xref: /rk3399_rockchip-uboot/include/configs/mx6sxsabreauto.h (revision cf94a3427abf2fdf3355f251aacce82305136fac)
1*cf94a342SYe Li /*
2*cf94a342SYe Li  * Copyright 2014 Freescale Semiconductor, Inc.
3*cf94a342SYe Li  *
4*cf94a342SYe Li  * Configuration settings for the Freescale i.MX6SX Sabreauto board.
5*cf94a342SYe Li  *
6*cf94a342SYe Li  * SPDX-License-Identifier:	GPL-2.0+
7*cf94a342SYe Li  */
8*cf94a342SYe Li 
9*cf94a342SYe Li 
10*cf94a342SYe Li #ifndef __CONFIG_H
11*cf94a342SYe Li #define __CONFIG_H
12*cf94a342SYe Li 
13*cf94a342SYe Li #include "mx6_common.h"
14*cf94a342SYe Li 
15*cf94a342SYe Li 
16*cf94a342SYe Li /* Size of malloc() pool */
17*cf94a342SYe Li #define CONFIG_SYS_MALLOC_LEN		(3 * SZ_1M)
18*cf94a342SYe Li 
19*cf94a342SYe Li #define CONFIG_BOARD_EARLY_INIT_F
20*cf94a342SYe Li #define CONFIG_BOARD_LATE_INIT
21*cf94a342SYe Li 
22*cf94a342SYe Li #define CONFIG_MXC_UART
23*cf94a342SYe Li #define CONFIG_MXC_UART_BASE		UART1_BASE
24*cf94a342SYe Li 
25*cf94a342SYe Li #define CONFIG_EXTRA_ENV_SETTINGS \
26*cf94a342SYe Li 	"script=boot.scr\0" \
27*cf94a342SYe Li 	"image=zImage\0" \
28*cf94a342SYe Li 	"console=ttymxc0\0" \
29*cf94a342SYe Li 	"fdt_high=0xffffffff\0" \
30*cf94a342SYe Li 	"initrd_high=0xffffffff\0" \
31*cf94a342SYe Li 	"fdt_file=imx6sx-sabreauto.dtb\0" \
32*cf94a342SYe Li 	"fdt_addr=0x88000000\0" \
33*cf94a342SYe Li 	"boot_fdt=try\0" \
34*cf94a342SYe Li 	"ip_dyn=yes\0" \
35*cf94a342SYe Li 	"mmcdev=0\0" \
36*cf94a342SYe Li 	"mmcpart=1\0" \
37*cf94a342SYe Li 	"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
38*cf94a342SYe Li 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
39*cf94a342SYe Li 		"root=${mmcroot}\0" \
40*cf94a342SYe Li 	"loadbootscript=" \
41*cf94a342SYe Li 		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
42*cf94a342SYe Li 	"bootscript=echo Running bootscript from mmc ...; " \
43*cf94a342SYe Li 		"source\0" \
44*cf94a342SYe Li 	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
45*cf94a342SYe Li 	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
46*cf94a342SYe Li 	"mmcboot=echo Booting from mmc ...; " \
47*cf94a342SYe Li 		"run mmcargs; " \
48*cf94a342SYe Li 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
49*cf94a342SYe Li 			"if run loadfdt; then " \
50*cf94a342SYe Li 				"bootz ${loadaddr} - ${fdt_addr}; " \
51*cf94a342SYe Li 			"else " \
52*cf94a342SYe Li 				"if test ${boot_fdt} = try; then " \
53*cf94a342SYe Li 					"bootz; " \
54*cf94a342SYe Li 				"else " \
55*cf94a342SYe Li 					"echo WARN: Cannot load the DT; " \
56*cf94a342SYe Li 				"fi; " \
57*cf94a342SYe Li 			"fi; " \
58*cf94a342SYe Li 		"else " \
59*cf94a342SYe Li 			"bootz; " \
60*cf94a342SYe Li 		"fi;\0" \
61*cf94a342SYe Li 	"netargs=setenv bootargs console=${console},${baudrate} " \
62*cf94a342SYe Li 		"root=/dev/nfs " \
63*cf94a342SYe Li 	"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
64*cf94a342SYe Li 		"netboot=echo Booting from net ...; " \
65*cf94a342SYe Li 		"run netargs; " \
66*cf94a342SYe Li 		"if test ${ip_dyn} = yes; then " \
67*cf94a342SYe Li 			"setenv get_cmd dhcp; " \
68*cf94a342SYe Li 		"else " \
69*cf94a342SYe Li 			"setenv get_cmd tftp; " \
70*cf94a342SYe Li 		"fi; " \
71*cf94a342SYe Li 		"${get_cmd} ${image}; " \
72*cf94a342SYe Li 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
73*cf94a342SYe Li 			"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
74*cf94a342SYe Li 				"bootz ${loadaddr} - ${fdt_addr}; " \
75*cf94a342SYe Li 			"else " \
76*cf94a342SYe Li 				"if test ${boot_fdt} = try; then " \
77*cf94a342SYe Li 					"bootz; " \
78*cf94a342SYe Li 				"else " \
79*cf94a342SYe Li 					"echo WARN: Cannot load the DT; " \
80*cf94a342SYe Li 				"fi; " \
81*cf94a342SYe Li 			"fi; " \
82*cf94a342SYe Li 		"else " \
83*cf94a342SYe Li 			"bootz; " \
84*cf94a342SYe Li 		"fi;\0"
85*cf94a342SYe Li 
86*cf94a342SYe Li #define CONFIG_BOOTCOMMAND \
87*cf94a342SYe Li 	   "mmc dev ${mmcdev};" \
88*cf94a342SYe Li 	   "mmc dev ${mmcdev}; if mmc rescan; then " \
89*cf94a342SYe Li 		   "if run loadbootscript; then " \
90*cf94a342SYe Li 			   "run bootscript; " \
91*cf94a342SYe Li 		   "else " \
92*cf94a342SYe Li 			   "if run loadimage; then " \
93*cf94a342SYe Li 				   "run mmcboot; " \
94*cf94a342SYe Li 			   "else run netboot; " \
95*cf94a342SYe Li 			   "fi; " \
96*cf94a342SYe Li 		   "fi; " \
97*cf94a342SYe Li 	   "else run netboot; fi"
98*cf94a342SYe Li 
99*cf94a342SYe Li /* Miscellaneous configurable options */
100*cf94a342SYe Li #define CONFIG_SYS_MEMTEST_START	0x80000000
101*cf94a342SYe Li #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + 0x10000)
102*cf94a342SYe Li 
103*cf94a342SYe Li #define CONFIG_STACKSIZE		SZ_128K
104*cf94a342SYe Li 
105*cf94a342SYe Li /* Physical Memory Map */
106*cf94a342SYe Li #define CONFIG_NR_DRAM_BANKS		1
107*cf94a342SYe Li #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
108*cf94a342SYe Li #define PHYS_SDRAM_SIZE			SZ_2G
109*cf94a342SYe Li 
110*cf94a342SYe Li #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
111*cf94a342SYe Li #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
112*cf94a342SYe Li #define CONFIG_SYS_INIT_RAM_SIZE	IRAM_SIZE
113*cf94a342SYe Li 
114*cf94a342SYe Li #define CONFIG_SYS_INIT_SP_OFFSET \
115*cf94a342SYe Li 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
116*cf94a342SYe Li #define CONFIG_SYS_INIT_SP_ADDR \
117*cf94a342SYe Li 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
118*cf94a342SYe Li 
119*cf94a342SYe Li /* MMC Configuration */
120*cf94a342SYe Li #define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC3_BASE_ADDR
121*cf94a342SYe Li 
122*cf94a342SYe Li /* I2C Configs */
123*cf94a342SYe Li #define CONFIG_CMD_I2C
124*cf94a342SYe Li #define CONFIG_SYS_I2C
125*cf94a342SYe Li #define CONFIG_SYS_I2C_MXC
126*cf94a342SYe Li #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
127*cf94a342SYe Li #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
128*cf94a342SYe Li #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
129*cf94a342SYe Li #define CONFIG_SYS_I2C_SPEED		  100000
130*cf94a342SYe Li 
131*cf94a342SYe Li /* PMIC */
132*cf94a342SYe Li #define CONFIG_POWER
133*cf94a342SYe Li #define CONFIG_POWER_I2C
134*cf94a342SYe Li #define CONFIG_POWER_PFUZE100
135*cf94a342SYe Li #define CONFIG_POWER_PFUZE100_I2C_ADDR	0x08
136*cf94a342SYe Li 
137*cf94a342SYe Li /* NAND flash command */
138*cf94a342SYe Li #define CONFIG_CMD_NAND
139*cf94a342SYe Li #define CONFIG_CMD_NAND_TRIMFFS
140*cf94a342SYe Li 
141*cf94a342SYe Li /* NAND stuff */
142*cf94a342SYe Li #define CONFIG_NAND_MXS
143*cf94a342SYe Li #define CONFIG_SYS_MAX_NAND_DEVICE     1
144*cf94a342SYe Li #define CONFIG_SYS_NAND_BASE           0x40000000
145*cf94a342SYe Li #define CONFIG_SYS_NAND_5_ADDR_CYCLE
146*cf94a342SYe Li #define CONFIG_SYS_NAND_ONFI_DETECTION
147*cf94a342SYe Li 
148*cf94a342SYe Li /* DMA stuff, needed for GPMI/MXS NAND support */
149*cf94a342SYe Li #define CONFIG_APBH_DMA
150*cf94a342SYe Li #define CONFIG_APBH_DMA_BURST
151*cf94a342SYe Li #define CONFIG_APBH_DMA_BURST8
152*cf94a342SYe Li 
153*cf94a342SYe Li /* Network */
154*cf94a342SYe Li #define CONFIG_CMD_PING
155*cf94a342SYe Li #define CONFIG_CMD_DHCP
156*cf94a342SYe Li #define CONFIG_CMD_MII
157*cf94a342SYe Li 
158*cf94a342SYe Li #define CONFIG_FEC_MXC
159*cf94a342SYe Li #define CONFIG_MII
160*cf94a342SYe Li 
161*cf94a342SYe Li #define IMX_FEC_BASE			ENET2_BASE_ADDR
162*cf94a342SYe Li #define CONFIG_FEC_MXC_PHYADDR          0x0
163*cf94a342SYe Li 
164*cf94a342SYe Li #define CONFIG_FEC_XCV_TYPE             RGMII
165*cf94a342SYe Li #define CONFIG_ETHPRIME                 "FEC"
166*cf94a342SYe Li 
167*cf94a342SYe Li #define CONFIG_PHYLIB
168*cf94a342SYe Li #define CONFIG_PHY_ATHEROS
169*cf94a342SYe Li 
170*cf94a342SYe Li 
171*cf94a342SYe Li #define CONFIG_CMD_USB
172*cf94a342SYe Li #ifdef CONFIG_CMD_USB
173*cf94a342SYe Li #define CONFIG_USB_EHCI
174*cf94a342SYe Li #define CONFIG_USB_EHCI_MX6
175*cf94a342SYe Li #define CONFIG_USB_STORAGE
176*cf94a342SYe Li #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
177*cf94a342SYe Li #define CONFIG_USB_HOST_ETHER
178*cf94a342SYe Li #define CONFIG_USB_ETHER_ASIX
179*cf94a342SYe Li #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
180*cf94a342SYe Li #define CONFIG_MXC_USB_FLAGS   0
181*cf94a342SYe Li #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
182*cf94a342SYe Li #endif
183*cf94a342SYe Li 
184*cf94a342SYe Li #define CONFIG_IMX_THERMAL
185*cf94a342SYe Li 
186*cf94a342SYe Li #define CONFIG_CMD_TIME
187*cf94a342SYe Li 
188*cf94a342SYe Li #define CONFIG_FSL_QSPI
189*cf94a342SYe Li #ifdef CONFIG_FSL_QSPI
190*cf94a342SYe Li #define CONFIG_CMD_SF
191*cf94a342SYe Li #define CONFIG_SYS_FSL_QSPI_AHB
192*cf94a342SYe Li #define CONFIG_SF_DEFAULT_BUS		0
193*cf94a342SYe Li #define CONFIG_SF_DEFAULT_CS		0
194*cf94a342SYe Li #define CONFIG_SF_DEFAULT_SPEED	40000000
195*cf94a342SYe Li #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
196*cf94a342SYe Li #define FSL_QSPI_FLASH_SIZE		SZ_32M
197*cf94a342SYe Li #define FSL_QSPI_FLASH_NUM		2
198*cf94a342SYe Li #endif
199*cf94a342SYe Li 
200*cf94a342SYe Li #define CONFIG_ENV_OFFSET		(8 * SZ_64K)
201*cf94a342SYe Li #define CONFIG_ENV_SIZE			SZ_8K
202*cf94a342SYe Li #define CONFIG_ENV_IS_IN_MMC
203*cf94a342SYe Li 
204*cf94a342SYe Li #define CONFIG_SYS_FSL_USDHC_NUM	2
205*cf94a342SYe Li #if defined(CONFIG_ENV_IS_IN_MMC)
206*cf94a342SYe Li #define CONFIG_SYS_MMC_ENV_DEV		0  /*USDHC3*/
207*cf94a342SYe Li #endif
208*cf94a342SYe Li 
209*cf94a342SYe Li #define CONFIG_PCA953X
210*cf94a342SYe Li #define CONFIG_SYS_I2C_PCA953X_WIDTH	{ {0x30, 8}, {0x32, 8}, {0x34, 8} }
211*cf94a342SYe Li 
212*cf94a342SYe Li #endif				/* __CONFIG_H */
213