]>
Commit | Line | Data |
---|---|---|
e2d282a1 FE |
1 | /* |
2 | * Copyright (C) 2013 Freescale Semiconductor, Inc. | |
3 | * | |
4 | * Configuration settings for the Wandboard. | |
5 | * | |
1a459660 | 6 | * SPDX-License-Identifier: GPL-2.0+ |
e2d282a1 FE |
7 | */ |
8 | ||
9 | #ifndef __CONFIG_H | |
10 | #define __CONFIG_H | |
11 | ||
3d99e862 | 12 | #include <config_distro_defaults.h> |
02824dc7 | 13 | #include "mx6_common.h" |
e2d282a1 | 14 | |
0d1ea052 FE |
15 | #include "imx6_spl.h" |
16 | ||
92a1babf | 17 | #define CONFIG_MACH_TYPE MACH_TYPE_WANDBOARD_IMX6 |
e2d282a1 | 18 | |
e2d282a1 | 19 | /* Size of malloc() pool */ |
7bcb983f | 20 | #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) |
e2d282a1 | 21 | |
e2d282a1 FE |
22 | #define CONFIG_MXC_UART |
23 | #define CONFIG_MXC_UART_BASE UART1_BASE | |
24 | ||
e355eec7 GC |
25 | /* SATA Configs */ |
26 | ||
27 | #define CONFIG_CMD_SATA | |
28 | #ifdef CONFIG_CMD_SATA | |
29 | #define CONFIG_DWC_AHSATA | |
30 | #define CONFIG_SYS_SATA_MAX_DEVICE 1 | |
31 | #define CONFIG_DWC_AHSATA_PORT_ID 0 | |
32 | #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR | |
33 | #define CONFIG_LBA48 | |
34 | #define CONFIG_LIBATA | |
35 | #endif | |
36 | ||
e2d282a1 FE |
37 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
38 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M) | |
e2d282a1 | 39 | |
8bc7c487 | 40 | /* I2C Configs */ |
8bc7c487 OS |
41 | #define CONFIG_SYS_I2C |
42 | #define CONFIG_SYS_I2C_MXC | |
03544c66 AA |
43 | #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ |
44 | #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ | |
f8cb101e | 45 | #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ |
8bc7c487 OS |
46 | #define CONFIG_SYS_I2C_SPEED 100000 |
47 | ||
e2d282a1 | 48 | /* MMC Configuration */ |
5ed15738 | 49 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
e2d282a1 | 50 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
e2d282a1 | 51 | |
9df47577 | 52 | /* USB Configs */ |
9df47577 | 53 | #define CONFIG_USB_EHCI_MX6 |
9df47577 JH |
54 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
55 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) | |
56 | #define CONFIG_MXC_USB_FLAGS 0 | |
57 | ||
e2d282a1 | 58 | /* Ethernet Configuration */ |
e2d282a1 FE |
59 | #define CONFIG_FEC_MXC |
60 | #define CONFIG_MII | |
61 | #define IMX_FEC_BASE ENET_BASE_ADDR | |
62 | #define CONFIG_FEC_XCV_TYPE RGMII | |
63 | #define CONFIG_ETHPRIME "FEC" | |
64 | #define CONFIG_FEC_MXC_PHYADDR 1 | |
65 | #define CONFIG_PHYLIB | |
66 | #define CONFIG_PHY_ATHEROS | |
67 | ||
7bcb983f | 68 | /* Framebuffer */ |
36c0627b | 69 | #ifdef CONFIG_VIDEO |
7bcb983f | 70 | #define CONFIG_VIDEO_IPUV3 |
7bcb983f FE |
71 | #define CONFIG_VIDEO_BMP_RLE8 |
72 | #define CONFIG_SPLASH_SCREEN | |
a7efb026 | 73 | #define CONFIG_SPLASH_SCREEN_ALIGN |
7bcb983f FE |
74 | #define CONFIG_BMP_16BPP |
75 | #define CONFIG_VIDEO_LOGO | |
a7efb026 | 76 | #define CONFIG_VIDEO_BMP_LOGO |
7bcb983f | 77 | #define CONFIG_IPUV3_CLK 260000000 |
0ef797a5 | 78 | #define CONFIG_CMD_HDMIDETECT |
5ea7f0e3 | 79 | #define CONFIG_IMX_HDMI |
8bc7c487 | 80 | #define CONFIG_IMX_VIDEO_SKIP |
36c0627b | 81 | #endif |
7bcb983f | 82 | |
0d1ea052 | 83 | #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
e2d282a1 | 84 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
acc6bb56 | 85 | "console=ttymxc0,115200\0" \ |
d727ab3c | 86 | "splashpos=m,m\0" \ |
0d1ea052 | 87 | "fdtfile=undefined\0" \ |
e2d282a1 FE |
88 | "fdt_high=0xffffffff\0" \ |
89 | "initrd_high=0xffffffff\0" \ | |
acc6bb56 | 90 | "fdt_addr_r=0x18000000\0" \ |
6584a1b5 | 91 | "fdt_addr=0x18000000\0" \ |
e2d282a1 | 92 | "ip_dyn=yes\0" \ |
1e1cbde0 | 93 | "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ |
0798d578 OS |
94 | "update_sd_firmware_filename=u-boot.imx\0" \ |
95 | "update_sd_firmware=" \ | |
96 | "if test ${ip_dyn} = yes; then " \ | |
97 | "setenv get_cmd dhcp; " \ | |
98 | "else " \ | |
99 | "setenv get_cmd tftp; " \ | |
100 | "fi; " \ | |
101 | "if mmc dev ${mmcdev}; then " \ | |
102 | "if ${get_cmd} ${update_sd_firmware_filename}; then " \ | |
103 | "setexpr fw_sz ${filesize} / 0x200; " \ | |
104 | "setexpr fw_sz ${fw_sz} + 1; " \ | |
105 | "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ | |
106 | "fi; " \ | |
107 | "fi\0" \ | |
0d1ea052 | 108 | "findfdt="\ |
9a8804a8 | 109 | "if test $board_name = C1 && test $board_rev = MX6Q ; then " \ |
0d1ea052 | 110 | "setenv fdtfile imx6q-wandboard.dtb; fi; " \ |
9a8804a8 | 111 | "if test $board_name = C1 && test $board_rev = MX6DL ; then " \ |
0d1ea052 | 112 | "setenv fdtfile imx6dl-wandboard.dtb; fi; " \ |
9a8804a8 FE |
113 | "if test $board_name = B1 && test $board_rev = MX6Q ; then " \ |
114 | "setenv fdtfile imx6q-wandboard-revb1.dtb; fi; " \ | |
115 | "if test $board_name = B1 && test $board_rev = MX6DL ; then " \ | |
116 | "setenv fdtfile imx6dl-wandboard-revb1.dtb; fi; " \ | |
0d1ea052 FE |
117 | "if test $fdtfile = undefined; then " \ |
118 | "echo WARNING: Could not determine dtb to use; fi; \0" \ | |
acc6bb56 | 119 | "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ |
d3b78e18 | 120 | "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ |
acc6bb56 VC |
121 | "ramdisk_addr_r=0x13000000\0" \ |
122 | "ramdiskaddr=0x13000000\0" \ | |
123 | "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ | |
124 | BOOTENV | |
125 | ||
126 | #define BOOT_TARGET_DEVICES(func) \ | |
127 | func(MMC, mmc, 0) \ | |
128 | func(MMC, mmc, 1) \ | |
129 | func(USB, usb, 0) \ | |
130 | func(PXE, pxe, na) \ | |
131 | func(DHCP, dhcp, na) | |
e2d282a1 FE |
132 | |
133 | #define CONFIG_BOOTCOMMAND \ | |
0d1ea052 | 134 | "run findfdt; " \ |
acc6bb56 VC |
135 | "run distro_bootcmd" |
136 | ||
acc6bb56 | 137 | #include <config_distro_bootcmd.h> |
e2d282a1 | 138 | |
e2d282a1 FE |
139 | /* Physical Memory Map */ |
140 | #define CONFIG_NR_DRAM_BANKS 1 | |
141 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR | |
142 | ||
143 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM | |
144 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR | |
145 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE | |
146 | ||
147 | #define CONFIG_SYS_INIT_SP_OFFSET \ | |
148 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) | |
149 | #define CONFIG_SYS_INIT_SP_ADDR \ | |
150 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) | |
151 | ||
056845c2 | 152 | /* Environment organization */ |
e2d282a1 FE |
153 | #define CONFIG_ENV_SIZE (8 * 1024) |
154 | ||
155 | #define CONFIG_ENV_IS_IN_MMC | |
67ff9e11 | 156 | #define CONFIG_ENV_OFFSET (768 * 1024) |
e2d282a1 FE |
157 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
158 | ||
e2d282a1 | 159 | #endif /* __CONFIG_H * */ |