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