Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Heiko Schocher | 0572982 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2015 |
| 4 | * Heiko Schocher, DENX Software Engineering, hs@denx.de. |
| 5 | * |
| 6 | * Based on: |
| 7 | * Copyright (C) 2012 Freescale Semiconductor, Inc. |
| 8 | * |
| 9 | * Configuration settings for the Freescale i.MX6DL aristainetos2 board. |
Heiko Schocher | 0572982 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 10 | */ |
| 11 | #ifndef __ARISTAINETOS2_CONFIG_H |
| 12 | #define __ARISTAINETOS2_CONFIG_H |
| 13 | |
Mario Six | 790d844 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 14 | #define CONFIG_HOSTNAME "aristainetos2" |
Heiko Schocher | 0572982 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 15 | |
Heiko Schocher | 0572982 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 16 | #define CONFIG_MXC_UART_BASE UART2_BASE |
Simon Glass | 4694a74 | 2016-10-17 20:12:39 -0600 | [diff] [blame] | 17 | #define CONSOLE_DEV "ttymxc1" |
Heiko Schocher | 0572982 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 18 | |
| 19 | #define CONFIG_FEC_XCV_TYPE RGMII |
Heiko Schocher | 0572982 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 20 | |
Heiko Schocher | 0572982 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 21 | /* Framebuffer */ |
Heiko Schocher | 8f4a1b9 | 2019-12-01 11:23:19 +0100 | [diff] [blame] | 22 | #define CONFIG_SYS_LDB_CLOCK 28341000 |
Heiko Schocher | 0572982 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 23 | #define CONFIG_LG4573 |
Heiko Schocher | 0572982 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 24 | |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 25 | #include "mx6_common.h" |
| 26 | |
| 27 | #define CONFIG_MACH_TYPE 4501 |
| 28 | #define CONFIG_MMCROOT "/dev/mmcblk0p1" |
| 29 | |
| 30 | /* MMC Configs */ |
Heiko Schocher | 7344de1 | 2019-12-01 11:23:14 +0100 | [diff] [blame] | 31 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 32 | |
| 33 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 34 | #define CONFIG_ETHPRIME "FEC" |
| 35 | #define CONFIG_FEC_MXC_PHYADDR 0 |
| 36 | |
| 37 | #define CONFIG_SYS_SPI_ST_ENABLE_WP_PIN |
| 38 | |
Heiko Schocher | 19c3cd9 | 2019-12-01 11:23:29 +0100 | [diff] [blame] | 39 | #ifdef CONFIG_IMX_HAB |
| 40 | #define HAB_EXTRA_SETTINGS \ |
| 41 | "hab_check_addr=" \ |
| 42 | "if hab_auth_img ${check_addr} ${filesize} ; then " \ |
| 43 | "true;" \ |
| 44 | "else " \ |
| 45 | "echo \"HAB checks ${hab_check_filetype} " \ |
| 46 | "failed!\"; " \ |
| 47 | "false; " \ |
| 48 | "fi;\0" \ |
| 49 | "hab_check_file_fit=" \ |
| 50 | "if env exists enable_hab_check && test " \ |
| 51 | "${enable_hab_check} -eq 1 ; then " \ |
| 52 | "setenv hab_check_filetype \"FIT file on SD card " \ |
| 53 | "or eMMC\";" \ |
| 54 | "env set check_addr ${fit_addr_r};" \ |
| 55 | "run hab_check_addr;" \ |
| 56 | "else " \ |
| 57 | "true; "\ |
| 58 | "fi;\0" \ |
| 59 | "hab_check_file_bootscript=" \ |
| 60 | "if env exists enable_hab_check && test " \ |
| 61 | "${enable_hab_check} -eq 1 ; then " \ |
| 62 | "setenv hab_check_filetype \"Bootscript file\";" \ |
| 63 | "env set check_addr ${loadaddr};" \ |
| 64 | "run hab_check_addr;" \ |
| 65 | "else " \ |
| 66 | "true; "\ |
| 67 | "fi;\0" \ |
| 68 | "hab_check_flash_fit=" \ |
| 69 | "if env exists enable_hab_check && test " \ |
| 70 | "${enable_hab_check} -eq 1 ; then " \ |
| 71 | "setenv hab_check_filetype \"FIT files on flash\";" \ |
| 72 | "env set check_addr ${fit_addr_r};" \ |
| 73 | "run hab_check_addr;" \ |
| 74 | "else " \ |
| 75 | "true; "\ |
| 76 | "fi;\0" \ |
| 77 | "enable_hab_check=1\0" |
| 78 | #else |
| 79 | #define HAB_EXTRA_SETTINGS \ |
| 80 | "hab_check_file_fit=echo HAB check FIT file always returns " \ |
| 81 | "true;true\0" \ |
| 82 | "hab_check_flash_fit=echo HAB check flash FIT always returns " \ |
| 83 | "true;true\0" \ |
| 84 | "hab_check_file_bootscript=echo HAB check bootscript always " \ |
| 85 | "returns true;true\0" \ |
| 86 | "enable_hab_check=0\0" |
| 87 | #endif |
| 88 | |
Heiko Schocher | 57c4aad | 2019-12-01 11:23:30 +0100 | [diff] [blame] | 89 | #if (CONFIG_SYS_BOARD_VERSION == 3) |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 90 | #define CONFIG_EXTRA_ENV_BOARD_SETTINGS \ |
| 91 | "dead=led led_red on\0" \ |
Heiko Schocher | 57c4aad | 2019-12-01 11:23:30 +0100 | [diff] [blame] | 92 | "mtdids=nand0=gpmi-nand,nor0=spi0.0\0" \ |
| 93 | "mtdparts=mtdparts=spi0.0:832k(u-boot),64k(env),64k(env-red)," \ |
| 94 | "-(ubi-nor);gpmi-nand:-(ubi)\0" \ |
| 95 | "addmisc=setenv bootargs ${bootargs} net.ifnames=0 consoleblank=0 " \ |
| 96 | "bootmode=${bootmode} mmcpart=${mmcpart}\0" \ |
| 97 | "mainboot=echo Booting from SD-card ...; " \ |
| 98 | "run mainargs addmtd addmisc;" \ |
| 99 | "if test -n ${addmiscM}; then run addmiscM;fi;" \ |
| 100 | "if test -n ${addmiscC}; then run addmiscC;fi;" \ |
| 101 | "if test -n ${addmiscD}; then run addmiscD;fi;" \ |
| 102 | "run boot_board_type;" \ |
| 103 | "bootm ${fit_addr_r}\0" \ |
| 104 | "mainargs=setenv bootargs console=${console},${baudrate} " \ |
| 105 | "root=${mmcroot}\0" \ |
| 106 | "main_load_fit=ext4load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \ |
| 107 | "${fit_file}\0" \ |
| 108 | "rescue_load_fit=ext4load mmc ${mmcdev}:${mmcrescuepart} " \ |
| 109 | "${fit_addr_r} ${rescue_fit_file}\0" |
Heiko Schocher | fbe7e2f | 2019-12-01 11:23:31 +0100 | [diff] [blame] | 110 | #elif (CONFIG_SYS_BOARD_VERSION == 4) |
| 111 | #define CONFIG_EXTRA_ENV_BOARD_SETTINGS \ |
| 112 | "dead=led led_red on;led led_red2 on;\0" \ |
| 113 | "mtdids=nand0=gpmi-nand,nor0=spi0.0\0" \ |
| 114 | "mtdparts=mtdparts=spi0.0:832k(u-boot),64k(env),64k(env-red)," \ |
| 115 | "-(ubi-nor);gpmi-nand:-(ubi)\0" \ |
| 116 | "addmisc=setenv bootargs ${bootargs} net.ifnames=0 consoleblank=0 " \ |
| 117 | "bootmode=${bootmode} mmcpart=${mmcpart}\0" \ |
| 118 | "mainboot=echo Booting from SD-card ...; " \ |
| 119 | "run mainargs addmtd addmisc;" \ |
| 120 | "if test -n ${addmiscM}; then run addmiscM;fi;" \ |
| 121 | "if test -n ${addmiscC}; then run addmiscC;fi;" \ |
| 122 | "if test -n ${addmiscD}; then run addmiscD;fi;" \ |
| 123 | "run boot_board_type;" \ |
| 124 | "bootm ${fit_addr_r}\0" \ |
| 125 | "mainargs=setenv bootargs console=${console},${baudrate} " \ |
| 126 | "root=${mmcroot}\0" \ |
| 127 | "main_load_fit=ext4load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \ |
| 128 | "${fit_file}\0" \ |
| 129 | "rescue_load_fit=ext4load mmc ${mmcdev}:${mmcrescuepart} " \ |
| 130 | "${fit_addr_r} ${rescue_fit_file}\0" |
Heiko Schocher | 74758a9 | 2019-12-01 11:23:32 +0100 | [diff] [blame] | 131 | #elif (CONFIG_SYS_BOARD_VERSION == 5) |
| 132 | #define CONFIG_EXTRA_ENV_BOARD_SETTINGS \ |
| 133 | "emmcpart=1\0" \ |
| 134 | "emmc_rescue_part=3\0" \ |
| 135 | "emmcdev=1\0" \ |
| 136 | "emmcroot=/dev/mmcblk1p1 rootwait rw\0" \ |
| 137 | "dead=led led_red on\0" \ |
| 138 | "mtdids=nor0=spi0.0\0" \ |
| 139 | "mtdparts=mtdparts=spi0.0:832k(u-boot),64k(env),64k(env-red)," \ |
| 140 | "-(ubi-nor)\0" \ |
| 141 | "addmisc=setenv bootargs ${bootargs} net.ifnames=0 consoleblank=0 " \ |
| 142 | "bootmode=${bootmode} mmcpart=${mmcpart} " \ |
| 143 | "emmcpart=${emmcpart}\0" \ |
| 144 | "mainboot=echo Booting from eMMC ...; " \ |
| 145 | "run mainargs addmtd addmisc;" \ |
| 146 | "if test -n ${addmiscM}; then run addmiscM;fi;" \ |
| 147 | "if test -n ${addmiscC}; then run addmiscC;fi;" \ |
| 148 | "if test -n ${addmiscD}; then run addmiscD;fi;" \ |
| 149 | "run boot_board_type;" \ |
| 150 | "bootm ${fit_addr_r}\0" \ |
| 151 | "mainargs=setenv bootargs console=${console},${baudrate} " \ |
| 152 | "root=${emmcroot} rootfstype=ext4\0 " \ |
| 153 | "main_load_fit=ext4load mmc ${emmcdev}:${emmcpart} ${fit_addr_r} " \ |
| 154 | "${fit_file}; " \ |
| 155 | "imi ${fit_addr_r}\0 " \ |
| 156 | "rescue_load_fit=ext4load mmc ${emmcdev}:${emmc_rescue_part} " \ |
| 157 | "${fit_addr_r} ${rescue_fit_file};imi ${fit_addr_r}\0" |
Heiko Schocher | 57c4aad | 2019-12-01 11:23:30 +0100 | [diff] [blame] | 158 | #else |
| 159 | #define CONFIG_EXTRA_ENV_BOARD_SETTINGS \ |
| 160 | "dead=led led_red on\0" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 161 | "mtdids=nand0=gpmi-nand,nor0=spi3.1\0" \ |
| 162 | "mtdparts=mtdparts=spi3.1:832k(u-boot),64k(env),64k(env-red)," \ |
| 163 | "-(ubi-nor);gpmi-nand:-(ubi)\0" \ |
| 164 | "addmisc=setenv bootargs ${bootargs} net.ifnames=0 consoleblank=0 " \ |
| 165 | "bootmode=${bootmode} mmcpart=${mmcpart}\0" \ |
| 166 | "mainboot=echo Booting from SD-card ...; " \ |
| 167 | "run mainargs addmtd addmisc;" \ |
| 168 | "if test -n ${addmiscM}; then run addmiscM;fi;" \ |
| 169 | "if test -n ${addmiscC}; then run addmiscC;fi;" \ |
| 170 | "if test -n ${addmiscD}; then run addmiscD;fi;" \ |
| 171 | "run boot_board_type;" \ |
| 172 | "bootm ${fit_addr_r}\0" \ |
| 173 | "mainargs=setenv bootargs console=${console},${baudrate} " \ |
| 174 | "root=${mmcroot}\0" \ |
| 175 | "main_load_fit=ext4load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \ |
| 176 | "${fit_file}\0" \ |
| 177 | "rescue_load_fit=ext4load mmc ${mmcdev}:${mmcrescuepart} " \ |
| 178 | "${fit_addr_r} ${rescue_fit_file}\0" |
Heiko Schocher | 57c4aad | 2019-12-01 11:23:30 +0100 | [diff] [blame] | 179 | #endif |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 180 | |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 181 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 182 | "disable_giga=yes\0" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 183 | "usb_pgood_delay=2000\0" \ |
| 184 | "nor_bootdelay=-2\0" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 185 | "script=u-boot.scr\0" \ |
| 186 | "fit_file=/boot/system.itb\0" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 187 | "rescue_fit_file=/boot/rescue.itb\0" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 188 | "loadaddr=0x12000000\0" \ |
| 189 | "fit_addr_r=0x14000000\0" \ |
| 190 | "uboot=/boot/u-boot.imx\0" \ |
| 191 | "uboot_sz=d0000\0" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 192 | "panel=lb07wv8\0" \ |
| 193 | "splashpos=m,m\0" \ |
| 194 | "console=" CONSOLE_DEV "\0" \ |
| 195 | "fdt_high=0xffffffff\0" \ |
| 196 | "initrd_high=0xffffffff\0" \ |
| 197 | "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 198 | "boot_board_type=bootm ${fit_addr_r}#${board_type}\0" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 199 | "get_env=mw ${loadaddr} 0 0x20000;" \ |
| 200 | "mmc rescan;" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 201 | "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} env.txt;" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 202 | "env import -t ${loadaddr}\0" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 203 | "default_env=gpio set wp_spi_nor.gpio-hog;" \ |
| 204 | "sf probe;" \ |
| 205 | "sf protect unlock 0 0x1000000;" \ |
| 206 | "mw ${loadaddr} 0 0x20000;" \ |
| 207 | "env export -t ${loadaddr} serial# ethaddr " \ |
| 208 | "board_type panel addmisc addmiscM addmiscC addmiscD;" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 209 | "env default -a;" \ |
| 210 | "env import -t ${loadaddr}\0" \ |
| 211 | "loadbootscript=" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 212 | "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \ |
| 213 | "${script};\0" \ |
| 214 | "loadbootscriptUSB=" \ |
| 215 | "ext4load usb 0 ${loadaddr} ${script};\0" \ |
| 216 | "loadbootscriptUSBf=" \ |
| 217 | "fatload usb 0 ${loadaddr} ${script};\0" \ |
| 218 | "bootscriptUSB=echo Running bootscript from usb-stick ...; " \ |
| 219 | "source\0" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 220 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 221 | "source\0" \ |
| 222 | "mmcpart=1\0" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 223 | "mmcrescuepart=3\0" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 224 | "mmcdev=0\0" \ |
| 225 | "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ |
| 226 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 227 | "root=${mmcroot}\0" \ |
| 228 | "mmcboot=echo Booting from mmc ...; " \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 229 | "run mmcargs addmtd addmisc;" \ |
| 230 | "if test -n ${addmiscM}; then run addmiscM;fi;" \ |
| 231 | "if test -n ${addmiscC}; then run addmiscC;fi;" \ |
| 232 | "if test -n ${addmiscD}; then run addmiscD;fi;" \ |
| 233 | "run boot_board_type;" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 234 | "bootm ${fit_addr_r}\0" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 235 | "mmc_load_fit=ext4load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 236 | "${fit_file}\0" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 237 | "mmc_load_uboot=ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 238 | "${uboot}\0" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 239 | "mmc_rescue_load_fit=ext4load mmc ${mmcdev}:${mmcrescuepart} " \ |
| 240 | "${fit_addr_r} ${rescue_fit_file}\0" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 241 | "mmc_upd_uboot=mw.b ${loadaddr} 0xff ${uboot_sz};" \ |
| 242 | "setexpr cmp_buf ${loadaddr} + ${uboot_sz};" \ |
| 243 | "setexpr uboot_maxsize ${uboot_sz} - 400;" \ |
| 244 | "mw.b ${cmp_buf} 0x00 ${uboot_sz};" \ |
| 245 | "run mmc_load_uboot;sf probe;sf erase 0 ${uboot_sz};" \ |
| 246 | "sf write ${loadaddr} 400 ${filesize};" \ |
| 247 | "sf read ${cmp_buf} 400 ${uboot_sz};" \ |
| 248 | "cmp.b ${loadaddr} ${cmp_buf} ${uboot_maxsize}\0" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 249 | "rescueargs=setenv bootargs console=${console},${baudrate} " \ |
| 250 | "root=/dev/ram rw\0 " \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 251 | "rescueboot=echo Booting rescue system ...; " \ |
| 252 | "run rescueargs addmtd addmisc;" \ |
| 253 | "if test -n ${rescue_reason}; then run rescue_reason;fi;" \ |
| 254 | "if test -n ${addmiscM}; then run addmiscM;fi;" \ |
| 255 | "if test -n ${addmiscC}; then run addmiscC;fi;" \ |
| 256 | "if test -n ${addmiscD}; then run addmiscD;fi;" \ |
| 257 | "run boot_board_type;" \ |
| 258 | "if bootm ${fit_addr_r}; then ; " \ |
| 259 | "else " \ |
| 260 | "run dead; " \ |
| 261 | "fi; \0" \ |
| 262 | "r_reason_syserr=setenv rescue_reason setenv bootargs " \ |
| 263 | "\\\\${bootargs} " \ |
| 264 | "rescueReason=18\0 " \ |
| 265 | "usb_load_fit=ext4load usb 0 ${fit_addr_r} ${fit_file}\0" \ |
| 266 | "usb_load_fitf=fatload usb 0 ${fit_addr_r} ${fit_file}\0" \ |
| 267 | "usb_load_rescuefit=ext4load usb 0 ${fit_addr_r} " \ |
| 268 | "${rescue_fit_file}\0" \ |
| 269 | "usb_load_rescuefitf=fatload usb 0 ${fit_addr_r} " \ |
| 270 | "${rescue_fit_file}\0" \ |
| 271 | "usbroot=/dev/sda1 rootwait rw\0" \ |
| 272 | "usbboot=echo Booting from usb-stick ...; " \ |
| 273 | "run usbargs addmtd addmisc;" \ |
| 274 | "if test -n ${addmiscM}; then run addmiscM;fi;" \ |
| 275 | "if test -n ${addmiscC}; then run addmiscC;fi;" \ |
| 276 | "if test -n ${addmiscD}; then run addmiscD;fi;" \ |
| 277 | "run boot_board_type;" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 278 | "bootm ${fit_addr_r}\0" \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 279 | "usbargs=setenv bootargs console=${console},${baudrate} " \ |
| 280 | "root=${usbroot}\0" \ |
| 281 | "mmc_rescue_boot=" \ |
| 282 | "run r_reason_syserr;" \ |
| 283 | "if run mmc_rescue_load_fit hab_check_file_fit; then " \ |
| 284 | "run rescueboot; " \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 285 | "else " \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 286 | "run dead; " \ |
| 287 | "echo RESCUE SYSTEM FROM SD-CARD BOOT FAILURE;" \ |
| 288 | "fi;\0" \ |
| 289 | "main_rescue_boot=" \ |
| 290 | "if run main_load_fit hab_check_flash_fit; then " \ |
| 291 | "if run mainboot; then ; " \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 292 | "else " \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 293 | "run r_reason_syserr;" \ |
| 294 | "if run rescue_load_fit hab_check_file_fit;" \ |
| 295 | "then run rescueboot; " \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 296 | "else " \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 297 | "run dead; " \ |
| 298 | "echo RESCUE SYSTEM BOOT FAILURE;" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 299 | "fi; " \ |
| 300 | "fi; " \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 301 | "else " \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 302 | "run r_reason_syserr;" \ |
| 303 | "if run rescue_load_fit hab_check_file_fit; then " \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 304 | "run rescueboot; " \ |
| 305 | "else " \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 306 | "run dead; " \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 307 | "echo RESCUE SYSTEM BOOT FAILURE;" \ |
| 308 | "fi; " \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 309 | "fi;\0" \ |
| 310 | "usb_mmc_rescue_boot=" \ |
| 311 | "usb start;" \ |
| 312 | "if usb storage; then " \ |
| 313 | "if run loadbootscriptUSB " \ |
| 314 | "hab_check_file_bootscript;" \ |
| 315 | "then run bootscriptUSB; " \ |
| 316 | "fi; " \ |
| 317 | "if run loadbootscriptUSBf " \ |
| 318 | "hab_check_file_bootscript;" \ |
| 319 | "then run bootscriptUSB; " \ |
| 320 | "fi; " \ |
| 321 | "if run usb_load_fit hab_check_file_fit; then " \ |
| 322 | "run usbboot; " \ |
| 323 | "fi; " \ |
| 324 | "if run usb_load_fitf hab_check_file_fit; then " \ |
| 325 | "run usbboot; " \ |
| 326 | "fi; "\ |
| 327 | "if run usb_load_rescuefit hab_check_file_fit;" \ |
| 328 | "then run r_reason_syserr rescueboot;" \ |
| 329 | "fi; " \ |
| 330 | "if run usb_load_rescuefitf hab_check_file_fit;" \ |
| 331 | "then run r_reason_syserr rescueboot;" \ |
| 332 | "fi; " \ |
| 333 | "run mmc_rescue_boot;" \ |
| 334 | "fi; "\ |
| 335 | "run mmc_rescue_boot;\0" \ |
| 336 | "rescue_xload_boot=" \ |
| 337 | "run r_reason_syserr;" \ |
| 338 | "if test ${bootmode} -ne 0 ; then " \ |
| 339 | "mmc dev ${mmcdev};" \ |
| 340 | "if mmc rescan; then " \ |
| 341 | "if run mmc_rescue_load_fit " \ |
| 342 | "hab_check_file_fit; then " \ |
| 343 | "run rescueboot; " \ |
| 344 | "else " \ |
| 345 | "usb start;" \ |
| 346 | "if usb storage; then " \ |
| 347 | "if run usb_load_rescuefit " \ |
| 348 | "hab_check_file_fit;"\ |
| 349 | "then " \ |
| 350 | "run rescueboot;" \ |
| 351 | "fi; " \ |
| 352 | "if run usb_load_rescuefitf "\ |
| 353 | "hab_check_file_fit;"\ |
| 354 | "then " \ |
| 355 | "run rescueboot;" \ |
| 356 | "fi; " \ |
| 357 | "fi;" \ |
| 358 | "fi;" \ |
| 359 | "run dead; " \ |
| 360 | "echo RESCUE SYSTEM ON SD OR " \ |
| 361 | "USB BOOT FAILURE;" \ |
| 362 | "else " \ |
| 363 | "usb start;" \ |
| 364 | "if usb storage; then " \ |
| 365 | "if run usb_load_rescuefit " \ |
| 366 | "hab_check_file_fit; then " \ |
| 367 | "run rescueboot;" \ |
| 368 | "fi; " \ |
| 369 | "if run usb_load_rescuefitf " \ |
| 370 | "hab_check_file_fit; then " \ |
| 371 | "run rescueboot;" \ |
| 372 | "fi; " \ |
| 373 | "fi;" \ |
| 374 | "run dead; " \ |
| 375 | "echo RESCUE SYSTEM ON USB BOOT FAILURE;" \ |
| 376 | "fi; " \ |
| 377 | "else "\ |
| 378 | "if run rescue_load_fit hab_check_file_fit; then " \ |
| 379 | "run rescueboot; " \ |
| 380 | "else " \ |
| 381 | "run dead; " \ |
| 382 | "echo RESCUE SYSTEM ON BOARD BOOT FAILURE;" \ |
| 383 | "fi; " \ |
| 384 | "fi;\0" \ |
| 385 | "ari_boot=if test ${bootmode} -ne 0 ; then " \ |
| 386 | "mmc dev ${mmcdev};" \ |
| 387 | "if mmc rescan; then " \ |
| 388 | "if run loadbootscript hab_check_file_bootscript;" \ |
| 389 | "then run bootscript; " \ |
| 390 | "fi; " \ |
| 391 | "if run mmc_load_fit hab_check_file_fit; then " \ |
| 392 | "if run mmcboot; then ; " \ |
| 393 | "else " \ |
| 394 | "run mmc_rescue_boot;" \ |
| 395 | "fi; " \ |
| 396 | "else " \ |
| 397 | "run usb_mmc_rescue_boot;" \ |
| 398 | "fi; " \ |
| 399 | "else " \ |
| 400 | "run usb_mmc_rescue_boot;" \ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 401 | "fi; " \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 402 | "else "\ |
| 403 | "run main_rescue_boot;" \ |
| 404 | "fi; \0"\ |
Heiko Schocher | 19c3cd9 | 2019-12-01 11:23:29 +0100 | [diff] [blame] | 405 | HAB_EXTRA_SETTINGS \ |
Heiko Schocher | 9eca461 | 2019-12-01 11:23:28 +0100 | [diff] [blame] | 406 | CONFIG_EXTRA_ENV_BOARD_SETTINGS |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 407 | |
| 408 | #define CONFIG_ARP_TIMEOUT 200UL |
| 409 | |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 410 | /* Physical Memory Map */ |
| 411 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 412 | |
| 413 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 414 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 415 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 416 | |
| 417 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 418 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 419 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 420 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 421 | |
| 422 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 423 | |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 424 | /* NAND stuff */ |
| 425 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
| 426 | #define CONFIG_SYS_NAND_BASE 0x40000000 |
| 427 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
| 428 | #define CONFIG_SYS_NAND_ONFI_DETECTION |
| 429 | |
| 430 | /* DMA stuff, needed for GPMI/MXS NAND support */ |
| 431 | |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 432 | /* USB Configs */ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 433 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ |
| 434 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 435 | #define CONFIG_MXC_USB_FLAGS 0 |
| 436 | |
| 437 | /* UBI support */ |
| 438 | |
| 439 | /* Framebuffer */ |
| 440 | /* check this console not needed, after test remove it */ |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 441 | #define CONFIG_SPLASH_SCREEN |
| 442 | #define CONFIG_SPLASH_SCREEN_ALIGN |
Heiko Schocher | 8f4a1b9 | 2019-12-01 11:23:19 +0100 | [diff] [blame] | 443 | #define CONFIG_IMX_VIDEO_SKIP |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 444 | #define CONFIG_VIDEO_LOGO |
| 445 | #define CONFIG_VIDEO_BMP_LOGO |
Heiko Schocher | 8f4a1b9 | 2019-12-01 11:23:19 +0100 | [diff] [blame] | 446 | #define CONFIG_BMP_16BPP |
| 447 | #define CONFIG_VIDEO_BMP_RLE8 |
Heiko Schocher | a051ee9 | 2019-12-01 11:23:11 +0100 | [diff] [blame] | 448 | |
| 449 | #define CONFIG_IMX6_PWM_PER_CLK 66000000 |
| 450 | |
Heiko Schocher | 0572982 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 451 | #endif /* __ARISTAINETOS2_CONFIG_H */ |