1 /* 2 * Copyright (c) 2017 Paweł Jarosz <paweljarosz3691@gmail.com> 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 #ifndef __CONFIG_H 8 #define __CONFIG_H 9 /* 10 * Using bootrom layout for rockchip-idb* and spl*. Size is nand erase size. 11 */ 12 #define MTDPARTS_DEFAULT \ 13 "mtdparts=rockchip-nand.0:" \ 14 "4M(idb)," \ 15 "4M(idb.backup)," \ 16 "4M(spl)," \ 17 "4M(spl.backup1)," \ 18 "4M(spl.backup2)," \ 19 "4M(spl.backup3)," \ 20 "4M(spl.backup4)," \ 21 "4M(u-boot)," \ 22 "4M(u-boot.backup)," \ 23 "4M(u-boot-env)," \ 24 "4M(u-boot-env.backup)," \ 25 "16M(kernel)," \ 26 "32M(initrd)," \ 27 "-(rootfs)" 28 29 #define DFU_ALT_INFO_NAND \ 30 "idb raw 0x0 0x400000;" \ 31 "idb.backup raw 0x400000 0x400000;" \ 32 "spl raw 0x800000 0x400000;" \ 33 "spl.backup1 raw 0xC00000 0x400000;" \ 34 "spl.backup2 raw 0x1000000 0x400000;" \ 35 "spl.backup3 raw 0x1400000 0x400000;" \ 36 "spl.backup4 raw 0x1800000 0x400000;" \ 37 "u-boot raw 0x1C00000 0x400000;" \ 38 "u-boot.backup raw 0x2000000 0x400000;" \ 39 "u-boot-env raw 0x2400000 0x400000;" \ 40 "u-boot-env.backup raw 0x2800000 0x400000;" \ 41 "kernel raw 0x2C00000 0x1000000;" \ 42 "initrd raw 0x3C00000 0x2000000" 43 44 #define DFU_ALT_INFO_RAM \ 45 "tpl.bin ram 0x10080C00 0x10000;" \ 46 "spl.bin ram 0x60000000 0x40000;" \ 47 "u-boot.bin ram 0x60408000 0x80000" 48 49 #define ROCKCHIP_DEVICE_SETTINGS \ 50 "mtdparts=" MTDPARTS_DEFAULT "\0" \ 51 "dfu_alt_info=" DFU_ALT_INFO_NAND "\0" \ 52 "dfu_alt_info_ram=" DFU_ALT_INFO_RAM "\0" 53 54 #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_4M 55 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x01c00000 56 #define CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND 0x02000000 57 58 #include <configs/rk3066_common.h> 59 60 #endif 61 62