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