blob: 1f2b3b58ca69394397c69733457524f60361e626 [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 */
Tom Rini376b88a2022-10-28 20:27:13 -040029#define CFG_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" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100113 "mk_fitfile_path=setenv fit_file /${sysnum}/system.itb\0" \
114 "mk_rescue_fitfile_path=setenv rescue_fit_file /${rescue_sysnum}/system.itb\0" \
115 "mk_uboot_path=setenv uboot /${sysnum}/u-boot.imx\0" \
116 "mk_pubkey_path=setenv pubkey /${sysnum}/PCR.pem\0" \
117 "mk_rescue_pubkey_path=setenv pubkey /${rescue_sysnum}/PCR.pem\0" \
118 "addmisc=setenv bootargs ${bootargs} net.ifnames=0 consoleblank=0 " \
119 "bootmode=${bootmode} rng_core.default_quality=1000 " \
120 "mmcpart=${mmcpart} emmcpart=${emmcpart} sysnum=${sysnum}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100121 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100122 "boot_board_type=bootm ${fit_addr_r}#${board_type}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100123 "get_env=mw ${loadaddr} 0 0x20000;" \
124 "mmc rescan;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100125 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} env.txt;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100126 "env import -t ${loadaddr}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100127 "default_env=gpio set wp_spi_nor.gpio-hog;" \
128 "sf probe;" \
129 "sf protect unlock 0 0x1000000;" \
130 "mw ${loadaddr} 0 0x20000;" \
131 "env export -t ${loadaddr} serial# ethaddr " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100132 "board_type panel;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100133 "env default -a;" \
134 "env import -t ${loadaddr}\0" \
135 "loadbootscript=" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100136 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
137 "${script};\0" \
138 "loadbootscriptUSB=" \
139 "ext4load usb 0 ${loadaddr} ${script};\0" \
140 "loadbootscriptUSBf=" \
141 "fatload usb 0 ${loadaddr} ${script};\0" \
142 "bootscriptUSB=echo Running bootscript from usb-stick ...; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100143 "source \0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100144 "bootscript=echo Running bootscript from mmc ...; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100145 "source \0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100146 "mmcpart=1\0" \
147 "mmcdev=0\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100148 "emmcpart=1\0" \
149 "emmcdev=1\0" \
150 "sysnum=1\0" \
151 "rescue_sysnum=0\0" \
152 "rreason=18\0" \
153 "mainboot=echo Booting from eMMC ...; " \
154 "run mainargs addmtd addmisc;" \
155 "run boot_board_type;" \
156 "bootm ${fit_addr_r}\0" \
157 "mainargs=setenv bootargs console=${console},${baudrate} " \
158 "root=${emmcroot} rootfstype=ext4\0 " \
159 "main_load_fit=run mk_fitfile_path; " \
160 "ext4load mmc ${emmcdev}:${emmcpart} ${fit_addr_r} " \
161 "${fit_file}; " \
162 "imi ${fit_addr_r}\0 " \
163 "rescue_load_fit=run mk_rescue_fitfile_path; " \
164 "ext4load mmc ${emmcdev}:${emmcpart} ${fit_addr_r} " \
165 "${rescue_fit_file}; " \
166 "imi ${fit_addr_r}\0" \
167 "main_load_pubkey=run mk_pubkey_path; " \
168 "setenv hab_check_filetype \"PCR.pem\";" \
169 "env set check_addr ${loadaddr};" \
170 "ext4load mmc ${emmcdev}:${emmcpart} ${loadaddr} " \
171 "${pubkey}\0" \
172 "rescue_load_pubkey=run mk_rescue_pubkey_path; " \
173 "setenv hab_check_filetype \"PCR.pem\";" \
174 "env set check_addr ${loadaddr};" \
175 "ext4load mmc ${emmcdev}:${emmcpart} ${loadaddr} " \
176 "${pubkey}\0" \
177 "mainRargs=setenv bootargs console=${console},${baudrate} " \
178 "rescue_sysnum=${rescue_sysnum} root=${emmcroot} rootfstype=ext4\0" \
Peng Fanbb4bb582022-04-15 12:23:41 +0800179 "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100180 "mmcargs=setenv bootargs console=${console},${baudrate} " \
181 "root=${mmcroot}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100182 "mmcRargs=setenv bootargs console=${console},${baudrate} " \
183 "rescue_sysnum=${rescue_sysnum} root=${mmcroot}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100184 "mmcboot=echo Booting from mmc ...; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100185 "run mmcargs addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100186 "run boot_board_type;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100187 "bootm ${fit_addr_r}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100188 "mmc_load_fit=run mk_fitfile_path; " \
189 "ext4load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100190 "${fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100191 "imi ${fit_addr_r}\0" \
192 "mmc_rescue_load_fit=run mk_rescue_fitfile_path; " \
193 "ext4load mmc ${mmcdev}:${mmcpart} " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100194 "${fit_addr_r} ${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100195 "imi ${fit_addr_r}\0" \
196 "mmc_load_uboot=run mk_uboot_path; " \
197 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
198 "${uboot}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100199 "mmc_upd_uboot=mw.b ${loadaddr} 0xff ${uboot_sz};" \
200 "setexpr cmp_buf ${loadaddr} + ${uboot_sz};" \
201 "setexpr uboot_maxsize ${uboot_sz} - 400;" \
202 "mw.b ${cmp_buf} 0x00 ${uboot_sz};" \
203 "run mmc_load_uboot;sf probe;sf erase 0 ${uboot_sz};" \
204 "sf write ${loadaddr} 400 ${filesize};" \
205 "sf read ${cmp_buf} 400 ${uboot_sz};" \
206 "cmp.b ${loadaddr} ${cmp_buf} ${uboot_maxsize}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100207 "mmc_load_pubkey=run mk_pubkey_path; " \
208 "setenv hab_check_filetype \"PCR.pem\";" \
209 "env set check_addr ${loadaddr};" \
210 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
211 "${pubkey}\0" \
212 "mmc_rescue_load_pubkey=run mk_rescue_pubkey_path; " \
213 "setenv hab_check_filetype \"PCR.pem\";" \
214 "env set check_addr ${loadaddr};" \
215 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
216 "${pubkey}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100217 "rescueboot=echo Booting rescue system ...; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100218 "run addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100219 "if test -n ${rescue_reason}; then run rescue_reason;fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100220 "run boot_board_type;" \
221 "if bootm ${fit_addr_r}; then ; " \
222 "else " \
223 "run dead; " \
224 "fi; \0" \
225 "r_reason_syserr=setenv rescue_reason setenv bootargs " \
226 "\\\\${bootargs} " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100227 "rescueReason=$rreason\0 " \
228 "usb_load_fit=run mk_fitfile_path; " \
229 "ext4load usb 0 ${fit_addr_r} ${fit_file}\0" \
230 "usb_load_fitf=run mk_fitfile_path; " \
231 "fatload usb 0 ${fit_addr_r} ${fit_file}\0" \
232 "usb_load_rescuefit=run mk_rescue_fitfile_path; " \
233 "ext4load usb 0 ${fit_addr_r} " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100234 "${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100235 "usb_load_rescuefitf=run mk_rescue_fitfile_path; " \
236 "fatload 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_pubkey=run mk_pubkey_path; " \
239 "setenv hab_check_filetype \"PCR.pem\";" \
240 "env set check_addr ${loadaddr};" \
241 "ext4load usb 0 ${loadaddr} ${pubkey}\0" \
242 "usb_rescue_load_pubkey=run mk_rescue_pubkey_path; " \
243 "setenv hab_check_filetype \"PCR.pem\";" \
244 "env set check_addr ${loadaddr};" \
245 "ext4load usb 0 ${loadaddr} ${pubkey}\0" \
246 "usb_load_pubkeyf=run mk_pubkey_path; " \
247 "setenv hab_check_filetype \"PCR.pem\";" \
248 "env set check_addr ${loadaddr};" \
249 "fatload usb 0 ${loadaddr} ${pubkey}\0" \
250 "usb_rescue_load_pubkeyf=run mk_rescue_pubkey_path; " \
251 "setenv hab_check_filetype \"PCR.pem\";" \
252 "env set check_addr ${loadaddr};" \
253 "fatload usb 0 ${loadaddr} ${pubkey}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100254 "usbroot=/dev/sda1 rootwait rw\0" \
255 "usbboot=echo Booting from usb-stick ...; " \
256 "run usbargs addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100257 "run boot_board_type;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100258 "bootm ${fit_addr_r}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100259 "usbargs=setenv bootargs console=${console},${baudrate} " \
260 "root=${usbroot}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100261 "usbRargs=setenv bootargs console=${console},${baudrate} " \
262 "rescue_sysnum=${rescue_sysnum} root=${usbroot} rw\0 " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100263 "mmc_rescue_boot=" \
264 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100265 "if run mmc_rescue_load_pubkey hab_check_addr " \
266 "mmc_rescue_load_fit hab_check_file_fit; then " \
267 "run mmcRargs; run rescueboot; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100268 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100269 "echo RESCUE SYSTEM FROM SD-CARD BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100270 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100271 "fi;\0" \
272 "main_rescue_boot=" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100273 "if run main_load_pubkey hab_check_addr " \
274 "main_load_fit hab_check_flash_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100275 "if run mainboot; then ; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100276 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100277 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100278 "if run rescue_load_pubkey hab_check_addr " \
279 "rescue_load_fit hab_check_file_fit; then " \
280 "run mainRargs; run rescueboot; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100281 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100282 "echo RESCUE SYSTEM BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100283 "run dead; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100284 "fi; " \
285 "fi; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100286 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100287 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100288 "if run rescue_load_pubkey hab_check_addr " \
289 "rescue_load_fit hab_check_file_fit; then " \
290 "run mainRargs; run rescueboot; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100291 "else " \
292 "echo RESCUE SYSTEM BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100293 "run dead; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100294 "fi; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100295 "fi;\0" \
296 "usb_mmc_rescue_boot=" \
297 "usb start;" \
298 "if usb storage; then " \
299 "if run loadbootscriptUSB " \
300 "hab_check_file_bootscript;" \
301 "then run bootscriptUSB; " \
302 "fi; " \
303 "if run loadbootscriptUSBf " \
304 "hab_check_file_bootscript;" \
305 "then run bootscriptUSB; " \
306 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100307 "if run usb_load_pubkey hab_check_addr " \
308 "usb_load_fit hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100309 "run usbboot; " \
310 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100311 "if run usb_load_pubkeyf hab_check_addr " \
312 "usb_load_fitf hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100313 "run usbboot; " \
314 "fi; "\
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100315 "if run usb_rescue_load_pubkey hab_check_addr " \
316 "usb_load_rescuefit hab_check_file_fit; then " \
317 "run r_reason_syserr usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100318 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100319 "if run usb_rescue_load_pubkeyf hab_check_addr " \
320 "usb_load_rescuefitf hab_check_file_fit; then " \
321 "run r_reason_syserr usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100322 "fi; " \
323 "run mmc_rescue_boot;" \
324 "fi; "\
325 "run mmc_rescue_boot;\0" \
326 "rescue_xload_boot=" \
327 "run r_reason_syserr;" \
328 "if test ${bootmode} -ne 0 ; then " \
329 "mmc dev ${mmcdev};" \
330 "if mmc rescan; then " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100331 "if run mmc_rescue_load_pubkey " \
332 "hab_check_addr " \
333 "mmc_rescue_load_fit " \
334 "hab_check_file_fit; then " \
335 "run mmcRargs; run rescueboot; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100336 "else " \
337 "usb start;" \
338 "if usb storage; then " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100339 "if run usb_rescue_load_pubkey " \
340 "hab_check_addr " \
341 "usb_load_rescuefit " \
342 "hab_check_file_fit; then " \
343 "run usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100344 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100345 "if run usb_rescue_load_pubkeyf " \
346 "hab_check_addr " \
347 "usb_load_rescuefitf " \
348 "hab_check_file_fit; then " \
349 "run usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100350 "fi; " \
351 "fi;" \
352 "fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100353 "echo RESCUE SYSTEM ON SD OR " \
354 "USB BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100355 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100356 "else " \
357 "usb start;" \
358 "if usb storage; then " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100359 "if run usb_rescue_load_pubkey " \
360 "hab_check_addr " \
361 "usb_load_rescuefit " \
362 "hab_check_file_fit; then " \
363 "run usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100364 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100365 "if run usb_rescue_load_pubkeyf " \
366 "hab_check_addr " \
367 "usb_load_rescuefitf " \
368 "hab_check_file_fit; then " \
369 "run usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100370 "fi; " \
371 "fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100372 "echo RESCUE SYSTEM ON USB BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100373 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100374 "fi; " \
375 "else "\
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100376 "if run rescue_load_pubkey hab_check_addr " \
377 "rescue_load_fit hab_check_file_fit; then " \
378 "run mainRargs; run rescueboot; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100379 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100380 "echo RESCUE SYSTEM ON BOARD BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100381 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100382 "fi; " \
383 "fi;\0" \
384 "ari_boot=if test ${bootmode} -ne 0 ; then " \
385 "mmc dev ${mmcdev};" \
386 "if mmc rescan; then " \
387 "if run loadbootscript hab_check_file_bootscript;" \
388 "then run bootscript; " \
389 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100390 "if run mmc_load_pubkey hab_check_addr " \
391 "mmc_load_fit hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100392 "if run mmcboot; then ; " \
393 "else " \
394 "run mmc_rescue_boot;" \
395 "fi; " \
396 "else " \
397 "run usb_mmc_rescue_boot;" \
398 "fi; " \
399 "else " \
400 "run usb_mmc_rescue_boot;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100401 "fi; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100402 "else "\
403 "run main_rescue_boot;" \
404 "fi; \0"\
Heiko Schocher19c3cd92019-12-01 11:23:29 +0100405 HAB_EXTRA_SETTINGS \
Tom Rinicc3b0032021-08-10 17:34:20 -0400406 EXTRA_ENV_BOARD_SETTINGS
Heiko Schochera051ee92019-12-01 11:23:11 +0100407
Heiko Schochera051ee92019-12-01 11:23:11 +0100408/* Physical Memory Map */
409#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
410
411#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
412#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
413#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
414
Tom Rini376b88a2022-10-28 20:27:13 -0400415#define CFG_SYS_FSL_USDHC_NUM 2
Heiko Schochera051ee92019-12-01 11:23:11 +0100416
Heiko Schochera051ee92019-12-01 11:23:11 +0100417/* DMA stuff, needed for GPMI/MXS NAND support */
418
Heiko Schochera051ee92019-12-01 11:23:11 +0100419/* USB Configs */
Heiko Schochera051ee92019-12-01 11:23:11 +0100420#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
421#define CONFIG_MXC_USB_FLAGS 0
422
423/* UBI support */
424
425/* Framebuffer */
426/* check this console not needed, after test remove it */
Heiko Schocher8f4a1b92019-12-01 11:23:19 +0100427#define CONFIG_IMX_VIDEO_SKIP
Heiko Schochera051ee92019-12-01 11:23:11 +0100428
429#define CONFIG_IMX6_PWM_PER_CLK 66000000
430
Heiko Schocherab77bef2020-11-30 20:46:05 +0100431#define CONFIG_ENV_FLAGS_LIST_STATIC "ethaddr:mw,serial#:sw,board_type:sw," \
432 "sysnum:dw,panel:sw,ipaddr:iw,serverip:iw"
433
Heiko Schocher05729822015-05-18 13:32:31 +0200434#endif /* __ARISTAINETOS2_CONFIG_H */