xref: /openbmc/u-boot/include/configs/mx6sllevk.h (revision 3788b451)
1 /*
2  * Copyright 2013-2016 Freescale Semiconductor, Inc.
3  *
4  * Configuration settings for the Freescale i.MX6SL EVK board.
5  *
6  * SPDX-License-Identifier:	GPL-2.0+
7  */
8 
9 #ifndef __CONFIG_H
10 #define __CONFIG_H
11 
12 #include "mx6_common.h"
13 
14 #ifdef CONFIG_SECURE_BOOT
15 #ifndef CONFIG_CSF_SIZE
16 #define CONFIG_CSF_SIZE 0x4000
17 #endif
18 #endif
19 
20 /* Size of malloc() pool */
21 #define CONFIG_SYS_MALLOC_LEN		(16 * SZ_1M)
22 
23 #define CONFIG_BOARD_EARLY_INIT_F
24 
25 #define CONFIG_MXC_UART
26 #define CONFIG_MXC_UART_BASE		UART1_BASE
27 
28 /* I2C Configs */
29 #ifdef CONFIG_CMD_I2C
30 #define CONFIG_SYS_I2C_MXC
31 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
32 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
33 #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
34 #define CONFIG_SYS_I2C_SPEED		  100000
35 #endif
36 
37 #define CONFIG_EXTRA_ENV_SETTINGS \
38 	"epdc_waveform=epdc_splash.bin\0" \
39 	"script=boot.scr\0" \
40 	"image=zImage\0" \
41 	"console=ttymxc0\0" \
42 	"fdt_high=0xffffffff\0" \
43 	"initrd_high=0xffffffff\0" \
44 	"fdt_file=imx6sll-evk.dtb\0" \
45 	"fdt_addr=0x83000000\0" \
46 	"boot_fdt=try\0" \
47 	"ip_dyn=yes\0" \
48 	"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
49 	"mmcpart=1\0" \
50 	"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
51 	"mmcautodetect=yes\0" \
52 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
53 		"root=${mmcroot}\0" \
54 	"loadbootscript=" \
55 		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
56 	"bootscript=echo Running bootscript from mmc ...; " \
57 		"source\0" \
58 	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
59 	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
60 	"mmcboot=echo Booting from mmc ...; " \
61 		"run mmcargs; " \
62 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
63 			"if run loadfdt; then " \
64 				"bootz ${loadaddr} - ${fdt_addr}; " \
65 			"else " \
66 				"if test ${boot_fdt} = try; then " \
67 					"bootz; " \
68 				"else " \
69 					"echo WARN: Cannot load the DT; " \
70 				"fi; " \
71 			"fi; " \
72 		"else " \
73 			"bootz; " \
74 		"fi;\0" \
75 	"netargs=setenv bootargs console=${console},${baudrate} " \
76 		"root=/dev/nfs " \
77 	"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
78 		"netboot=echo Booting from net ...; " \
79 		"usb start; " \
80 		"run netargs; " \
81 		"if test ${ip_dyn} = yes; then " \
82 			"setenv get_cmd dhcp; " \
83 		"else " \
84 			"setenv get_cmd tftp; " \
85 		"fi; " \
86 		"${get_cmd} ${image}; " \
87 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
88 			"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
89 				"bootz ${loadaddr} - ${fdt_addr}; " \
90 			"else " \
91 				"if test ${boot_fdt} = try; then " \
92 					"bootz; " \
93 				"else " \
94 					"echo WARN: Cannot load the DT; " \
95 				"fi; " \
96 			"fi; " \
97 		"else " \
98 			"bootz; " \
99 		"fi;\0"
100 
101 #define CONFIG_BOOTCOMMAND \
102 	   "mmc dev ${mmcdev};" \
103 	   "mmc dev ${mmcdev}; if mmc rescan; then " \
104 		   "if run loadbootscript; then " \
105 			   "run bootscript; " \
106 		   "else " \
107 			   "if run loadimage; then " \
108 				   "run mmcboot; " \
109 			   "else run netboot; " \
110 			   "fi; " \
111 		   "fi; " \
112 	   "else run netboot; fi"
113 
114 /* Miscellaneous configurable options */
115 #define CONFIG_SYS_MEMTEST_START	0x80000000
116 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + SZ_128M)
117 
118 #define CONFIG_STACKSIZE		SZ_128K
119 
120 /* Physical Memory Map */
121 #define CONFIG_NR_DRAM_BANKS		1
122 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
123 #define PHYS_SDRAM_SIZE			SZ_2G
124 
125 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
126 #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
127 #define CONFIG_SYS_INIT_RAM_SIZE	IRAM_SIZE
128 
129 #define CONFIG_SYS_INIT_SP_OFFSET \
130 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
131 #define CONFIG_SYS_INIT_SP_ADDR \
132 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
133 
134 /* Environment organization */
135 #define CONFIG_ENV_SIZE			SZ_8K
136 #define CONFIG_SYS_MMC_ENV_PART		0   /* user partition */
137 #define CONFIG_MMCROOT			"/dev/mmcblk0p2"  /* USDHC1 */
138 
139 #define CONFIG_ENV_OFFSET		(12 * SZ_64K)
140 #define CONFIG_ENV_IS_IN_MMC
141 
142 /* MMC Configs */
143 #define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC1_BASE_ADDR
144 #define CONFIG_SYS_FSL_USDHC_NUM	3
145 #define CONFIG_SYS_MMC_ENV_DEV		0   /* USDHC1 */
146 
147 #define CONFIG_IMX_THERMAL
148 
149 #define CONFIG_IOMUX_LPSR
150 
151 /* USB Configs */
152 #ifdef CONFIG_CMD_USB
153 #define CONFIG_USB_HOST_ETHER
154 #define CONFIG_USB_ETHER_ASIX
155 #define CONFIG_USB_ETHER_RTL8152
156 #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
157 #endif
158 
159 #endif				/* __CONFIG_H */
160