1 /* SPDX-License-Identifier: GPL-2.0+ */
7 * Copyright (C) 2012 Freescale Semiconductor, Inc.
9 * Configuration settings for the Freescale i.MX6DL aristainetos2 board.
11 #ifndef __ARISTAINETOS2_CONFIG_H
12 #define __ARISTAINETOS2_CONFIG_H
14 #define CONFIG_HOSTNAME "aristainetos2"
16 #define CONFIG_MXC_UART_BASE UART2_BASE
17 #define CONSOLE_DEV "ttymxc1"
19 #define CONFIG_FEC_XCV_TYPE RGMII
21 #define CONFIG_EXTRA_ENV_BOARD_SETTINGS \
22 "board_type=aristainetos2_7@1\0" \
23 "nor_bootdelay=-2\0" \
24 "mtdids=nand0=gpmi-nand,nor0=spi3.1\0" \
25 "mtdparts=mtdparts=spi3.1:832k(u-boot),64k(env),64k(env-red)," \
26 "-(rescue-system);gpmi-nand:-(ubi)\0" \
27 "addmisc=setenv bootargs ${bootargs} net.ifnames=0 consoleblank=0\0" \
28 "ubiargs=setenv bootargs console=${console},${baudrate} " \
29 "ubi.mtd=0,4096 root=ubi0:rootfs rootfstype=ubifs\0 " \
30 "ubifs_load_fit=sf probe;ubi part ubi 4096;ubifsmount ubi:rootfs;" \
31 "ubifsload ${fit_addr_r} /boot/system.itb; " \
32 "imi ${fit_addr_r}\0 "
34 #define ARISTAINETOS_USB_OTG_PWR IMX_GPIO_NR(4, 15)
35 #define ARISTAINETOS_USB_H1_PWR IMX_GPIO_NR(1, 0)
36 #define CONFIG_GPIO_ENABLE_SPI_FLASH IMX_GPIO_NR(2, 15)
39 #define CONFIG_SYS_LDB_CLOCK 33246000
42 #include "mx6_common.h"
44 #define CONFIG_MACH_TYPE 4501
45 #define CONFIG_MMCROOT "/dev/mmcblk0p1"
48 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
50 #define IMX_FEC_BASE ENET_BASE_ADDR
51 #define CONFIG_ETHPRIME "FEC"
52 #define CONFIG_FEC_MXC_PHYADDR 0
54 #define CONFIG_SYS_SPI_ST_ENABLE_WP_PIN
56 #define CONFIG_EXTRA_ENV_SETTINGS \
57 "disable_giga=yes\0" \
58 "script=u-boot.scr\0" \
59 "fit_file=/boot/system.itb\0" \
60 "loadaddr=0x12000000\0" \
61 "fit_addr_r=0x14000000\0" \
62 "uboot=/boot/u-boot.imx\0" \
64 "rescue_sys_addr=f0000\0" \
65 "rescue_sys_length=f10000\0" \
68 "console=" CONSOLE_DEV "\0" \
69 "fdt_high=0xffffffff\0" \
70 "initrd_high=0xffffffff\0" \
71 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
72 "set_fit_default=fdt addr ${fit_addr_r};fdt set /configurations " \
73 "default ${board_type}\0" \
74 "get_env=mw ${loadaddr} 0 0x20000;" \
76 "ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} env.txt;" \
77 "env import -t ${loadaddr}\0" \
78 "default_env=mw ${loadaddr} 0 0x20000;" \
79 "env export -t ${loadaddr} serial# ethaddr eth1addr " \
82 "env import -t ${loadaddr}\0" \
84 "ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
85 "bootscript=echo Running bootscript from mmc ...; " \
89 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
90 "mmcargs=setenv bootargs console=${console},${baudrate} " \
92 "mmcboot=echo Booting from mmc ...; " \
93 "run mmcargs addmtd addmisc set_fit_default;" \
94 "bootm ${fit_addr_r}\0" \
95 "mmc_load_fit=ext2load mmc ${mmcdev}:${mmcpart} ${fit_addr_r} " \
97 "mmc_load_uboot=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
99 "mmc_upd_uboot=mw.b ${loadaddr} 0xff ${uboot_sz};" \
100 "setexpr cmp_buf ${loadaddr} + ${uboot_sz};" \
101 "setexpr uboot_maxsize ${uboot_sz} - 400;" \
102 "mw.b ${cmp_buf} 0x00 ${uboot_sz};" \
103 "run mmc_load_uboot;sf probe;sf erase 0 ${uboot_sz};" \
104 "sf write ${loadaddr} 400 ${filesize};" \
105 "sf read ${cmp_buf} 400 ${uboot_sz};" \
106 "cmp.b ${loadaddr} ${cmp_buf} ${uboot_maxsize}\0" \
107 "ubiboot=echo Booting from ubi ...; " \
108 "run ubiargs addmtd addmisc set_fit_default;" \
109 "bootm ${fit_addr_r}\0" \
110 "rescueargs=setenv bootargs console=${console},${baudrate} " \
111 "root=/dev/ram rw\0 " \
112 "rescueboot=echo Booting rescue system from NOR ...; " \
113 "run rescueargs addmtd addmisc set_fit_default;" \
114 "bootm ${fit_addr_r}\0" \
115 "rescue_load_fit=sf probe;sf read ${fit_addr_r} ${rescue_sys_addr} " \
116 "${rescue_sys_length}; imi ${fit_addr_r}\0" \
117 CONFIG_EXTRA_ENV_BOARD_SETTINGS
119 #define CONFIG_BOOTCOMMAND \
120 "mmc dev ${mmcdev};" \
121 "if mmc rescan; then " \
122 "if run loadbootscript; then " \
125 "if run mmc_load_fit; then " \
128 "if run ubifs_load_fit; then " \
131 "if run rescue_load_fit; then " \
134 "echo RESCUE SYSTEM BOOT " \
141 "if run ubifs_load_fit; then " \
144 "if run rescue_load_fit; then " \
147 "echo RESCUE SYSTEM BOOT FAILURE;" \
152 #define CONFIG_ARP_TIMEOUT 200UL
154 #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
155 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x100000)
156 #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
158 /* Physical Memory Map */
159 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
161 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
162 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
163 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
165 #define CONFIG_SYS_INIT_SP_OFFSET \
166 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
167 #define CONFIG_SYS_INIT_SP_ADDR \
168 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
170 #define CONFIG_SYS_FSL_USDHC_NUM 2
173 #define CONFIG_SYS_I2C
174 #define CONFIG_SYS_I2C_SPEED 100000
175 #define CONFIG_SYS_I2C_SLAVE 0x7f
176 #define CONFIG_SYS_I2C_NOPROBES { {0, 0x00} }
179 #define CONFIG_SYS_MAX_NAND_DEVICE 1
180 #define CONFIG_SYS_NAND_BASE 0x40000000
181 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
182 #define CONFIG_SYS_NAND_ONFI_DETECTION
184 /* DMA stuff, needed for GPMI/MXS NAND support */
187 #define CONFIG_SYS_I2C_RTC_ADDR 0x68
188 #define CONFIG_SYS_RTC_BUS_NUM 2
189 #define CONFIG_RTC_M41T11
192 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
193 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
194 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
195 #define CONFIG_MXC_USB_FLAGS 0
200 /* check this console not needed, after test remove it */
201 #define CONFIG_VIDEO_BMP_RLE8
202 #define CONFIG_SPLASH_SCREEN
203 #define CONFIG_SPLASH_SCREEN_ALIGN
204 #define CONFIG_BMP_16BPP
205 #define CONFIG_VIDEO_LOGO
206 #define CONFIG_VIDEO_BMP_LOGO
207 #define CONFIG_IMX_VIDEO_SKIP
209 #define CONFIG_IMX6_PWM_PER_CLK 66000000
212 #endif /* __ARISTAINETOS2_CONFIG_H */