]>
Commit | Line | Data |
---|---|---|
14a16131 FE |
1 | /* |
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 | ||
13 | #include <asm/arch/imx-regs.h> | |
14 | #include <linux/sizes.h> | |
15 | #include "mx6_common.h" | |
16 | ||
17 | #define CONFIG_MX6 | |
18 | #define CONFIG_DISPLAY_CPUINFO | |
19 | #define CONFIG_DISPLAY_BOARDINFO | |
20 | ||
21 | #define CONFIG_CMDLINE_TAG | |
22 | #define CONFIG_SETUP_MEMORY_TAGS | |
23 | #define CONFIG_INITRD_TAG | |
24 | #define CONFIG_REVISION_TAG | |
25 | #define CONFIG_SYS_GENERIC_BOARD | |
26 | ||
27 | /* Size of malloc() pool */ | |
28 | #define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M) | |
29 | ||
30 | #define CONFIG_BOARD_EARLY_INIT_F | |
31 | #define CONFIG_MXC_GPIO | |
32 | ||
33 | #define CONFIG_MXC_UART | |
34 | #define CONFIG_MXC_UART_BASE UART1_BASE | |
35 | ||
36 | /* allow to overwrite serial and ethaddr */ | |
37 | #define CONFIG_ENV_OVERWRITE | |
38 | #define CONFIG_CONS_INDEX 1 | |
39 | #define CONFIG_BAUDRATE 115200 | |
40 | ||
41 | /* Command definition */ | |
42 | #include <config_cmd_default.h> | |
43 | ||
44 | #undef CONFIG_CMD_IMLS | |
45 | ||
46 | #define CONFIG_BOOTDELAY 3 | |
47 | ||
48 | #define CONFIG_LOADADDR 0x80800000 | |
49 | #define CONFIG_SYS_TEXT_BASE 0x87800000 | |
50 | ||
51 | #define CONFIG_EXTRA_ENV_SETTINGS \ | |
52 | "script=boot.scr\0" \ | |
53 | "image=zImage\0" \ | |
54 | "console=ttymxc0\0" \ | |
55 | "fdt_high=0xffffffff\0" \ | |
56 | "initrd_high=0xffffffff\0" \ | |
57 | "fdt_file=imx6sx-sdb.dtb\0" \ | |
58 | "fdt_addr=0x88000000\0" \ | |
59 | "boot_fdt=try\0" \ | |
60 | "ip_dyn=yes\0" \ | |
61 | "mmcdev=0\0" \ | |
62 | "mmcpart=1\0" \ | |
63 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ | |
64 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ | |
65 | "root=${mmcroot}\0" \ | |
66 | "loadbootscript=" \ | |
67 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ | |
68 | "bootscript=echo Running bootscript from mmc ...; " \ | |
69 | "source\0" \ | |
70 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ | |
71 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ | |
72 | "mmcboot=echo Booting from mmc ...; " \ | |
73 | "run mmcargs; " \ | |
74 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ | |
75 | "if run loadfdt; then " \ | |
76 | "bootz ${loadaddr} - ${fdt_addr}; " \ | |
77 | "else " \ | |
78 | "if test ${boot_fdt} = try; then " \ | |
79 | "bootz; " \ | |
80 | "else " \ | |
81 | "echo WARN: Cannot load the DT; " \ | |
82 | "fi; " \ | |
83 | "fi; " \ | |
84 | "else " \ | |
85 | "bootz; " \ | |
86 | "fi;\0" \ | |
87 | "netargs=setenv bootargs console=${console},${baudrate} " \ | |
88 | "root=/dev/nfs " \ | |
89 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ | |
90 | "netboot=echo Booting from net ...; " \ | |
91 | "run netargs; " \ | |
92 | "if test ${ip_dyn} = yes; then " \ | |
93 | "setenv get_cmd dhcp; " \ | |
94 | "else " \ | |
95 | "setenv get_cmd tftp; " \ | |
96 | "fi; " \ | |
97 | "${get_cmd} ${image}; " \ | |
98 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ | |
99 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ | |
100 | "bootz ${loadaddr} - ${fdt_addr}; " \ | |
101 | "else " \ | |
102 | "if test ${boot_fdt} = try; then " \ | |
103 | "bootz; " \ | |
104 | "else " \ | |
105 | "echo WARN: Cannot load the DT; " \ | |
106 | "fi; " \ | |
107 | "fi; " \ | |
108 | "else " \ | |
109 | "bootz; " \ | |
110 | "fi;\0" | |
111 | ||
112 | #define CONFIG_BOOTCOMMAND \ | |
113 | "mmc dev ${mmcdev};" \ | |
114 | "mmc dev ${mmcdev}; if mmc rescan; then " \ | |
115 | "if run loadbootscript; then " \ | |
116 | "run bootscript; " \ | |
117 | "else " \ | |
118 | "if run loadimage; then " \ | |
119 | "run mmcboot; " \ | |
120 | "else run netboot; " \ | |
121 | "fi; " \ | |
122 | "fi; " \ | |
123 | "else run netboot; fi" | |
124 | ||
125 | /* Miscellaneous configurable options */ | |
126 | #define CONFIG_SYS_LONGHELP | |
127 | #define CONFIG_SYS_HUSH_PARSER | |
128 | #define CONFIG_AUTO_COMPLETE | |
129 | #define CONFIG_SYS_CBSIZE 1024 | |
130 | ||
131 | /* Print Buffer Size */ | |
132 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) | |
133 | #define CONFIG_SYS_MAXARGS 256 | |
134 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE | |
135 | ||
136 | #define CONFIG_SYS_MEMTEST_START 0x80000000 | |
137 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x10000) | |
138 | ||
139 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR | |
140 | ||
141 | #define CONFIG_CMDLINE_EDITING | |
142 | #define CONFIG_STACKSIZE SZ_128K | |
143 | ||
144 | /* Physical Memory Map */ | |
145 | #define CONFIG_NR_DRAM_BANKS 1 | |
146 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR | |
147 | #define PHYS_SDRAM_SIZE SZ_1G | |
148 | ||
149 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM | |
150 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR | |
151 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE | |
152 | ||
153 | #define CONFIG_SYS_INIT_SP_OFFSET \ | |
154 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) | |
155 | #define CONFIG_SYS_INIT_SP_ADDR \ | |
156 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) | |
157 | ||
158 | /* MMC Configuration */ | |
159 | #define CONFIG_FSL_ESDHC | |
160 | #define CONFIG_FSL_USDHC | |
161 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 | |
162 | ||
163 | #define CONFIG_MMC | |
164 | #define CONFIG_CMD_MMC | |
165 | #define CONFIG_GENERIC_MMC | |
166 | #define CONFIG_BOUNCE_BUFFER | |
167 | #define CONFIG_CMD_EXT2 | |
168 | #define CONFIG_CMD_FAT | |
169 | #define CONFIG_DOS_PARTITION | |
170 | ||
171 | /* FLASH and environment organization */ | |
172 | #define CONFIG_SYS_NO_FLASH | |
173 | ||
174 | #define CONFIG_ENV_OFFSET (6 * SZ_64K) | |
175 | #define CONFIG_ENV_SIZE SZ_8K | |
176 | #define CONFIG_ENV_IS_IN_MMC | |
177 | #define CONFIG_SYS_MMC_ENV_DEV 0 | |
178 | ||
179 | #define CONFIG_OF_LIBFDT | |
180 | #define CONFIG_CMD_BOOTZ | |
181 | ||
182 | #ifndef CONFIG_SYS_DCACHE_OFF | |
183 | #define CONFIG_CMD_CACHE | |
184 | #endif | |
185 | ||
186 | #endif /* __CONFIG_H */ |