common/Kconfig: Add DISPLAY_CPUINFO
[platform/kernel/u-boot.git] / include / configs / m28evk.h
1 /*
2  * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
3  * on behalf of DENX Software Engineering GmbH
4  *
5  * SPDX-License-Identifier:     GPL-2.0+
6  */
7 #ifndef __CONFIGS_M28EVK_H__
8 #define __CONFIGS_M28EVK_H__
9
10 /* System configurations */
11 #define CONFIG_MX28                             /* i.MX28 SoC */
12 #define MACH_TYPE_M28EVK        3613
13 #define CONFIG_MACH_TYPE        MACH_TYPE_M28EVK
14
15 #define CONFIG_TIMESTAMP                /* Print image info with timestamp */
16
17 /* U-Boot Commands */
18 #define CONFIG_SYS_NO_FLASH
19 #define CONFIG_DOS_PARTITION
20 #define CONFIG_FAT_WRITE
21
22 #define CONFIG_CMD_BMP
23 #define CONFIG_CMD_DATE
24 #define CONFIG_CMD_EEPROM
25 #define CONFIG_CMD_NAND
26 #define CONFIG_CMD_NAND_TRIMFFS
27 #define CONFIG_VIDEO
28
29 /* Memory configuration */
30 #define CONFIG_NR_DRAM_BANKS            1               /* 1 bank of DRAM */
31 #define PHYS_SDRAM_1                    0x40000000      /* Base address */
32 #define PHYS_SDRAM_1_SIZE               0x20000000      /* Max 512 MB RAM */
33 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM_1
34
35 /* Environment */
36 #define CONFIG_ENV_SIZE                 (16 * 1024)
37 #define CONFIG_ENV_IS_IN_NAND
38
39 /* Environment is in NAND */
40 #if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
41 #define CONFIG_ENV_SIZE_REDUND          CONFIG_ENV_SIZE
42 #define CONFIG_ENV_SECT_SIZE            (128 * 1024)
43 #define CONFIG_ENV_RANGE                (4 * CONFIG_ENV_SECT_SIZE)
44 #define CONFIG_ENV_OFFSET               (24 * CONFIG_ENV_SECT_SIZE) /* 3 MiB */
45 #define CONFIG_ENV_OFFSET_REDUND        \
46                 (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
47
48 #define CONFIG_CMD_UBIFS
49 #define CONFIG_CMD_MTDPARTS
50 #define CONFIG_RBTREE
51 #define CONFIG_LZO
52 #define CONFIG_MTD_DEVICE
53 #define CONFIG_MTD_PARTITIONS
54 #define MTDIDS_DEFAULT                  "nand0=gpmi-nand"
55 #define MTDPARTS_DEFAULT                        \
56         "mtdparts=gpmi-nand:"                   \
57                 "3m(u-boot),"                   \
58                 "512k(env1),"                   \
59                 "512k(env2),"                   \
60                 "14m(boot),"                    \
61                 "238m(data),"                   \
62                 "-@4096k(UBI)"
63 #else
64 #define CONFIG_ENV_IS_NOWHERE
65 #endif
66
67 /* FEC Ethernet on SoC */
68 #ifdef CONFIG_CMD_NET
69 #define CONFIG_FEC_MXC
70 #endif
71
72 /* EEPROM */
73 #ifdef CONFIG_CMD_EEPROM
74 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN  2
75 #endif
76
77 /* RTC */
78 #ifdef CONFIG_CMD_DATE
79 /* Use the internal RTC in the MXS chip */
80 #define CONFIG_RTC_INTERNAL
81 #ifdef CONFIG_RTC_INTERNAL
82 #define CONFIG_RTC_MXS
83 #else
84 #define CONFIG_RTC_M41T62
85 #define CONFIG_SYS_I2C_RTC_ADDR         0x68
86 #define CONFIG_SYS_M41T11_BASE_YEAR     2000
87 #endif
88 #endif
89
90 /* USB */
91 #ifdef CONFIG_CMD_USB
92 #define CONFIG_EHCI_MXS_PORT0
93 #define CONFIG_EHCI_MXS_PORT1
94 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
95 #endif
96
97 /* SPI */
98 #ifdef CONFIG_CMD_SPI
99 #define CONFIG_DEFAULT_SPI_BUS          2
100 #define CONFIG_DEFAULT_SPI_CS           0
101 #define CONFIG_DEFAULT_SPI_MODE         SPI_MODE_0
102
103 /* SPI FLASH */
104 #ifdef CONFIG_CMD_SF
105 #define CONFIG_SF_DEFAULT_BUS           2
106 #define CONFIG_SF_DEFAULT_CS            0
107 #define CONFIG_SF_DEFAULT_SPEED         40000000
108 #define CONFIG_SF_DEFAULT_MODE          SPI_MODE_0
109
110 #define CONFIG_ENV_SPI_BUS              2
111 #define CONFIG_ENV_SPI_CS               0
112 #define CONFIG_ENV_SPI_MAX_HZ           40000000
113 #define CONFIG_ENV_SPI_MODE             SPI_MODE_0
114 #endif
115
116 #endif
117
118 /* LCD */
119 #ifdef CONFIG_VIDEO
120 #define CONFIG_VIDEO_LOGO
121 #define CONFIG_SPLASH_SCREEN
122 #define CONFIG_CMD_BMP
123 #define CONFIG_BMP_16BPP
124 #define CONFIG_VIDEO_BMP_RLE8
125 #define CONFIG_VIDEO_BMP_GZIP
126 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE  (2 << 20)
127 #endif
128
129 /* Booting Linux */
130 #define CONFIG_BOOTFILE         "fitImage"
131 #define CONFIG_BOOTARGS         "console=ttyAMA0,115200n8 "
132 #define CONFIG_BOOTCOMMAND      "run mmc_mmc"
133 #define CONFIG_LOADADDR         0x42000000
134 #define CONFIG_SYS_LOAD_ADDR    CONFIG_LOADADDR
135
136 /* Extra Environment */
137 #define CONFIG_PREBOOT          "run try_bootscript"
138 #define CONFIG_HOSTNAME         m28evk
139
140 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
141         "consdev=ttyAMA0\0"                                             \
142         "baudrate=115200\0"                                             \
143         "bootscript=boot.scr\0"                                         \
144         "bootdev=/dev/mmcblk0p2\0"                                      \
145         "rootdev=/dev/mmcblk0p3\0"                                      \
146         "netdev=eth0\0"                                                 \
147         "hostname=m28evk\0"                                             \
148         "rootpath=/opt/eldk-5.5/armv5te/rootfs-qte-sdk\0"               \
149         "kernel_addr_r=0x42000000\0"                                    \
150         "videomode=video=ctfb:x:800,y:480,depth:18,mode:0,pclk:30066,"  \
151                 "le:0,ri:256,up:0,lo:45,hs:1,vs:1,sync:100663296,"      \
152                 "vmode:0\0"                                             \
153         "update_nand_full_filename=u-boot.nand\0"                       \
154         "update_nand_firmware_filename=u-boot.sb\0"                     \
155         "update_sd_firmware_filename=u-boot.sd\0"                       \
156         "update_nand_firmware_maxsz=0x100000\0"                         \
157         "update_nand_stride=0x40\0"     /* MX28 datasheet ch. 12.12 */  \
158         "update_nand_count=0x4\0"       /* MX28 datasheet ch. 12.12 */  \
159         "update_nand_get_fcb_size="     /* Get size of FCB blocks */    \
160                 "nand device 0 ; "                                      \
161                 "nand info ; "                                          \
162                 "setexpr fcb_sz ${update_nand_stride} * ${update_nand_count};" \
163                 "setexpr update_nand_fcb ${fcb_sz} * ${nand_writesize}\0" \
164         "update_nand_full="             /* Update FCB, DBBT and FW */   \
165                 "if tftp ${update_nand_full_filename} ; then "          \
166                 "run update_nand_get_fcb_size ; "                       \
167                 "nand scrub -y 0x0 ${filesize} ; "                      \
168                 "nand write.raw ${loadaddr} 0x0 ${fcb_sz} ; "           \
169                 "setexpr update_off ${loadaddr} + ${update_nand_fcb} ; " \
170                 "setexpr update_sz ${filesize} - ${update_nand_fcb} ; " \
171                 "nand write ${update_off} ${update_nand_fcb} ${update_sz} ; " \
172                 "fi\0"                                                  \
173         "update_nand_firmware="         /* Update only firmware */      \
174                 "if tftp ${update_nand_firmware_filename} ; then "      \
175                 "run update_nand_get_fcb_size ; "                       \
176                 "setexpr fcb_sz ${update_nand_fcb} * 2 ; " /* FCB + DBBT */ \
177                 "setexpr fw_sz ${update_nand_firmware_maxsz} * 2 ; "    \
178                 "setexpr fw_off ${fcb_sz} + ${update_nand_firmware_maxsz};" \
179                 "nand erase ${fcb_sz} ${fw_sz} ; "                      \
180                 "nand write ${loadaddr} ${fcb_sz} ${filesize} ; "       \
181                 "nand write ${loadaddr} ${fw_off} ${filesize} ; "       \
182                 "fi\0"                                                  \
183         "update_sd_firmware="           /* Update the SD firmware partition */ \
184                 "if mmc rescan ; then "                                 \
185                 "if tftp ${update_sd_firmware_filename} ; then "        \
186                 "setexpr fw_sz ${filesize} / 0x200 ; "  /* SD block size */ \
187                 "setexpr fw_sz ${fw_sz} + 1 ; "                         \
188                 "mmc write ${loadaddr} 0x800 ${fw_sz} ; "               \
189                 "fi ; "                                                 \
190                 "fi\0"                                                  \
191         "addcons="                                                      \
192                 "setenv bootargs ${bootargs} "                          \
193                 "console=${consdev},${baudrate}\0"                      \
194         "addip="                                                        \
195                 "setenv bootargs ${bootargs} "                          \
196                 "ip=${ipaddr}:${serverip}:${gatewayip}:"                \
197                         "${netmask}:${hostname}:${netdev}:off\0"        \
198         "addmisc="                                                      \
199                 "setenv bootargs ${bootargs} ${miscargs}\0"             \
200         "adddfltmtd="                                                   \
201                 "if test \"x${mtdparts}\" == \"x\" ; then "             \
202                         "mtdparts default ; "                           \
203                 "fi\0"                                                  \
204         "addmtd="                                                       \
205                 "run adddfltmtd ; "                                     \
206                 "setenv bootargs ${bootargs} ${mtdparts}\0"             \
207         "addargs=run addcons addmtd addmisc\0"                          \
208         "mmcload="                                                      \
209                 "mmc rescan ; "                                         \
210                 "load mmc 0:2 ${kernel_addr_r} ${bootfile}\0"           \
211         "ubiload="                                                      \
212                 "ubi part UBI ; ubifsmount ubi0:rootfs ; "              \
213                 "ubifsload ${kernel_addr_r} /boot/${bootfile}\0"        \
214         "netload="                                                      \
215                 "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0"       \
216         "miscargs=nohlt panic=1\0"                                      \
217         "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0"         \
218         "ubiargs="                                                      \
219                 "setenv bootargs ubi.mtd=5 "                            \
220                 "root=ubi0:rootfs rootfstype=ubifs\0"                   \
221         "nfsargs="                                                      \
222                 "setenv bootargs root=/dev/nfs rw "                     \
223                         "nfsroot=${serverip}:${rootpath},v3,tcp\0"      \
224         "mmc_mmc="                                                      \
225                 "run mmcload mmcargs addargs ; "                        \
226                 "bootm ${kernel_addr_r}\0"                              \
227         "mmc_ubi="                                                      \
228                 "run mmcload ubiargs addargs ; "                        \
229                 "bootm ${kernel_addr_r}\0"                              \
230         "mmc_nfs="                                                      \
231                 "run mmcload nfsargs addip addargs ; "                  \
232                 "bootm ${kernel_addr_r}\0"                              \
233         "ubi_mmc="                                                      \
234                 "run ubiload mmcargs addargs ; "                        \
235                 "bootm ${kernel_addr_r}\0"                              \
236         "ubi_ubi="                                                      \
237                 "run ubiload ubiargs addargs ; "                        \
238                 "bootm ${kernel_addr_r}\0"                              \
239         "ubi_nfs="                                                      \
240                 "run ubiload nfsargs addip addargs ; "                  \
241                 "bootm ${kernel_addr_r}\0"                              \
242         "net_mmc="                                                      \
243                 "run netload mmcargs addargs ; "                        \
244                 "bootm ${kernel_addr_r}\0"                              \
245         "net_ubi="                                                      \
246                 "run netload ubiargs addargs ; "                        \
247                 "bootm ${kernel_addr_r}\0"                              \
248         "net_nfs="                                                      \
249                 "run netload nfsargs addip addargs ; "                  \
250                 "bootm ${kernel_addr_r}\0"                              \
251         "try_bootscript="                                               \
252                 "mmc rescan;"                                           \
253                 "if test -e mmc 0:2 ${bootscript} ; then "              \
254                 "if load mmc 0:2 ${kernel_addr_r} ${bootscript};"       \
255                 "then ; "                                               \
256                         "echo Running bootscript... ; "                 \
257                         "source ${kernel_addr_r} ; "                    \
258                 "fi ; "                                                 \
259                 "fi\0"
260
261 /* The rest of the configuration is shared */
262 #include <configs/mxs.h>
263
264 #endif /* __CONFIGS_M28EVK_H__ */