]> git.sur5r.net Git - u-boot/blob - include/configs/warp.h
mx51evk: Use the default CONFIG_SYS_PBSIZE
[u-boot] / include / configs / warp.h
1 /*
2  * Copyright (C) 2014 O.S. Systems Software LTDA.
3  * Copyright (C) 2014 Kynetics LLC.
4  * Copyright (C) 2014 Revolution Robotics, Inc.
5  *
6  * Author: Otavio Salvador <otavio@ossystems.com.br>
7  *
8  * Configuration settings for the WaRP Board
9  *
10  * SPDX-License-Identifier:     GPL-2.0+
11  */
12
13 #ifndef __CONFIG_H
14 #define __CONFIG_H
15
16 #include <asm/arch/imx-regs.h>
17 #include <linux/sizes.h>
18 #include "mx6_common.h"
19
20 #define CONFIG_MX6
21 #define CONFIG_DISPLAY_CPUINFO
22 #define CONFIG_DISPLAY_BOARDINFO
23 #define CONFIG_SYS_GENERIC_BOARD
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           (3 * SZ_1M)
32
33 #define CONFIG_BOARD_EARLY_INIT_F
34 #define CONFIG_BOARD_LATE_INIT
35 #define CONFIG_MXC_GPIO
36
37 #define CONFIG_MXC_UART
38 #define CONFIG_MXC_UART_BASE            UART1_IPS_BASE_ADDR
39
40 /* MMC Configs */
41 #define CONFIG_FSL_ESDHC
42 #define CONFIG_FSL_USDHC
43 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
44 #define CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
45
46 #define CONFIG_MMC
47 #define CONFIG_CMD_MMC
48 #define CONFIG_GENERIC_MMC
49 #define CONFIG_BOUNCE_BUFFER
50 #define CONFIG_CMD_EXT2
51 #define CONFIG_CMD_EXT4
52 #define CONFIG_CMD_EXT4_WRITE
53 #define CONFIG_CMD_FAT
54 #define CONFIG_DOS_PARTITION
55
56 /* allow to overwrite serial and ethaddr */
57 #define CONFIG_ENV_OVERWRITE
58 #define CONFIG_CONS_INDEX               1
59 #define CONFIG_BAUDRATE                 115200
60
61 /* FLASH and environment organization */
62 #define CONFIG_SYS_NO_FLASH
63
64 /* Command definition */
65 #include <config_cmd_default.h>
66 #undef CONFIG_CMD_NET
67 #undef CONFIG_CMD_NFS
68
69 #define CONFIG_BOOTDELAY                3
70
71 #define CONFIG_LOADADDR                 0x82000000
72 #define CONFIG_SYS_TEXT_BASE            0x87800000
73
74 /* Miscellaneous configurable options */
75 #define CONFIG_SYS_LONGHELP
76 #define CONFIG_SYS_HUSH_PARSER
77 #define CONFIG_AUTO_COMPLETE
78 #define CONFIG_SYS_CBSIZE               256
79
80 /* Watchdog */
81 #define CONFIG_HW_WATCHDOG
82 #define CONFIG_IMX_WATCHDOG
83 #define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 /* 30s */
84
85 /* Print Buffer Size */
86 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
87 #define CONFIG_SYS_MAXARGS              16
88 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
89
90 #define CONFIG_SYS_MEMTEST_START        0x80000000
91 #define CONFIG_SYS_MEMTEST_END          (CONFIG_SYS_MEMTEST_START + SZ_256M)
92
93 #define CONFIG_SYS_LOAD_ADDR            CONFIG_LOADADDR
94
95 #define CONFIG_CMDLINE_EDITING
96 #define CONFIG_STACKSIZE                SZ_128K
97
98 /* Physical Memory Map */
99 #define CONFIG_NR_DRAM_BANKS            1
100 #define PHYS_SDRAM                      MMDC0_ARB_BASE_ADDR
101 #define PHYS_SDRAM_SIZE                 SZ_512M
102
103 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
104 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
105 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
106
107 #define CONFIG_SYS_INIT_SP_OFFSET \
108         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
109 #define CONFIG_SYS_INIT_SP_ADDR \
110         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
111
112 #define CONFIG_ENV_OFFSET               (6 * SZ_64K)
113 #define CONFIG_ENV_SIZE                 SZ_8K
114 #define CONFIG_ENV_IS_IN_MMC
115 #define CONFIG_SYS_MMC_ENV_DEV          0
116
117 /* VDD voltage 1.65 - 1.95 */
118 #define CONFIG_SYS_SD_VOLTAGE           0x00000080
119
120 #define CONFIG_OF_LIBFDT
121 #define CONFIG_CMD_BOOTZ
122
123 #ifndef CONFIG_SYS_DCACHE_OFF
124 #define CONFIG_CMD_CACHE
125 #endif
126
127 /* USB Configs */
128 #define CONFIG_CMD_USB
129 #ifdef CONFIG_CMD_USB
130 #define CONFIG_USB_EHCI
131 #define CONFIG_USB_EHCI_MX6
132 #define CONFIG_USB_STORAGE
133 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
134 #define CONFIG_MXC_USB_PORTSC           (PORT_PTS_UTMI | PORT_PTS_PTW)
135 #define CONFIG_MXC_USB_FLAGS            0
136 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Only OTG2 port enabled */
137 #endif
138
139 #define CONFIG_CI_UDC
140 #define CONFIG_USBD_HS
141 #define CONFIG_USB_GADGET_DUALSPEED
142
143 #define CONFIG_USB_GADGET
144 #define CONFIG_CMD_USB_MASS_STORAGE
145 #define CONFIG_USB_GADGET_MASS_STORAGE
146 #define CONFIG_USBDOWNLOAD_GADGET
147 #define CONFIG_USB_GADGET_VBUS_DRAW     2
148
149 #define CONFIG_G_DNL_VENDOR_NUM         0x0525
150 #define CONFIG_G_DNL_PRODUCT_NUM        0xa4a5
151 #define CONFIG_G_DNL_MANUFACTURER       "FSL"
152
153 #define CONFIG_EXTRA_ENV_SETTINGS \
154         "script=boot.scr\0" \
155         "image=zImage\0" \
156         "console=ttymxc0\0" \
157         "fdt_high=0xffffffff\0" \
158         "initrd_high=0xffffffff\0" \
159         "fdt_file=imx6sl-warp.dtb\0" \
160         "fdt_addr=0x88000000\0" \
161         "initrd_addr=0x83800000\0" \
162         "boot_fdt=try\0" \
163         "ip_dyn=yes\0" \
164         "mmcdev=0\0" \
165         "mmcpart=1\0" \
166         "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
167         "mmcargs=setenv bootargs console=${console},${baudrate} " \
168                 "root=${mmcroot}\0" \
169         "loadbootscript=" \
170                 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
171         "bootscript=echo Running bootscript from mmc ...; " \
172                 "source\0" \
173         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
174         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
175         "mmcboot=echo Booting from mmc ...; " \
176                 "run mmcargs; " \
177                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
178                         "if run loadfdt; then " \
179                                 "bootz ${loadaddr} - ${fdt_addr}; " \
180                         "else " \
181                                 "if test ${boot_fdt} = try; then " \
182                                         "bootz; " \
183                                 "else " \
184                                         "echo WARN: Cannot load the DT; " \
185                                 "fi; " \
186                         "fi; " \
187                 "else " \
188                         "bootz; " \
189                 "fi;\0" \
190         "netargs=setenv bootargs console=${console},${baudrate} " \
191                 "root=/dev/nfs " \
192         "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
193                 "netboot=echo Booting from net ...; " \
194                 "run netargs; " \
195                 "if test ${ip_dyn} = yes; then " \
196                         "setenv get_cmd dhcp; " \
197                 "else " \
198                         "setenv get_cmd tftp; " \
199                 "fi; " \
200                 "${get_cmd} ${image}; " \
201                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
202                         "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
203                                 "bootz ${loadaddr} - ${fdt_addr}; " \
204                         "else " \
205                                 "if test ${boot_fdt} = try; then " \
206                                         "bootz; " \
207                                 "else " \
208                                         "echo WARN: Cannot load the DT; " \
209                                 "fi; " \
210                         "fi; " \
211                 "else " \
212                         "bootz; " \
213                 "fi;\0"
214
215 #define CONFIG_BOOTCOMMAND \
216            "mmc dev ${mmcdev};" \
217            "mmc dev ${mmcdev}; if mmc rescan; then " \
218                    "if run loadbootscript; then " \
219                            "run bootscript; " \
220                    "else " \
221                            "if run loadimage; then " \
222                                    "run mmcboot; " \
223                            "else run netboot; " \
224                            "fi; " \
225                    "fi; " \
226            "else run netboot; fi"
227
228 #endif                          /* __CONFIG_H */