]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/mx6qsabrelite.h
zynq: Enable axi ethernet and emaclite driver initialization
[karo-tx-uboot.git] / include / configs / mx6qsabrelite.h
1 /*
2  * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
3  *
4  * Configuration settings for the Freescale i.MX6Q Sabre Lite board.
5  *
6  * SPDX-License-Identifier:     GPL-2.0+
7  */
8
9 #ifndef __CONFIG_H
10 #define __CONFIG_H
11
12 #define CONFIG_MX6
13 #define CONFIG_MX6Q
14
15 #include "mx6_common.h"
16
17 #define CONFIG_DISPLAY_CPUINFO
18 #define CONFIG_DISPLAY_BOARDINFO
19
20 #define CONFIG_MACH_TYPE        3769
21
22 #include <asm/arch/imx-regs.h>
23 #include <asm/imx-common/gpio.h>
24
25 #define CONFIG_CMDLINE_TAG
26 #define CONFIG_SETUP_MEMORY_TAGS
27 #define CONFIG_INITRD_TAG
28 #define CONFIG_REVISION_TAG
29
30 /* Size of malloc() pool */
31 #define CONFIG_SYS_MALLOC_LEN           (10 * 1024 * 1024)
32
33 #define CONFIG_BOARD_EARLY_INIT_F
34 #define CONFIG_MISC_INIT_R
35 #define CONFIG_MXC_GPIO
36
37 #define CONFIG_CMD_FUSE
38 #ifdef CONFIG_CMD_FUSE
39 #define CONFIG_MXC_OCOTP
40 #endif
41
42 #define CONFIG_MXC_UART
43 #define CONFIG_MXC_UART_BASE           UART2_BASE
44
45 #define CONFIG_CMD_SF
46 #ifdef CONFIG_CMD_SF
47 #define CONFIG_SPI_FLASH
48 #define CONFIG_SPI_FLASH_SST
49 #define CONFIG_MXC_SPI
50 #define CONFIG_SF_DEFAULT_BUS  0
51 #define CONFIG_SF_DEFAULT_CS   (0|(IMX_GPIO_NR(3, 19)<<8))
52 #define CONFIG_SF_DEFAULT_SPEED 25000000
53 #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
54 #endif
55
56 /* I2C Configs */
57 #define CONFIG_CMD_I2C
58 #define CONFIG_I2C_MULTI_BUS
59 #define CONFIG_I2C_MXC
60 #define CONFIG_SYS_I2C_SPEED            100000
61
62 /* MMC Configs */
63 #define CONFIG_FSL_ESDHC
64 #define CONFIG_FSL_USDHC
65 #define CONFIG_SYS_FSL_ESDHC_ADDR      0
66 #define CONFIG_SYS_FSL_USDHC_NUM       2
67
68 #define CONFIG_MMC
69 #define CONFIG_CMD_MMC
70 #define CONFIG_GENERIC_MMC
71 #define CONFIG_BOUNCE_BUFFER
72 #define CONFIG_CMD_EXT2
73 #define CONFIG_CMD_FAT
74 #define CONFIG_DOS_PARTITION
75
76 #define CONFIG_CMD_SATA
77 /*
78  * SATA Configs
79  */
80 #ifdef CONFIG_CMD_SATA
81 #define CONFIG_DWC_AHSATA
82 #define CONFIG_SYS_SATA_MAX_DEVICE      1
83 #define CONFIG_DWC_AHSATA_PORT_ID       0
84 #define CONFIG_DWC_AHSATA_BASE_ADDR     SATA_ARB_BASE_ADDR
85 #define CONFIG_LBA48
86 #define CONFIG_LIBATA
87 #endif
88
89 #define CONFIG_CMD_PING
90 #define CONFIG_CMD_DHCP
91 #define CONFIG_CMD_MII
92 #define CONFIG_CMD_NET
93 #define CONFIG_FEC_MXC
94 #define CONFIG_MII
95 #define IMX_FEC_BASE                    ENET_BASE_ADDR
96 #define CONFIG_FEC_XCV_TYPE             RGMII
97 #define CONFIG_ETHPRIME                 "FEC"
98 #define CONFIG_FEC_MXC_PHYADDR          6
99 #define CONFIG_PHYLIB
100 #define CONFIG_PHY_MICREL
101 #define CONFIG_PHY_MICREL_KSZ9021
102
103 /* USB Configs */
104 #define CONFIG_CMD_USB
105 #define CONFIG_CMD_FAT
106 #define CONFIG_USB_EHCI
107 #define CONFIG_USB_EHCI_MX6
108 #define CONFIG_USB_STORAGE
109 #define CONFIG_USB_HOST_ETHER
110 #define CONFIG_USB_ETHER_ASIX
111 #define CONFIG_USB_ETHER_SMSC95XX
112 #define CONFIG_MXC_USB_PORT     1
113 #define CONFIG_MXC_USB_PORTSC   (PORT_PTS_UTMI | PORT_PTS_PTW)
114 #define CONFIG_MXC_USB_FLAGS    0
115
116 /* Miscellaneous commands */
117 #define CONFIG_CMD_BMODE
118
119 /* Framebuffer and LCD */
120 #define CONFIG_VIDEO
121 #define CONFIG_VIDEO_IPUV3
122 #define CONFIG_CFB_CONSOLE
123 #define CONFIG_VGA_AS_SINGLE_DEVICE
124 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
125 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
126 #define CONFIG_VIDEO_BMP_RLE8
127 #define CONFIG_SPLASH_SCREEN
128 #define CONFIG_BMP_16BPP
129 #define CONFIG_VIDEO_LOGO
130 #define CONFIG_IPUV3_CLK 260000000
131
132 /* allow to overwrite serial and ethaddr */
133 #define CONFIG_ENV_OVERWRITE
134 #define CONFIG_CONS_INDEX              1
135 #define CONFIG_BAUDRATE                        115200
136
137 /* Command definition */
138 #include <config_cmd_default.h>
139
140 #undef CONFIG_CMD_IMLS
141
142 #define CONFIG_BOOTDELAY               1
143
144 #define CONFIG_PREBOOT                 ""
145
146 #define CONFIG_LOADADDR                        0x12000000
147 #define CONFIG_SYS_TEXT_BASE           0x17800000
148
149 #define CONFIG_EXTRA_ENV_SETTINGS \
150         "script=boot.scr\0" \
151         "uimage=uImage\0" \
152         "console=ttymxc1\0" \
153         "fdt_high=0xffffffff\0" \
154         "initrd_high=0xffffffff\0" \
155         "fdt_file=imx6q-sabrelite.dtb\0" \
156         "fdt_addr=0x11000000\0" \
157         "boot_fdt=try\0" \
158         "ip_dyn=yes\0" \
159         "mmcdev=0\0" \
160         "mmcpart=1\0" \
161         "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
162         "mmcargs=setenv bootargs console=${console},${baudrate} " \
163                 "root=${mmcroot}\0" \
164         "loadbootscript=" \
165                 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
166         "bootscript=echo Running bootscript from mmc ...; " \
167                 "source\0" \
168         "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
169         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
170         "mmcboot=echo Booting from mmc ...; " \
171                 "run mmcargs; " \
172                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
173                         "if run loadfdt; then " \
174                                 "bootm ${loadaddr} - ${fdt_addr}; " \
175                         "else " \
176                                 "if test ${boot_fdt} = try; then " \
177                                         "bootm; " \
178                                 "else " \
179                                         "echo WARN: Cannot load the DT; " \
180                                 "fi; " \
181                         "fi; " \
182                 "else " \
183                         "bootm; " \
184                 "fi;\0" \
185         "netargs=setenv bootargs console=${console},${baudrate} " \
186                 "root=/dev/nfs " \
187         "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
188                 "netboot=echo Booting from net ...; " \
189                 "run netargs; " \
190                 "if test ${ip_dyn} = yes; then " \
191                         "setenv get_cmd dhcp; " \
192                 "else " \
193                         "setenv get_cmd tftp; " \
194                 "fi; " \
195                 "${get_cmd} ${uimage}; " \
196                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
197                         "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
198                                 "bootm ${loadaddr} - ${fdt_addr}; " \
199                         "else " \
200                                 "if test ${boot_fdt} = try; then " \
201                                         "bootm; " \
202                                 "else " \
203                                         "echo WARN: Cannot load the DT; " \
204                                 "fi; " \
205                         "fi; " \
206                 "else " \
207                         "bootm; " \
208                 "fi;\0"
209
210 #define CONFIG_BOOTCOMMAND \
211            "mmc dev ${mmcdev}; if mmc rescan; then " \
212                    "if run loadbootscript; then " \
213                            "run bootscript; " \
214                    "else " \
215                            "if run loaduimage; then " \
216                                    "run mmcboot; " \
217                            "else run netboot; " \
218                            "fi; " \
219                    "fi; " \
220            "else run netboot; fi"
221
222 /* Miscellaneous configurable options */
223 #define CONFIG_SYS_LONGHELP
224 #define CONFIG_SYS_HUSH_PARSER
225 #define CONFIG_SYS_PROMPT              "MX6QSABRELITE U-Boot > "
226 #define CONFIG_AUTO_COMPLETE
227 #define CONFIG_SYS_CBSIZE              256
228
229 /* Print Buffer Size */
230 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
231 #define CONFIG_SYS_MAXARGS             16
232 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
233
234 #define CONFIG_SYS_MEMTEST_START       0x10000000
235 #define CONFIG_SYS_MEMTEST_END         0x10010000
236 #define CONFIG_SYS_MEMTEST_SCRATCH     0x10800000
237
238 #define CONFIG_SYS_LOAD_ADDR           CONFIG_LOADADDR
239 #define CONFIG_SYS_HZ                  1000
240
241 #define CONFIG_CMDLINE_EDITING
242
243 /* Physical Memory Map */
244 #define CONFIG_NR_DRAM_BANKS           1
245 #define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
246 #define PHYS_SDRAM_SIZE                        (1u * 1024 * 1024 * 1024)
247
248 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
249 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
250 #define CONFIG_SYS_INIT_RAM_SIZE       IRAM_SIZE
251
252 #define CONFIG_SYS_INIT_SP_OFFSET \
253        (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
254 #define CONFIG_SYS_INIT_SP_ADDR \
255        (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
256
257 /* FLASH and environment organization */
258 #define CONFIG_SYS_NO_FLASH
259
260 #define CONFIG_ENV_SIZE                 (8 * 1024)
261
262 #define CONFIG_ENV_IS_IN_MMC
263 /* #define CONFIG_ENV_IS_IN_SPI_FLASH */
264
265 #if defined(CONFIG_ENV_IS_IN_MMC)
266 #define CONFIG_ENV_OFFSET               (6 * 64 * 1024)
267 #define CONFIG_SYS_MMC_ENV_DEV          0
268 #elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
269 #define CONFIG_ENV_OFFSET               (768 * 1024)
270 #define CONFIG_ENV_SECT_SIZE            (8 * 1024)
271 #define CONFIG_ENV_SPI_BUS              CONFIG_SF_DEFAULT_BUS
272 #define CONFIG_ENV_SPI_CS               CONFIG_SF_DEFAULT_CS
273 #define CONFIG_ENV_SPI_MODE             CONFIG_SF_DEFAULT_MODE
274 #define CONFIG_ENV_SPI_MAX_HZ           CONFIG_SF_DEFAULT_SPEED
275 #endif
276
277 #define CONFIG_OF_LIBFDT
278 #define CONFIG_CMD_BOOTZ
279
280 #ifndef CONFIG_SYS_DCACHE_OFF
281 #define CONFIG_CMD_CACHE
282 #endif
283
284 #endif                         /* __CONFIG_H */