4 * SPDX-License-Identifier: GPL-2.0+
6 #ifndef __CONFIGS_MX23_OLINUXINO_H__
7 #define __CONFIGS_MX23_OLINUXINO_H__
9 /* System configurations */
10 #define CONFIG_MX23 /* i.MX23 SoC */
11 #define CONFIG_MACH_TYPE 4105
14 #define CONFIG_SYS_NO_FLASH
16 /* Memory configuration */
17 #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
18 #define PHYS_SDRAM_1 0x40000000 /* Base address */
19 #define PHYS_SDRAM_1_SIZE 0x08000000 /* Max 128 MB RAM */
20 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
23 #define CONFIG_ENV_IS_IN_MMC
24 #define CONFIG_ENV_OVERWRITE
26 /* Environment is in MMC */
27 #if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
28 #define CONFIG_ENV_OFFSET (256 * 1024)
29 #define CONFIG_ENV_SIZE (16 * 1024)
30 #define CONFIG_SYS_MMC_ENV_DEV 0
37 #define CONFIG_EHCI_MXS_PORT0
38 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
43 #define CONFIG_USB_HOST_ETHER
44 #define CONFIG_USB_ETHER_SMSC95XX
48 #define CONFIG_BOOTFILE "uImage"
49 #define CONFIG_LOADADDR 0x42000000
50 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
52 /* Extra Environment */
53 #define CONFIG_EXTRA_ENV_SETTINGS \
54 "update_sd_firmware_filename=u-boot.sd\0" \
55 "update_sd_firmware=" /* Update the SD firmware partition */ \
56 "if mmc rescan ; then " \
57 "if tftp ${update_sd_firmware_filename} ; then " \
58 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
59 "setexpr fw_sz ${fw_sz} + 1 ; " \
60 "mmc write ${loadaddr} 0x800 ${fw_sz} ; " \
66 "fdt_file=imx23-olinuxino.dtb\0" \
67 "fdt_addr=0x41000000\0" \
72 "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
73 "mmcargs=setenv bootargs console=${console},${baudrate} " \
76 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
77 "bootscript=echo Running bootscript from mmc ...; " \
79 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
80 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
81 "mmcboot=echo Booting from mmc ...; " \
83 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
84 "if run loadfdt; then " \
85 "bootm ${loadaddr} - ${fdt_addr}; " \
87 "if test ${boot_fdt} = try; then " \
90 "echo WARN: Cannot load the DT; " \
96 "netargs=setenv bootargs console=${console},${baudrate} " \
98 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
99 "netboot=echo Booting from net ...; " \
102 "if test ${ip_dyn} = yes; then " \
103 "setenv get_cmd dhcp; " \
105 "setenv get_cmd tftp; " \
107 "${get_cmd} ${uimage}; " \
108 "if test ${boot_fdt} = yes; then " \
109 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
110 "bootm ${loadaddr} - ${fdt_addr}; " \
112 "if test ${boot_fdt} = try; then " \
115 "echo WARN: Cannot load the DT; " \
122 #define CONFIG_BOOTCOMMAND \
123 "mmc dev ${mmcdev}; if mmc rescan; then " \
124 "if run loadbootscript; then " \
127 "if run loaduimage; then " \
129 "else run netboot; " \
132 "else run netboot; fi"
134 /* The rest of the configuration is shared */
135 #include <configs/mxs.h>
137 #endif /* __CONFIGS_MX23_OLINUXINO_H__ */