2 * Copyright (C) 2013 Marek Vasut <marex@denx.de>
4 * SPDX-License-Identifier: GPL-2.0+
6 #ifndef __MX23_OLINUXINO_CONFIG_H__
7 #define __MX23_OLINUXINO_CONFIG_H__
9 #include <asm/arch/iomux-mx23.h>
14 #define CONFIG_MX23 /* i.MX23 SoC */
15 #define CONFIG_MXS_GPIO /* GPIO control */
16 #define CONFIG_SYS_HZ 1000 /* Ticks per second */
18 #define CONFIG_MACH_TYPE 4105
20 #include <asm/arch/regs-base.h>
22 #define CONFIG_SYS_NO_FLASH
23 #define CONFIG_BOARD_EARLY_INIT_F
24 #define CONFIG_ARCH_MISC_INIT
30 #define CONFIG_SPL_NO_CPU_SUPPORT_CODE
31 #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mxs"
32 #define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
33 #define CONFIG_SPL_LIBCOMMON_SUPPORT
34 #define CONFIG_SPL_LIBGENERIC_SUPPORT
35 #define CONFIG_SPL_GPIO_SUPPORT
40 #include <config_cmd_default.h>
41 #define CONFIG_DISPLAY_CPUINFO
42 #define CONFIG_DOS_PARTITION
44 #define CONFIG_CMD_CACHE
45 #define CONFIG_CMD_DHCP
46 #define CONFIG_CMD_EXT2
47 #define CONFIG_CMD_FAT
48 #define CONFIG_CMD_GPIO
49 #define CONFIG_CMD_LED
50 #define CONFIG_CMD_MMC
51 #define CONFIG_CMD_NET
52 #define CONFIG_CMD_USB
55 * Memory configurations
57 #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
58 #define PHYS_SDRAM_1 0x40000000 /* Base address */
59 #define PHYS_SDRAM_1_SIZE 0x08000000 /* Max 128 MB RAM */
60 #define CONFIG_SYS_MALLOC_LEN 0x00400000 /* 4 MB for malloc */
61 #define CONFIG_SYS_GBL_DATA_SIZE 128 /* Initial data */
62 #define CONFIG_SYS_MEMTEST_START 0x40000000 /* Memtest start adr */
63 #define CONFIG_SYS_MEMTEST_END 0x40400000 /* 4 MB RAM test */
64 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
65 /* Point initial SP in SRAM so SPL can use it too. */
67 #define CONFIG_SYS_INIT_RAM_ADDR 0x00000000
68 #define CONFIG_SYS_INIT_RAM_SIZE (128 * 1024)
70 #define CONFIG_SYS_INIT_SP_OFFSET \
71 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
72 #define CONFIG_SYS_INIT_SP_ADDR \
73 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
75 * We need to sacrifice first 4 bytes of RAM here to avoid triggering some
76 * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot
77 * binary. In case there was more of this mess, 0x100 bytes are skipped.
79 #define CONFIG_SYS_TEXT_BASE 0x40000100
82 * U-Boot general configurations
84 #define CONFIG_SYS_LONGHELP
85 #define CONFIG_SYS_PROMPT "=> "
86 #define CONFIG_SYS_CBSIZE 1024 /* Console I/O buffer size */
87 #define CONFIG_SYS_PBSIZE \
88 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
89 /* Print buffer size */
90 #define CONFIG_SYS_MAXARGS 32 /* Max number of command args */
91 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
92 /* Boot argument buffer size */
93 #define CONFIG_VERSION_VARIABLE /* U-BOOT version */
94 #define CONFIG_AUTO_COMPLETE /* Command auto complete */
95 #define CONFIG_CMDLINE_EDITING /* Command history etc */
96 #define CONFIG_SYS_HUSH_PARSER
101 #define CONFIG_PL011_SERIAL
102 #define CONFIG_PL011_CLOCK 24000000
103 #define CONFIG_PL01x_PORTS { (void *)MXS_UARTDBG_BASE }
104 #define CONFIG_CONS_INDEX 0
105 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
110 #define CONFIG_STATUS_LED
111 #define CONFIG_GPIO_LED
112 #define CONFIG_BOARD_SPECIFIC_LED
113 #define STATUS_LED_BOOT 0
114 #define STATUS_LED_BIT MX23_PAD_SSP1_DETECT__GPIO_2_1
115 #define STATUS_LED_STATE STATUS_LED_ON
116 #define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
121 #ifdef CONFIG_CMD_MMC
123 #define CONFIG_BOUNCE_BUFFER
124 #define CONFIG_GENERIC_MMC
125 #define CONFIG_MXS_MMC
131 #define CONFIG_APBH_DMA
134 #ifdef CONFIG_CMD_USB
135 #define CONFIG_USB_EHCI
136 #define CONFIG_USB_EHCI_MXS
137 #define CONFIG_EHCI_MXS_PORT0
138 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
139 #define CONFIG_EHCI_IS_TDI
140 #define CONFIG_USB_STORAGE
144 #ifdef CONFIG_CMD_NET
145 #define CONFIG_USB_HOST_ETHER
146 #define CONFIG_USB_ETHER_SMSC95XX
152 #define CONFIG_CMDLINE_TAG
153 #define CONFIG_SETUP_MEMORY_TAGS
154 #define CONFIG_BOOTDELAY 3
155 #define CONFIG_BOOTFILE "uImage"
156 #define CONFIG_LOADADDR 0x42000000
157 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
158 #define CONFIG_OF_LIBFDT
163 #define CONFIG_ENV_IS_IN_MMC
164 #define CONFIG_ENV_OVERWRITE
165 #ifdef CONFIG_ENV_IS_IN_MMC
166 #define CONFIG_ENV_OFFSET (256 * 1024)
167 #define CONFIG_ENV_SIZE (16 * 1024)
168 #define CONFIG_SYS_MMC_ENV_DEV 0
174 #define CONFIG_EXTRA_ENV_SETTINGS \
175 "update_sd_firmware_filename=u-boot.sd\0" \
176 "update_sd_firmware=" /* Update the SD firmware partition */ \
177 "if mmc rescan ; then " \
178 "if tftp ${update_sd_firmware_filename} ; then " \
179 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
180 "setexpr fw_sz ${fw_sz} + 1 ; " \
181 "mmc write ${loadaddr} 0x800 ${fw_sz} ; " \
184 "script=boot.scr\0" \
186 "console=ttyAMA0\0" \
187 "fdt_file=imx23-olinuxino.dtb\0" \
188 "fdt_addr=0x41000000\0" \
193 "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
194 "mmcargs=setenv bootargs console=${console},${baudrate} " \
195 "root=${mmcroot}\0" \
197 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
198 "bootscript=echo Running bootscript from mmc ...; " \
200 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
201 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
202 "mmcboot=echo Booting from mmc ...; " \
204 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
205 "if run loadfdt; then " \
206 "bootm ${loadaddr} - ${fdt_addr}; " \
208 "if test ${boot_fdt} = try; then " \
211 "echo WARN: Cannot load the DT; " \
217 "netargs=setenv bootargs console=${console},${baudrate} " \
219 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
220 "netboot=echo Booting from net ...; " \
223 "if test ${ip_dyn} = yes; then " \
224 "setenv get_cmd dhcp; " \
226 "setenv get_cmd tftp; " \
228 "${get_cmd} ${uimage}; " \
229 "if test ${boot_fdt} = yes; then " \
230 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
231 "bootm ${loadaddr} - ${fdt_addr}; " \
233 "if test ${boot_fdt} = try; then " \
236 "echo WARN: Cannot load the DT; " \
243 #define CONFIG_BOOTCOMMAND \
244 "mmc dev ${mmcdev}; if mmc rescan; then " \
245 "if run loadbootscript; then " \
248 "if run loaduimage; then " \
250 "else run netboot; " \
253 "else run netboot; fi"
255 #endif /* __MX23_OLINUXINO_CONFIG_H__ */