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