1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2019 DENX Software Engineering
6 * Copyright (C) 2018 DENX Software Engineering
10 * on behalf of DENX Software Engineering GmbH
12 #ifndef __CONFIGS_XEA_H__
13 #define __CONFIGS_XEA_H__
15 #include <linux/sizes.h>
19 #define CONFIG_SYS_SPL_ARGS_ADDR 0x44000000
21 #define CONFIG_SYS_SPI_KERNEL_OFFS SZ_1M
22 #define CONFIG_SYS_SPI_ARGS_OFFS SZ_512K
23 #define CONFIG_SYS_SPI_ARGS_SIZE SZ_32K
25 #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR (SZ_512K / 0x200)
26 #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS (SZ_32K / 0x200)
28 /* Memory configuration */
29 #define PHYS_SDRAM_1 0x40000000 /* Base address */
30 #define PHYS_SDRAM_1_SIZE 0x10000000 /* Max 256 MB RAM */
31 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
33 /* Extra Environment */
34 #define CONFIG_HOSTNAME "xea"
36 #define CONFIG_EXTRA_ENV_SETTINGS \
42 "dtbaddr=0x44000000\0" \
43 "dtbfile=imx28-xea.dtb\0" \
44 "rootdev=/dev/mmcblk0p2\0" \
46 "rdaddr=0x43000000\0" \
47 "swufile=swupdate.img\0" \
48 "sf_kernel_offset=0x100000\0" \
49 "sf_kernel_size=0x400000\0" \
50 "sf_swu_offset=0x500000\0" \
51 "sf_swu_size=0x800000\0" \
52 "rootpath=/opt/eldk-5.5/armv5te/rootfs-qte-sdk\0" \
54 "if mmc rescan ; then " \
55 "mmc dev 0 ${update_mmc_part} ; " \
56 "if dhcp ${hostname}/${update_filename} ; then " \
57 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
58 "setexpr fw_sz ${fw_sz} + 1 ; " \
59 "mmc write ${loadaddr} ${update_offset} ${fw_sz} ; " \
63 "if sf probe ; then " \
64 "if dhcp ${hostname}/${update_filename} ; then " \
65 "sf erase ${update_offset} +${filesize} ; " \
66 "sf write ${loadaddr} ${update_offset} ${filesize} ; " \
69 "update_spl_filename=u-boot.sb\0" \
71 "setenv update_filename ${update_spl_filename} ; " \
72 "setenv update_offset 0 ; " \
73 "run do_update_sf\0" \
74 "update_uboot_filename=u-boot.img\0" \
76 "setenv update_filename ${update_uboot_filename} ; " \
77 "setenv update_offset 0x10000 ; " \
78 "run do_update_sf ; " \
79 "setenv update_mmc_part 1 ; " \
80 "setenv update_offset 0 ; " \
81 "run do_update_mmc\0" \
82 "update_kernel_filename=uImage\0" \
84 "setenv update_mmc_part 1 ; " \
85 "setenv update_filename ${update_kernel_filename} ; " \
86 "setenv update_offset 0x800 ; " \
87 "run do_update_mmc ; " \
88 "setenv update_filename ${dtbfile} ; " \
89 "setenv update_offset 0x400 ; " \
90 "run do_update_mmc\0" \
92 "setenv update_filename fitImage ; " \
93 "setenv update_offset ${sf_kernel_offset} ; " \
94 "run do_update_sf\0" \
96 "setenv update_filename ${swufile} ; " \
97 "setenv update_offset ${sf_swu_offset} ; " \
98 "run do_update_sf\0" \
100 "setenv bootargs ${bootargs} " \
101 "console=${consdev},${baudrate}\0" \
103 "setenv bootargs ${bootargs} " \
104 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
105 "${netmask}:${hostname}:${netdev}:off\0" \
107 "setenv bootargs ${bootargs} ${miscargs}\0" \
108 "addargs=run addcons addmisc\0" \
112 "mmc read ${loadaddr} 0x800 0x2000 ; " \
113 "mmc read ${dtbaddr} 0x400 0x80\0" \
115 "dhcp ${loadaddr} ${hostname}/${bootfile} ; " \
116 "tftp ${dtbaddr} ${hostname}/${dtbfile}\0" \
119 "sf read ${loadaddr} ${sf_kernel_offset} ${sf_kernel_size}\0" \
122 "load usb 0:1 ${loadaddr} ${bootfile}\0" \
123 "miscargs=panic=1\0" \
124 "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
126 "setenv bootargs root=/dev/nfs rw " \
127 "nfsroot=${serverip}:${rootpath},v3,tcp\0" \
129 "if run mmcload mmcargs addargs ; then " \
130 "bootm ${loadaddr} - ${dtbaddr} ; " \
133 "if run mmcload nfsargs addip addargs ; then " \
134 "bootm ${loadaddr} - ${dtbaddr} ; " \
137 "if run sfload mmcargs addargs ; then " \
138 "bootm ${loadaddr} - ${dtbaddr} ; " \
141 "if run sfload ; then " \
142 "sf read ${rdaddr} ${sf_swu_offset} ${sf_swu_size} ; " \
143 "setenv bootargs root=/dev/ram0 rw ; " \
145 "bootm ${loadaddr} ${rdaddr} ; " \
148 "if run netload mmcargs addargs ; then " \
149 "bootm ${loadaddr} - ${dtbaddr} ; " \
152 "if run netload nfsargs addip addargs ; then " \
153 "bootm ${loadaddr} - ${dtbaddr} ; " \
156 "if test \"${envsaved}\" != y ; then ; " \
157 "setenv envsaved y ; " \
160 "if test \"${bootmode}\" = normal ; then " \
161 "setenv bootdelay 0 ; " \
162 "setenv bootpri mmc_mmc ; " \
163 "elif test \"${bootmode}\" = devel ; then " \
164 "setenv bootdelay 3 ; " \
165 "setenv bootpri net_mmc ; " \
167 "if test \"${bootmode}\" != update ; then " \
168 "echo Warning: unknown bootmode \"${bootmode}\" ; " \
170 "setenv bootdelay 1 ; " \
171 "setenv bootpri sf_swu ; " \
174 /* The rest of the configuration is shared */
175 #include <configs/mxs.h>
177 #endif /* __CONFIGS_XEA_H__ */