blob: 6c3c52e3e009c8d53b8210f39f317377baa3b635 [file] [log] [blame]
Fabio Estevambcfc7112012-09-24 08:09:32 +00001/*
2 * Copyright (C) 2012 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Freescale i.MX6Q SabreSD board.
5 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Fabio Estevambcfc7112012-09-24 08:09:32 +00007 */
8
9#ifndef __MX6QSABRE_COMMON_CONFIG_H
10#define __MX6QSABRE_COMMON_CONFIG_H
11
Stephen Warren8f393772013-02-26 12:28:29 +000012#include "mx6_common.h"
13
Ye.Li6c920ee2014-11-20 21:14:15 +080014#define CONFIG_IMX6_THERMAL
15
Fabio Estevambcfc7112012-09-24 08:09:32 +000016/* Size of malloc() pool */
Pardeep Kumar Singla58cc9782013-07-25 12:12:14 -050017#define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)
Fabio Estevambcfc7112012-09-24 08:09:32 +000018
19#define CONFIG_BOARD_EARLY_INIT_F
Otavio Salvador85449db2013-03-16 08:05:07 +000020#define CONFIG_BOARD_LATE_INIT
Fabio Estevambcfc7112012-09-24 08:09:32 +000021
22#define CONFIG_MXC_UART
23
Fabio Estevam5dc64ab2013-12-23 13:07:18 -020024#define CONFIG_CMD_FUSE
Ye.Li6c920ee2014-11-20 21:14:15 +080025#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
Fabio Estevam5dc64ab2013-12-23 13:07:18 -020026#define CONFIG_MXC_OCOTP
27#endif
28
Fabio Estevambcfc7112012-09-24 08:09:32 +000029/* MMC Configs */
Fabio Estevambcfc7112012-09-24 08:09:32 +000030#define CONFIG_SYS_FSL_ESDHC_ADDR 0
Fabio Estevambcfc7112012-09-24 08:09:32 +000031
Fabio Estevambcfc7112012-09-24 08:09:32 +000032#define CONFIG_CMD_PING
33#define CONFIG_CMD_DHCP
34#define CONFIG_CMD_MII
Fabio Estevambcfc7112012-09-24 08:09:32 +000035#define CONFIG_FEC_MXC
36#define CONFIG_MII
37#define IMX_FEC_BASE ENET_BASE_ADDR
38#define CONFIG_FEC_XCV_TYPE RGMII
39#define CONFIG_ETHPRIME "FEC"
40#define CONFIG_FEC_MXC_PHYADDR 1
41
42#define CONFIG_PHYLIB
43#define CONFIG_PHY_ATHEROS
44
Fabio Estevam8bfa9c62013-11-08 16:20:54 -020045#define CONFIG_CMD_SF
46#ifdef CONFIG_CMD_SF
Fabio Estevam8bfa9c62013-11-08 16:20:54 -020047#define CONFIG_SPI_FLASH_STMICRO
48#define CONFIG_MXC_SPI
49#define CONFIG_SF_DEFAULT_BUS 0
Nikita Kiryanov155fa9a2014-08-20 15:08:50 +030050#define CONFIG_SF_DEFAULT_CS 0
Fabio Estevam8bfa9c62013-11-08 16:20:54 -020051#define CONFIG_SF_DEFAULT_SPEED 20000000
52#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
53#endif
54
Fabio Estevambcfc7112012-09-24 08:09:32 +000055/* Command definition */
Otavio Salvador85449db2013-03-16 08:05:07 +000056#define CONFIG_CMD_BMODE
Fabio Estevambcfc7112012-09-24 08:09:32 +000057
Otavio Salvador03ce3302014-01-06 13:27:20 -020058#ifdef CONFIG_SUPPORT_EMMC_BOOT
59#define EMMC_ENV \
60 "emmcdev=2\0" \
61 "update_emmc_firmware=" \
62 "if test ${ip_dyn} = yes; then " \
63 "setenv get_cmd dhcp; " \
64 "else " \
65 "setenv get_cmd tftp; " \
66 "fi; " \
67 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
maxin.john@enea.com4bf83962015-03-03 15:48:41 +010068 "if mmc dev ${emmcdev} 1; then " \
Otavio Salvador03ce3302014-01-06 13:27:20 -020069 "setexpr fw_sz ${filesize} / 0x200; " \
70 "setexpr fw_sz ${fw_sz} + 1; " \
71 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
Otavio Salvador03ce3302014-01-06 13:27:20 -020072 "fi; " \
73 "fi\0"
74#else
75#define EMMC_ENV ""
76#endif
77
Fabio Estevambcfc7112012-09-24 08:09:32 +000078#define CONFIG_EXTRA_ENV_SETTINGS \
79 "script=boot.scr\0" \
Otavio Salvadorf2e42882014-01-16 19:58:03 -020080 "image=zImage\0" \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +000081 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
Otavio Salvador6584a1b2013-12-16 20:44:04 -020082 "fdt_addr=0x18000000\0" \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +000083 "boot_fdt=try\0" \
84 "ip_dyn=yes\0" \
Otavio Salvador51535d92012-09-26 11:37:01 +000085 "console=" CONFIG_CONSOLE_DEV "\0" \
Fabio Estevambcfc7112012-09-24 08:09:32 +000086 "fdt_high=0xffffffff\0" \
87 "initrd_high=0xffffffff\0" \
Fabio Estevamacbb4452013-01-10 09:00:53 +000088 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Fabio Estevam7fb72c72013-06-04 15:05:39 +000089 "mmcpart=1\0" \
Otavio Salvador903e7792012-10-02 09:22:10 +000090 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
Otavio Salvador810d6df2013-04-19 03:41:57 +000091 "update_sd_firmware=" \
92 "if test ${ip_dyn} = yes; then " \
93 "setenv get_cmd dhcp; " \
94 "else " \
95 "setenv get_cmd tftp; " \
96 "fi; " \
97 "if mmc dev ${mmcdev}; then " \
98 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
99 "setexpr fw_sz ${filesize} / 0x200; " \
100 "setexpr fw_sz ${fw_sz} + 1; " \
101 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
102 "fi; " \
103 "fi\0" \
Otavio Salvador03ce3302014-01-06 13:27:20 -0200104 EMMC_ENV \
Fabio Estevambcfc7112012-09-24 08:09:32 +0000105 "mmcargs=setenv bootargs console=${console},${baudrate} " \
106 "root=${mmcroot}\0" \
107 "loadbootscript=" \
108 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
109 "bootscript=echo Running bootscript from mmc ...; " \
110 "source\0" \
Otavio Salvadorf2e42882014-01-16 19:58:03 -0200111 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +0000112 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
113 "mmcboot=echo Booting from mmc ...; " \
Fabio Estevambcfc7112012-09-24 08:09:32 +0000114 "run mmcargs; " \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +0000115 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
116 "if run loadfdt; then " \
Otavio Salvadorf2e42882014-01-16 19:58:03 -0200117 "bootz ${loadaddr} - ${fdt_addr}; " \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +0000118 "else " \
119 "if test ${boot_fdt} = try; then " \
Otavio Salvadorf2e42882014-01-16 19:58:03 -0200120 "bootz; " \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +0000121 "else " \
122 "echo WARN: Cannot load the DT; " \
123 "fi; " \
124 "fi; " \
125 "else " \
Otavio Salvadorf2e42882014-01-16 19:58:03 -0200126 "bootz; " \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +0000127 "fi;\0" \
Fabio Estevambcfc7112012-09-24 08:09:32 +0000128 "netargs=setenv bootargs console=${console},${baudrate} " \
129 "root=/dev/nfs " \
130 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
131 "netboot=echo Booting from net ...; " \
132 "run netargs; " \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +0000133 "if test ${ip_dyn} = yes; then " \
134 "setenv get_cmd dhcp; " \
135 "else " \
136 "setenv get_cmd tftp; " \
137 "fi; " \
Otavio Salvadorf2e42882014-01-16 19:58:03 -0200138 "${get_cmd} ${image}; " \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +0000139 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
140 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
Otavio Salvadorf2e42882014-01-16 19:58:03 -0200141 "bootz ${loadaddr} - ${fdt_addr}; " \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +0000142 "else " \
143 "if test ${boot_fdt} = try; then " \
Otavio Salvadorf2e42882014-01-16 19:58:03 -0200144 "bootz; " \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +0000145 "else " \
146 "echo WARN: Cannot load the DT; " \
147 "fi; " \
148 "fi; " \
149 "else " \
Otavio Salvadorf2e42882014-01-16 19:58:03 -0200150 "bootz; " \
Otavio Salvadorbf0c2242013-01-10 09:45:09 +0000151 "fi;\0"
Fabio Estevambcfc7112012-09-24 08:09:32 +0000152
153#define CONFIG_BOOTCOMMAND \
154 "mmc dev ${mmcdev};" \
Otavio Salvador66300ac2013-04-10 16:55:50 +0000155 "if mmc rescan; then " \
Fabio Estevambcfc7112012-09-24 08:09:32 +0000156 "if run loadbootscript; then " \
157 "run bootscript; " \
158 "else " \
Otavio Salvadorf2e42882014-01-16 19:58:03 -0200159 "if run loadimage; then " \
Fabio Estevambcfc7112012-09-24 08:09:32 +0000160 "run mmcboot; " \
161 "else run netboot; " \
162 "fi; " \
163 "fi; " \
164 "else run netboot; fi"
165
166#define CONFIG_ARP_TIMEOUT 200UL
167
Fabio Estevambcfc7112012-09-24 08:09:32 +0000168#define CONFIG_SYS_MEMTEST_START 0x10000000
169#define CONFIG_SYS_MEMTEST_END 0x10010000
Eric Nelsonbec01602013-02-01 08:08:45 +0000170#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
Fabio Estevambcfc7112012-09-24 08:09:32 +0000171
Fabio Estevambcfc7112012-09-24 08:09:32 +0000172#define CONFIG_STACKSIZE (128 * 1024)
173
174/* Physical Memory Map */
175#define CONFIG_NR_DRAM_BANKS 1
176#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
177
178#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
179#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
180#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
181
182#define CONFIG_SYS_INIT_SP_OFFSET \
183 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
184#define CONFIG_SYS_INIT_SP_ADDR \
185 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
186
Peter Robinson056845c2015-05-22 17:30:45 +0100187/* Environment organization */
Fabio Estevambcfc7112012-09-24 08:09:32 +0000188#define CONFIG_ENV_SIZE (8 * 1024)
189
190#define CONFIG_ENV_IS_IN_MMC
191
192#if defined(CONFIG_ENV_IS_IN_MMC)
Ye.Li610efbe2014-11-12 14:02:04 +0800193#define CONFIG_ENV_OFFSET (8 * 64 * 1024)
Fabio Estevambcfc7112012-09-24 08:09:32 +0000194#endif
195
Fabio Estevam04451ba2014-09-22 13:55:53 -0300196/* Framebuffer */
197#define CONFIG_VIDEO
198#define CONFIG_VIDEO_IPUV3
199#define CONFIG_CFB_CONSOLE
200#define CONFIG_VGA_AS_SINGLE_DEVICE
201#define CONFIG_SYS_CONSOLE_IS_IN_ENV
202#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
203#define CONFIG_VIDEO_BMP_RLE8
204#define CONFIG_SPLASH_SCREEN
205#define CONFIG_SPLASH_SCREEN_ALIGN
206#define CONFIG_BMP_16BPP
207#define CONFIG_VIDEO_LOGO
208#define CONFIG_VIDEO_BMP_LOGO
209#define CONFIG_IPUV3_CLK 260000000
210#define CONFIG_IMX_HDMI
211#define CONFIG_IMX_VIDEO_SKIP
212
Fabio Estevamd5eb6dc2015-03-09 18:44:39 -0300213#ifndef CONFIG_SPL
Fabio Estevamad8aae82015-02-26 16:58:55 -0300214#define CONFIG_CI_UDC
215#define CONFIG_USBD_HS
216#define CONFIG_USB_GADGET_DUALSPEED
217
218#define CONFIG_USB_GADGET
219#define CONFIG_CMD_USB_MASS_STORAGE
220#define CONFIG_USB_GADGET_MASS_STORAGE
221#define CONFIG_USBDOWNLOAD_GADGET
222#define CONFIG_USB_GADGET_VBUS_DRAW 2
223
224#define CONFIG_G_DNL_VENDOR_NUM 0x0525
225#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
226#define CONFIG_G_DNL_MANUFACTURER "FSL"
Fabio Estevamd5eb6dc2015-03-09 18:44:39 -0300227#endif
Fabio Estevamad8aae82015-02-26 16:58:55 -0300228
Fabio Estevambcfc7112012-09-24 08:09:32 +0000229#endif /* __MX6QSABRE_COMMON_CONFIG_H */