blob: 78fa1a969e7f953dc9aa6fe601374a984a853c7a [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)
Heiko Schocher05729822015-05-18 13:32:31 +020017#define CONFIG_MXC_UART_BASE UART2_BASE
Simon Glass4694a742016-10-17 20:12:39 -060018#define CONSOLE_DEV "ttymxc1"
Heiko Schocherb43a1d72020-11-30 20:46:03 +010019#elif (CONFIG_SYS_BOARD_VERSION == 6)
20#define CONFIG_MXC_UART_BASE UART1_BASE
21#define CONSOLE_DEV "ttymxc0"
Heiko Schocher5a0baf42020-11-30 20:46:02 +010022#endif
Heiko Schocher05729822015-05-18 13:32:31 +020023
24#define CONFIG_FEC_XCV_TYPE RGMII
Heiko Schocher05729822015-05-18 13:32:31 +020025
Heiko Schocher05729822015-05-18 13:32:31 +020026/* Framebuffer */
Heiko Schocher8f4a1b92019-12-01 11:23:19 +010027#define CONFIG_SYS_LDB_CLOCK 28341000
Heiko Schocher05729822015-05-18 13:32:31 +020028
Heiko Schochera051ee92019-12-01 11:23:11 +010029#include "mx6_common.h"
30
31#define CONFIG_MACH_TYPE 4501
32#define CONFIG_MMCROOT "/dev/mmcblk0p1"
33
34/* MMC Configs */
Heiko Schocher7344de12019-12-01 11:23:14 +010035#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
Heiko Schochera051ee92019-12-01 11:23:11 +010036
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 Schocher19c3cd92019-12-01 11:23:29 +010043#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 Schocher5a0baf42020-11-30 20:46:02 +010084 "hab_check_addr=echo HAB check addr always returns " \
85 "true;true\0" \
Heiko Schocher19c3cd92019-12-01 11:23:29 +010086 "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 Schocher5a0baf42020-11-30 20:46:02 +010095#if (CONFIG_SYS_BOARD_VERSION == 5)
Heiko Schocher57c4aad2019-12-01 11:23:30 +010096#define CONFIG_EXTRA_ENV_BOARD_SETTINGS \
Heiko Schocher5a0baf42020-11-30 20:46:02 +010097 "dead=while true; do; " \
98 "led led_red on; sleep 1;" \
99 "led led_red off; sleep 1;" \
100 "done\0"
Heiko Schocherb43a1d72020-11-30 20:46:03 +0100101#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 Schocher57c4aad2019-12-01 11:23:30 +0100107#endif
Heiko Schocher9eca4612019-12-01 11:23:28 +0100108
Heiko Schochera051ee92019-12-01 11:23:11 +0100109#define CONFIG_EXTRA_ENV_SETTINGS \
110 "disable_giga=yes\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100111 "usb_pgood_delay=2000\0" \
112 "nor_bootdelay=-2\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100113 "script=u-boot.scr\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100114 "loadaddr=0x12000000\0" \
115 "fit_addr_r=0x14000000\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100116 "uboot_sz=d0000\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100117 "panel=lb07wv8\0" \
118 "splashpos=m,m\0" \
119 "console=" CONSOLE_DEV "\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100120 "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 Schochera051ee92019-12-01 11:23:11 +0100132 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100133 "boot_board_type=bootm ${fit_addr_r}#${board_type}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100134 "get_env=mw ${loadaddr} 0 0x20000;" \
135 "mmc rescan;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100136 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} env.txt;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100137 "env import -t ${loadaddr}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100138 "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 Schocher5a0baf42020-11-30 20:46:02 +0100143 "board_type panel;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100144 "env default -a;" \
145 "env import -t ${loadaddr}\0" \
146 "loadbootscript=" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100147 "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 Schocher5a0baf42020-11-30 20:46:02 +0100154 "source \0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100155 "bootscript=echo Running bootscript from mmc ...; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100156 "source \0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100157 "mmcpart=1\0" \
158 "mmcdev=0\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100159 "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 Schochera051ee92019-12-01 11:23:11 +0100190 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
191 "mmcargs=setenv bootargs console=${console},${baudrate} " \
192 "root=${mmcroot}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100193 "mmcRargs=setenv bootargs console=${console},${baudrate} " \
194 "rescue_sysnum=${rescue_sysnum} root=${mmcroot}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100195 "mmcboot=echo Booting from mmc ...; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100196 "run mmcargs addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100197 "run boot_board_type;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100198 "bootm ${fit_addr_r}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100199 "mmc_load_fit=run mk_fitfile_path; " \
200 "ext4load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100201 "${fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100202 "imi ${fit_addr_r}\0" \
203 "mmc_rescue_load_fit=run mk_rescue_fitfile_path; " \
204 "ext4load mmc ${mmcdev}:${mmcpart} " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100205 "${fit_addr_r} ${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100206 "imi ${fit_addr_r}\0" \
207 "mmc_load_uboot=run mk_uboot_path; " \
208 "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
209 "${uboot}\0" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100210 "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 Schocher5a0baf42020-11-30 20:46:02 +0100218 "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 Schocher9eca4612019-12-01 11:23:28 +0100228 "rescueboot=echo Booting rescue system ...; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100229 "run addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100230 "if test -n ${rescue_reason}; then run rescue_reason;fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100231 "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 Schocher5a0baf42020-11-30 20:46:02 +0100238 "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 Schocher9eca4612019-12-01 11:23:28 +0100245 "${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100246 "usb_load_rescuefitf=run mk_rescue_fitfile_path; " \
247 "fatload usb 0 ${fit_addr_r} " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100248 "${rescue_fit_file}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100249 "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 Schocher9eca4612019-12-01 11:23:28 +0100265 "usbroot=/dev/sda1 rootwait rw\0" \
266 "usbboot=echo Booting from usb-stick ...; " \
267 "run usbargs addmtd addmisc;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100268 "run boot_board_type;" \
Heiko Schochera051ee92019-12-01 11:23:11 +0100269 "bootm ${fit_addr_r}\0" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100270 "usbargs=setenv bootargs console=${console},${baudrate} " \
271 "root=${usbroot}\0" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100272 "usbRargs=setenv bootargs console=${console},${baudrate} " \
273 "rescue_sysnum=${rescue_sysnum} root=${usbroot} rw\0 " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100274 "mmc_rescue_boot=" \
275 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100276 "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 Schochera051ee92019-12-01 11:23:11 +0100279 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100280 "echo RESCUE SYSTEM FROM SD-CARD BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100281 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100282 "fi;\0" \
283 "main_rescue_boot=" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100284 "if run main_load_pubkey hab_check_addr " \
285 "main_load_fit hab_check_flash_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100286 "if run mainboot; then ; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100287 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100288 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100289 "if run rescue_load_pubkey hab_check_addr " \
290 "rescue_load_fit hab_check_file_fit; then " \
291 "run mainRargs; run rescueboot; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100292 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100293 "echo RESCUE SYSTEM BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100294 "run dead; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100295 "fi; " \
296 "fi; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100297 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100298 "run r_reason_syserr;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100299 "if run rescue_load_pubkey hab_check_addr " \
300 "rescue_load_fit hab_check_file_fit; then " \
301 "run mainRargs; run rescueboot; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100302 "else " \
303 "echo RESCUE SYSTEM BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100304 "run dead; " \
Heiko Schochera051ee92019-12-01 11:23:11 +0100305 "fi; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100306 "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 Schocher5a0baf42020-11-30 20:46:02 +0100318 "if run usb_load_pubkey hab_check_addr " \
319 "usb_load_fit hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100320 "run usbboot; " \
321 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100322 "if run usb_load_pubkeyf hab_check_addr " \
323 "usb_load_fitf hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100324 "run usbboot; " \
325 "fi; "\
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100326 "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 Schocher9eca4612019-12-01 11:23:28 +0100329 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100330 "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 Schocher9eca4612019-12-01 11:23:28 +0100333 "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 Schocher5a0baf42020-11-30 20:46:02 +0100342 "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 Schocher9eca4612019-12-01 11:23:28 +0100347 "else " \
348 "usb start;" \
349 "if usb storage; then " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100350 "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 Schocher9eca4612019-12-01 11:23:28 +0100355 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100356 "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 Schocher9eca4612019-12-01 11:23:28 +0100361 "fi; " \
362 "fi;" \
363 "fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100364 "echo RESCUE SYSTEM ON SD OR " \
365 "USB BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100366 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100367 "else " \
368 "usb start;" \
369 "if usb storage; then " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100370 "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 Schocher9eca4612019-12-01 11:23:28 +0100375 "fi; " \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100376 "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 Schocher9eca4612019-12-01 11:23:28 +0100381 "fi; " \
382 "fi;" \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100383 "echo RESCUE SYSTEM ON USB BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100384 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100385 "fi; " \
386 "else "\
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100387 "if run rescue_load_pubkey hab_check_addr " \
388 "rescue_load_fit hab_check_file_fit; then " \
389 "run mainRargs; run rescueboot; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100390 "else " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100391 "echo RESCUE SYSTEM ON BOARD BOOT FAILURE;" \
Heiko Schocher5a0baf42020-11-30 20:46:02 +0100392 "run dead; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100393 "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 Schocher5a0baf42020-11-30 20:46:02 +0100401 "if run mmc_load_pubkey hab_check_addr " \
402 "mmc_load_fit hab_check_file_fit; then " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100403 "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 Schochera051ee92019-12-01 11:23:11 +0100412 "fi; " \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100413 "else "\
414 "run main_rescue_boot;" \
415 "fi; \0"\
Heiko Schocher19c3cd92019-12-01 11:23:29 +0100416 HAB_EXTRA_SETTINGS \
Heiko Schocher9eca4612019-12-01 11:23:28 +0100417 CONFIG_EXTRA_ENV_BOARD_SETTINGS
Heiko Schochera051ee92019-12-01 11:23:11 +0100418
419#define CONFIG_ARP_TIMEOUT 200UL
420
Heiko Schochera051ee92019-12-01 11:23:11 +0100421/* 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 Schochera051ee92019-12-01 11:23:11 +0100435/* DMA stuff, needed for GPMI/MXS NAND support */
436
Heiko Schochera051ee92019-12-01 11:23:11 +0100437/* USB Configs */
Heiko Schochera051ee92019-12-01 11:23:11 +0100438#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 Schocher8f4a1b92019-12-01 11:23:19 +0100446#define CONFIG_IMX_VIDEO_SKIP
Heiko Schochera051ee92019-12-01 11:23:11 +0100447#define CONFIG_VIDEO_LOGO
448#define CONFIG_VIDEO_BMP_LOGO
Heiko Schochera051ee92019-12-01 11:23:11 +0100449
450#define CONFIG_IMX6_PWM_PER_CLK 66000000
451
Heiko Schocherab77bef2020-11-30 20:46:05 +0100452#define CONFIG_ENV_FLAGS_LIST_STATIC "ethaddr:mw,serial#:sw,board_type:sw," \
453 "sysnum:dw,panel:sw,ipaddr:iw,serverip:iw"
454
Heiko Schocher05729822015-05-18 13:32:31 +0200455#endif /* __ARISTAINETOS2_CONFIG_H */