1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2013 Marek Vasut <marex@denx.de>
5 #ifndef __CONFIGS_MX23_OLINUXINO_H__
6 #define __CONFIGS_MX23_OLINUXINO_H__
8 /* System configurations */
9 #define CONFIG_MACH_TYPE 4105
13 /* Memory configuration */
14 #define PHYS_SDRAM_1 0x40000000 /* Base address */
15 #define PHYS_SDRAM_1_SIZE 0x08000000 /* Max 128 MB RAM */
16 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
20 /* Environment is in MMC */
21 #if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
22 #define CONFIG_SYS_MMC_ENV_DEV 0
29 #define CONFIG_EHCI_MXS_PORT0
30 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
36 #define CONFIG_BOOTFILE "uImage"
37 #define CONFIG_LOADADDR 0x42000000
38 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
40 /* Extra Environment */
41 #define CONFIG_EXTRA_ENV_SETTINGS \
42 "update_sd_firmware_filename=u-boot.sd\0" \
43 "update_sd_firmware=" /* Update the SD firmware partition */ \
44 "if mmc rescan ; then " \
45 "if tftp ${update_sd_firmware_filename} ; then " \
46 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
47 "setexpr fw_sz ${fw_sz} + 1 ; " \
48 "mmc write ${loadaddr} 0x800 ${fw_sz} ; " \
54 "fdt_file=imx23-olinuxino.dtb\0" \
55 "fdt_addr=0x41000000\0" \
60 "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
61 "mmcargs=setenv bootargs console=${console},${baudrate} " \
64 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
65 "bootscript=echo Running bootscript from mmc ...; " \
67 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
68 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
69 "mmcboot=echo Booting from mmc ...; " \
71 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
72 "if run loadfdt; then " \
73 "bootm ${loadaddr} - ${fdt_addr}; " \
75 "if test ${boot_fdt} = try; then " \
78 "echo WARN: Cannot load the DT; " \
84 "netargs=setenv bootargs console=${console},${baudrate} " \
86 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
87 "netboot=echo Booting from net ...; " \
90 "if test ${ip_dyn} = yes; then " \
91 "setenv get_cmd dhcp; " \
93 "setenv get_cmd tftp; " \
95 "${get_cmd} ${uimage}; " \
96 "if test ${boot_fdt} = yes; then " \
97 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
98 "bootm ${loadaddr} - ${fdt_addr}; " \
100 "if test ${boot_fdt} = try; then " \
103 "echo WARN: Cannot load the DT; " \
110 #define CONFIG_BOOTCOMMAND \
111 "mmc dev ${mmcdev}; if mmc rescan; then " \
112 "if run loadbootscript; then " \
115 "if run loaduimage; then " \
117 "else run netboot; " \
120 "else run netboot; fi"
122 /* The rest of the configuration is shared */
123 #include <configs/mxs.h>
125 #endif /* __CONFIGS_MX23_OLINUXINO_H__ */