blob: 474f80184c9d77dc730ddbb45e95562d6ad15956 [file] [log] [blame]
Fabio Estevam14a16132014-06-24 17:41:01 -03001/*
2 * Copyright 2014 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Freescale i.MX6SX Sabresd board.
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9
10#ifndef __CONFIG_H
11#define __CONFIG_H
12
Fabio Estevam14a16132014-06-24 17:41:01 -030013#include "mx6_common.h"
14
Peng Fan71abf192014-12-30 17:24:00 +080015#ifdef CONFIG_SPL
16#define CONFIG_SPL_LIBCOMMON_SUPPORT
17#define CONFIG_SPL_MMC_SUPPORT
18#include "imx6_spl.h"
19#endif
20
Fabio Estevam14a16132014-06-24 17:41:01 -030021/* Size of malloc() pool */
22#define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M)
23
24#define CONFIG_BOARD_EARLY_INIT_F
Fabio Estevam14a16132014-06-24 17:41:01 -030025
26#define CONFIG_MXC_UART
27#define CONFIG_MXC_UART_BASE UART1_BASE
28
29/* allow to overwrite serial and ethaddr */
30#define CONFIG_ENV_OVERWRITE
31#define CONFIG_CONS_INDEX 1
32#define CONFIG_BAUDRATE 115200
33
34/* Command definition */
Fabio Estevam14a16132014-06-24 17:41:01 -030035
Fabio Estevam14a16132014-06-24 17:41:01 -030036#define CONFIG_EXTRA_ENV_SETTINGS \
37 "script=boot.scr\0" \
38 "image=zImage\0" \
39 "console=ttymxc0\0" \
40 "fdt_high=0xffffffff\0" \
41 "initrd_high=0xffffffff\0" \
42 "fdt_file=imx6sx-sdb.dtb\0" \
43 "fdt_addr=0x88000000\0" \
44 "boot_fdt=try\0" \
45 "ip_dyn=yes\0" \
Ye.Lid0fbca22014-11-04 15:36:40 +080046 "mmcdev=2\0" \
Fabio Estevam14a16132014-06-24 17:41:01 -030047 "mmcpart=1\0" \
48 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
49 "mmcargs=setenv bootargs console=${console},${baudrate} " \
50 "root=${mmcroot}\0" \
51 "loadbootscript=" \
52 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
53 "bootscript=echo Running bootscript from mmc ...; " \
54 "source\0" \
55 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
56 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
57 "mmcboot=echo Booting from mmc ...; " \
58 "run mmcargs; " \
59 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
60 "if run loadfdt; then " \
61 "bootz ${loadaddr} - ${fdt_addr}; " \
62 "else " \
63 "if test ${boot_fdt} = try; then " \
64 "bootz; " \
65 "else " \
66 "echo WARN: Cannot load the DT; " \
67 "fi; " \
68 "fi; " \
69 "else " \
70 "bootz; " \
71 "fi;\0" \
72 "netargs=setenv bootargs console=${console},${baudrate} " \
73 "root=/dev/nfs " \
74 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
75 "netboot=echo Booting from net ...; " \
76 "run netargs; " \
77 "if test ${ip_dyn} = yes; then " \
78 "setenv get_cmd dhcp; " \
79 "else " \
80 "setenv get_cmd tftp; " \
81 "fi; " \
82 "${get_cmd} ${image}; " \
83 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
84 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
85 "bootz ${loadaddr} - ${fdt_addr}; " \
86 "else " \
87 "if test ${boot_fdt} = try; then " \
88 "bootz; " \
89 "else " \
90 "echo WARN: Cannot load the DT; " \
91 "fi; " \
92 "fi; " \
93 "else " \
94 "bootz; " \
95 "fi;\0"
96
97#define CONFIG_BOOTCOMMAND \
98 "mmc dev ${mmcdev};" \
99 "mmc dev ${mmcdev}; if mmc rescan; then " \
100 "if run loadbootscript; then " \
101 "run bootscript; " \
102 "else " \
103 "if run loadimage; then " \
104 "run mmcboot; " \
105 "else run netboot; " \
106 "fi; " \
107 "fi; " \
108 "else run netboot; fi"
109
110/* Miscellaneous configurable options */
111#define CONFIG_SYS_LONGHELP
112#define CONFIG_SYS_HUSH_PARSER
113#define CONFIG_AUTO_COMPLETE
114#define CONFIG_SYS_CBSIZE 1024
115
Fabio Estevam14a16132014-06-24 17:41:01 -0300116#define CONFIG_SYS_MAXARGS 256
117#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
118
119#define CONFIG_SYS_MEMTEST_START 0x80000000
120#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x10000)
121
Fabio Estevam14a16132014-06-24 17:41:01 -0300122#define CONFIG_CMDLINE_EDITING
123#define CONFIG_STACKSIZE SZ_128K
124
125/* Physical Memory Map */
126#define CONFIG_NR_DRAM_BANKS 1
127#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
128#define PHYS_SDRAM_SIZE SZ_1G
129
130#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
131#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
132#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
133
134#define CONFIG_SYS_INIT_SP_OFFSET \
135 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
136#define CONFIG_SYS_INIT_SP_ADDR \
137 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
138
139/* MMC Configuration */
140#define CONFIG_FSL_ESDHC
141#define CONFIG_FSL_USDHC
Peng Fan152adee2014-09-15 14:59:16 +0800142#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR
Fabio Estevam14a16132014-06-24 17:41:01 -0300143
144#define CONFIG_MMC
145#define CONFIG_CMD_MMC
146#define CONFIG_GENERIC_MMC
147#define CONFIG_BOUNCE_BUFFER
148#define CONFIG_CMD_EXT2
149#define CONFIG_CMD_FAT
150#define CONFIG_DOS_PARTITION
151
Fabio Estevamfa8cf312014-07-09 16:13:30 -0300152/* I2C Configs */
153#define CONFIG_CMD_I2C
154#define CONFIG_SYS_I2C
155#define CONFIG_SYS_I2C_MXC
York Sunf8cb1012015-03-20 10:20:40 -0700156#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
Fabio Estevamfa8cf312014-07-09 16:13:30 -0300157#define CONFIG_SYS_I2C_SPEED 100000
158
159/* PMIC */
160#define CONFIG_POWER
161#define CONFIG_POWER_I2C
162#define CONFIG_POWER_PFUZE100
163#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
164
Fabio Estevamd1458782014-08-15 00:24:29 -0300165/* Network */
166#define CONFIG_CMD_PING
167#define CONFIG_CMD_DHCP
168#define CONFIG_CMD_MII
169#define CONFIG_CMD_NET
170#define CONFIG_FEC_MXC
171#define CONFIG_MII
172
173#define IMX_FEC_BASE ENET_BASE_ADDR
174#define CONFIG_FEC_MXC_PHYADDR 0x1
175
176#define CONFIG_FEC_XCV_TYPE RGMII
177#define CONFIG_ETHPRIME "FEC"
178
179#define CONFIG_PHYLIB
180#define CONFIG_PHY_ATHEROS
181
Peng Fana511a3e2014-11-10 08:50:40 +0800182
183#define CONFIG_CMD_USB
184#ifdef CONFIG_CMD_USB
185#define CONFIG_USB_EHCI
186#define CONFIG_USB_EHCI_MX6
187#define CONFIG_USB_STORAGE
188#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
189#define CONFIG_USB_HOST_ETHER
190#define CONFIG_USB_ETHER_ASIX
191#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
192#define CONFIG_MXC_USB_FLAGS 0
193#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
194#endif
195
Fabio Estevamc860eed2014-08-25 14:26:46 -0300196#define CONFIG_CMD_PCI
197#ifdef CONFIG_CMD_PCI
198#define CONFIG_PCI
199#define CONFIG_PCI_PNP
200#define CONFIG_PCI_SCAN_SHOW
201#define CONFIG_PCIE_IMX
Fabio Estevamfb6f86c2014-09-30 14:05:39 -0300202#define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(2, 0)
203#define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(2, 1)
Fabio Estevamc860eed2014-08-25 14:26:46 -0300204#endif
205
Fabio Estevam4b16fd22014-11-25 13:11:07 -0200206#define CONFIG_IMX6_THERMAL
207
208#define CONFIG_CMD_FUSE
209#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
210#define CONFIG_MXC_OCOTP
211#endif
212
Peng Fanadc0fab2015-01-08 10:40:21 +0800213#define CONFIG_CMD_TIME
214
Peng Fanfad7d732014-12-31 11:01:40 +0800215#define CONFIG_FSL_QSPI
216
217#ifdef CONFIG_FSL_QSPI
218#define CONFIG_CMD_SF
219#define CONFIG_SPI_FLASH
Peng Fand87cbec2015-01-04 17:07:15 +0800220#define CONFIG_SPI_FLASH_BAR
Peng Fanfad7d732014-12-31 11:01:40 +0800221#define CONFIG_SPI_FLASH_SPANSION
222#define CONFIG_SPI_FLASH_STMICRO
223#define CONFIG_SYS_FSL_QSPI_LE
Peng Fanadc0fab2015-01-08 10:40:21 +0800224#define CONFIG_SYS_FSL_QSPI_AHB
Peng Fand87cbec2015-01-04 17:07:15 +0800225#ifdef CONFIG_MX6SX_SABRESD_REVA
Peng Fanfad7d732014-12-31 11:01:40 +0800226#define FSL_QSPI_FLASH_SIZE SZ_16M
Peng Fand87cbec2015-01-04 17:07:15 +0800227#else
228#define FSL_QSPI_FLASH_SIZE SZ_32M
229#endif
Peng Fanfad7d732014-12-31 11:01:40 +0800230#define FSL_QSPI_FLASH_NUM 2
231#endif
232
Ye.Li0da040b2015-01-16 16:47:44 +0800233#define CONFIG_ENV_OFFSET (8 * SZ_64K)
Fabio Estevam14a16132014-06-24 17:41:01 -0300234#define CONFIG_ENV_SIZE SZ_8K
235#define CONFIG_ENV_IS_IN_MMC
Fabio Estevam14a16132014-06-24 17:41:01 -0300236
237#define CONFIG_OF_LIBFDT
238#define CONFIG_CMD_BOOTZ
239
240#ifndef CONFIG_SYS_DCACHE_OFF
241#define CONFIG_CMD_CACHE
242#endif
243
Ye.Lid0fbca22014-11-04 15:36:40 +0800244#define CONFIG_SYS_FSL_USDHC_NUM 3
245#if defined(CONFIG_ENV_IS_IN_MMC)
246#define CONFIG_SYS_MMC_ENV_DEV 2 /*USDHC4*/
247#endif
248
Fabio Estevam14a16132014-06-24 17:41:01 -0300249#endif /* __CONFIG_H */