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