blob: 2560c8845653dc73093e0e9f6813d16381fed890 [file] [log] [blame]
Akshay Bhatf9162b12016-01-29 15:16:40 -05001/*
2 * Copyright (C) 2015 Timesys Corporation
3 * Copyright (C) 2015 General Electric Company
4 * Copyright (C) 2014 Advantech
5 * Copyright (C) 2012 Freescale Semiconductor, Inc.
6 *
7 * Configuration settings for the GE MX6Q Bx50v3 boards.
8 *
9 * SPDX-License-Identifier: GPL-2.0+
10 */
11
12#ifndef __GE_BX50V3_CONFIG_H
13#define __GE_BX50V3_CONFIG_H
14
15#include <asm/arch/imx-regs.h>
16#include <asm/imx-common/gpio.h>
17
Ken Lin3dddc792016-10-07 10:26:56 -040018#define BX50V3_BOOTARGS_EXTRA
Akshay Bhatf9162b12016-01-29 15:16:40 -050019#if defined(CONFIG_TARGET_GE_B450V3)
20#define CONFIG_BOARD_NAME "General Electric B450v3"
Akshay Bhatf9162b12016-01-29 15:16:40 -050021#elif defined(CONFIG_TARGET_GE_B650V3)
22#define CONFIG_BOARD_NAME "General Electric B650v3"
Akshay Bhatf9162b12016-01-29 15:16:40 -050023#elif defined(CONFIG_TARGET_GE_B850V3)
24#define CONFIG_BOARD_NAME "General Electric B850v3"
Ken Lin3dddc792016-10-07 10:26:56 -040025#undef BX50V3_BOOTARGS_EXTRA
26#define BX50V3_BOOTARGS_EXTRA "video=DP-1:1024x768@60 " \
27 "video=HDMI-A-1:1024x768@60 "
Akshay Bhatf9162b12016-01-29 15:16:40 -050028#else
29#define CONFIG_BOARD_NAME "General Electric BA16 Generic"
Akshay Bhatf9162b12016-01-29 15:16:40 -050030#endif
31
32#define CONFIG_MXC_UART_BASE UART3_BASE
Simon Glass12ca05a2016-10-17 20:12:39 -060033#define CONSOLE_DEV "ttymxc2"
Akshay Bhatf9162b12016-01-29 15:16:40 -050034
Akshay Bhatf9162b12016-01-29 15:16:40 -050035#define CONFIG_SUPPORT_EMMC_BOOT
36
Akshay Bhatf9162b12016-01-29 15:16:40 -050037
38#include "mx6_common.h"
39#include <linux/sizes.h>
40
Akshay Bhatf9162b12016-01-29 15:16:40 -050041#define CONFIG_CMDLINE_TAG
42#define CONFIG_SETUP_MEMORY_TAGS
43#define CONFIG_INITRD_TAG
44#define CONFIG_REVISION_TAG
45#define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)
46
47#define CONFIG_BOARD_EARLY_INIT_F
48#define CONFIG_BOARD_LATE_INIT
49
50#define CONFIG_MXC_GPIO
51#define CONFIG_MXC_UART
52
53#define CONFIG_CMD_FUSE
54#define CONFIG_MXC_OCOTP
55
56/* SATA Configs */
Andrew Shaduraaacc10c2016-05-24 15:56:21 +020057#ifdef CONFIG_CMD_SATA
Akshay Bhatf9162b12016-01-29 15:16:40 -050058#define CONFIG_DWC_AHSATA
59#define CONFIG_SYS_SATA_MAX_DEVICE 1
60#define CONFIG_DWC_AHSATA_PORT_ID 0
61#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
62#define CONFIG_LBA48
63#define CONFIG_LIBATA
Andrew Shaduraaacc10c2016-05-24 15:56:21 +020064#endif
Akshay Bhatf9162b12016-01-29 15:16:40 -050065
66/* MMC Configs */
67#define CONFIG_FSL_ESDHC
68#define CONFIG_FSL_USDHC
69#define CONFIG_SYS_FSL_ESDHC_ADDR 0
70#define CONFIG_MMC
Akshay Bhatf9162b12016-01-29 15:16:40 -050071#define CONFIG_GENERIC_MMC
72#define CONFIG_BOUNCE_BUFFER
Akshay Bhatf9162b12016-01-29 15:16:40 -050073#define CONFIG_DOS_PARTITION
74
75/* USB Configs */
Andrew Shadurafc449022016-05-24 15:56:19 +020076#ifdef CONFIG_USB
Akshay Bhatf9162b12016-01-29 15:16:40 -050077#define CONFIG_USB_EHCI
78#define CONFIG_USB_EHCI_MX6
Akshay Bhatf9162b12016-01-29 15:16:40 -050079#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
80#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
81#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
82#define CONFIG_MXC_USB_FLAGS 0
Akshay Bhatf9162b12016-01-29 15:16:40 -050083#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
84
85#define CONFIG_CI_UDC
86#define CONFIG_USBD_HS
87#define CONFIG_USB_GADGET_DUALSPEED
88#define CONFIG_USB_GADGET
89#define CONFIG_USB_GADGET_DOWNLOAD
Akshay Bhatf9162b12016-01-29 15:16:40 -050090#define CONFIG_USB_GADGET_MASS_STORAGE
91#define CONFIG_USB_FUNCTION_MASS_STORAGE
92#define CONFIG_USB_GADGET_VBUS_DRAW 2
93#define CONFIG_G_DNL_VENDOR_NUM 0x0525
94#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
95#define CONFIG_G_DNL_MANUFACTURER "Advantech"
Andrew Shadurafc449022016-05-24 15:56:19 +020096#endif
Akshay Bhatf9162b12016-01-29 15:16:40 -050097
98/* Networking Configs */
Andrew Shadurac26ffd92016-05-24 15:56:20 +020099#ifdef CONFIG_NET
Akshay Bhatf9162b12016-01-29 15:16:40 -0500100#define CONFIG_FEC_MXC
101#define CONFIG_MII
102#define IMX_FEC_BASE ENET_BASE_ADDR
103#define CONFIG_FEC_XCV_TYPE RGMII
104#define CONFIG_ETHPRIME "FEC"
105#define CONFIG_FEC_MXC_PHYADDR 4
106#define CONFIG_PHYLIB
107#define CONFIG_PHY_ATHEROS
Andrew Shadurac26ffd92016-05-24 15:56:20 +0200108#endif
Akshay Bhatf9162b12016-01-29 15:16:40 -0500109
110/* Serial Flash */
Akshay Bhatf9162b12016-01-29 15:16:40 -0500111#ifdef CONFIG_CMD_SF
112#define CONFIG_MXC_SPI
113#define CONFIG_SF_DEFAULT_BUS 0
114#define CONFIG_SF_DEFAULT_CS 0
115#define CONFIG_SF_DEFAULT_SPEED 20000000
116#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
117#endif
118
119/* allow to overwrite serial and ethaddr */
120#define CONFIG_ENV_OVERWRITE
121#define CONFIG_CONS_INDEX 1
122#define CONFIG_BAUDRATE 115200
123
124/* Command definition */
125#define CONFIG_CMD_BMODE
Akshay Bhatf9162b12016-01-29 15:16:40 -0500126
127#define CONFIG_LOADADDR 0x12000000
128#define CONFIG_SYS_TEXT_BASE 0x17800000
129
130#define CONFIG_EXTRA_ENV_SETTINGS \
131 "script=boot.scr\0" \
132 "image=/boot/uImage\0" \
133 "uboot=u-boot.imx\0" \
134 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
135 "fdt_addr=0x18000000\0" \
136 "boot_fdt=yes\0" \
137 "ip_dyn=yes\0" \
Simon Glass12ca05a2016-10-17 20:12:39 -0600138 "console=" CONSOLE_DEV "\0" \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500139 "fdt_high=0xffffffff\0" \
140 "initrd_high=0xffffffff\0" \
141 "sddev=0\0" \
142 "emmcdev=1\0" \
143 "partnum=1\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 "update_sf_uboot=" \
158 "if tftp $loadaddr $uboot; then " \
159 "sf probe; " \
160 "sf erase 0 0xC0000; " \
161 "sf write $loadaddr 0x400 $filesize; " \
162 "echo 'U-Boot upgraded. Please reset'; " \
163 "fi\0" \
164 "setargs=setenv bootargs console=${console},${baudrate} " \
Ken Lin3dddc792016-10-07 10:26:56 -0400165 "root=/dev/${rootdev} rw rootwait cma=128M " \
166 BX50V3_BOOTARGS_EXTRA "\0" \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500167 "loadbootscript=" \
168 "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${script};\0" \
169 "bootscript=echo Running bootscript from ${dev}:${devnum}:${partnum};" \
170 " source\0" \
171 "loadimage=" \
172 "ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
173 "loadfdt=ext2load ${dev} ${devnum}:${partnum} ${fdt_addr} ${fdt_file}\0" \
174 "tryboot=" \
175 "if run loadbootscript; then " \
176 "run bootscript; " \
177 "else " \
178 "if run loadimage; then " \
179 "run doboot; " \
180 "fi; " \
181 "fi;\0" \
182 "doboot=echo Booting from ${dev}:${devnum}:${partnum} ...; " \
183 "run setargs; " \
184 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
185 "if run loadfdt; then " \
186 "bootm ${loadaddr} - ${fdt_addr}; " \
187 "else " \
188 "if test ${boot_fdt} = try; then " \
189 "bootm; " \
190 "else " \
191 "echo WARN: Cannot load the DT; " \
192 "fi; " \
193 "fi; " \
194 "else " \
195 "bootm; " \
196 "fi;\0" \
197 "netargs=setenv bootargs console=${console},${baudrate} " \
198 "root=/dev/nfs " \
199 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
200 "netboot=echo Booting from net ...; " \
201 "run netargs; " \
202 "if test ${ip_dyn} = yes; then " \
203 "setenv get_cmd dhcp; " \
204 "else " \
205 "setenv get_cmd tftp; " \
206 "fi; " \
207 "${get_cmd} ${image}; " \
208 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
209 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
210 "bootm ${loadaddr} - ${fdt_addr}; " \
211 "else " \
212 "if test ${boot_fdt} = try; then " \
213 "bootm; " \
214 "else " \
215 "echo WARN: Cannot load the DT; " \
216 "fi; " \
217 "fi; " \
218 "else " \
219 "bootm; " \
220 "fi;\0" \
221
Andrew Shadurafc449022016-05-24 15:56:19 +0200222#define CONFIG_MMCBOOTCOMMAND \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500223 "setenv dev mmc; " \
Kimmo Surakkaf6825e42016-05-24 15:56:23 +0200224 "setenv rootdev mmcblk0p${partnum}; " \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500225 \
226 "setenv devnum ${sddev}; " \
227 "if mmc dev ${devnum}; then " \
228 "run tryboot; " \
Kimmo Surakkaf6825e42016-05-24 15:56:23 +0200229 "setenv rootdev mmcblk1p${partnum}; " \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500230 "fi; " \
231 \
232 "setenv devnum ${emmcdev}; " \
233 "if mmc dev ${devnum}; then " \
234 "run tryboot; " \
235 "fi; " \
Andrew Shadurafc449022016-05-24 15:56:19 +0200236
237#define CONFIG_USBBOOTCOMMAND \
238 "usb start; " \
239 "setenv dev usb; " \
240 "setenv devnum 0; " \
Kimmo Surakkaf6825e42016-05-24 15:56:23 +0200241 "setenv rootdev sda${partnum}; " \
Andrew Shadurafc449022016-05-24 15:56:19 +0200242 "run tryboot; " \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500243 \
Andrew Shadurafc449022016-05-24 15:56:19 +0200244 CONFIG_MMCBOOTCOMMAND \
Akshay Bhatf9162b12016-01-29 15:16:40 -0500245 "bmode usb; " \
246
Andrew Shadurafc449022016-05-24 15:56:19 +0200247#ifdef CONFIG_CMD_USB
248#define CONFIG_BOOTCOMMAND CONFIG_USBBOOTCOMMAND
249#else
250#define CONFIG_BOOTCOMMAND CONFIG_MMCBOOTCOMMAND
251#endif
252
Akshay Bhatf9162b12016-01-29 15:16:40 -0500253#define CONFIG_ARP_TIMEOUT 200UL
254
255/* Miscellaneous configurable options */
256#define CONFIG_SYS_LONGHELP
Akshay Bhatf9162b12016-01-29 15:16:40 -0500257#define CONFIG_AUTO_COMPLETE
258
259/* Print Buffer Size */
260#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
261#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
262
263#define CONFIG_SYS_MEMTEST_START 0x10000000
264#define CONFIG_SYS_MEMTEST_END 0x10010000
265#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
266
267#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
268
269#define CONFIG_CMDLINE_EDITING
270#define CONFIG_STACKSIZE (128 * 1024)
271
272/* Physical Memory Map */
273#define CONFIG_NR_DRAM_BANKS 1
274#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
275
276#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
277#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
278#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
279
280#define CONFIG_SYS_INIT_SP_OFFSET \
281 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
282#define CONFIG_SYS_INIT_SP_ADDR \
283 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
284
285/* FLASH and environment organization */
286#define CONFIG_SYS_NO_FLASH
287
288#define CONFIG_ENV_IS_IN_SPI_FLASH
289#define CONFIG_ENV_SIZE (8 * 1024)
290#define CONFIG_ENV_OFFSET (768 * 1024)
291#define CONFIG_ENV_SECT_SIZE (64 * 1024)
292#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
293#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
294#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
295#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
296
Akshay Bhatf9162b12016-01-29 15:16:40 -0500297#ifndef CONFIG_SYS_DCACHE_OFF
Akshay Bhatf9162b12016-01-29 15:16:40 -0500298#endif
299
300#define CONFIG_SYS_FSL_USDHC_NUM 3
301
302/* Framebuffer */
Andrew Shadura07aa0302016-05-24 15:56:18 +0200303#ifdef CONFIG_VIDEO
Akshay Bhatf9162b12016-01-29 15:16:40 -0500304#define CONFIG_VIDEO_IPUV3
Akshay Bhatf9162b12016-01-29 15:16:40 -0500305#define CONFIG_VIDEO_BMP_RLE8
306#define CONFIG_SPLASH_SCREEN
307#define CONFIG_SPLASH_SCREEN_ALIGN
308#define CONFIG_BMP_16BPP
309#define CONFIG_VIDEO_LOGO
310#define CONFIG_VIDEO_BMP_LOGO
311#define CONFIG_IPUV3_CLK 260000000
312#define CONFIG_IMX_HDMI
313#define CONFIG_IMX_VIDEO_SKIP
Andrew Shadura07aa0302016-05-24 15:56:18 +0200314#endif
Akshay Bhatf9162b12016-01-29 15:16:40 -0500315
Akshay Bhat54971ac2016-04-12 18:13:59 -0400316#define CONFIG_PWM_IMX
317#define CONFIG_IMX6_PWM_PER_CLK 66000000
318
Akshay Bhatf9162b12016-01-29 15:16:40 -0500319#undef CONFIG_CMD_PCI
320#ifdef CONFIG_CMD_PCI
Akshay Bhatf9162b12016-01-29 15:16:40 -0500321#define CONFIG_PCI_SCAN_SHOW
322#define CONFIG_PCIE_IMX
323#define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(7, 12)
324#define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(1, 5)
325#endif
326
327/* I2C Configs */
Akshay Bhatf9162b12016-01-29 15:16:40 -0500328#define CONFIG_SYS_I2C
329#define CONFIG_SYS_I2C_MXC
330#define CONFIG_SYS_I2C_SPEED 100000
331#define CONFIG_SYS_I2C_MXC_I2C1
332#define CONFIG_SYS_I2C_MXC_I2C2
333#define CONFIG_SYS_I2C_MXC_I2C3
334
335#endif /* __GE_BX50V3_CONFIG_H */