a5c13f78362ffff57bdf1097e6d34f7fc8d4adad
[platform/kernel/u-boot.git] / include / configs / mx6ul_14x14_evk.h
1 /*
2  * Copyright (C) 2015 Freescale Semiconductor, Inc.
3  *
4  * Configuration settings for the Freescale i.MX6UL 14x14 EVK board.
5  *
6  * SPDX-License-Identifier:     GPL-2.0+
7  */
8 #ifndef __MX6UL_14X14_EVK_CONFIG_H
9 #define __MX6UL_14X14_EVK_CONFIG_H
10
11
12 #include <asm/arch/imx-regs.h>
13 #include <linux/sizes.h>
14 #include "mx6_common.h"
15 #include <asm/imx-common/gpio.h>
16
17 #define is_mx6ul_9x9_evk()      CONFIG_IS_ENABLED(TARGET_MX6UL_9X9_EVK)
18
19 /* SPL options */
20 #define CONFIG_SPL_LIBCOMMON_SUPPORT
21 #define CONFIG_SPL_MMC_SUPPORT
22 #define CONFIG_SPL_FAT_SUPPORT
23 #include "imx6_spl.h"
24
25 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
26
27 #define CONFIG_ROM_UNIFIED_SECTIONS
28 #define CONFIG_SYS_GENERIC_BOARD
29 #define CONFIG_DISPLAY_CPUINFO
30 #define CONFIG_DISPLAY_BOARDINFO
31
32 /* Size of malloc() pool */
33 #define CONFIG_SYS_MALLOC_LEN           (16 * SZ_1M)
34
35 #define CONFIG_BOARD_EARLY_INIT_F
36 #define CONFIG_BOARD_LATE_INIT
37
38 #define CONFIG_MXC_UART
39 #define CONFIG_MXC_UART_BASE            UART1_BASE
40
41 /* MMC Configs */
42 #ifdef CONFIG_FSL_USDHC
43 #define CONFIG_SYS_FSL_ESDHC_ADDR       USDHC2_BASE_ADDR
44
45 /* NAND pin conflicts with usdhc2 */
46 #ifdef CONFIG_NAND_MXS
47 #define CONFIG_SYS_FSL_USDHC_NUM        1
48 #else
49 #define CONFIG_SYS_FSL_USDHC_NUM        2
50 #endif
51
52 #define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
53 #endif
54
55 #undef CONFIG_BOOTM_NETBSD
56 #undef CONFIG_BOOTM_PLAN9
57 #undef CONFIG_BOOTM_RTEMS
58
59 #undef CONFIG_CMD_EXPORTENV
60 #undef CONFIG_CMD_IMPORTENV
61
62 /* I2C configs */
63 #define CONFIG_CMD_I2C
64 #ifdef CONFIG_CMD_I2C
65 #define CONFIG_SYS_I2C
66 #define CONFIG_SYS_I2C_MXC
67 #define CONFIG_SYS_I2C_SPEED            100000
68
69 /* PMIC only for 9X9 EVK */
70 #define CONFIG_POWER
71 #define CONFIG_POWER_I2C
72 #define CONFIG_POWER_PFUZE3000
73 #define CONFIG_POWER_PFUZE3000_I2C_ADDR  0x08
74 #endif
75
76 #undef CONFIG_CMD_IMLS
77
78 #define CONFIG_SYS_MMC_IMG_LOAD_PART    1
79
80 #define CONFIG_EXTRA_ENV_SETTINGS \
81         "script=boot.scr\0" \
82         "image=zImage\0" \
83         "console=ttymxc0\0" \
84         "fdt_high=0xffffffff\0" \
85         "initrd_high=0xffffffff\0" \
86         "fdt_file=undefined\0" \
87         "fdt_addr=0x83000000\0" \
88         "boot_fdt=try\0" \
89         "ip_dyn=yes\0" \
90         "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
91         "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
92         "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
93         "mmcautodetect=yes\0" \
94         "mmcargs=setenv bootargs console=${console},${baudrate} " \
95                 "root=${mmcroot}\0" \
96         "loadbootscript=" \
97                 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
98         "bootscript=echo Running bootscript from mmc ...; " \
99                 "source\0" \
100         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
101         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
102         "mmcboot=echo Booting from mmc ...; " \
103                 "run mmcargs; " \
104                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
105                         "if run loadfdt; then " \
106                                 "bootz ${loadaddr} - ${fdt_addr}; " \
107                         "else " \
108                                 "if test ${boot_fdt} = try; then " \
109                                         "bootz; " \
110                                 "else " \
111                                         "echo WARN: Cannot load the DT; " \
112                                 "fi; " \
113                         "fi; " \
114                 "else " \
115                         "bootz; " \
116                 "fi;\0" \
117         "netargs=setenv bootargs console=${console},${baudrate} " \
118                 "root=/dev/nfs " \
119         "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
120                 "netboot=echo Booting from net ...; " \
121                 "run netargs; " \
122                 "if test ${ip_dyn} = yes; then " \
123                         "setenv get_cmd dhcp; " \
124                 "else " \
125                         "setenv get_cmd tftp; " \
126                 "fi; " \
127                 "${get_cmd} ${image}; " \
128                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
129                         "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
130                                 "bootz ${loadaddr} - ${fdt_addr}; " \
131                         "else " \
132                                 "if test ${boot_fdt} = try; then " \
133                                         "bootz; " \
134                                 "else " \
135                                         "echo WARN: Cannot load the DT; " \
136                                 "fi; " \
137                         "fi; " \
138                 "else " \
139                         "bootz; " \
140                 "fi;\0" \
141                 "findfdt="\
142                         "if test $fdt_file = undefined; then " \
143                                 "if test $board_name = EVK && test $board_rev = 9X9; then " \
144                                         "setenv fdt_file imx6ul-9x9-evk.dtb; fi; " \
145                                 "if test $board_name = EVK && test $board_rev = 14X14; then " \
146                                         "setenv fdt_file imx6ul-14x14-evk.dtb; fi; " \
147                                 "if test $fdt_file = undefined; then " \
148                                         "echo WARNING: Could not determine dtb to use; fi; " \
149                         "fi;\0" \
150
151 #define CONFIG_BOOTCOMMAND \
152            "run findfdt;" \
153            "mmc dev ${mmcdev};" \
154            "mmc dev ${mmcdev}; if mmc rescan; then " \
155                    "if run loadbootscript; then " \
156                            "run bootscript; " \
157                    "else " \
158                            "if run loadimage; then " \
159                                    "run mmcboot; " \
160                            "else run netboot; " \
161                            "fi; " \
162                    "fi; " \
163            "else run netboot; fi"
164
165 /* Miscellaneous configurable options */
166 /* Print Buffer Size */
167 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
168
169 #define CONFIG_CMD_MEMTEST
170 #define CONFIG_SYS_MEMTEST_START        0x80000000
171 #define CONFIG_SYS_MEMTEST_END          (CONFIG_SYS_MEMTEST_START + 0x10000000)
172
173 #define CONFIG_SYS_LOAD_ADDR            CONFIG_LOADADDR
174 #define CONFIG_SYS_HZ                   1000
175
176 #define CONFIG_CMDLINE_EDITING
177 #define CONFIG_STACKSIZE                SZ_128K
178
179 /* Physical Memory Map */
180 #define CONFIG_NR_DRAM_BANKS            1
181 #define PHYS_SDRAM                      MMDC0_ARB_BASE_ADDR
182
183 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
184 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
185 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
186
187 #define CONFIG_SYS_INIT_SP_OFFSET \
188         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
189 #define CONFIG_SYS_INIT_SP_ADDR \
190         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
191
192 /* FLASH and environment organization */
193 #define CONFIG_SYS_NO_FLASH
194
195 #define CONFIG_ENV_SIZE                 SZ_8K
196 #define CONFIG_ENV_IS_IN_MMC
197 #define CONFIG_ENV_OFFSET               (8 * SZ_64K)
198 #define CONFIG_SYS_MMC_ENV_DEV          1   /* USDHC2 */
199 #define CONFIG_SYS_MMC_ENV_PART         0       /* user area */
200 #define CONFIG_MMCROOT                  "/dev/mmcblk1p2"  /* USDHC2 */
201
202 #define CONFIG_OF_LIBFDT
203 #define CONFIG_CMD_BOOTZ
204 #define CONFIG_CMD_BMODE
205
206 #ifndef CONFIG_SYS_DCACHE_OFF
207 #define CONFIG_CMD_CACHE
208 #endif
209
210 #define CONFIG_FSL_QSPI
211 #ifdef CONFIG_FSL_QSPI
212 #define CONFIG_CMD_SF
213 #define CONFIG_SPI_FLASH
214 #define CONFIG_SPI_FLASH_STMICRO
215 #define CONFIG_SPI_FLASH_BAR
216 #define CONFIG_SF_DEFAULT_BUS           0
217 #define CONFIG_SF_DEFAULT_CS            0
218 #define CONFIG_SF_DEFAULT_SPEED 40000000
219 #define CONFIG_SF_DEFAULT_MODE          SPI_MODE_0
220 #define FSL_QSPI_FLASH_NUM              1
221 #define FSL_QSPI_FLASH_SIZE             SZ_32M
222 #endif
223
224 /* USB Configs */
225 #define CONFIG_CMD_USB
226 #ifdef CONFIG_CMD_USB
227 #define CONFIG_USB_EHCI
228 #define CONFIG_USB_EHCI_MX6
229 #define CONFIG_USB_STORAGE
230 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
231 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
232 #define CONFIG_MXC_USB_FLAGS   0
233 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
234 #endif
235
236 #ifdef CONFIG_CMD_NET
237 #define CONFIG_FEC_MXC
238 #define CONFIG_MII
239 #define CONFIG_FEC_ENET_DEV             1
240
241 #if (CONFIG_FEC_ENET_DEV == 0)
242 #define IMX_FEC_BASE                    ENET_BASE_ADDR
243 #define CONFIG_FEC_MXC_PHYADDR          0x2
244 #define CONFIG_FEC_XCV_TYPE             RMII
245 #elif (CONFIG_FEC_ENET_DEV == 1)
246 #define IMX_FEC_BASE                    ENET2_BASE_ADDR
247 #define CONFIG_FEC_MXC_PHYADDR          0x1
248 #define CONFIG_FEC_XCV_TYPE             RMII
249 #endif
250 #define CONFIG_ETHPRIME                 "FEC"
251
252 #define CONFIG_PHYLIB
253 #define CONFIG_PHY_MICREL
254 #define CONFIG_FEC_DMA_MINALIGN         64
255 #endif
256
257 #define CONFIG_IMX_THERMAL
258
259 #endif