blob: de4f4407abb8bba83ba6fb3ae59fd93c32eb65fd [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Heiko Schocher05729822015-05-18 13:32:31 +02002/*
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 Schocher05729822015-05-18 13:32:31 +020010 */
11#ifndef __ARISTAINETOS2_CONFIG_H
12#define __ARISTAINETOS2_CONFIG_H
13
Mario Six790d8442018-03-28 14:38:20 +020014#define CONFIG_HOSTNAME "aristainetos2"
Heiko Schocher05729822015-05-18 13:32:31 +020015
Heiko Schocher5a0baf42020-11-30 20:46:02 +010016#if (CONFIG_SYS_BOARD_VERSION == 5)
Simon Glass4694a742016-10-17 20:12:39 -060017#define CONSOLE_DEV "ttymxc1"
Heiko Schocherb43a1d72020-11-30 20:46:03 +010018#elif (CONFIG_SYS_BOARD_VERSION == 6)
Heiko Schocherb43a1d72020-11-30 20:46:03 +010019#define CONSOLE_DEV "ttymxc0"
Heiko Schocher5a0baf42020-11-30 20:46:02 +010020#endif
Heiko Schocher05729822015-05-18 13:32:31 +020021
Heiko Schocher05729822015-05-18 13:32:31 +020022/* Framebuffer */
Heiko Schocher8f4a1b92019-12-01 11:23:19 +010023#define CONFIG_SYS_LDB_CLOCK 28341000
Heiko Schocher05729822015-05-18 13:32:31 +020024
Heiko Schochera051ee92019-12-01 11:23:11 +010025#include "mx6_common.h"
26
Heiko Schochera051ee92019-12-01 11:23:11 +010027
28/* MMC Configs */
Heiko Schocher7344de12019-12-01 11:23:14 +010029#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
Heiko Schochera051ee92019-12-01 11:23:11 +010030
Heiko Schochera051ee92019-12-01 11:23:11 +010031#define CONFIG_FEC_MXC_PHYADDR 0
32
33#define CONFIG_SYS_SPI_ST_ENABLE_WP_PIN
34
Heiko Schocher19c3cd92019-12-01 11:23:29 +010035#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 Schocher5a0baf42020-11-30 20:46:02 +010076 "hab_check_addr=echo HAB check addr always returns " \
77 "true;true\0" \
Heiko Schocher19c3cd92019-12-01 11:23:29 +010078 "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 Schocher5a0baf42020-11-30 20:46:02 +010087#if (CONFIG_SYS_BOARD_VERSION == 5)
Tom Rinicc3b0032021-08-10 17:34:20 -040088#define EXTRA_ENV_BOARD_SETTINGS \
Heiko Schocher5a0baf42020-11-30 20:46:02 +010089 "dead=while true; do; " \
90 "led led_red on; sleep 1;" \
91 "led led_red off; sleep 1;" \
92 "done\0"
Heiko Schocherb43a1d72020-11-30 20:46:03 +010093#elif (CONFIG_SYS_BOARD_VERSION == 6)
Tom Rinicc3b0032021-08-10 17:34:20 -040094#define EXTRA_ENV_BOARD_SETTINGS \
Heiko Schocherb43a1d72020-11-30 20:46:03 +010095 "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 Schocher57c4aad2019-12-01 11:23:30 +010099#endif
Heiko Schocher9eca4612019-12-01 11:23:28 +0100100
Heiko Schochera051ee92019-12-01 11:23:11 +0100101#define CONFIG_EXTRA_ENV_SETTINGS \
102 "disable_giga=yes\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100103 "usb_pgood_delay=2000\0" \
104 "nor_bootdelay=-2\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100105 "script=u-boot.scr\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100106 "loadaddr=0x12000000\0" \
107 "fit_addr_r=0x14000000\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100108 "uboot_sz=d0000\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100109 "panel=lb07wv8\0" \
110 "splashpos=m,m\0" \
111 "console=" CONSOLE_DEV "\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100112 "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 Schochera051ee92019-12-01 11:23:11 +0100124 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100125 "boot_board_type=bootm ${fit_addr_r}#${board_type}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100126 "get_env=mw ${loadaddr} 0 0x20000;" \
127 "mmc rescan;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100128 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} env.txt;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100129 "env import -t ${loadaddr}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100130 "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 Schocher5a0baf42020-11-30 20:46:02 +0100135 "board_type panel;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100136 "env default -a;" \
137 "env import -t ${loadaddr}\0" \
138 "loadbootscript=" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100139 "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 Schocher5a0baf42020-11-30 20:46:02 +0100146 "source \0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100147 "bootscript=echo Running bootscript from mmc ...; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100148 "source \0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100149 "mmcpart=1\0" \
150 "mmcdev=0\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100151 "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 Fanbb4bb582022-04-15 12:23:41 +0800182 "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100183 "mmcargs=setenv bootargs console=${console},${baudrate} " \
184 "root=${mmcroot}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100185 "mmcRargs=setenv bootargs console=${console},${baudrate} " \
186 "rescue_sysnum=${rescue_sysnum} root=${mmcroot}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100187 "mmcboot=echo Booting from mmc ...; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100188 "run mmcargs addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100189 "run boot_board_type;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100190 "bootm ${fit_addr_r}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100191 "mmc_load_fit=run mk_fitfile_path; " \
192 "ext4load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100193 "${fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100194 "imi ${fit_addr_r}\0" \
195 "mmc_rescue_load_fit=run mk_rescue_fitfile_path; " \
196 "ext4load mmc ${mmcdev}:${mmcpart} " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100197 "${fit_addr_r} ${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100198 "imi ${fit_addr_r}\0" \
199 "mmc_load_uboot=run mk_uboot_path; " \
200 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
201 "${uboot}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100202 "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 Schocher5a0baf42020-11-30 20:46:02 +0100210 "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 Schocher9eca4612019-12-01 11:23:28 +0100220 "rescueboot=echo Booting rescue system ...; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100221 "run addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100222 "if test -n ${rescue_reason}; then run rescue_reason;fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100223 "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 Schocher5a0baf42020-11-30 20:46:02 +0100230 "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 Schocher9eca4612019-12-01 11:23:28 +0100237 "${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100238 "usb_load_rescuefitf=run mk_rescue_fitfile_path; " \
239 "fatload usb 0 ${fit_addr_r} " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100240 "${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100241 "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 Schocher9eca4612019-12-01 11:23:28 +0100257 "usbroot=/dev/sda1 rootwait rw\0" \
258 "usbboot=echo Booting from usb-stick ...; " \
259 "run usbargs addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100260 "run boot_board_type;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100261 "bootm ${fit_addr_r}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100262 "usbargs=setenv bootargs console=${console},${baudrate} " \
263 "root=${usbroot}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100264 "usbRargs=setenv bootargs console=${console},${baudrate} " \
265 "rescue_sysnum=${rescue_sysnum} root=${usbroot} rw\0 " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100266 "mmc_rescue_boot=" \
267 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100268 "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 Schochera051ee92019-12-01 11:23:11 +0100271 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100272 "echo RESCUE SYSTEM FROM SD-CARD BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100273 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100274 "fi;\0" \
275 "main_rescue_boot=" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100276 "if run main_load_pubkey hab_check_addr " \
277 "main_load_fit hab_check_flash_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100278 "if run mainboot; then ; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100279 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100280 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100281 "if run rescue_load_pubkey hab_check_addr " \
282 "rescue_load_fit hab_check_file_fit; then " \
283 "run mainRargs; run rescueboot; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100284 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100285 "echo RESCUE SYSTEM BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100286 "run dead; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100287 "fi; " \
288 "fi; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100289 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100290 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100291 "if run rescue_load_pubkey hab_check_addr " \
292 "rescue_load_fit hab_check_file_fit; then " \
293 "run mainRargs; run rescueboot; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100294 "else " \
295 "echo RESCUE SYSTEM BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100296 "run dead; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100297 "fi; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100298 "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 Schocher5a0baf42020-11-30 20:46:02 +0100310 "if run usb_load_pubkey hab_check_addr " \
311 "usb_load_fit hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100312 "run usbboot; " \
313 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100314 "if run usb_load_pubkeyf hab_check_addr " \
315 "usb_load_fitf hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100316 "run usbboot; " \
317 "fi; "\
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100318 "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 Schocher9eca4612019-12-01 11:23:28 +0100321 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100322 "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 Schocher9eca4612019-12-01 11:23:28 +0100325 "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 Schocher5a0baf42020-11-30 20:46:02 +0100334 "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 Schocher9eca4612019-12-01 11:23:28 +0100339 "else " \
340 "usb start;" \
341 "if usb storage; then " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100342 "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 Schocher9eca4612019-12-01 11:23:28 +0100347 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100348 "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 Schocher9eca4612019-12-01 11:23:28 +0100353 "fi; " \
354 "fi;" \
355 "fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100356 "echo RESCUE SYSTEM ON SD OR " \
357 "USB BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100358 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100359 "else " \
360 "usb start;" \
361 "if usb storage; then " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100362 "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 Schocher9eca4612019-12-01 11:23:28 +0100367 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100368 "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 Schocher9eca4612019-12-01 11:23:28 +0100373 "fi; " \
374 "fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100375 "echo RESCUE SYSTEM ON USB BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100376 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100377 "fi; " \
378 "else "\
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100379 "if run rescue_load_pubkey hab_check_addr " \
380 "rescue_load_fit hab_check_file_fit; then " \
381 "run mainRargs; run rescueboot; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100382 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100383 "echo RESCUE SYSTEM ON BOARD BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100384 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100385 "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 Schocher5a0baf42020-11-30 20:46:02 +0100393 "if run mmc_load_pubkey hab_check_addr " \
394 "mmc_load_fit hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100395 "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 Schochera051ee92019-12-01 11:23:11 +0100404 "fi; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100405 "else "\
406 "run main_rescue_boot;" \
407 "fi; \0"\
Heiko Schocher19c3cd92019-12-01 11:23:29 +0100408 HAB_EXTRA_SETTINGS \
Tom Rinicc3b0032021-08-10 17:34:20 -0400409 EXTRA_ENV_BOARD_SETTINGS
Heiko Schochera051ee92019-12-01 11:23:11 +0100410
Heiko Schochera051ee92019-12-01 11:23:11 +0100411/* 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 Schochera051ee92019-12-01 11:23:11 +0100418#define CONFIG_SYS_FSL_USDHC_NUM 2
419
Heiko Schochera051ee92019-12-01 11:23:11 +0100420/* DMA stuff, needed for GPMI/MXS NAND support */
421
Heiko Schochera051ee92019-12-01 11:23:11 +0100422/* USB Configs */
Heiko Schochera051ee92019-12-01 11:23:11 +0100423#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 Schocher8f4a1b92019-12-01 11:23:19 +0100431#define CONFIG_IMX_VIDEO_SKIP
Heiko Schochera051ee92019-12-01 11:23:11 +0100432
433#define CONFIG_IMX6_PWM_PER_CLK 66000000
434
Heiko Schocherab77bef2020-11-30 20:46:05 +0100435#define CONFIG_ENV_FLAGS_LIST_STATIC "ethaddr:mw,serial#:sw,board_type:sw," \
436 "sysnum:dw,panel:sw,ipaddr:iw,serverip:iw"
437
Heiko Schocher05729822015-05-18 13:32:31 +0200438#endif /* __ARISTAINETOS2_CONFIG_H */