]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/mx6sabre_common.h
zynqmp: i2c: Enable i2c driver for zynqMP
[karo-tx-uboot.git] / include / configs / mx6sabre_common.h
1 /*
2  * Copyright (C) 2012 Freescale Semiconductor, Inc.
3  *
4  * Configuration settings for the Freescale i.MX6Q SabreSD board.
5  *
6  * SPDX-License-Identifier:     GPL-2.0+
7  */
8
9 #ifndef __MX6QSABRE_COMMON_CONFIG_H
10 #define __MX6QSABRE_COMMON_CONFIG_H
11
12
13 #include "mx6_common.h"
14 #include <linux/sizes.h>
15
16 #define CONFIG_DISPLAY_CPUINFO
17 #define CONFIG_DISPLAY_BOARDINFO
18
19 #include <asm/arch/imx-regs.h>
20 #include <asm/imx-common/gpio.h>
21
22 #define CONFIG_CMDLINE_TAG
23 #define CONFIG_SETUP_MEMORY_TAGS
24 #define CONFIG_INITRD_TAG
25 #define CONFIG_REVISION_TAG
26
27 #define CONFIG_IMX6_THERMAL
28
29 #define CONFIG_SYS_GENERIC_BOARD
30
31 /* Size of malloc() pool */
32 #define CONFIG_SYS_MALLOC_LEN           (10 * SZ_1M)
33
34 #define CONFIG_BOARD_EARLY_INIT_F
35 #define CONFIG_BOARD_LATE_INIT
36 #define CONFIG_MXC_GPIO
37
38 #define CONFIG_MXC_UART
39
40 #define CONFIG_CMD_FUSE
41 #if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
42 #define CONFIG_MXC_OCOTP
43 #endif
44
45 /* MMC Configs */
46 #define CONFIG_FSL_ESDHC
47 #define CONFIG_FSL_USDHC
48 #define CONFIG_SYS_FSL_ESDHC_ADDR      0
49
50 #define CONFIG_MMC
51 #define CONFIG_CMD_MMC
52 #define CONFIG_GENERIC_MMC
53 #define CONFIG_BOUNCE_BUFFER
54 #define CONFIG_CMD_EXT2
55 #define CONFIG_CMD_EXT4
56 #define CONFIG_CMD_EXT4_WRITE
57 #define CONFIG_CMD_FAT
58 #define CONFIG_DOS_PARTITION
59
60 #define CONFIG_CMD_PING
61 #define CONFIG_CMD_DHCP
62 #define CONFIG_CMD_MII
63 #define CONFIG_CMD_NET
64 #define CONFIG_FEC_MXC
65 #define CONFIG_MII
66 #define IMX_FEC_BASE                    ENET_BASE_ADDR
67 #define CONFIG_FEC_XCV_TYPE             RGMII
68 #define CONFIG_ETHPRIME                 "FEC"
69 #define CONFIG_FEC_MXC_PHYADDR          1
70
71 #define CONFIG_PHYLIB
72 #define CONFIG_PHY_ATHEROS
73
74 #define CONFIG_CMD_SF
75 #ifdef CONFIG_CMD_SF
76 #define CONFIG_SPI_FLASH
77 #define CONFIG_SPI_FLASH_STMICRO
78 #define CONFIG_MXC_SPI
79 #define CONFIG_SF_DEFAULT_BUS           0
80 #define CONFIG_SF_DEFAULT_CS            0
81 #define CONFIG_SF_DEFAULT_SPEED         20000000
82 #define CONFIG_SF_DEFAULT_MODE          SPI_MODE_0
83 #endif
84
85 /* allow to overwrite serial and ethaddr */
86 #define CONFIG_ENV_OVERWRITE
87 #define CONFIG_CONS_INDEX              1
88 #define CONFIG_BAUDRATE                        115200
89
90 /* Command definition */
91 #include <config_cmd_default.h>
92
93 #define CONFIG_CMD_BMODE
94 #define CONFIG_CMD_BOOTZ
95 #define CONFIG_CMD_SETEXPR
96 #undef CONFIG_CMD_IMLS
97
98 #define CONFIG_BOOTDELAY               1
99
100 #define CONFIG_LOADADDR                        0x12000000
101 #define CONFIG_SYS_TEXT_BASE           0x17800000
102
103 #ifdef CONFIG_SUPPORT_EMMC_BOOT
104 #define EMMC_ENV \
105         "emmcdev=2\0" \
106         "update_emmc_firmware=" \
107                 "if test ${ip_dyn} = yes; then " \
108                         "setenv get_cmd dhcp; " \
109                 "else " \
110                         "setenv get_cmd tftp; " \
111                 "fi; " \
112                 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
113                         "if mmc dev ${emmcdev} 1; then "        \
114                                 "setexpr fw_sz ${filesize} / 0x200; " \
115                                 "setexpr fw_sz ${fw_sz} + 1; "  \
116                                 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
117                         "fi; "  \
118                 "fi\0"
119 #else
120 #define EMMC_ENV ""
121 #endif
122
123 #ifndef VIDEO_ARGS
124 #define VIDEO_ARGS ""
125 #endif
126
127 #ifndef VIDEO_ARGS_SCRIPT
128 #define VIDEO_ARGS_SCRIPT ""
129 #endif
130
131 #define CONFIG_EXTRA_ENV_SETTINGS \
132         "script=boot.scr\0" \
133         "image=zImage\0" \
134         "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
135         "fdt_addr=0x18000000\0" \
136         "boot_fdt=try\0" \
137         "ip_dyn=yes\0" \
138         "console=" CONFIG_CONSOLE_DEV "\0" \
139         "fdt_high=0xffffffff\0"   \
140         "initrd_high=0xffffffff\0" \
141         "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
142         "mmcpart=1\0" \
143         "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
144         "update_sd_firmware=" \
145                 "if test ${ip_dyn} = yes; then " \
146                         "setenv get_cmd dhcp; " \
147                 "else " \
148                         "setenv get_cmd tftp; " \
149                 "fi; " \
150                 "if mmc dev ${mmcdev}; then "   \
151                         "if ${get_cmd} ${update_sd_firmware_filename}; then " \
152                                 "setexpr fw_sz ${filesize} / 0x200; " \
153                                 "setexpr fw_sz ${fw_sz} + 1; "  \
154                                 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
155                         "fi; "  \
156                 "fi\0" \
157         EMMC_ENV          \
158         "video_args_hdmi=setenv video_args $video_args " \
159                 "video=mxcfb${fb}:dev=hdmi,1280x720M@60,if=RGB24\0" \
160         "video_args_lvds=setenv video_args $video_args " \
161                 "video=mxcfb${fb}:dev=ldb,LDB-XGA,if=RGB666\0" \
162         "video_args_lcd=setenv video_args $video_args " \
163                 "video=mxcfb${fb}:dev=lcd,CLAA-WVGA,if=RGB666\0" \
164         "fb=0\0" \
165         "video_interfaces=hdmi lvds lcd\0" \
166         "video_args_script=" \
167                 "for v in ${video_interfaces}; do " \
168                         "run video_args_${v}; " \
169                         "setexpr fb $fb + 1; " \
170                 "done\0" \
171         "mmcargs=setenv bootargs console=${console},${baudrate} " \
172                 "root=${mmcroot} " \
173                 VIDEO_ARGS "\0" \
174         "loadbootscript=" \
175                 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
176         "bootscript=echo Running bootscript from mmc ...; " \
177                 "source\0" \
178         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
179         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
180         "mmcboot=echo Booting from mmc ...; " \
181                 VIDEO_ARGS_SCRIPT \
182                 "run mmcargs; " \
183                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
184                         "if run loadfdt; then " \
185                                 "bootz ${loadaddr} - ${fdt_addr}; " \
186                         "else " \
187                                 "if test ${boot_fdt} = try; then " \
188                                         "bootz; " \
189                                 "else " \
190                                         "echo WARN: Cannot load the DT; " \
191                                 "fi; " \
192                         "fi; " \
193                 "else " \
194                         "bootz; " \
195                 "fi;\0" \
196         "netargs=setenv bootargs console=${console},${baudrate} " \
197                 "root=/dev/nfs " \
198                 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
199         "netboot=echo Booting from net ...; " \
200                 "run netargs; " \
201                 "if test ${ip_dyn} = yes; then " \
202                         "setenv get_cmd dhcp; " \
203                 "else " \
204                         "setenv get_cmd tftp; " \
205                 "fi; " \
206                 "${get_cmd} ${image}; " \
207                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
208                         "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
209                                 "bootz ${loadaddr} - ${fdt_addr}; " \
210                         "else " \
211                                 "if test ${boot_fdt} = try; then " \
212                                         "bootz; " \
213                                 "else " \
214                                         "echo WARN: Cannot load the DT; " \
215                                 "fi; " \
216                         "fi; " \
217                 "else " \
218                         "bootz; " \
219                 "fi;\0"
220
221 #define CONFIG_BOOTCOMMAND \
222         "mmc dev ${mmcdev};" \
223         "if mmc rescan; then " \
224                 "if run loadbootscript; then " \
225                 "run bootscript; " \
226                 "else " \
227                         "if run loadimage; then " \
228                                 "run mmcboot; " \
229                         "else run netboot; " \
230                         "fi; " \
231                 "fi; " \
232         "else run netboot; fi"
233
234 #define CONFIG_ARP_TIMEOUT     200UL
235
236 /* Miscellaneous configurable options */
237 #define CONFIG_SYS_LONGHELP
238 #define CONFIG_SYS_HUSH_PARSER
239 #define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
240 #define CONFIG_AUTO_COMPLETE
241 #define CONFIG_SYS_CBSIZE              256
242 #define CONFIG_SYS_MAXARGS             16
243 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
244
245 #define CONFIG_SYS_MEMTEST_START       0x10000000
246 #define CONFIG_SYS_MEMTEST_END         0x10010000
247 #define CONFIG_SYS_MEMTEST_SCRATCH     0x10800000
248
249 #define CONFIG_SYS_LOAD_ADDR           CONFIG_LOADADDR
250
251 #define CONFIG_CMDLINE_EDITING
252 #define CONFIG_STACKSIZE               (128 * 1024)
253
254 /* Physical Memory Map */
255 #define CONFIG_NR_DRAM_BANKS           1
256 #define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
257
258 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
259 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
260 #define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
261
262 #define CONFIG_SYS_INIT_SP_OFFSET \
263         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
264 #define CONFIG_SYS_INIT_SP_ADDR \
265         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
266
267 /* FLASH and environment organization */
268 #define CONFIG_SYS_NO_FLASH
269
270 #define CONFIG_ENV_SIZE                 (8 * 1024)
271
272 #define CONFIG_ENV_IS_IN_MMC
273
274 #if defined(CONFIG_ENV_IS_IN_MMC)
275 #define CONFIG_ENV_OFFSET               (8 * 64 * 1024)
276 #endif
277
278 #define CONFIG_OF_LIBFDT
279
280 #ifndef CONFIG_SYS_DCACHE_OFF
281 #define CONFIG_CMD_CACHE
282 #endif
283
284 /* Framebuffer */
285 #define CONFIG_VIDEO
286 #define CONFIG_VIDEO_IPUV3
287 #define CONFIG_CFB_CONSOLE
288 #define CONFIG_VGA_AS_SINGLE_DEVICE
289 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
290 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
291 #define CONFIG_VIDEO_BMP_RLE8
292 #define CONFIG_SPLASH_SCREEN
293 #define CONFIG_SPLASH_SCREEN_ALIGN
294 #define CONFIG_BMP_16BPP
295 #define CONFIG_VIDEO_LOGO
296 #define CONFIG_VIDEO_BMP_LOGO
297 #define CONFIG_IPUV3_CLK 260000000
298 #define CONFIG_IMX_HDMI
299 #define CONFIG_IMX_VIDEO_SKIP
300
301 #ifndef CONFIG_SPL
302 #define CONFIG_CI_UDC
303 #define CONFIG_USBD_HS
304 #define CONFIG_USB_GADGET_DUALSPEED
305
306 #define CONFIG_USB_GADGET
307 #define CONFIG_CMD_USB_MASS_STORAGE
308 #define CONFIG_USB_GADGET_MASS_STORAGE
309 #define CONFIG_USBDOWNLOAD_GADGET
310 #define CONFIG_USB_GADGET_VBUS_DRAW     2
311
312 #define CONFIG_G_DNL_VENDOR_NUM         0x0525
313 #define CONFIG_G_DNL_PRODUCT_NUM        0xa4a5
314 #define CONFIG_G_DNL_MANUFACTURER       "FSL"
315 #endif
316
317 #endif                         /* __MX6QSABRE_COMMON_CONFIG_H */