Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Lukasz Majewski | ce86bf9 | 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 | ce86bf9 | 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 | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 13 | #define CONFIG_SYS_SPL_ARGS_ADDR 0x18000000 |
Lukasz Majewski | ce86bf9 | 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 | a3d18cd | 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 | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 35 | */ |
| 36 | |
Lukasz Majewski | 7505605 | 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 | ce86bf9 | 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 | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 49 | |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 50 | #define CONFIG_MXC_UART_BASE UART5_BASE |
| 51 | |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 52 | /* I2C Configs */ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 53 | #define CONFIG_I2C_MULTI_BUS |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 54 | |
| 55 | /* MMC Configs */ |
Lukasz Majewski | ce86bf9 | 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 | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 58 | |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 59 | #define PARTS_DEFAULT \ |
| 60 | /* Linux partitions */ \ |
| 61 | "partitions=" \ |
| 62 | "uuid_disk=${uuid_gpt_disk};" \ |
| 63 | "name=kernel_raw1,start=128K,size=8M,uuid=${uuid_gpt_kernel_raw1};" \ |
| 64 | "name=rootfs1,size=1528M,uuid=${uuid_gpt_rootfs1};" \ |
| 65 | "name=kernel_raw2,size=8M,uuid=${uuid_gpt_kernel_raw2};" \ |
Lukasz Majewski | 6d46ce0 | 2018-05-11 16:51:16 +0200 | [diff] [blame] | 66 | "name=rootfs2,size=512M,uuid=${uuid_gpt_rootfs2};" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 67 | "name=data,size=-,uuid=${uuid_gpt_data}\0" |
| 68 | |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 69 | #define SWUPDATE_RECOVERY_PROCEDURE \ |
| 70 | "echo '#######################';" \ |
| 71 | "echo '# RECOVERY SWUupdate #';" \ |
| 72 | "echo '#######################';" \ |
Lukasz Majewski | ac6fb1e | 2018-05-11 16:51:18 +0200 | [diff] [blame] | 73 | "echo '#######################';" \ |
| 74 | "echo '# GPT verify #';" \ |
| 75 | "if gpt verify mmc ${mmcdev} ${partitions}; then " \ |
| 76 | "echo '# OK ! #';" \ |
| 77 | "else " \ |
| 78 | "echo '# FAILED ! #';" \ |
| 79 | "echo '# GPT RESTORATION #';" \ |
| 80 | "gpt write mmc ${mmcdev} ${partitions};" \ |
| 81 | "fi;" \ |
| 82 | "echo '#######################';" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 83 | "setenv loadaddr_swu_initramfs 0x14000000;" \ |
| 84 | "setenv bootargs console=${console} " \ |
| 85 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
| 86 | ":${hostname}::off root=/dev/ram rw;" \ |
| 87 | "sf probe;" \ |
| 88 | "sf read ${loadaddr} swu-kernel;" \ |
| 89 | "sf read ${loadaddr_swu_initramfs} swu-initramfs;" \ |
Lukasz Majewski | 37bf203 | 2018-05-11 16:51:04 +0200 | [diff] [blame] | 90 | "bootm ${loadaddr} ${loadaddr_swu_initramfs};reset;" |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 91 | |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 92 | #define SETUP_BOOTARGS \ |
| 93 | "run set_rootfs_part;" \ |
| 94 | "setenv bootargs ${bootargs} console=${console} " \ |
| 95 | "root=/dev/mmcblk${mmcdev}p${rootfs_part} " \ |
| 96 | "rootwait rootfstype=ext4 rw; " \ |
| 97 | "run set_kernel_part;" \ |
| 98 | "part start mmc ${mmcdev} ${kernel_part} lba_start; " \ |
Lukasz Majewski | f1b7c77 | 2018-08-18 22:22:07 +0200 | [diff] [blame] | 99 | "mmc read ${loadaddr} ${lba_start} ${fitImg_fw_sz}; " \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 100 | "setenv fdt_conf imx6q-${board}-${display}.dtb; " |
| 101 | |
| 102 | /* All the numbers are in LBAs */ |
| 103 | #define __TFTP_UPDATE_KERNEL \ |
| 104 | "tftp_mmc_fitImg=" \ |
| 105 | "if test ! -n ${kernel_part}; then " \ |
| 106 | "setenv kernel_part ${kernel_part_active};" \ |
| 107 | "fi;" \ |
| 108 | "if tftp ${loadaddr} ${kernel_file}; then " \ |
| 109 | "setexpr fw_sz ${filesize} / 0x200; " \ |
| 110 | "setexpr fw_sz ${fw_sz} + 1; " \ |
| 111 | "part start mmc ${mmcdev} ${kernel_part} lba_start; " \ |
| 112 | "mmc write ${loadaddr} ${lba_start} ${fw_sz}; " \ |
| 113 | "; fi\0" \ |
| 114 | |
| 115 | #define TFTP_UPDATE_KERNEL \ |
| 116 | "setenv kernel_part ${kernel_part_active};" \ |
| 117 | "run tftp_mmc_fitImg;" \ |
| 118 | "setenv kernel_part ${kernel_part_backup};" \ |
| 119 | "run tftp_mmc_fitImg;" \ |
| 120 | |
| 121 | #define __TFTP_UPDATE_ROOTFS \ |
| 122 | "tftp_mmc_rootfs=" \ |
| 123 | "if test ! -n ${rootfs_part}; then " \ |
| 124 | "setenv rootfs_part ${rootfs_part_active};" \ |
| 125 | "fi;" \ |
| 126 | "if tftp ${loadaddr} ${rootfs_file}; then " \ |
| 127 | "setexpr fw_sz ${filesize} / 0x200; " \ |
| 128 | "setexpr fw_sz ${fw_sz} + 1; " \ |
| 129 | "part start mmc ${mmcdev} ${rootfs_part} lba_start; " \ |
| 130 | "mmc write ${loadaddr} ${lba_start} ${fw_sz}; " \ |
| 131 | "; fi\0" \ |
| 132 | |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 133 | #define TFTP_UPDATE_ROOTFS \ |
| 134 | "setenv rootfs_part ${rootfs_part_active};" \ |
| 135 | "run tftp_mmc_rootfs;" \ |
Lukasz Majewski | a2a603e | 2018-05-11 16:51:11 +0200 | [diff] [blame] | 136 | "run tftp_mmc_rootfs_bkp;" \ |
| 137 | |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 138 | |
| 139 | #define TFTP_UPDATE_RECOVERY_SWU_KERNEL \ |
| 140 | "tftp_sf_fitImg_SWU=" \ |
| 141 | "if tftp ${loadaddr} ${kernel_file}; then " \ |
| 142 | "sf probe;" \ |
| 143 | "sf erase swu-kernel +${filesize};" \ |
| 144 | "sf write ${loadaddr} swu-kernel ${filesize};" \ |
| 145 | "; fi\0" \ |
| 146 | |
| 147 | #define TFTP_UPDATE_RECOVERY_SWU_INITRAMFS \ |
Lukasz Majewski | a1d657f | 2018-05-11 16:51:12 +0200 | [diff] [blame] | 148 | "swu_initramfs_file=swupdate-image-display5.ext4.gz.u-boot\0" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 149 | "tftp_sf_initramfs_SWU=" \ |
| 150 | "if tftp ${loadaddr} ${swu_initramfs_file}; then " \ |
| 151 | "sf probe;" \ |
| 152 | "sf erase swu-initramfs +${filesize};" \ |
| 153 | "sf write ${loadaddr} swu-initramfs ${filesize};" \ |
| 154 | "; fi\0" \ |
| 155 | |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 156 | #define TFTP_UPDATE_BOOTLOADER \ |
| 157 | "ubootfile=u-boot.img\0" \ |
| 158 | "ubootfileSPL=SPL\0" \ |
| 159 | "tftp_sf_uboot=" \ |
| 160 | "if tftp ${loadaddr} ${ubootfile}; then " \ |
| 161 | "sf probe;" \ |
| 162 | "sf erase u-boot +${filesize};" \ |
| 163 | "sf write ${loadaddr} u-boot ${filesize}" \ |
| 164 | "; fi\0" \ |
| 165 | "tftp_sf_SPL=" \ |
| 166 | "if tftp ${loadaddr} ${ubootfileSPL}; then " \ |
| 167 | "sf probe;" \ |
| 168 | "setexpr uboot_SPL_size ${filesize} + 0x400;" \ |
| 169 | "sf erase 0x0 +${uboot_SPL_size};" \ |
| 170 | "sf write ${loadaddr} 0x400 ${filesize};" \ |
| 171 | "fi\0" \ |
| 172 | |
Lukasz Majewski | bac6fe7 | 2018-05-11 16:51:02 +0200 | [diff] [blame] | 173 | #define TFTP_UPDATE_SPINOR \ |
| 174 | "spinorfile=core-image-lwn-display5.spinor\0" \ |
| 175 | "spinorsize=0x2000000\0" \ |
| 176 | "tftp_sf_img=" \ |
| 177 | "if tftp ${loadaddr} ${spinorfile}; then " \ |
| 178 | "sf probe;" \ |
| 179 | "sf erase 0x0 ${spinorsize};" \ |
| 180 | "sf write ${loadaddr} 0x0 ${filesize};" \ |
| 181 | "fi\0" \ |
| 182 | |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 183 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 184 | PARTS_DEFAULT \ |
Lukasz Majewski | d7e065a | 2018-05-11 16:51:08 +0200 | [diff] [blame] | 185 | "gpio_recovery=93\0" \ |
| 186 | "check_em_pad=gpio input ${gpio_recovery};test $? -eq 0;\0" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 187 | "display=tianma-tm070-800x480\0" \ |
| 188 | "board=display5\0" \ |
| 189 | "mmcdev=0\0" \ |
| 190 | "altbootcmd=run recovery\0" \ |
| 191 | "bootdelay=1\0" \ |
| 192 | "baudrate=115200\0" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 193 | "ethact=FEC\0" \ |
| 194 | "netdev=eth0\0" \ |
| 195 | "boot_os=y\0" \ |
| 196 | "hostname=display5\0" \ |
| 197 | "loadaddr=0x12000000\0" \ |
| 198 | "fdtaddr=0x12800000\0" \ |
Lukasz Majewski | 248698e | 2018-05-11 16:51:15 +0200 | [diff] [blame] | 199 | "console=ttymxc4,115200 quiet cma=256M\0" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 200 | "fdtfile=imx6q-display5.dtb\0" \ |
| 201 | "fdt_high=0xffffffff\0" \ |
| 202 | "initrd_high=0xffffffff\0" \ |
| 203 | "kernel_file=fitImage\0" \ |
Lukasz Majewski | f1b7c77 | 2018-08-18 22:22:07 +0200 | [diff] [blame] | 204 | "fitImg_fw_sz=0x2200\0" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 205 | "up=run tftp_sf_SPL; run tftp_sf_uboot\0" \ |
| 206 | "download_kernel=" \ |
| 207 | "tftpboot ${loadaddr} ${kernel_file};\0" \ |
Lukasz Majewski | 48ef474 | 2018-05-11 16:50:59 +0200 | [diff] [blame] | 208 | "factory_nfs=" \ |
Lukasz Majewski | f4ad68a | 2018-05-11 16:51:00 +0200 | [diff] [blame] | 209 | "setenv ipaddr 192.168.1.102;" \ |
| 210 | "setenv gatewayip 192.168.1.1;" \ |
| 211 | "setenv netmask 255.255.255.0;" \ |
| 212 | "setenv serverip 192.168.1.2;" \ |
Lukasz Majewski | 48ef474 | 2018-05-11 16:50:59 +0200 | [diff] [blame] | 213 | "echo BOOT: FACTORY (LEG);" \ |
| 214 | "run boot_nfs\0" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 215 | "boot_swu_recovery=" SWUPDATE_RECOVERY_PROCEDURE "\0" \ |
| 216 | "recovery=" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 217 | "echo BOOT: RECOVERY: SWU;" \ |
Lukasz Majewski | b259fff | 2018-05-11 16:51:05 +0200 | [diff] [blame] | 218 | "run boot_swu_recovery\0" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 219 | "boot_tftp=" \ |
| 220 | "if run download_kernel; then " \ |
| 221 | "setenv bootargs console=${console} " \ |
| 222 | "root=/dev/mmcblk0p2 rootwait;" \ |
Lukasz Majewski | 37bf203 | 2018-05-11 16:51:04 +0200 | [diff] [blame] | 223 | "bootm ${loadaddr} - ${fdtaddr};reset;" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 224 | "fi\0" \ |
| 225 | "addip=setenv bootargs ${bootargs} " \ |
| 226 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ |
| 227 | "${hostname}:eth0:on" \ |
| 228 | "\0" \ |
| 229 | "nfsargs=setenv bootargs " \ |
| 230 | "root=/dev/nfs rw " \ |
| 231 | "nfsroot=${serverip}:${rootpath},nolock,nfsvers=3" \ |
| 232 | "\0" \ |
| 233 | "rootpath=/srv/tftp/DISP5/rootfs\0" \ |
| 234 | "boot_nfs=" \ |
| 235 | "if run download_kernel; then " \ |
| 236 | "run nfsargs;" \ |
| 237 | "run addip;" \ |
| 238 | "setenv bootargs ${bootargs} console=${console};" \ |
| 239 | "setenv fdt_conf imx6q-${board}-${display}.dtb; " \ |
Lukasz Majewski | 37bf203 | 2018-05-11 16:51:04 +0200 | [diff] [blame] | 240 | "bootm ${loadaddr}#conf@${fdt_conf};reset;" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 241 | "fi\0" \ |
| 242 | "falcon_setup=" \ |
| 243 | "if mmc dev ${mmcdev}; then " \ |
| 244 | SETUP_BOOTARGS \ |
| 245 | "spl export fdt ${loadaddr}#conf@${fdt_conf};" \ |
| 246 | "setexpr fw_sz ${fdtargslen} / 0x200; " \ |
| 247 | "setexpr fw_sz ${fw_sz} + 1; " \ |
| 248 | "mmc write ${fdtargsaddr} " \ |
| 249 | __stringify(CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR)" ${fw_sz}; " \ |
| 250 | "fi\0" \ |
| 251 | "boot_mmc=" \ |
| 252 | "if mmc dev ${mmcdev}; then " \ |
| 253 | SETUP_BOOTARGS \ |
Lukasz Majewski | 37bf203 | 2018-05-11 16:51:04 +0200 | [diff] [blame] | 254 | "bootm ${loadaddr}#conf@${fdt_conf};reset;" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 255 | "fi\0" \ |
| 256 | "set_kernel_part=" \ |
| 257 | "if test ${BOOT_FROM} = ACTIVE; then " \ |
| 258 | "setenv kernel_part ${kernel_part_active};" \ |
| 259 | "echo BOOT: ACTIVE;" \ |
| 260 | "else if test ${BOOT_FROM} = BACKUP; then " \ |
| 261 | "setenv kernel_part ${kernel_part_backup};" \ |
| 262 | "echo BOOT: BACKUP;" \ |
| 263 | "else " \ |
| 264 | "run recovery;" \ |
| 265 | "fi;fi\0" \ |
| 266 | "set_rootfs_part=" \ |
| 267 | "if test ${BOOT_FROM} = ACTIVE; then " \ |
| 268 | "setenv rootfs_part ${rootfs_part_active};" \ |
| 269 | "else if test ${BOOT_FROM} = BACKUP; then " \ |
| 270 | "setenv rootfs_part ${rootfs_part_backup};" \ |
| 271 | "else " \ |
| 272 | "run recovery;" \ |
| 273 | "fi;fi\0" \ |
| 274 | "BOOT_FROM=ACTIVE\0" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 275 | TFTP_UPDATE_BOOTLOADER \ |
Lukasz Majewski | bac6fe7 | 2018-05-11 16:51:02 +0200 | [diff] [blame] | 276 | TFTP_UPDATE_SPINOR \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 277 | "kernel_part_active=1\0" \ |
| 278 | "kernel_part_backup=3\0" \ |
| 279 | __TFTP_UPDATE_KERNEL \ |
| 280 | "rootfs_part_active=2\0" \ |
| 281 | "rootfs_part_backup=4\0" \ |
| 282 | "rootfs_file=core-image-lwn-display5.ext4\0" \ |
Lukasz Majewski | 7fbc636 | 2018-05-11 16:51:10 +0200 | [diff] [blame] | 283 | "rootfs_file_backup=core-image-lwn-backup-display5.ext4\0" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 284 | __TFTP_UPDATE_ROOTFS \ |
Lukasz Majewski | 7fbc636 | 2018-05-11 16:51:10 +0200 | [diff] [blame] | 285 | "tftp_mmc_rootfs_bkp=" \ |
| 286 | "setenv rootfs_part ${rootfs_part_backup};" \ |
| 287 | "setenv rootfs_file ${rootfs_file_backup};" \ |
| 288 | "run tftp_mmc_rootfs\0" \ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 289 | TFTP_UPDATE_RECOVERY_SWU_KERNEL \ |
| 290 | TFTP_UPDATE_RECOVERY_SWU_INITRAMFS \ |
| 291 | "\0" \ |
| 292 | |
| 293 | /* Miscellaneous configurable options */ |
| 294 | #undef CONFIG_SYS_CBSIZE |
| 295 | #define CONFIG_SYS_CBSIZE 2048 |
| 296 | |
| 297 | /* Print Buffer Size */ |
| 298 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ |
| 299 | sizeof(CONFIG_SYS_PROMPT) + 16) |
| 300 | #define CONFIG_SYS_MAXARGS 32 |
| 301 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 302 | |
| 303 | #define CONFIG_STANDALONE_LOAD_ADDR 0x10001000 |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 304 | |
| 305 | /* Physical Memory Map */ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 306 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 307 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 308 | |
| 309 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 310 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 311 | |
| 312 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 313 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 314 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 315 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 316 | |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 317 | /* ENV config */ |
| 318 | #ifdef CONFIG_ENV_IS_IN_SPI_FLASH |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 319 | /* The 0x120000 value corresponds to above SPI-NOR memory MAP */ |
Lukasz Majewski | ce86bf9 | 2017-10-31 17:58:05 +0100 | [diff] [blame] | 320 | #endif |
| 321 | |
| 322 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 323 | #endif /* __CONFIG_H */ |