light-c910.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. /*
  2. * Copyright (C) 2017-2020 Alibaba Group Holding Limited
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __CONFIG_H
  7. #define __CONFIG_H
  8. #include <linux/sizes.h>
  9. #define CONFIG_SYS_SPL_MALLOC_START 0xffe0110000
  10. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x000000a000
  11. #define CONFIG_SPL_STACK 0xffe011d000
  12. #define CONFIG_SPL_BSS_START_ADDR 0xffe011d000
  13. #define CONFIG_SPL_BSS_MAX_SIZE 0x0000002000
  14. #define CONFIG_SYS_MONITOR_LEN (898 * 1024) /* Assumed U-Boot size */
  15. #define CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION 1
  16. #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
  17. #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x178
  18. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + SZ_1M)
  19. #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_TEXT_BASE + SZ_1M)
  20. #define CONFIG_SYS_MALLOC_LEN SZ_1M
  21. #define CONFIG_SYS_BOOTM_LEN SZ_64M
  22. #define CONFIG_SYS_CACHELINE_SIZE 64
  23. #define SRAM_BASE_ADDR 0xffe0000000
  24. #define PLIC_BASE_ADDR 0xffd8000000
  25. #define PMP_BASE_ADDR 0xffdc020000
  26. /* Network Configuration */
  27. #define CONFIG_DW_ALTDESCRIPTOR
  28. #define CONFIG_RGMII 1
  29. #define CONFIG_PHY_MARVELL 1
  30. #define CONFIG_NET_RETRY_COUNT 20
  31. #define CONFIG_SYS_FLASH_BASE 0x0
  32. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  33. #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
  34. #define CONFIG_SYS_MMC_ENV_DEV 0
  35. #define CONFIG_SYS_SDRAM_BASE 0
  36. #define MEMTEST_MAX_SIZE 0x200000000 /* 8GB DDR */
  37. #define CONFIG_SYS_MEMTEST_START 0x00000000 // larger than Uboot end addr
  38. #define CONFIG_SYS_MEMTEST_END CONFIG_SYS_SDRAM_BASE + MEMTEST_MAX_SIZE
  39. #define CONFIG_SYS_MEMTEST_SCRATCH CONFIG_SYS_MEMTEST_END/2
  40. /* SEC Configuration */
  41. //#define LIGHT_ROOTFS_SEC_CHECK 1
  42. #define SBI_ENTRY_ADDR 0x100000
  43. #define AON_DDR_ADDR 0x80000
  44. #define AON_SRAM_ADDR 0xffffef8000
  45. /* USB fastboot non_sec configs */
  46. #define THEAD_LIGHT_FASTBOOT 1
  47. #define LIGHT_FW_ADDR 0x0
  48. #define LIGHT_KERNEL_ADDR 0x200000
  49. #define LIGHT_DTB_ADDR 0x1f00000
  50. #define LIGHT_ROOTFS_ADDR 0x2000000
  51. #define LIGHT_AON_FW_ADDR 0xffffef8000
  52. #define LIGHT_TEE_FW_ADDR 0x1c000000
  53. #define LIGHT_TF_FW_ADDR LIGHT_FW_ADDR
  54. #define LIGHT_TF_FW_TMP_ADDR 0x100000
  55. #define LIGHT_KERNEL_ADDR_CMD "0x200000"
  56. #define LIGHT_DTB_ADDR_CMD "0x1f00000"
  57. /* trust image name string */
  58. #define TF_IMG_UPD_NAME "stashtf"
  59. #define TEE_IMG_UPD_NAME "stashtee"
  60. #define UBOOT_IMG_UPD_NAME "stashuboot"
  61. #define TF_PART_NAME "tf"
  62. #define TEE_PART_NAME "tee"
  63. #define UBOOT_PART_NAME "uboot"
  64. #define STASH_PART_NAME "stash"
  65. #define KERNEL_PART_NAME "kernel"
  66. #define UBOOT_STAGE_ADDR SRAM_BASE_ADDR
  67. /* Video configs */
  68. #define CONFIG_VIDEO_LOGO
  69. #define CONFIG_VIDEO_BMP_LOGO
  70. #define CONFIG_SPLASH_SCREEN
  71. #define CONFIG_SPLASH_SCREEN_ALIGN
  72. #define CONFIG_BMP_32BPP
  73. /* security upgrade flag */
  74. #define TF_SEC_UPGRADE_FLAG 0x5555aaaa
  75. #define TEE_SEC_UPGRADE_FLAG 0x5a5aa5a5
  76. #define UBOOT_SEC_UPGRADE_FLAG 0xa5a5aa55
  77. #define UBOOT_MAX_VER 64
  78. #define CONFIG_SYS_CBSIZE 512
  79. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  80. sizeof(CONFIG_SYS_PROMPT) + 16)
  81. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot args buffer */
  82. #define CONFIG_SYS_MAXARGS 64 /* max number of command args */
  83. /* List of different env in debug/release version */
  84. #if defined (U_BUILD_DEBUG)
  85. #define ENV_KERNEL_LOGLEVEL "kernel_loglevel=7\0"
  86. #define ENV_STR_BOOT_DELAY
  87. #else
  88. #define ENV_KERNEL_LOGLEVEL "kernel_loglevel=4\0"
  89. #define ENV_STR_BOOT_DELAY "bootdelay=0\0"
  90. #endif
  91. #if defined (CONFIG_LIGHT_SEC_BOOT_WITH_VERIFY_VAL_A)
  92. #define CONFIG_EXTRA_ENV_SETTINGS \
  93. "fdt_high=0xffffffffffffffff\0" \
  94. "tf_addr=0x100000\0" \
  95. "dtb_addr=0x01f00000\0" \
  96. "kernel_addr=0x00200000\0" \
  97. "aon_ram_addr=0xffffef8000\0" \
  98. "audio_ram_addr=0xffc0000000\0" \
  99. "fwaddr=0x10000000\0"\
  100. "tee_addr=0x1c000000\0" \
  101. "sec_upgrade_mode=0\0"\
  102. "mmcdev=0\0" \
  103. "mmcpart=6\0" \
  104. "kdump_buf=1M\0" \
  105. "uboot_version=0x0000000000000000\0"\
  106. "fdt_file=light-a-val-sec.dtb\0" \
  107. "uuid_rootfs=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  108. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=tf,size=50MiB,type=boot;name=tee,size=50MiB,type=boot;name=stash,size=50MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfs};name=data,size=-,type=linux\0" \
  109. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  110. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  111. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrwreset=${factory_reset} crashkernel=${kdump_buf}\0" \
  112. "load_aon=ext4load mmc 0:2 $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  113. "load_c906_audio=ext4load mmc 0:2 $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  114. "bootcmd_load=run load_aon;run load_c906_audio; ext4load mmc 0:3 $tf_addr trust_firmware.bin; ext4load mmc 0:4 $tee_addr tee.bin;ext4load mmc 0:2 $dtb_addr ${fdt_file}; ext4load mmc 0:2 $kernel_addr Image\0" \
  115. "bootcmd=run bootcmd_load; bootslave; run finduuid; run set_bootargs; secboot; booti $kernel_addr - $dtb_addr;\0" \
  116. "factory_reset=yes\0"\
  117. "\0"
  118. #elif defined (CONFIG_LIGHT_SEC_BOOT_WITH_VERIFY_VAL_B)
  119. #define CONFIG_EXTRA_ENV_SETTINGS \
  120. "fdt_high=0xffffffffffffffff\0" \
  121. "tf_addr=0x100000\0" \
  122. "dtb_addr=0x01f00000\0" \
  123. "kernel_addr=0x00200000\0" \
  124. "aon_ram_addr=0xffffef8000\0" \
  125. "audio_ram_addr=0xffc0000000\0" \
  126. "fwaddr=0x10000000\0"\
  127. "tee_addr=0x1c000000\0" \
  128. "sec_upgrade_mode=0\0"\
  129. "mmcdev=0\0" \
  130. "mmcpart=6\0" \
  131. "kdump_buf=1M\0" \
  132. "uboot_version=0x0000000000000000\0"\
  133. "fdt_file=light-b-product-sec.dtb\0" \
  134. "uuid_rootfs=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  135. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=tf,size=50MiB,type=boot;name=tee,size=50MiB,type=boot;name=stash,size=50MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfs};name=data,size=-,type=linux\0" \
  136. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  137. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  138. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrwreset=${factory_reset} crashkernel=${kdump_buf}\0" \
  139. "load_aon=ext4load mmc 0:2 $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  140. "load_c906_audio=ext4load mmc 0:2 $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  141. "bootcmd_load=run load_aon;run load_c906_audio; ext4load mmc 0:3 $tf_addr trust_firmware.bin; ext4load mmc 0:4 $tee_addr tee.bin;ext4load mmc 0:2 $dtb_addr ${fdt_file}; ext4load mmc 0:2 $kernel_addr Image\0" \
  142. "bootcmd=run bootcmd_load; bootslave; run finduuid; run set_bootargs; secboot; booti $kernel_addr - $dtb_addr;\0" \
  143. "factory_reset=yes\0"\
  144. "\0"
  145. #elif defined (CONFIG_LIGHT_SEC_BOOT_WITH_VERIFY_ANT_REF)
  146. #define CONFIG_EXTRA_ENV_SETTINGS \
  147. "fdt_high=0xffffffffffffffff\0" \
  148. "tf_addr=0x100000\0" \
  149. "dtb_addr=0x01f00000\0" \
  150. "kernel_addr=0x00200000\0" \
  151. "aon_ram_addr=0xffffef8000\0" \
  152. "audio_ram_addr=0xffc0000000\0" \
  153. "fwaddr=0x10000000\0"\
  154. "tee_addr=0x1c000000\0" \
  155. "sec_upgrade_mode=0\0"\
  156. "mmcdev=0\0" \
  157. "mmcpart=6\0" \
  158. "kdump_buf=1M\0" \
  159. "uboot_version=0x0000000000000000\0"\
  160. "fdt_file=light-ant-ref-sec.dtb\0" \
  161. "uuid_rootfs=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  162. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=tf,size=50MiB,type=boot;name=tee,size=50MiB,type=boot;name=stash,size=50MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfs};name=data,size=-,type=linux\0" \
  163. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  164. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  165. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrwreset=${factory_reset} crashkernel=${kdump_buf}\0" \
  166. "load_aon=ext4load mmc 0:2 $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  167. "load_c906_audio=ext4load mmc 0:2 $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  168. "bootcmd_load=run load_aon;run load_c906_audio; ext4load mmc 0:3 $tf_addr trust_firmware.bin; ext4load mmc 0:4 $tee_addr tee.bin;ext4load mmc 0:2 $dtb_addr ${fdt_file}; ext4load mmc 0:2 $kernel_addr Image\0" \
  169. "bootcmd=run bootcmd_load; bootslave; run finduuid; run set_bootargs; secboot; booti $kernel_addr - $dtb_addr;\0" \
  170. "factory_reset=yes\0"\
  171. "\0"
  172. #else
  173. #if defined (CONFIG_TARGET_LIGHT_FM_C910_VAL_A)
  174. #define CONFIG_EXTRA_ENV_SETTINGS \
  175. "splashimage=0x30000000\0" \
  176. "splashpos=m,m\0" \
  177. "fdt_high=0xffffffffffffffff\0" \
  178. "opensbi_addr=0x0\0" \
  179. "dtb_addr=0x01f00000\0" \
  180. "kernel_addr=0x00200000\0" \
  181. "aon_ram_addr=0xffffef8000\0" \
  182. "audio_ram_addr=0xffc0000000\0" \
  183. "fwaddr=0x10000000\0"\
  184. "mmcdev=0\0" \
  185. "mmcpart=3\0" \
  186. "kdump_buf=1M\0" \
  187. "fdt_file=light-a-product.dtb\0" \
  188. "uuid_rootfs=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  189. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfs};name=data,size=-,type=linux\0" \
  190. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  191. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  192. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrwreset=${factory_reset} crashkernel=${kdump_buf}\0" \
  193. "load_aon=ext4load mmc 0:2 $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  194. "load_c906_audio=ext4load mmc 0:2 $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  195. "bootcmd_load=run load_aon;run load_c906_audio; ext4load mmc 0:2 $opensbi_addr fw_dynamic.bin; ext4load mmc 0:2 $dtb_addr ${fdt_file}; ext4load mmc 0:2 $kernel_addr Image\0" \
  196. "bootcmd=run bootcmd_load; bootslave; run finduuid; run set_bootargs; booti $kernel_addr - $dtb_addr;\0" \
  197. "factory_reset=yes\0"\
  198. "\0"
  199. #elif defined (CONFIG_TARGET_LIGHT_FM_C910_VAL_B)
  200. #define CONFIG_EXTRA_ENV_SETTINGS \
  201. "splashimage=0x30000000\0" \
  202. "splashpos=m,m\0" \
  203. "fdt_high=0xffffffffffffffff\0" \
  204. "opensbi_addr=0x0\0" \
  205. "dtb_addr=0x01f00000\0" \
  206. "kernel_addr=0x00200000\0" \
  207. "aon_ram_addr=0xffffef8000\0" \
  208. "audio_ram_addr=0xffc0000000\0" \
  209. "fwaddr=0x10000000\0"\
  210. "mmcdev=0\0" \
  211. "boot_partition=bootA\0" \
  212. "root_partition=rootfsA\0" \
  213. ENV_KERNEL_LOGLEVEL \
  214. "kdump_buf=1M\0" \
  215. ENV_STR_BOOT_DELAY \
  216. "findpart=rollback; if test ${boot_partition} = bootB; then mmcbootpart=4; else mmcbootpart=2; fi; if test ${root_partition} = rootfsB; then mmcpart=5; else mmcpart=3; fi;\0" \
  217. "fdt_file=light-b-product.dtb\0" \
  218. "uuid_rootfsA=80a5a8e9-c744-491a-93c1-4f4194fd690a\0" \
  219. "uuid_rootfsB=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  220. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfsA};name=bootB,size=200MiB,type=boot;name=rootB,size=4000MiB,type=linux,uuid=${uuid_rootfsB};name=data,size=-,type=linux\0" \
  221. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  222. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  223. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=${kernel_loglevel} eth=$ethaddr rootrw=PARTLABEL=data init=/init rootinit=/sbin/init rootrwoptions=rw,noatime rootrwreset=${factory_reset} crashkernel=${kdump_buf}\0" \
  224. "load_aon=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  225. "load_c906_audio=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  226. "bootcmd_load=run findpart;run load_aon;run load_c906_audio; ext4load mmc ${mmcdev}:${mmcbootpart} $opensbi_addr fw_dynamic.bin; ext4load mmc ${mmcdev}:${mmcbootpart} $dtb_addr ${fdt_file};ext4load mmc ${mmcdev}:${mmcbootpart} $kernel_addr Image;\0" \
  227. "bootcmd=run bootcmd_load; bootslave ; run finduuid; run set_bootargs; booti $kernel_addr - $dtb_addr;\0" \
  228. "factory_reset=yes\0"\
  229. "\0"
  230. #elif defined (CONFIG_TARGET_LIGHT_FM_C910_B_REF)
  231. #define CONFIG_EXTRA_ENV_SETTINGS \
  232. "splashimage=0x30000000\0" \
  233. "splashpos=m,m\0" \
  234. "fdt_high=0xffffffffffffffff\0" \
  235. "opensbi_addr=0x0\0" \
  236. "dtb_addr=0x01f00000\0" \
  237. "kernel_addr=0x00200000\0" \
  238. "aon_ram_addr=0xffffef8000\0" \
  239. "audio_ram_addr=0xffc0000000\0" \
  240. "fwaddr=0x10000000\0"\
  241. "mmcdev=0\0" \
  242. "boot_partition=bootA\0" \
  243. "root_partition=rootfsA\0" \
  244. "findpart=if test ${boot_partition} = bootB; then mmcbootpart=4; else mmcbootpart=2; fi; if test ${root_partition} = rootfsB; then mmcpart=5; else mmcpart=3; fi;\0" \
  245. "fdt_file=light-b-ref.dtb\0" \
  246. "uuid_rootfsA=80a5a8e9-c744-491a-93c1-4f4194fd690a\0" \
  247. "uuid_rootfsB=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  248. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfsA};name=bootB,size=200MiB,type=boot;name=rootB,size=4000MiB,type=linux,uuid=${uuid_rootfsB};name=data,size=-,type=linux\0" \
  249. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  250. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  251. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrw=PARTLABEL=data init=/init rootinit=/sbin/init rootrwoptions=rw,noatime\0" \
  252. "load_aon=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  253. "load_c906_audio=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  254. "bootcmd_load=run findpart;run load_aon;run load_c906_audio; ext4load mmc ${mmcdev}:${mmcbootpart} $opensbi_addr fw_dynamic.bin; ext4load mmc ${mmcdev}:${mmcbootpart} $dtb_addr ${fdt_file};ext4load mmc ${mmcdev}:${mmcbootpart} $kernel_addr Image;\0" \
  255. "bootcmd=run bootcmd_load; bootslave ; run finduuid; run set_bootargs; booti $kernel_addr - $dtb_addr;\0" \
  256. "\0"
  257. #elif defined (CONFIG_TARGET_LIGHT_FM_C910_B_POWER)
  258. #define CONFIG_EXTRA_ENV_SETTINGS \
  259. "splashimage=0x30000000\0" \
  260. "splashpos=m,m\0" \
  261. "fdt_high=0xffffffffffffffff\0" \
  262. "opensbi_addr=0x0\0" \
  263. "dtb_addr=0x01f00000\0" \
  264. "kernel_addr=0x00200000\0" \
  265. "aon_ram_addr=0xffffef8000\0" \
  266. "audio_ram_addr=0xffc0000000\0" \
  267. "fwaddr=0x10000000\0"\
  268. "mmcdev=0\0" \
  269. "boot_partition=bootA\0" \
  270. "root_partition=rootfsA\0" \
  271. "kdump_buf=1M\0" \
  272. "findpart=rollback; if test ${boot_partition} = bootB; then mmcbootpart=4; else mmcbootpart=2; fi; if test ${root_partition} = rootfsB; then mmcpart=5; else mmcpart=3; fi;\0" \
  273. "fdt_file=light-b-power.dtb\0" \
  274. "uuid_rootfsA=80a5a8e9-c744-491a-93c1-4f4194fd690a\0" \
  275. "uuid_rootfsB=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  276. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfsA};name=bootB,size=200MiB,type=boot;name=rootB,size=4000MiB,type=linux,uuid=${uuid_rootfsB};name=data,size=-,type=linux\0" \
  277. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  278. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  279. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrw=PARTLABEL=data init=/init rootinit=/sbin/init rootrwoptions=rw,noatime rootrwreset=${factory_reset} crashkernel=${kdump_buf}\0" \
  280. "load_aon=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  281. "load_c906_audio=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  282. "bootcmd_load=run findpart;run load_aon;run load_c906_audio; ext4load mmc ${mmcdev}:${mmcbootpart} $opensbi_addr fw_dynamic.bin; ext4load mmc ${mmcdev}:${mmcbootpart} $dtb_addr ${fdt_file}; ext4load mmc ${mmcdev}:${mmcbootpart} $kernel_addr Image\0" \
  283. "bootcmd=run bootcmd_load; bootslave; run finduuid; run set_bootargs; booti $kernel_addr - $dtb_addr;\0" \
  284. "factory_reset=yes\0"\
  285. "\0"
  286. #elif defined (CONFIG_TARGET_LIGHT_FM_C910_VAL_ANT_REF)
  287. #define CONFIG_EXTRA_ENV_SETTINGS \
  288. "splashimage=0x30000000\0" \
  289. "splashpos=m,m\0" \
  290. "fdt_high=0xffffffffffffffff\0" \
  291. "opensbi_addr=0x0\0" \
  292. "dtb_addr=0x01f00000\0" \
  293. "kernel_addr=0x00200000\0" \
  294. "aon_ram_addr=0xffffef8000\0" \
  295. "audio_ram_addr=0xffc0000000\0" \
  296. "fwaddr=0x10000000\0"\
  297. "mmcdev=0\0" \
  298. "boot_partition=bootA\0" \
  299. "root_partition=rootfsA\0" \
  300. "kdump_buf=1M\0" \
  301. "findpart=rollback; if test ${boot_partition} = bootB; then mmcbootpart=4; else mmcbootpart=2; fi; if test ${root_partition} = rootfsB; then mmcpart=5; else mmcpart=3; fi;\0" \
  302. "fdt_file=light-ant-ref.dtb\0" \
  303. "uuid_rootfsA=80a5a8e9-c744-491a-93c1-4f4194fd690a\0" \
  304. "uuid_rootfsB=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  305. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfsA};name=bootB,size=200MiB,type=boot;name=rootB,size=4000MiB,type=linux,uuid=${uuid_rootfsB};name=data,size=-,type=linux\0" \
  306. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  307. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  308. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrw=PARTLABEL=data init=/init rootinit=/sbin/init rootrwoptions=rw,noatime rootrwreset=${factory_reset} crashkernel=${kdump_buf}\0" \
  309. "load_aon=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  310. "load_c906_audio=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  311. "bootcmd_load=run findpart;run load_aon;run load_c906_audio; ext4load mmc ${mmcdev}:${mmcbootpart} $opensbi_addr fw_dynamic.bin; ext4load mmc ${mmcdev}:${mmcbootpart} $dtb_addr ${fdt_file}; ext4load mmc ${mmcdev}:${mmcbootpart} $kernel_addr Image\0" \
  312. "bootcmd=run bootcmd_load; bootslave; run finduuid; run set_bootargs; booti $kernel_addr - $dtb_addr;\0" \
  313. "factory_reset=yes\0"\
  314. "\0"
  315. #elif defined (CONFIG_TARGET_LIGHT_FM_C910_VAL_ANT_DISCRETE)
  316. #define CONFIG_EXTRA_ENV_SETTINGS \
  317. "splashimage=0x30000000\0" \
  318. "splashpos=m,m\0" \
  319. "fdt_high=0xffffffffffffffff\0" \
  320. "opensbi_addr=0x0\0" \
  321. "dtb_addr=0x01f00000\0" \
  322. "kernel_addr=0x00200000\0" \
  323. "aon_ram_addr=0xffffef8000\0" \
  324. "audio_ram_addr=0xffc0000000\0" \
  325. "fwaddr=0x10000000\0"\
  326. "mmcdev=0\0" \
  327. "boot_partition=bootA\0" \
  328. "root_partition=rootfsA\0" \
  329. "kdump_buf=1M\0" \
  330. "findpart=rollback; if test ${boot_partition} = bootB; then mmcbootpart=4; else mmcbootpart=2; fi; if test ${root_partition} = rootfsB; then mmcpart=5; else mmcpart=3; fi;\0" \
  331. "fdt_file=light-ant-discrete.dtb\0" \
  332. "uuid_rootfsA=80a5a8e9-c744-491a-93c1-4f4194fd690a\0" \
  333. "uuid_rootfsB=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  334. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfsA};name=bootB,size=200MiB,type=boot;name=rootB,size=4000MiB,type=linux,uuid=${uuid_rootfsB};name=data,size=-,type=linux\0" \
  335. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  336. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  337. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrw=PARTLABEL=data init=/init rootinit=/sbin/init rootrwoptions=rw,noatime rootrwreset=${factory_reset} crashkernel=${kdump_buf}\0" \
  338. "load_aon=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  339. "load_c906_audio=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  340. "bootcmd_load=run findpart;run load_aon;run load_c906_audio; ext4load mmc ${mmcdev}:${mmcbootpart} $opensbi_addr fw_dynamic.bin; ext4load mmc ${mmcdev}:${mmcbootpart} $dtb_addr ${fdt_file}; ext4load mmc ${mmcdev}:${mmcbootpart} $kernel_addr Image\0" \
  341. "bootcmd=run bootcmd_load; bootslave; run finduuid; run set_bootargs; booti $kernel_addr - $dtb_addr;\0" \
  342. "factory_reset=yes\0"\
  343. "\0"
  344. #elif defined (CONFIG_TARGET_LIGHT_FM_C910_BEAGLE)
  345. #define CONFIG_EXTRA_ENV_SETTINGS \
  346. "splashimage=0x30000000\0" \
  347. "splashpos=m,m\0" \
  348. "fdt_high=0xffffffffffffffff\0" \
  349. "opensbi_addr=0x0\0" \
  350. "dtb_addr=0x01f00000\0" \
  351. "kernel_addr=0x00200000\0" \
  352. "aon_ram_addr=0xffffef8000\0" \
  353. "audio_ram_addr=0xffc0000000\0" \
  354. "fwaddr=0x10000000\0"\
  355. "mmcdev=0\0" \
  356. "boot_partition=bootA\0" \
  357. "root_partition=rootfsA\0" \
  358. "kdump_buf=500M\0" \
  359. "findpart=rollback; if test ${boot_partition} = bootB; then mmcbootpart=4; else mmcbootpart=2; fi; if test ${root_partition} = rootfsB; then mmcpart=5; else mmcpart=3; fi;\0" \
  360. "fdt_file=light-beagle.dtb\0" \
  361. "uuid_rootfsA=80a5a8e9-c744-491a-93c1-4f4194fd690a\0" \
  362. "uuid_rootfsB=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  363. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfsA};name=bootB,size=200MiB,type=boot;name=rootB,size=4000MiB,type=linux,uuid=${uuid_rootfsB};name=data,size=-,type=linux\0" \
  364. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  365. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  366. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrw=PARTLABEL=data init=/init rootinit=/sbin/init rootrwoptions=rw,noatime rootrwreset=${factory_reset} crashkernel=${kdump_buf}\0" \
  367. "load_aon=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  368. "load_c906_audio=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  369. "bootcmd_load=run findpart;run load_aon;run load_c906_audio; ext4load mmc ${mmcdev}:${mmcbootpart} $opensbi_addr fw_dynamic.bin; ext4load mmc ${mmcdev}:${mmcbootpart} $dtb_addr ${fdt_file}; ext4load mmc ${mmcdev}:${mmcbootpart} $kernel_addr Image\0" \
  370. "bootcmd=run bootcmd_load; bootslave; run finduuid; run set_bootargs; booti $kernel_addr - $dtb_addr;\0" \
  371. "factory_reset=yes\0"\
  372. "\0"
  373. #elif defined (CONFIG_TARGET_LIGHT_FM_C910_A_REF)
  374. #define CONFIG_EXTRA_ENV_SETTINGS \
  375. "splashimage=0x30000000\0" \
  376. "splashpos=m,m\0" \
  377. "fdt_high=0xffffffffffffffff\0" \
  378. "opensbi_addr=0x0\0" \
  379. "dtb_addr=0x01f00000\0" \
  380. "kernel_addr=0x00200000\0" \
  381. "aon_ram_addr=0xffffef8000\0" \
  382. "audio_ram_addr=0xffc0000000\0" \
  383. "fwaddr=0x10000000\0"\
  384. "mmcdev=0\0" \
  385. "boot_partition=bootA\0" \
  386. "root_partition=rootfsA\0" \
  387. "findpart=if test ${boot_partition} = bootB; then mmcbootpart=4; else mmcbootpart=2; fi; if test ${root_partition} = rootfsB; then mmcpart=5; else mmcpart=3; fi;\0" \
  388. "fdt_file=light-a-ref.dtb\0" \
  389. "uuid_rootfsA=80a5a8e9-c744-491a-93c1-4f4194fd690a\0" \
  390. "uuid_rootfsB=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  391. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfsA};name=bootB,size=200MiB,type=boot;name=rootB,size=4000MiB,type=linux,uuid=${uuid_rootfsB};name=data,size=-,type=linux\0" \
  392. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  393. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  394. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrw=PARTLABEL=data init=/init rootinit=/sbin/init rootrwoptions=rw,noatime\0" \
  395. "load_aon=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  396. "load_c906_audio=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  397. "bootcmd_load=run findpart;run load_aon;run load_c906_audio; ext4load mmc ${mmcdev}:${mmcbootpart} $opensbi_addr fw_dynamic.bin; ext4load mmc ${mmcdev}:${mmcbootpart} $dtb_addr ${fdt_file}; ext4load mmc ${mmcdev}:${mmcbootpart} $kernel_addr Image\0" \
  398. "bootcmd=run bootcmd_load; bootslave; run finduuid; run set_bootargs; booti $kernel_addr - $dtb_addr;\0" \
  399. "\0"
  400. #else
  401. #define CONFIG_EXTRA_ENV_SETTINGS \
  402. "splashimage=0x30000000\0" \
  403. "splashpos=m,m\0" \
  404. "fdt_high=0xffffffffffffffff\0" \
  405. "opensbi_addr=0x0\0" \
  406. "dtb_addr=0x01f00000\0" \
  407. "kernel_addr=0x00200000\0" \
  408. "aon_ram_addr=0xffffef8000\0" \
  409. "audio_ram_addr=0xffc0000000\0" \
  410. "fwaddr=0x10000000\0"\
  411. "mmcdev=0\0" \
  412. "boot_partition=bootA\0" \
  413. "root_partition=rootfsA\0" \
  414. "kdump_buf=500M\0" \
  415. "findpart=rollback; if test ${boot_partition} = bootB; then mmcbootpart=4; else mmcbootpart=2; fi; if test ${root_partition} = rootfsB; then mmcpart=5; else mmcpart=3; fi;\0" \
  416. "fdt_file=light-a-val.dtb\0" \
  417. "uuid_rootfsA=80a5a8e9-c744-491a-93c1-4f4194fd690a\0" \
  418. "uuid_rootfsB=80a5a8e9-c744-491a-93c1-4f4194fd690b\0" \
  419. "partitions=name=table,size=2031KB;name=boot,size=200MiB,type=boot;name=root,size=4000MiB,type=linux,uuid=${uuid_rootfsA};name=bootB,size=200MiB,type=boot;name=rootB,size=4000MiB,type=linux,uuid=${uuid_rootfsB};name=data,size=-,type=linux\0" \
  420. "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
  421. "gpt_partition=gpt write mmc ${mmcdev} $partitions\0" \
  422. "set_bootargs=setenv bootargs console=ttyS0,115200 root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrw=PARTLABEL=data init=/init rootinit=/sbin/init rootrwoptions=rw,noatime rootrwreset=${factory_reset} crashkernel=${kdump_buf}\0" \
  423. "load_aon=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_aon_fpga.bin;cp.b $fwaddr $aon_ram_addr $filesize\0"\
  424. "load_c906_audio=ext4load mmc ${mmcdev}:${mmcbootpart} $fwaddr light_c906_audio.bin;cp.b $fwaddr $audio_ram_addr $filesize\0"\
  425. "bootcmd_load=run findpart;run load_aon;run load_c906_audio; ext4load mmc ${mmcdev}:${mmcbootpart} $opensbi_addr fw_dynamic.bin; ext4load mmc ${mmcdev}:${mmcbootpart} $dtb_addr ${fdt_file}; ext4load mmc ${mmcdev}:${mmcbootpart} $kernel_addr Image\0" \
  426. "bootcmd=run bootcmd_load; bootslave; run finduuid; run set_bootargs; booti $kernel_addr - $dtb_addr;\0" \
  427. "factory_reset=yes\0"\
  428. "\0"
  429. #endif
  430. #endif
  431. #endif /* __CONFIG_H */