]> git.karo-electronics.de Git - karo-tx-uboot.git/blob - include/configs/mx6slevk.h
6ed21295acb7528957dca46aa3e66827e1a4cc25
[karo-tx-uboot.git] / include / configs / mx6slevk.h
1 /*
2  * Copyright 2013 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 <asm/arch/imx-regs.h>
13 #include <asm/imx-common/gpio.h>
14 #include <linux/sizes.h>
15 #include "mx6_common.h"
16
17 #define CONFIG_DISPLAY_CPUINFO
18 #define CONFIG_DISPLAY_BOARDINFO
19
20 #define MACH_TYPE_MX6SLEVK              4307
21 #define CONFIG_MACH_TYPE                MACH_TYPE_MX6SLEVK
22
23 #define CONFIG_CMDLINE_TAG
24 #define CONFIG_SETUP_MEMORY_TAGS
25 #define CONFIG_INITRD_TAG
26 #define CONFIG_REVISION_TAG
27
28 #define CONFIG_SYS_GENERIC_BOARD
29
30 /* Size of malloc() pool */
31 #define CONFIG_SYS_MALLOC_LEN           (3 * SZ_1M)
32
33 #define CONFIG_BOARD_EARLY_INIT_F
34 #define CONFIG_MXC_GPIO
35
36 #define CONFIG_MXC_UART
37 #define CONFIG_MXC_UART_BASE            UART1_IPS_BASE_ADDR
38
39 /* MMC Configs */
40 #define CONFIG_FSL_ESDHC
41 #define CONFIG_FSL_USDHC
42 #define CONFIG_SYS_FSL_ESDHC_ADDR       USDHC2_BASE_ADDR
43
44 #define CONFIG_MMC
45 #define CONFIG_CMD_MMC
46 #define CONFIG_GENERIC_MMC
47 #define CONFIG_CMD_FAT
48 #define CONFIG_DOS_PARTITION
49
50 /* I2C Configs */
51 #define CONFIG_CMD_I2C
52 #define CONFIG_SYS_I2C
53 #define CONFIG_SYS_I2C_MXC
54 #define CONFIG_SYS_I2C_SPEED              100000
55
56 /* PMIC */
57 #define CONFIG_POWER
58 #define CONFIG_POWER_I2C
59 #define CONFIG_POWER_PFUZE100
60 #define CONFIG_POWER_PFUZE100_I2C_ADDR  0x08
61
62 #define CONFIG_CMD_PING
63 #define CONFIG_CMD_DHCP
64 #define CONFIG_CMD_MII
65 #define CONFIG_CMD_NET
66 #define CONFIG_FEC_MXC
67 #define CONFIG_MII
68 #define IMX_FEC_BASE                    ENET_BASE_ADDR
69 #define CONFIG_FEC_XCV_TYPE             RMII
70 #define CONFIG_ETHPRIME                 "FEC"
71 #define CONFIG_FEC_MXC_PHYADDR          0
72
73 #define CONFIG_PHYLIB
74 #define CONFIG_PHY_SMSC
75
76 /* allow to overwrite serial and ethaddr */
77 #define CONFIG_ENV_OVERWRITE
78 #define CONFIG_CONS_INDEX               1
79 #define CONFIG_BAUDRATE                 115200
80
81 /* Command definition */
82 #include <config_cmd_default.h>
83
84 #undef CONFIG_CMD_IMLS
85
86 #define CONFIG_BOOTDELAY                3
87
88 #define CONFIG_LOADADDR                 0x82000000
89 #define CONFIG_SYS_TEXT_BASE            0x87800000
90
91 #define CONFIG_EXTRA_ENV_SETTINGS \
92         "script=boot.scr\0" \
93         "image=zImage\0" \
94         "console=ttymxc0\0" \
95         "fdt_high=0xffffffff\0" \
96         "initrd_high=0xffffffff\0" \
97         "fdt_file=imx6sl-evk-ldo.dtb\0" \
98         "fdt_addr=0x88000000\0" \
99         "boot_fdt=try\0" \
100         "ip_dyn=yes\0" \
101         "mmcdev=1\0" \
102         "mmcpart=1\0" \
103         "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
104         "mmcargs=setenv bootargs console=${console},${baudrate} " \
105                 "root=${mmcroot}\0" \
106         "loadbootscript=" \
107                 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
108         "bootscript=echo Running bootscript from mmc ...; " \
109                 "source\0" \
110         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
111         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
112         "mmcboot=echo Booting from mmc ...; " \
113                 "run mmcargs; " \
114                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
115                         "if run loadfdt; then " \
116                                 "bootz ${loadaddr} - ${fdt_addr}; " \
117                         "else " \
118                                 "if test ${boot_fdt} = try; then " \
119                                         "bootz; " \
120                                 "else " \
121                                         "echo WARN: Cannot load the DT; " \
122                                 "fi; " \
123                         "fi; " \
124                 "else " \
125                         "bootz; " \
126                 "fi;\0" \
127         "netargs=setenv bootargs console=${console},${baudrate} " \
128                 "root=/dev/nfs " \
129         "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
130                 "netboot=echo Booting from net ...; " \
131                 "run netargs; " \
132                 "if test ${ip_dyn} = yes; then " \
133                         "setenv get_cmd dhcp; " \
134                 "else " \
135                         "setenv get_cmd tftp; " \
136                 "fi; " \
137                 "${get_cmd} ${image}; " \
138                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
139                         "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
140                                 "bootz ${loadaddr} - ${fdt_addr}; " \
141                         "else " \
142                                 "if test ${boot_fdt} = try; then " \
143                                         "bootz; " \
144                                 "else " \
145                                         "echo WARN: Cannot load the DT; " \
146                                 "fi; " \
147                         "fi; " \
148                 "else " \
149                         "bootz; " \
150                 "fi;\0"
151
152 #define CONFIG_BOOTCOMMAND \
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 #define CONFIG_SYS_LONGHELP
167 #define CONFIG_SYS_HUSH_PARSER
168 #define CONFIG_AUTO_COMPLETE
169 #define CONFIG_SYS_CBSIZE               256
170
171 #define CONFIG_SYS_MAXARGS              16
172 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
173
174 #define CONFIG_SYS_MEMTEST_START        0x80000000
175 #define CONFIG_SYS_MEMTEST_END          (CONFIG_SYS_MEMTEST_START + SZ_512M)
176
177 #define CONFIG_SYS_LOAD_ADDR            CONFIG_LOADADDR
178
179 #define CONFIG_CMDLINE_EDITING
180 #define CONFIG_STACKSIZE                SZ_128K
181
182 /* Physical Memory Map */
183 #define CONFIG_NR_DRAM_BANKS            1
184 #define PHYS_SDRAM                      MMDC0_ARB_BASE_ADDR
185 #define PHYS_SDRAM_SIZE                 SZ_1G
186
187 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
188 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
189 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
190
191 #define CONFIG_SYS_INIT_SP_OFFSET \
192         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
193 #define CONFIG_SYS_INIT_SP_ADDR \
194         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
195
196 /* FLASH and environment organization */
197 #define CONFIG_SYS_NO_FLASH
198
199 #define CONFIG_ENV_SIZE                 SZ_8K
200
201 #if defined CONFIG_SYS_BOOT_SPINOR
202 #define CONFIG_ENV_IS_IN_SPI_FLASH
203 #define CONFIG_ENV_OFFSET               (768 * 1024)
204 #define CONFIG_ENV_SECT_SIZE            (64 * 1024)
205 #define CONFIG_ENV_SPI_BUS              CONFIG_SF_DEFAULT_BUS
206 #define CONFIG_ENV_SPI_CS               CONFIG_SF_DEFAULT_CS
207 #define CONFIG_ENV_SPI_MODE             CONFIG_SF_DEFAULT_MODE
208 #define CONFIG_ENV_SPI_MAX_HZ           CONFIG_SF_DEFAULT_SPEED
209 #else
210 #define CONFIG_ENV_OFFSET               (8 * SZ_64K)
211 #define CONFIG_ENV_IS_IN_MMC
212 #endif
213
214 #define CONFIG_OF_LIBFDT
215 #define CONFIG_CMD_BOOTZ
216
217 #ifndef CONFIG_SYS_DCACHE_OFF
218 #define CONFIG_CMD_CACHE
219 #endif
220
221 #define CONFIG_CMD_SF
222 #ifdef CONFIG_CMD_SF
223 #define CONFIG_SPI_FLASH
224 #define CONFIG_SPI_FLASH_STMICRO
225 #define CONFIG_MXC_SPI
226 #define CONFIG_SF_DEFAULT_BUS           0
227 #define CONFIG_SF_DEFAULT_CS            0
228 #define CONFIG_SF_DEFAULT_SPEED         20000000
229 #define CONFIG_SF_DEFAULT_MODE          SPI_MODE_0
230 #endif
231
232 /* USB Configs */
233 #define CONFIG_CMD_USB
234 #ifdef CONFIG_CMD_USB
235 #define CONFIG_USB_EHCI
236 #define CONFIG_USB_EHCI_MX6
237 #define CONFIG_USB_STORAGE
238 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
239 #define CONFIG_USB_HOST_ETHER
240 #define CONFIG_USB_ETHER_ASIX
241 #define CONFIG_MXC_USB_PORTSC           (PORT_PTS_UTMI | PORT_PTS_PTW)
242 #define CONFIG_MXC_USB_FLAGS            0
243 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
244 #endif
245
246 #define CONFIG_SYS_FSL_USDHC_NUM        3
247 #if defined(CONFIG_ENV_IS_IN_MMC)
248 #define CONFIG_SYS_MMC_ENV_DEV          1       /* SDHC2*/
249 #endif
250
251 #define CONFIG_IMX6_THERMAL
252
253 #define CONFIG_CMD_FUSE
254 #if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
255 #define CONFIG_MXC_OCOTP
256 #endif
257
258 #endif                          /* __CONFIG_H */