blob: c1eec5d06ccbb976ecdaff44e99050f25d5ba295 [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 */
Tom Rini6a5dccc2022-11-16 13:10:41 -050023#define CFG_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
Heiko Schocher19c3cd92019-12-01 11:23:29 +010033#ifdef CONFIG_IMX_HAB
34#define HAB_EXTRA_SETTINGS \
35 "hab_check_addr=" \
36 "if hab_auth_img ${check_addr} ${filesize} ; then " \
37 "true;" \
38 "else " \
39 "echo \"HAB checks ${hab_check_filetype} " \
40 "failed!\"; " \
41 "false; " \
42 "fi;\0" \
43 "hab_check_file_fit=" \
44 "if env exists enable_hab_check && test " \
45 "${enable_hab_check} -eq 1 ; then " \
46 "setenv hab_check_filetype \"FIT file on SD card " \
47 "or eMMC\";" \
48 "env set check_addr ${fit_addr_r};" \
49 "run hab_check_addr;" \
50 "else " \
51 "true; "\
52 "fi;\0" \
53 "hab_check_file_bootscript=" \
54 "if env exists enable_hab_check && test " \
55 "${enable_hab_check} -eq 1 ; then " \
56 "setenv hab_check_filetype \"Bootscript file\";" \
57 "env set check_addr ${loadaddr};" \
58 "run hab_check_addr;" \
59 "else " \
60 "true; "\
61 "fi;\0" \
62 "hab_check_flash_fit=" \
63 "if env exists enable_hab_check && test " \
64 "${enable_hab_check} -eq 1 ; then " \
65 "setenv hab_check_filetype \"FIT files on flash\";" \
66 "env set check_addr ${fit_addr_r};" \
67 "run hab_check_addr;" \
68 "else " \
69 "true; "\
70 "fi;\0" \
71 "enable_hab_check=1\0"
72#else
73#define HAB_EXTRA_SETTINGS \
Heiko Schocher5a0baf42020-11-30 20:46:02 +010074 "hab_check_addr=echo HAB check addr always returns " \
75 "true;true\0" \
Heiko Schocher19c3cd92019-12-01 11:23:29 +010076 "hab_check_file_fit=echo HAB check FIT file always returns " \
77 "true;true\0" \
78 "hab_check_flash_fit=echo HAB check flash FIT always returns " \
79 "true;true\0" \
80 "hab_check_file_bootscript=echo HAB check bootscript always " \
81 "returns true;true\0" \
82 "enable_hab_check=0\0"
83#endif
84
Heiko Schocher5a0baf42020-11-30 20:46:02 +010085#if (CONFIG_SYS_BOARD_VERSION == 5)
Tom Rinicc3b0032021-08-10 17:34:20 -040086#define EXTRA_ENV_BOARD_SETTINGS \
Heiko Schocher5a0baf42020-11-30 20:46:02 +010087 "dead=while true; do; " \
88 "led led_red on; sleep 1;" \
89 "led led_red off; sleep 1;" \
90 "done\0"
Heiko Schocherb43a1d72020-11-30 20:46:03 +010091#elif (CONFIG_SYS_BOARD_VERSION == 6)
Tom Rinicc3b0032021-08-10 17:34:20 -040092#define EXTRA_ENV_BOARD_SETTINGS \
Heiko Schocherb43a1d72020-11-30 20:46:03 +010093 "dead=while true; do; " \
94 "led led_red on; led led_red2 on; sleep 1;" \
95 "led led_red off; led led_red2 off;; sleep 1;" \
96 "done\0"
Heiko Schocher57c4aad2019-12-01 11:23:30 +010097#endif
Heiko Schocher9eca4612019-12-01 11:23:28 +010098
Heiko Schochera051ee92019-12-01 11:23:11 +010099#define CONFIG_EXTRA_ENV_SETTINGS \
100 "disable_giga=yes\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100101 "usb_pgood_delay=2000\0" \
102 "nor_bootdelay=-2\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100103 "script=u-boot.scr\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100104 "loadaddr=0x12000000\0" \
105 "fit_addr_r=0x14000000\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100106 "uboot_sz=d0000\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100107 "panel=lb07wv8\0" \
108 "splashpos=m,m\0" \
109 "console=" CONSOLE_DEV "\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100110 "emmcroot=/dev/mmcblk1p1 rootwait rw\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100111 "mk_fitfile_path=setenv fit_file /${sysnum}/system.itb\0" \
112 "mk_rescue_fitfile_path=setenv rescue_fit_file /${rescue_sysnum}/system.itb\0" \
113 "mk_uboot_path=setenv uboot /${sysnum}/u-boot.imx\0" \
114 "mk_pubkey_path=setenv pubkey /${sysnum}/PCR.pem\0" \
115 "mk_rescue_pubkey_path=setenv pubkey /${rescue_sysnum}/PCR.pem\0" \
116 "addmisc=setenv bootargs ${bootargs} net.ifnames=0 consoleblank=0 " \
117 "bootmode=${bootmode} rng_core.default_quality=1000 " \
118 "mmcpart=${mmcpart} emmcpart=${emmcpart} sysnum=${sysnum}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100119 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100120 "boot_board_type=bootm ${fit_addr_r}#${board_type}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100121 "get_env=mw ${loadaddr} 0 0x20000;" \
122 "mmc rescan;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100123 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} env.txt;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100124 "env import -t ${loadaddr}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100125 "default_env=gpio set wp_spi_nor.gpio-hog;" \
126 "sf probe;" \
127 "sf protect unlock 0 0x1000000;" \
128 "mw ${loadaddr} 0 0x20000;" \
129 "env export -t ${loadaddr} serial# ethaddr " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100130 "board_type panel;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100131 "env default -a;" \
132 "env import -t ${loadaddr}\0" \
133 "loadbootscript=" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100134 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
135 "${script};\0" \
136 "loadbootscriptUSB=" \
137 "ext4load usb 0 ${loadaddr} ${script};\0" \
138 "loadbootscriptUSBf=" \
139 "fatload usb 0 ${loadaddr} ${script};\0" \
140 "bootscriptUSB=echo Running bootscript from usb-stick ...; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100141 "source \0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100142 "bootscript=echo Running bootscript from mmc ...; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100143 "source \0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100144 "mmcpart=1\0" \
145 "mmcdev=0\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100146 "emmcpart=1\0" \
147 "emmcdev=1\0" \
148 "sysnum=1\0" \
149 "rescue_sysnum=0\0" \
150 "rreason=18\0" \
151 "mainboot=echo Booting from eMMC ...; " \
152 "run mainargs addmtd addmisc;" \
153 "run boot_board_type;" \
154 "bootm ${fit_addr_r}\0" \
155 "mainargs=setenv bootargs console=${console},${baudrate} " \
156 "root=${emmcroot} rootfstype=ext4\0 " \
157 "main_load_fit=run mk_fitfile_path; " \
158 "ext4load mmc ${emmcdev}:${emmcpart} ${fit_addr_r} " \
159 "${fit_file}; " \
160 "imi ${fit_addr_r}\0 " \
161 "rescue_load_fit=run mk_rescue_fitfile_path; " \
162 "ext4load mmc ${emmcdev}:${emmcpart} ${fit_addr_r} " \
163 "${rescue_fit_file}; " \
164 "imi ${fit_addr_r}\0" \
165 "main_load_pubkey=run mk_pubkey_path; " \
166 "setenv hab_check_filetype \"PCR.pem\";" \
167 "env set check_addr ${loadaddr};" \
168 "ext4load mmc ${emmcdev}:${emmcpart} ${loadaddr} " \
169 "${pubkey}\0" \
170 "rescue_load_pubkey=run mk_rescue_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 "mainRargs=setenv bootargs console=${console},${baudrate} " \
176 "rescue_sysnum=${rescue_sysnum} root=${emmcroot} rootfstype=ext4\0" \
Peng Fanbb4bb582022-04-15 12:23:41 +0800177 "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100178 "mmcargs=setenv bootargs console=${console},${baudrate} " \
179 "root=${mmcroot}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100180 "mmcRargs=setenv bootargs console=${console},${baudrate} " \
181 "rescue_sysnum=${rescue_sysnum} root=${mmcroot}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100182 "mmcboot=echo Booting from mmc ...; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100183 "run mmcargs addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100184 "run boot_board_type;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100185 "bootm ${fit_addr_r}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100186 "mmc_load_fit=run mk_fitfile_path; " \
187 "ext4load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100188 "${fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100189 "imi ${fit_addr_r}\0" \
190 "mmc_rescue_load_fit=run mk_rescue_fitfile_path; " \
191 "ext4load mmc ${mmcdev}:${mmcpart} " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100192 "${fit_addr_r} ${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100193 "imi ${fit_addr_r}\0" \
194 "mmc_load_uboot=run mk_uboot_path; " \
195 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
196 "${uboot}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100197 "mmc_upd_uboot=mw.b ${loadaddr} 0xff ${uboot_sz};" \
198 "setexpr cmp_buf ${loadaddr} + ${uboot_sz};" \
199 "setexpr uboot_maxsize ${uboot_sz} - 400;" \
200 "mw.b ${cmp_buf} 0x00 ${uboot_sz};" \
201 "run mmc_load_uboot;sf probe;sf erase 0 ${uboot_sz};" \
202 "sf write ${loadaddr} 400 ${filesize};" \
203 "sf read ${cmp_buf} 400 ${uboot_sz};" \
204 "cmp.b ${loadaddr} ${cmp_buf} ${uboot_maxsize}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100205 "mmc_load_pubkey=run mk_pubkey_path; " \
206 "setenv hab_check_filetype \"PCR.pem\";" \
207 "env set check_addr ${loadaddr};" \
208 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
209 "${pubkey}\0" \
210 "mmc_rescue_load_pubkey=run mk_rescue_pubkey_path; " \
211 "setenv hab_check_filetype \"PCR.pem\";" \
212 "env set check_addr ${loadaddr};" \
213 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
214 "${pubkey}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100215 "rescueboot=echo Booting rescue system ...; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100216 "run addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100217 "if test -n ${rescue_reason}; then run rescue_reason;fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100218 "run boot_board_type;" \
219 "if bootm ${fit_addr_r}; then ; " \
220 "else " \
221 "run dead; " \
222 "fi; \0" \
223 "r_reason_syserr=setenv rescue_reason setenv bootargs " \
224 "\\\\${bootargs} " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100225 "rescueReason=$rreason\0 " \
226 "usb_load_fit=run mk_fitfile_path; " \
227 "ext4load usb 0 ${fit_addr_r} ${fit_file}\0" \
228 "usb_load_fitf=run mk_fitfile_path; " \
229 "fatload usb 0 ${fit_addr_r} ${fit_file}\0" \
230 "usb_load_rescuefit=run mk_rescue_fitfile_path; " \
231 "ext4load usb 0 ${fit_addr_r} " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100232 "${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100233 "usb_load_rescuefitf=run mk_rescue_fitfile_path; " \
234 "fatload usb 0 ${fit_addr_r} " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100235 "${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100236 "usb_load_pubkey=run mk_pubkey_path; " \
237 "setenv hab_check_filetype \"PCR.pem\";" \
238 "env set check_addr ${loadaddr};" \
239 "ext4load usb 0 ${loadaddr} ${pubkey}\0" \
240 "usb_rescue_load_pubkey=run mk_rescue_pubkey_path; " \
241 "setenv hab_check_filetype \"PCR.pem\";" \
242 "env set check_addr ${loadaddr};" \
243 "ext4load usb 0 ${loadaddr} ${pubkey}\0" \
244 "usb_load_pubkeyf=run mk_pubkey_path; " \
245 "setenv hab_check_filetype \"PCR.pem\";" \
246 "env set check_addr ${loadaddr};" \
247 "fatload usb 0 ${loadaddr} ${pubkey}\0" \
248 "usb_rescue_load_pubkeyf=run mk_rescue_pubkey_path; " \
249 "setenv hab_check_filetype \"PCR.pem\";" \
250 "env set check_addr ${loadaddr};" \
251 "fatload usb 0 ${loadaddr} ${pubkey}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100252 "usbroot=/dev/sda1 rootwait rw\0" \
253 "usbboot=echo Booting from usb-stick ...; " \
254 "run usbargs addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100255 "run boot_board_type;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100256 "bootm ${fit_addr_r}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100257 "usbargs=setenv bootargs console=${console},${baudrate} " \
258 "root=${usbroot}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100259 "usbRargs=setenv bootargs console=${console},${baudrate} " \
260 "rescue_sysnum=${rescue_sysnum} root=${usbroot} rw\0 " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100261 "mmc_rescue_boot=" \
262 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100263 "if run mmc_rescue_load_pubkey hab_check_addr " \
264 "mmc_rescue_load_fit hab_check_file_fit; then " \
265 "run mmcRargs; run rescueboot; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100266 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100267 "echo RESCUE SYSTEM FROM SD-CARD BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100268 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100269 "fi;\0" \
270 "main_rescue_boot=" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100271 "if run main_load_pubkey hab_check_addr " \
272 "main_load_fit hab_check_flash_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100273 "if run mainboot; then ; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100274 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100275 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100276 "if run rescue_load_pubkey hab_check_addr " \
277 "rescue_load_fit hab_check_file_fit; then " \
278 "run mainRargs; run rescueboot; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100279 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100280 "echo RESCUE SYSTEM BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100281 "run dead; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100282 "fi; " \
283 "fi; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100284 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100285 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100286 "if run rescue_load_pubkey hab_check_addr " \
287 "rescue_load_fit hab_check_file_fit; then " \
288 "run mainRargs; run rescueboot; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100289 "else " \
290 "echo RESCUE SYSTEM BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100291 "run dead; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100292 "fi; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100293 "fi;\0" \
294 "usb_mmc_rescue_boot=" \
295 "usb start;" \
296 "if usb storage; then " \
297 "if run loadbootscriptUSB " \
298 "hab_check_file_bootscript;" \
299 "then run bootscriptUSB; " \
300 "fi; " \
301 "if run loadbootscriptUSBf " \
302 "hab_check_file_bootscript;" \
303 "then run bootscriptUSB; " \
304 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100305 "if run usb_load_pubkey hab_check_addr " \
306 "usb_load_fit hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100307 "run usbboot; " \
308 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100309 "if run usb_load_pubkeyf hab_check_addr " \
310 "usb_load_fitf hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100311 "run usbboot; " \
312 "fi; "\
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100313 "if run usb_rescue_load_pubkey hab_check_addr " \
314 "usb_load_rescuefit hab_check_file_fit; then " \
315 "run r_reason_syserr usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100316 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100317 "if run usb_rescue_load_pubkeyf hab_check_addr " \
318 "usb_load_rescuefitf hab_check_file_fit; then " \
319 "run r_reason_syserr usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100320 "fi; " \
321 "run mmc_rescue_boot;" \
322 "fi; "\
323 "run mmc_rescue_boot;\0" \
324 "rescue_xload_boot=" \
325 "run r_reason_syserr;" \
326 "if test ${bootmode} -ne 0 ; then " \
327 "mmc dev ${mmcdev};" \
328 "if mmc rescan; then " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100329 "if run mmc_rescue_load_pubkey " \
330 "hab_check_addr " \
331 "mmc_rescue_load_fit " \
332 "hab_check_file_fit; then " \
333 "run mmcRargs; run rescueboot; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100334 "else " \
335 "usb start;" \
336 "if usb storage; then " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100337 "if run usb_rescue_load_pubkey " \
338 "hab_check_addr " \
339 "usb_load_rescuefit " \
340 "hab_check_file_fit; then " \
341 "run usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100342 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100343 "if run usb_rescue_load_pubkeyf " \
344 "hab_check_addr " \
345 "usb_load_rescuefitf " \
346 "hab_check_file_fit; then " \
347 "run usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100348 "fi; " \
349 "fi;" \
350 "fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100351 "echo RESCUE SYSTEM ON SD OR " \
352 "USB BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100353 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100354 "else " \
355 "usb start;" \
356 "if usb storage; then " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100357 "if run usb_rescue_load_pubkey " \
358 "hab_check_addr " \
359 "usb_load_rescuefit " \
360 "hab_check_file_fit; then " \
361 "run usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100362 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100363 "if run usb_rescue_load_pubkeyf " \
364 "hab_check_addr " \
365 "usb_load_rescuefitf " \
366 "hab_check_file_fit; then " \
367 "run usbRargs; run rescueboot;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100368 "fi; " \
369 "fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100370 "echo RESCUE SYSTEM ON USB BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100371 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100372 "fi; " \
373 "else "\
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100374 "if run rescue_load_pubkey hab_check_addr " \
375 "rescue_load_fit hab_check_file_fit; then " \
376 "run mainRargs; run rescueboot; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100377 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100378 "echo RESCUE SYSTEM ON BOARD BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100379 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100380 "fi; " \
381 "fi;\0" \
382 "ari_boot=if test ${bootmode} -ne 0 ; then " \
383 "mmc dev ${mmcdev};" \
384 "if mmc rescan; then " \
385 "if run loadbootscript hab_check_file_bootscript;" \
386 "then run bootscript; " \
387 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100388 "if run mmc_load_pubkey hab_check_addr " \
389 "mmc_load_fit hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100390 "if run mmcboot; then ; " \
391 "else " \
392 "run mmc_rescue_boot;" \
393 "fi; " \
394 "else " \
395 "run usb_mmc_rescue_boot;" \
396 "fi; " \
397 "else " \
398 "run usb_mmc_rescue_boot;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100399 "fi; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100400 "else "\
401 "run main_rescue_boot;" \
402 "fi; \0"\
Heiko Schocher19c3cd92019-12-01 11:23:29 +0100403 HAB_EXTRA_SETTINGS \
Tom Rinicc3b0032021-08-10 17:34:20 -0400404 EXTRA_ENV_BOARD_SETTINGS
Heiko Schochera051ee92019-12-01 11:23:11 +0100405
Heiko Schochera051ee92019-12-01 11:23:11 +0100406/* Physical Memory Map */
407#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
408
Tom Rinibb4dd962022-11-16 13:10:37 -0500409#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini6a5dccc2022-11-16 13:10:41 -0500410#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
411#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
Heiko Schochera051ee92019-12-01 11:23:11 +0100412
Tom Rini376b88a2022-10-28 20:27:13 -0400413#define CFG_SYS_FSL_USDHC_NUM 2
Heiko Schochera051ee92019-12-01 11:23:11 +0100414
Heiko Schochera051ee92019-12-01 11:23:11 +0100415/* DMA stuff, needed for GPMI/MXS NAND support */
416
Heiko Schochera051ee92019-12-01 11:23:11 +0100417/* USB Configs */
Heiko Schochera051ee92019-12-01 11:23:11 +0100418#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
419#define CONFIG_MXC_USB_FLAGS 0
420
421/* UBI support */
422
423/* Framebuffer */
424/* check this console not needed, after test remove it */
Heiko Schocher8f4a1b92019-12-01 11:23:19 +0100425#define CONFIG_IMX_VIDEO_SKIP
Heiko Schochera051ee92019-12-01 11:23:11 +0100426
427#define CONFIG_IMX6_PWM_PER_CLK 66000000
428
Heiko Schocherab77bef2020-11-30 20:46:05 +0100429#define CONFIG_ENV_FLAGS_LIST_STATIC "ethaddr:mw,serial#:sw,board_type:sw," \
430 "sysnum:dw,panel:sw,ipaddr:iw,serverip:iw"
431
Heiko Schocher05729822015-05-18 13:32:31 +0200432#endif /* __ARISTAINETOS2_CONFIG_H */