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