blob: 96cd9e9960add2e3f1142dcc22699997009a9cf8 [file] [log] [blame]
Adrian Alonso1a8150d2015-09-03 11:49:28 -05001/*
2 * Copyright (C) 2015 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Freescale i.MX7D SABRESD board.
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#ifndef __MX7D_SABRESD_CONFIG_H
10#define __MX7D_SABRESD_CONFIG_H
11
12#include "mx7_common.h"
13
14#define CONFIG_DBG_MONITOR
15#define PHYS_SDRAM_SIZE SZ_1G
16
Adrian Alonso78e9ca52015-10-12 13:48:16 -050017/* Uncomment to enable secure boot support */
18/* #define CONFIG_SECURE_BOOT */
19#define CONFIG_CSF_SIZE 0x4000
20
Adrian Alonso1a8150d2015-09-03 11:49:28 -050021/* Network */
22#define CONFIG_CMD_MII
23#define CONFIG_FEC_MXC
24#define CONFIG_MII
25#define CONFIG_FEC_XCV_TYPE RGMII
26#define CONFIG_ETHPRIME "FEC"
27#define CONFIG_FEC_MXC_PHYADDR 0
28
29#define CONFIG_PHYLIB
30#define CONFIG_PHY_BROADCOM
Adrian Alonso1a8150d2015-09-03 11:49:28 -050031/* ENET1 */
32#define IMX_FEC_BASE ENET_IPS_BASE_ADDR
33
34/* MMC Config*/
35#define CONFIG_SYS_FSL_ESDHC_ADDR 0
36
37/* PMIC */
38#define CONFIG_POWER
39#define CONFIG_POWER_I2C
40#define CONFIG_POWER_PFUZE3000
41#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
42
43#undef CONFIG_BOOTM_NETBSD
44#undef CONFIG_BOOTM_PLAN9
45#undef CONFIG_BOOTM_RTEMS
46
47#undef CONFIG_CMD_EXPORTENV
48#undef CONFIG_CMD_IMPORTENV
49
50/* I2C configs */
51#define CONFIG_CMD_I2C
52#define CONFIG_SYS_I2C
53#define CONFIG_SYS_I2C_MXC
Albert ARIBAUD \\(3ADEV\\)03544c62015-09-21 22:43:38 +020054#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
Adrian Alonso1a8150d2015-09-03 11:49:28 -050055#define CONFIG_SYS_I2C_SPEED 100000
56
57#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
58#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
59
60#define CONFIG_MFG_ENV_SETTINGS \
61 "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
62 "rdinit=/linuxrc " \
63 "g_mass_storage.stall=0 g_mass_storage.removable=1 " \
64 "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\
65 "g_mass_storage.iSerialNumber=\"\" "\
66 "clk_ignore_unused "\
67 "\0" \
68 "initrd_addr=0x83800000\0" \
69 "initrd_high=0xffffffff\0" \
70 "bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \
71
Tzu-Jung Lee73f1b802015-10-27 23:00:50 +000072#define CONFIG_DFU_ENV_SETTINGS \
73 "dfu_alt_info=image raw 0 0x800000;"\
74 "u-boot raw 0 0x4000;"\
75 "bootimg part 0 1;"\
76 "rootfs part 0 2\0" \
77
Adrian Alonso1a8150d2015-09-03 11:49:28 -050078#define CONFIG_EXTRA_ENV_SETTINGS \
79 CONFIG_MFG_ENV_SETTINGS \
Tzu-Jung Lee73f1b802015-10-27 23:00:50 +000080 CONFIG_DFU_ENV_SETTINGS \
Adrian Alonso1a8150d2015-09-03 11:49:28 -050081 "script=boot.scr\0" \
82 "image=zImage\0" \
83 "console=ttymxc0\0" \
84 "fdt_high=0xffffffff\0" \
85 "initrd_high=0xffffffff\0" \
86 "fdt_file=imx7d-sdb.dtb\0" \
87 "fdt_addr=0x83000000\0" \
88 "boot_fdt=try\0" \
89 "ip_dyn=yes\0" \
90 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
91 "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
92 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
93 "mmcautodetect=yes\0" \
94 "mmcargs=setenv bootargs console=${console},${baudrate} " \
95 "root=${mmcroot}\0" \
96 "loadbootscript=" \
97 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
98 "bootscript=echo Running bootscript from mmc ...; " \
99 "source\0" \
100 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
101 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
102 "mmcboot=echo Booting from mmc ...; " \
103 "run mmcargs; " \
104 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
105 "if run loadfdt; then " \
106 "bootz ${loadaddr} - ${fdt_addr}; " \
107 "else " \
108 "if test ${boot_fdt} = try; then " \
109 "bootz; " \
110 "else " \
111 "echo WARN: Cannot load the DT; " \
112 "fi; " \
113 "fi; " \
114 "else " \
115 "bootz; " \
116 "fi;\0" \
117 "netargs=setenv bootargs console=${console},${baudrate} " \
118 "root=/dev/nfs " \
119 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
120 "netboot=echo Booting from net ...; " \
121 "run netargs; " \
122 "if test ${ip_dyn} = yes; then " \
123 "setenv get_cmd dhcp; " \
124 "else " \
125 "setenv get_cmd tftp; " \
126 "fi; " \
127 "${get_cmd} ${image}; " \
128 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
129 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
130 "bootz ${loadaddr} - ${fdt_addr}; " \
131 "else " \
132 "if test ${boot_fdt} = try; then " \
133 "bootz; " \
134 "else " \
135 "echo WARN: Cannot load the DT; " \
136 "fi; " \
137 "fi; " \
138 "else " \
139 "bootz; " \
140 "fi;\0"
141
142#define CONFIG_BOOTCOMMAND \
143 "mmc dev ${mmcdev};" \
144 "mmc dev ${mmcdev}; if mmc rescan; then " \
145 "if run loadbootscript; then " \
146 "run bootscript; " \
147 "else " \
148 "if run loadimage; then " \
149 "run mmcboot; " \
150 "else run netboot; " \
151 "fi; " \
152 "fi; " \
153 "else run netboot; fi"
154
155#define CONFIG_CMD_MEMTEST
156#define CONFIG_SYS_MEMTEST_START 0x80000000
157#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x20000000)
158
159#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
160#define CONFIG_SYS_HZ 1000
161
162#define CONFIG_STACKSIZE SZ_128K
163
164/* Physical Memory Map */
165#define CONFIG_NR_DRAM_BANKS 1
166#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
167
168#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
169#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
170#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
171
172#define CONFIG_SYS_INIT_SP_OFFSET \
173 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
174#define CONFIG_SYS_INIT_SP_ADDR \
175 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
176
177/* FLASH and environment organization */
178#define CONFIG_SYS_NO_FLASH
179#define CONFIG_ENV_SIZE SZ_8K
180#define CONFIG_ENV_IS_IN_MMC
181#define CONFIG_ENV_OFFSET (8 * SZ_64K)
182#define CONFIG_SYS_FSL_USDHC_NUM 2
183
184#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
185#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
186#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
187
Adrian Alonso1a8150d2015-09-03 11:49:28 -0500188/* USB Configs */
189#define CONFIG_CMD_USB
190#define CONFIG_USB_EHCI
191#define CONFIG_USB_EHCI_MX7
192#define CONFIG_USB_STORAGE
193#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
194#define CONFIG_USB_HOST_ETHER
195#define CONFIG_USB_ETHER_ASIX
196#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
197#define CONFIG_MXC_USB_FLAGS 0
198#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
199
200#define CONFIG_IMX_THERMAL
201
Tzu-Jung Lee73f1b802015-10-27 23:00:50 +0000202#define CONFIG_CI_UDC
203#define CONFIG_USBD_HS
204#define CONFIG_USB_GADGET_DUALSPEED
205
206#define CONFIG_USB_GADGET
207#define CONFIG_CMD_USB_MASS_STORAGE
208#define CONFIG_USB_FUNCTION_MASS_STORAGE
209#define CONFIG_USB_GADGET_DOWNLOAD
210#define CONFIG_USB_GADGET_VBUS_DRAW 2
211
212#define CONFIG_G_DNL_VENDOR_NUM 0x0525
213#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
214#define CONFIG_G_DNL_MANUFACTURER "FSL"
215
216/* USB Device Firmware Update support */
217#define CONFIG_CMD_DFU
218#define CONFIG_USB_FUNCTION_DFU
219#define CONFIG_DFU_MMC
220#define CONFIG_DFU_RAM
221
Adrian Alonso1a8150d2015-09-03 11:49:28 -0500222#endif /* __CONFIG_H */