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