1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2011-2012
4 * Pali Rohár <pali@kernel.org>
7 * Alistair Buxton <a.j.buxton@gmail.com>
9 * Derived from Beagle Board code:
10 * (C) Copyright 2006-2008
12 * Richard Woodruff <r-woodruff2@ti.com>
13 * Syed Mohammed Khasim <x0khasim@ti.com>
15 * Configuration settings for the Nokia RX-51 aka N900.
22 * High Level Configuration Options
24 #define CONFIG_SYS_L2CACHE_OFF /* pretend there is no L2 CACHE */
26 #define CONFIG_MACH_TYPE MACH_TYPE_NOKIA_RX51
28 #include <asm/arch/cpu.h> /* get chip and board defs */
29 #include <asm/arch/omap.h>
30 #include <asm/arch/mem.h>
31 #include <linux/stringify.h>
34 #define V_OSCK 26000000 /* Clock output from T2 */
35 #define V_SCLK (V_OSCK >> 1)
37 #define CONFIG_SKIP_LOWLEVEL_INIT /* X-Loader set everything up */
39 #define CONFIG_CMDLINE_TAG /* enable passing kernel command line string */
40 #define CONFIG_INITRD_TAG /* enable passing initrd */
41 #define CONFIG_REVISION_TAG /* enable passing revision tag*/
42 #define CONFIG_SETUP_MEMORY_TAGS /* enable memory tag */
45 * Size of malloc() pool
47 #define CONFIG_UBI_SIZE (512 << 10)
48 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + CONFIG_UBI_SIZE + \
56 * NS16550 Configuration
58 #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
60 #define CONFIG_SYS_NS16550_SERIAL
61 #define CONFIG_SYS_NS16550_REG_SIZE (-4)
62 #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
65 * select serial console configuration
67 #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
69 #define CONFIG_SYS_BAUDRATE_TABLE { 4800, 9600, 19200, 38400, 57600, 115200 }
71 /* USB device configuration */
72 #define CONFIG_USB_DEVICE
73 #define CONFIG_USB_TTY
74 #define CONFIG_USBD_VENDORID 0x0421
75 #define CONFIG_USBD_PRODUCTID_CDCACM 0x01c8
76 #define CONFIG_USBD_PRODUCTID_GSERIAL 0x01c8
77 #define CONFIG_USBD_MANUFACTURER "Nokia"
78 #define CONFIG_USBD_PRODUCT_NAME "N900 (U-Boot)"
86 #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
92 #define CONFIG_VIDEO_LOGO
93 #define VIDEO_FB_16BPP_PIXEL_SWAP
94 #define VIDEO_FB_16BPP_WORD_SWAP
96 /* functions for cfb_console */
97 #define VIDEO_KBD_INIT_FCT rx51_kp_init()
98 #define VIDEO_TSTC_FCT rx51_kp_tstc
99 #define VIDEO_GETC_FCT rx51_kp_getc
102 int rx51_kp_init(void);
103 int rx51_kp_tstc(struct stdio_dev *sdev);
104 int rx51_kp_getc(struct stdio_dev *sdev);
107 /* Environment information */
108 #define CONFIG_EXTRA_ENV_SETTINGS \
110 "stdin=usbtty,serial,vga\0" \
111 "stdout=usbtty,serial,vga\0" \
112 "stderr=usbtty,serial,vga\0" \
113 "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \
114 "switchmmc=mmc dev ${mmcnum}\0" \
115 "kernaddr=0x82008000\0" \
116 "initrdaddr=0x84008000\0" \
117 "scriptaddr=0x86008000\0" \
118 "fileload=${mmctype}load mmc ${mmcnum}:${mmcpart} " \
119 "${loadaddr} ${mmcfile}\0" \
120 "kernload=setenv loadaddr ${kernaddr};" \
121 "setenv mmcfile ${mmckernfile};" \
123 "initrdload=setenv loadaddr ${initrdaddr};" \
124 "setenv mmcfile ${mmcinitrdfile};" \
126 "scriptload=setenv loadaddr ${scriptaddr};" \
127 "setenv mmcfile ${mmcscriptfile};" \
129 "scriptboot=echo Running ${mmcscriptfile} from mmc " \
130 "${mmcnum}:${mmcpart} ...; source ${scriptaddr}\0" \
131 "kernboot=echo Booting ${mmckernfile} from mmc " \
132 "${mmcnum}:${mmcpart} ...; bootm ${kernaddr}\0" \
133 "kerninitrdboot=echo Booting ${mmckernfile} ${mmcinitrdfile} from mmc "\
134 "${mmcnum}:${mmcpart} ...; bootm ${kernaddr} ${initrdaddr}\0" \
135 "attachboot=echo Booting attached kernel image ...;" \
136 "setenv setup_omap_atag 1;" \
137 "bootm ${attkernaddr};" \
138 "setenv setup_omap_atag\0" \
139 "trymmcscriptboot=if run switchmmc; then " \
140 "if run scriptload; then " \
144 "trymmckernboot=if run switchmmc; then " \
145 "if run kernload; then " \
149 "trymmckerninitrdboot=if run switchmmc; then " \
150 "if run initrdload; then " \
151 "if run kernload; then " \
152 "run kerninitrdboot;" \
156 "trymmcpartboot=setenv mmcscriptfile boot.scr; run trymmcscriptboot;" \
157 "setenv mmckernfile uImage; run trymmckernboot\0" \
158 "trymmcallpartboot=setenv mmcpart 1; run trymmcpartboot;" \
159 "setenv mmcpart 2; run trymmcpartboot;" \
160 "setenv mmcpart 3; run trymmcpartboot;" \
161 "setenv mmcpart 4; run trymmcpartboot\0" \
162 "trymmcboot=if run switchmmc; then " \
163 "setenv mmctype fat;" \
164 "run trymmcallpartboot;" \
165 "setenv mmctype ext4;" \
166 "run trymmcallpartboot;" \
168 "emmcboot=setenv mmcnum 1; run trymmcboot\0" \
169 "sdboot=setenv mmcnum 0; run trymmcboot\0" \
170 "preboot=setenv mmcnum 1; setenv mmcpart 1;" \
171 "setenv mmcscriptfile bootmenu.scr;" \
172 "if run switchmmc; then " \
173 "setenv mmctype fat;" \
174 "if run scriptload; then run scriptboot; else " \
175 "setenv mmctype ext4;" \
176 "if run scriptload; then run scriptboot; fi;" \
179 "if run slide; then true; else " \
180 "setenv bootmenu_delay 0;" \
181 "setenv bootdelay 0;" \
183 "menucmd=bootmenu\0" \
184 "bootmenu_0=Attached kernel=run attachboot\0" \
185 "bootmenu_1=Internal eMMC=run emmcboot\0" \
186 "bootmenu_2=External SD card=run sdboot\0" \
187 "bootmenu_3=U-Boot boot order=boot\0" \
188 "bootmenu_delay=30\0" \
191 #define CONFIG_POSTBOOTMENU \
193 "echo Extra commands:;" \
194 "echo run sdboot - Boot from SD card slot.;" \
195 "echo run emmcboot - Boot internal eMMC memory.;" \
196 "echo run attachboot - Boot attached kernel image.;" \
199 #define CONFIG_BOOTCOMMAND \
205 /* default load address */
206 #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0)
209 * OMAP3 has 12 GP timers, they can be driven by the system clock
210 * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
211 * This rate is divided by a local divisor.
213 #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
214 #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
217 * Physical Memory Map
219 #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
222 * FLASH and environment organization
225 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
226 #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
227 #define CONFIG_SYS_INIT_RAM_SIZE 0x800
228 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
229 CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
232 * Attached kernel image
235 #define SDRAM_SIZE 0x10000000 /* 256 MB */
236 #define SDRAM_END (CONFIG_SYS_SDRAM_BASE + SDRAM_SIZE)
238 #define IMAGE_MAXSIZE 0x1FF800 /* 2 MB - 2 kB */
239 #define KERNEL_OFFSET 0x40000 /* 256 kB */
240 #define KERNEL_MAXSIZE (IMAGE_MAXSIZE-KERNEL_OFFSET)
241 #define KERNEL_ADDRESS (SDRAM_END-KERNEL_MAXSIZE)
243 /* Reserve protected RAM for attached kernel */
244 #define CONFIG_PRAM ((KERNEL_MAXSIZE >> 10)+1)
246 #endif /* __CONFIG_H */