]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/configs/mx23_olinuxino.h
cmd: Kconfig: Add a Kconfig options for a few CMD
[people/ms/u-boot.git] / include / configs / mx23_olinuxino.h
1 /*
2 * Copyright (C) 2013 Marek Vasut <marex@denx.de>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6 #ifndef __CONFIGS_MX23_OLINUXINO_H__
7 #define __CONFIGS_MX23_OLINUXINO_H__
8
9 /* System configurations */
10 #define CONFIG_MX23 /* i.MX23 SoC */
11 #define CONFIG_MACH_TYPE 4105
12
13 /* U-Boot Commands */
14 #define CONFIG_SYS_NO_FLASH
15 #define CONFIG_DISPLAY_CPUINFO
16 #define CONFIG_DOS_PARTITION
17
18 #define CONFIG_CMD_CACHE
19 #define CONFIG_CMD_EXT2
20 #define CONFIG_CMD_FAT
21 #define CONFIG_CMD_LED
22 #define CONFIG_CMD_MMC
23
24 /* Memory configuration */
25 #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
26 #define PHYS_SDRAM_1 0x40000000 /* Base address */
27 #define PHYS_SDRAM_1_SIZE 0x08000000 /* Max 128 MB RAM */
28 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
29
30 /* Environment */
31 #define CONFIG_ENV_IS_IN_MMC
32 #define CONFIG_ENV_OVERWRITE
33
34 /* Environment is in MMC */
35 #if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
36 #define CONFIG_ENV_OFFSET (256 * 1024)
37 #define CONFIG_ENV_SIZE (16 * 1024)
38 #define CONFIG_SYS_MMC_ENV_DEV 0
39 #endif
40
41 /* Status LED */
42 #define CONFIG_STATUS_LED
43 #define CONFIG_GPIO_LED
44 #define CONFIG_BOARD_SPECIFIC_LED
45 #define STATUS_LED_BOOT 0
46 #define STATUS_LED_BIT MX23_PAD_SSP1_DETECT__GPIO_2_1
47 #define STATUS_LED_STATE STATUS_LED_ON
48 #define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
49
50 /* USB */
51 #ifdef CONFIG_CMD_USB
52 #define CONFIG_EHCI_MXS_PORT0
53 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
54 #define CONFIG_USB_STORAGE
55 #endif
56
57 /* Ethernet */
58 #ifdef CONFIG_CMD_NET
59 #define CONFIG_USB_HOST_ETHER
60 #define CONFIG_USB_ETHER_SMSC95XX
61 #endif
62
63 /* Booting Linux */
64 #define CONFIG_BOOTDELAY 3
65 #define CONFIG_BOOTFILE "uImage"
66 #define CONFIG_LOADADDR 0x42000000
67 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
68
69 /* Extra Environment */
70 #define CONFIG_EXTRA_ENV_SETTINGS \
71 "update_sd_firmware_filename=u-boot.sd\0" \
72 "update_sd_firmware=" /* Update the SD firmware partition */ \
73 "if mmc rescan ; then " \
74 "if tftp ${update_sd_firmware_filename} ; then " \
75 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
76 "setexpr fw_sz ${fw_sz} + 1 ; " \
77 "mmc write ${loadaddr} 0x800 ${fw_sz} ; " \
78 "fi ; " \
79 "fi\0" \
80 "script=boot.scr\0" \
81 "uimage=uImage\0" \
82 "console=ttyAMA0\0" \
83 "fdt_file=imx23-olinuxino.dtb\0" \
84 "fdt_addr=0x41000000\0" \
85 "boot_fdt=try\0" \
86 "ip_dyn=yes\0" \
87 "mmcdev=0\0" \
88 "mmcpart=2\0" \
89 "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
90 "mmcargs=setenv bootargs console=${console},${baudrate} " \
91 "root=${mmcroot}\0" \
92 "loadbootscript=" \
93 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
94 "bootscript=echo Running bootscript from mmc ...; " \
95 "source\0" \
96 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
97 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
98 "mmcboot=echo Booting from mmc ...; " \
99 "run mmcargs; " \
100 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
101 "if run loadfdt; then " \
102 "bootm ${loadaddr} - ${fdt_addr}; " \
103 "else " \
104 "if test ${boot_fdt} = try; then " \
105 "bootm; " \
106 "else " \
107 "echo WARN: Cannot load the DT; " \
108 "fi; " \
109 "fi; " \
110 "else " \
111 "bootm; " \
112 "fi;\0" \
113 "netargs=setenv bootargs console=${console},${baudrate} " \
114 "root=/dev/nfs " \
115 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
116 "netboot=echo Booting from net ...; " \
117 "usb start; " \
118 "run netargs; " \
119 "if test ${ip_dyn} = yes; then " \
120 "setenv get_cmd dhcp; " \
121 "else " \
122 "setenv get_cmd tftp; " \
123 "fi; " \
124 "${get_cmd} ${uimage}; " \
125 "if test ${boot_fdt} = yes; then " \
126 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
127 "bootm ${loadaddr} - ${fdt_addr}; " \
128 "else " \
129 "if test ${boot_fdt} = try; then " \
130 "bootm; " \
131 "else " \
132 "echo WARN: Cannot load the DT; " \
133 "fi;" \
134 "fi; " \
135 "else " \
136 "bootm; " \
137 "fi;\0"
138
139 #define CONFIG_BOOTCOMMAND \
140 "mmc dev ${mmcdev}; if mmc rescan; then " \
141 "if run loadbootscript; then " \
142 "run bootscript; " \
143 "else " \
144 "if run loaduimage; then " \
145 "run mmcboot; " \
146 "else run netboot; " \
147 "fi; " \
148 "fi; " \
149 "else run netboot; fi"
150
151 /* The rest of the configuration is shared */
152 #include <configs/mxs.h>
153
154 #endif /* __CONFIGS_MX23_OLINUXINO_H__ */