Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2017 |
| 4 | * Lukasz Majewski, DENX Software Engineering, lukma@denx.de |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __CONFIG_H |
| 8 | #define __CONFIG_H |
| 9 | |
| 10 | #include "mx6_common.h" |
| 11 | |
| 12 | /* Falcon Mode */ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 13 | #define CONFIG_SYS_SPL_ARGS_ADDR 0x18000000 |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 14 | |
| 15 | /* Falcon Mode - MMC support */ |
| 16 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x3F00 |
| 17 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS \ |
| 18 | (CONFIG_CMD_SPL_WRITE_SIZE / 512) |
| 19 | #define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x100 /* 128KiB */ |
| 20 | |
| 21 | /* |
| 22 | * display5 SPI-NOR memory layout |
| 23 | * |
| 24 | * The definition can be found in Kconfig's |
| 25 | * CONFIG_MTDIDS_DEFAULT and CONFIG_MTDPARTS_DEFAULT |
| 26 | * |
| 27 | * 0x000000 - 0x020000 : SPI.SPL (128KiB) |
| 28 | * 0x020000 - 0x120000 : SPI.u-boot (1MiB) |
| 29 | * 0x120000 - 0x130000 : SPI.u-boot-env1 (64KiB) |
| 30 | * 0x130000 - 0x140000 : SPI.u-boot-env2 (64KiB) |
Lukasz Majewski | c04b41b | 2020-05-13 17:45:15 +0200 | [diff] [blame] | 31 | * 0x140000 - 0x740000 : SPI.swupdate-kernel-FIT (6MiB) |
| 32 | * 0x740000 - 0x1B40000 : SPI.swupdate-initramfs (20MiB) |
| 33 | * 0x1B40000 - 0x1F00000 : SPI.reserved (3840KiB) |
| 34 | * 0x1F00000 - 0x2000000 : SPI.factory (1MiB) |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 35 | */ |
| 36 | |
Lukasz Majewski | e95b4bd | 2019-09-03 16:38:43 +0200 | [diff] [blame] | 37 | /* SPI Flash Configs */ |
| 38 | #if defined(CONFIG_SPL_BUILD) |
| 39 | #undef CONFIG_DM_SPI |
| 40 | #undef CONFIG_DM_SPI_FLASH |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 41 | #endif |
| 42 | |
| 43 | /* Below values are "dummy" - only to avoid build break */ |
| 44 | #define CONFIG_SYS_SPI_KERNEL_OFFS 0x150000 |
| 45 | #define CONFIG_SYS_SPI_ARGS_OFFS 0x140000 |
| 46 | #define CONFIG_SYS_SPI_ARGS_SIZE 0x10000 |
| 47 | |
| 48 | #include "imx6_spl.h" |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 49 | |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 50 | #define CONFIG_MXC_UART_BASE UART5_BASE |
| 51 | |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 52 | /* I2C Configs */ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 53 | #define CONFIG_I2C_MULTI_BUS |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 54 | |
| 55 | /* MMC Configs */ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 56 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 57 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 58 | |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 59 | #ifndef CONFIG_BOOTCOMMAND |
Lukasz Majewski | 27aede2 | 2018-05-11 16:51:08 +0200 | [diff] [blame] | 60 | #define CONFIG_BOOTCOMMAND "if run check_em_pad; then " \ |
| 61 | "run recovery;" \ |
| 62 | "else if test ${BOOT_FROM} = FACTORY; then " \ |
Lukasz Majewski | 13e012f | 2018-05-11 16:50:59 +0200 | [diff] [blame] | 63 | "run factory_nfs;" \ |
| 64 | "else " \ |
| 65 | "run boot_mmc;" \ |
Lukasz Majewski | 27aede2 | 2018-05-11 16:51:08 +0200 | [diff] [blame] | 66 | "fi;fi" |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 67 | #endif |
| 68 | |
| 69 | #define PARTS_DEFAULT \ |
| 70 | /* Linux partitions */ \ |
| 71 | "partitions=" \ |
| 72 | "uuid_disk=${uuid_gpt_disk};" \ |
| 73 | "name=kernel_raw1,start=128K,size=8M,uuid=${uuid_gpt_kernel_raw1};" \ |
| 74 | "name=rootfs1,size=1528M,uuid=${uuid_gpt_rootfs1};" \ |
| 75 | "name=kernel_raw2,size=8M,uuid=${uuid_gpt_kernel_raw2};" \ |
Lukasz Majewski | 9fea1ca | 2018-05-11 16:51:16 +0200 | [diff] [blame] | 76 | "name=rootfs2,size=512M,uuid=${uuid_gpt_rootfs2};" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 77 | "name=data,size=-,uuid=${uuid_gpt_data}\0" |
| 78 | |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 79 | #define SWUPDATE_RECOVERY_PROCEDURE \ |
| 80 | "echo '#######################';" \ |
| 81 | "echo '# RECOVERY SWUupdate #';" \ |
| 82 | "echo '#######################';" \ |
Lukasz Majewski | 0f05512 | 2018-05-11 16:51:18 +0200 | [diff] [blame] | 83 | "echo '#######################';" \ |
| 84 | "echo '# GPT verify #';" \ |
| 85 | "if gpt verify mmc ${mmcdev} ${partitions}; then " \ |
| 86 | "echo '# OK ! #';" \ |
| 87 | "else " \ |
| 88 | "echo '# FAILED ! #';" \ |
| 89 | "echo '# GPT RESTORATION #';" \ |
| 90 | "gpt write mmc ${mmcdev} ${partitions};" \ |
| 91 | "fi;" \ |
| 92 | "echo '#######################';" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 93 | "setenv loadaddr_swu_initramfs 0x14000000;" \ |
| 94 | "setenv bootargs console=${console} " \ |
| 95 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
| 96 | ":${hostname}::off root=/dev/ram rw;" \ |
| 97 | "sf probe;" \ |
| 98 | "sf read ${loadaddr} swu-kernel;" \ |
| 99 | "sf read ${loadaddr_swu_initramfs} swu-initramfs;" \ |
Lukasz Majewski | 1bcbf48 | 2018-05-11 16:51:04 +0200 | [diff] [blame] | 100 | "bootm ${loadaddr} ${loadaddr_swu_initramfs};reset;" |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 101 | |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 102 | #define SETUP_BOOTARGS \ |
| 103 | "run set_rootfs_part;" \ |
| 104 | "setenv bootargs ${bootargs} console=${console} " \ |
| 105 | "root=/dev/mmcblk${mmcdev}p${rootfs_part} " \ |
| 106 | "rootwait rootfstype=ext4 rw; " \ |
| 107 | "run set_kernel_part;" \ |
| 108 | "part start mmc ${mmcdev} ${kernel_part} lba_start; " \ |
Lukasz Majewski | f008e26 | 2018-08-18 22:22:07 +0200 | [diff] [blame] | 109 | "mmc read ${loadaddr} ${lba_start} ${fitImg_fw_sz}; " \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 110 | "setenv fdt_conf imx6q-${board}-${display}.dtb; " |
| 111 | |
| 112 | /* All the numbers are in LBAs */ |
| 113 | #define __TFTP_UPDATE_KERNEL \ |
| 114 | "tftp_mmc_fitImg=" \ |
| 115 | "if test ! -n ${kernel_part}; then " \ |
| 116 | "setenv kernel_part ${kernel_part_active};" \ |
| 117 | "fi;" \ |
| 118 | "if tftp ${loadaddr} ${kernel_file}; then " \ |
| 119 | "setexpr fw_sz ${filesize} / 0x200; " \ |
| 120 | "setexpr fw_sz ${fw_sz} + 1; " \ |
| 121 | "part start mmc ${mmcdev} ${kernel_part} lba_start; " \ |
| 122 | "mmc write ${loadaddr} ${lba_start} ${fw_sz}; " \ |
| 123 | "; fi\0" \ |
| 124 | |
| 125 | #define TFTP_UPDATE_KERNEL \ |
| 126 | "setenv kernel_part ${kernel_part_active};" \ |
| 127 | "run tftp_mmc_fitImg;" \ |
| 128 | "setenv kernel_part ${kernel_part_backup};" \ |
| 129 | "run tftp_mmc_fitImg;" \ |
| 130 | |
| 131 | #define __TFTP_UPDATE_ROOTFS \ |
| 132 | "tftp_mmc_rootfs=" \ |
| 133 | "if test ! -n ${rootfs_part}; then " \ |
| 134 | "setenv rootfs_part ${rootfs_part_active};" \ |
| 135 | "fi;" \ |
| 136 | "if tftp ${loadaddr} ${rootfs_file}; then " \ |
| 137 | "setexpr fw_sz ${filesize} / 0x200; " \ |
| 138 | "setexpr fw_sz ${fw_sz} + 1; " \ |
| 139 | "part start mmc ${mmcdev} ${rootfs_part} lba_start; " \ |
| 140 | "mmc write ${loadaddr} ${lba_start} ${fw_sz}; " \ |
| 141 | "; fi\0" \ |
| 142 | |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 143 | #define TFTP_UPDATE_ROOTFS \ |
| 144 | "setenv rootfs_part ${rootfs_part_active};" \ |
| 145 | "run tftp_mmc_rootfs;" \ |
Lukasz Majewski | 18ccca5 | 2018-05-11 16:51:11 +0200 | [diff] [blame] | 146 | "run tftp_mmc_rootfs_bkp;" \ |
| 147 | |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 148 | |
| 149 | #define TFTP_UPDATE_RECOVERY_SWU_KERNEL \ |
| 150 | "tftp_sf_fitImg_SWU=" \ |
| 151 | "if tftp ${loadaddr} ${kernel_file}; then " \ |
| 152 | "sf probe;" \ |
| 153 | "sf erase swu-kernel +${filesize};" \ |
| 154 | "sf write ${loadaddr} swu-kernel ${filesize};" \ |
| 155 | "; fi\0" \ |
| 156 | |
| 157 | #define TFTP_UPDATE_RECOVERY_SWU_INITRAMFS \ |
Lukasz Majewski | b5f4543 | 2018-05-11 16:51:12 +0200 | [diff] [blame] | 158 | "swu_initramfs_file=swupdate-image-display5.ext4.gz.u-boot\0" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 159 | "tftp_sf_initramfs_SWU=" \ |
| 160 | "if tftp ${loadaddr} ${swu_initramfs_file}; then " \ |
| 161 | "sf probe;" \ |
| 162 | "sf erase swu-initramfs +${filesize};" \ |
| 163 | "sf write ${loadaddr} swu-initramfs ${filesize};" \ |
| 164 | "; fi\0" \ |
| 165 | |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 166 | #define TFTP_UPDATE_BOOTLOADER \ |
| 167 | "ubootfile=u-boot.img\0" \ |
| 168 | "ubootfileSPL=SPL\0" \ |
| 169 | "tftp_sf_uboot=" \ |
| 170 | "if tftp ${loadaddr} ${ubootfile}; then " \ |
| 171 | "sf probe;" \ |
| 172 | "sf erase u-boot +${filesize};" \ |
| 173 | "sf write ${loadaddr} u-boot ${filesize}" \ |
| 174 | "; fi\0" \ |
| 175 | "tftp_sf_SPL=" \ |
| 176 | "if tftp ${loadaddr} ${ubootfileSPL}; then " \ |
| 177 | "sf probe;" \ |
| 178 | "setexpr uboot_SPL_size ${filesize} + 0x400;" \ |
| 179 | "sf erase 0x0 +${uboot_SPL_size};" \ |
| 180 | "sf write ${loadaddr} 0x400 ${filesize};" \ |
| 181 | "fi\0" \ |
| 182 | |
Lukasz Majewski | 2f4372a | 2018-05-11 16:51:02 +0200 | [diff] [blame] | 183 | #define TFTP_UPDATE_SPINOR \ |
| 184 | "spinorfile=core-image-lwn-display5.spinor\0" \ |
| 185 | "spinorsize=0x2000000\0" \ |
| 186 | "tftp_sf_img=" \ |
| 187 | "if tftp ${loadaddr} ${spinorfile}; then " \ |
| 188 | "sf probe;" \ |
| 189 | "sf erase 0x0 ${spinorsize};" \ |
| 190 | "sf write ${loadaddr} 0x0 ${filesize};" \ |
| 191 | "fi\0" \ |
| 192 | |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 193 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 194 | PARTS_DEFAULT \ |
Lukasz Majewski | 27aede2 | 2018-05-11 16:51:08 +0200 | [diff] [blame] | 195 | "gpio_recovery=93\0" \ |
| 196 | "check_em_pad=gpio input ${gpio_recovery};test $? -eq 0;\0" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 197 | "display=tianma-tm070-800x480\0" \ |
| 198 | "board=display5\0" \ |
| 199 | "mmcdev=0\0" \ |
| 200 | "altbootcmd=run recovery\0" \ |
| 201 | "bootdelay=1\0" \ |
| 202 | "baudrate=115200\0" \ |
| 203 | "bootcmd=" CONFIG_BOOTCOMMAND "\0" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 204 | "ethact=FEC\0" \ |
| 205 | "netdev=eth0\0" \ |
| 206 | "boot_os=y\0" \ |
| 207 | "hostname=display5\0" \ |
| 208 | "loadaddr=0x12000000\0" \ |
| 209 | "fdtaddr=0x12800000\0" \ |
Lukasz Majewski | 5d92540 | 2018-05-11 16:51:15 +0200 | [diff] [blame] | 210 | "console=ttymxc4,115200 quiet cma=256M\0" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 211 | "fdtfile=imx6q-display5.dtb\0" \ |
| 212 | "fdt_high=0xffffffff\0" \ |
| 213 | "initrd_high=0xffffffff\0" \ |
| 214 | "kernel_file=fitImage\0" \ |
Lukasz Majewski | f008e26 | 2018-08-18 22:22:07 +0200 | [diff] [blame] | 215 | "fitImg_fw_sz=0x2200\0" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 216 | "up=run tftp_sf_SPL; run tftp_sf_uboot\0" \ |
| 217 | "download_kernel=" \ |
| 218 | "tftpboot ${loadaddr} ${kernel_file};\0" \ |
Lukasz Majewski | 13e012f | 2018-05-11 16:50:59 +0200 | [diff] [blame] | 219 | "factory_nfs=" \ |
Lukasz Majewski | 4864ba7 | 2018-05-11 16:51:00 +0200 | [diff] [blame] | 220 | "setenv ipaddr 192.168.1.102;" \ |
| 221 | "setenv gatewayip 192.168.1.1;" \ |
| 222 | "setenv netmask 255.255.255.0;" \ |
| 223 | "setenv serverip 192.168.1.2;" \ |
Lukasz Majewski | 13e012f | 2018-05-11 16:50:59 +0200 | [diff] [blame] | 224 | "echo BOOT: FACTORY (LEG);" \ |
| 225 | "run boot_nfs\0" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 226 | "boot_swu_recovery=" SWUPDATE_RECOVERY_PROCEDURE "\0" \ |
| 227 | "recovery=" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 228 | "echo BOOT: RECOVERY: SWU;" \ |
Lukasz Majewski | b78e9c4 | 2018-05-11 16:51:05 +0200 | [diff] [blame] | 229 | "run boot_swu_recovery\0" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 230 | "boot_tftp=" \ |
| 231 | "if run download_kernel; then " \ |
| 232 | "setenv bootargs console=${console} " \ |
| 233 | "root=/dev/mmcblk0p2 rootwait;" \ |
Lukasz Majewski | 1bcbf48 | 2018-05-11 16:51:04 +0200 | [diff] [blame] | 234 | "bootm ${loadaddr} - ${fdtaddr};reset;" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 235 | "fi\0" \ |
| 236 | "addip=setenv bootargs ${bootargs} " \ |
| 237 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ |
| 238 | "${hostname}:eth0:on" \ |
| 239 | "\0" \ |
| 240 | "nfsargs=setenv bootargs " \ |
| 241 | "root=/dev/nfs rw " \ |
| 242 | "nfsroot=${serverip}:${rootpath},nolock,nfsvers=3" \ |
| 243 | "\0" \ |
| 244 | "rootpath=/srv/tftp/DISP5/rootfs\0" \ |
| 245 | "boot_nfs=" \ |
| 246 | "if run download_kernel; then " \ |
| 247 | "run nfsargs;" \ |
| 248 | "run addip;" \ |
| 249 | "setenv bootargs ${bootargs} console=${console};" \ |
| 250 | "setenv fdt_conf imx6q-${board}-${display}.dtb; " \ |
Lukasz Majewski | 1bcbf48 | 2018-05-11 16:51:04 +0200 | [diff] [blame] | 251 | "bootm ${loadaddr}#conf@${fdt_conf};reset;" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 252 | "fi\0" \ |
| 253 | "falcon_setup=" \ |
| 254 | "if mmc dev ${mmcdev}; then " \ |
| 255 | SETUP_BOOTARGS \ |
| 256 | "spl export fdt ${loadaddr}#conf@${fdt_conf};" \ |
| 257 | "setexpr fw_sz ${fdtargslen} / 0x200; " \ |
| 258 | "setexpr fw_sz ${fw_sz} + 1; " \ |
| 259 | "mmc write ${fdtargsaddr} " \ |
| 260 | __stringify(CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR)" ${fw_sz}; " \ |
| 261 | "fi\0" \ |
| 262 | "boot_mmc=" \ |
| 263 | "if mmc dev ${mmcdev}; then " \ |
| 264 | SETUP_BOOTARGS \ |
Lukasz Majewski | 1bcbf48 | 2018-05-11 16:51:04 +0200 | [diff] [blame] | 265 | "bootm ${loadaddr}#conf@${fdt_conf};reset;" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 266 | "fi\0" \ |
| 267 | "set_kernel_part=" \ |
| 268 | "if test ${BOOT_FROM} = ACTIVE; then " \ |
| 269 | "setenv kernel_part ${kernel_part_active};" \ |
| 270 | "echo BOOT: ACTIVE;" \ |
| 271 | "else if test ${BOOT_FROM} = BACKUP; then " \ |
| 272 | "setenv kernel_part ${kernel_part_backup};" \ |
| 273 | "echo BOOT: BACKUP;" \ |
| 274 | "else " \ |
| 275 | "run recovery;" \ |
| 276 | "fi;fi\0" \ |
| 277 | "set_rootfs_part=" \ |
| 278 | "if test ${BOOT_FROM} = ACTIVE; then " \ |
| 279 | "setenv rootfs_part ${rootfs_part_active};" \ |
| 280 | "else if test ${BOOT_FROM} = BACKUP; then " \ |
| 281 | "setenv rootfs_part ${rootfs_part_backup};" \ |
| 282 | "else " \ |
| 283 | "run recovery;" \ |
| 284 | "fi;fi\0" \ |
| 285 | "BOOT_FROM=ACTIVE\0" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 286 | TFTP_UPDATE_BOOTLOADER \ |
Lukasz Majewski | 2f4372a | 2018-05-11 16:51:02 +0200 | [diff] [blame] | 287 | TFTP_UPDATE_SPINOR \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 288 | "kernel_part_active=1\0" \ |
| 289 | "kernel_part_backup=3\0" \ |
| 290 | __TFTP_UPDATE_KERNEL \ |
| 291 | "rootfs_part_active=2\0" \ |
| 292 | "rootfs_part_backup=4\0" \ |
| 293 | "rootfs_file=core-image-lwn-display5.ext4\0" \ |
Lukasz Majewski | dd4ed88 | 2018-05-11 16:51:10 +0200 | [diff] [blame] | 294 | "rootfs_file_backup=core-image-lwn-backup-display5.ext4\0" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 295 | __TFTP_UPDATE_ROOTFS \ |
Lukasz Majewski | dd4ed88 | 2018-05-11 16:51:10 +0200 | [diff] [blame] | 296 | "tftp_mmc_rootfs_bkp=" \ |
| 297 | "setenv rootfs_part ${rootfs_part_backup};" \ |
| 298 | "setenv rootfs_file ${rootfs_file_backup};" \ |
| 299 | "run tftp_mmc_rootfs\0" \ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 300 | TFTP_UPDATE_RECOVERY_SWU_KERNEL \ |
| 301 | TFTP_UPDATE_RECOVERY_SWU_INITRAMFS \ |
| 302 | "\0" \ |
| 303 | |
| 304 | /* Miscellaneous configurable options */ |
| 305 | #undef CONFIG_SYS_CBSIZE |
| 306 | #define CONFIG_SYS_CBSIZE 2048 |
| 307 | |
| 308 | /* Print Buffer Size */ |
| 309 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ |
| 310 | sizeof(CONFIG_SYS_PROMPT) + 16) |
| 311 | #define CONFIG_SYS_MAXARGS 32 |
| 312 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 313 | |
| 314 | #define CONFIG_STANDALONE_LOAD_ADDR 0x10001000 |
| 315 | #define CONFIG_SYS_HZ 1000 |
| 316 | |
| 317 | /* Physical Memory Map */ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 318 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 319 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 320 | |
| 321 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 322 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 323 | |
| 324 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 325 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 326 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 327 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 328 | |
Lukasz Majewski | 76d1d16 | 2018-05-11 16:51:09 +0200 | [diff] [blame] | 329 | /* Watchdog */ |
Lukasz Majewski | d5354f5 | 2019-09-03 16:38:45 +0200 | [diff] [blame] | 330 | #if defined(CONFIG_SPL_BUILD) |
| 331 | #undef CONFIG_WDT |
| 332 | #undef CONFIG_WATCHDOG |
| 333 | #define CONFIG_HW_WATCHDOG |
| 334 | #endif |
Lukasz Majewski | 76d1d16 | 2018-05-11 16:51:09 +0200 | [diff] [blame] | 335 | |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 336 | /* ENV config */ |
| 337 | #ifdef CONFIG_ENV_IS_IN_SPI_FLASH |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 338 | /* The 0x120000 value corresponds to above SPI-NOR memory MAP */ |
Lukasz Majewski | a3eec24 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 339 | #endif |
| 340 | |
| 341 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 342 | #endif /* __CONFIG_H */ |