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_CMDLINE_TAG /* enable passing kernel command line string */
38 #define CONFIG_INITRD_TAG /* enable passing initrd */
39 #define CONFIG_REVISION_TAG /* enable passing revision tag*/
40 #define CONFIG_SETUP_MEMORY_TAGS /* enable memory tag */
42 #define CONFIG_UBI_SIZE (512 << 10)
49 * NS16550 Configuration
51 #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
53 #define CONFIG_SYS_NS16550_SERIAL
54 #define CONFIG_SYS_NS16550_REG_SIZE (-4)
55 #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
58 * select serial console configuration
60 #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
62 #define CONFIG_SYS_BAUDRATE_TABLE { 4800, 9600, 19200, 38400, 57600, 115200 }
64 /* USB device configuration */
65 #define CONFIG_USB_DEVICE
66 #define CONFIG_USB_TTY
67 #define CONFIG_USBD_VENDORID 0x0421
68 #define CONFIG_USBD_PRODUCTID_CDCACM 0x01c8
69 #define CONFIG_USBD_PRODUCTID_GSERIAL 0x01c8
70 #define CONFIG_USBD_MANUFACTURER "Nokia"
71 #define CONFIG_USBD_PRODUCT_NAME "N900 (U-Boot)"
79 #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
85 #define CONFIG_VIDEO_LOGO
86 #define VIDEO_FB_16BPP_PIXEL_SWAP
87 #define VIDEO_FB_16BPP_WORD_SWAP
89 /* functions for cfb_console */
90 #define VIDEO_KBD_INIT_FCT rx51_kp_init()
91 #define VIDEO_TSTC_FCT rx51_kp_tstc
92 #define VIDEO_GETC_FCT rx51_kp_getc
95 int rx51_kp_init(void);
96 int rx51_kp_tstc(struct stdio_dev *sdev);
97 int rx51_kp_getc(struct stdio_dev *sdev);
100 /* Environment information */
101 #define CONFIG_EXTRA_ENV_SETTINGS \
103 "stdin=usbtty,serial,vga\0" \
104 "stdout=usbtty,serial,vga\0" \
105 "stderr=usbtty,serial,vga\0" \
106 "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \
107 "switchmmc=mmc dev ${mmcnum}\0" \
108 "kernaddr=0x82008000\0" \
109 "initrdaddr=0x84008000\0" \
110 "scriptaddr=0x86008000\0" \
111 "fileload=${mmctype}load mmc ${mmcnum}:${mmcpart} " \
112 "${loadaddr} ${mmcfile}\0" \
113 "kernload=setenv loadaddr ${kernaddr};" \
114 "setenv mmcfile ${mmckernfile};" \
116 "initrdload=setenv loadaddr ${initrdaddr};" \
117 "setenv mmcfile ${mmcinitrdfile};" \
119 "scriptload=setenv loadaddr ${scriptaddr};" \
120 "setenv mmcfile ${mmcscriptfile};" \
122 "scriptboot=echo Running ${mmcscriptfile} from mmc " \
123 "${mmcnum}:${mmcpart} ...; source ${scriptaddr}\0" \
124 "kernboot=echo Booting ${mmckernfile} from mmc " \
125 "${mmcnum}:${mmcpart} ...; bootm ${kernaddr} || " \
126 "bootz ${kernaddr}\0" \
127 "kerninitrdboot=echo Booting ${mmckernfile} ${mmcinitrdfile} from mmc "\
128 "${mmcnum}:${mmcpart} ...; bootm ${kernaddr} ${initrdaddr} || " \
129 "bootz ${kernaddr} ${initrdaddr}\0" \
130 "attachboot=echo Booting attached kernel image ...;" \
131 "setenv setup_omap_atag 1;" \
132 "bootm ${attkernaddr} || bootz ${attkernaddr};" \
133 "setenv setup_omap_atag\0" \
134 "trymmcscriptboot=run switchmmc && run scriptload && run scriptboot\0" \
135 "trymmckernboot=run switchmmc && run kernload && run kernboot\0" \
136 "trymmckerninitrdboot=run switchmmc && run initrdload && " \
137 "run kernload && run kerninitrdboot\0" \
138 "trymmcpartboot=setenv mmcscriptfile boot.scr; run trymmcscriptboot;" \
139 "setenv mmckernfile uImage; run trymmckernboot;" \
140 "setenv mmckernfile zImage; run trymmckernboot\0" \
141 "trymmcallpartboot=setenv mmcpart 1; run trymmcpartboot;" \
142 "setenv mmcpart 2; run trymmcpartboot;" \
143 "setenv mmcpart 3; run trymmcpartboot;" \
144 "setenv mmcpart 4; run trymmcpartboot\0" \
145 "trymmcboot=if run switchmmc; then " \
146 "setenv mmctype fat;" \
147 "run trymmcallpartboot;" \
148 "setenv mmctype ext4;" \
149 "run trymmcallpartboot;" \
151 "emmcboot=setenv mmcnum 1; run trymmcboot\0" \
152 "sdboot=setenv mmcnum 0; run trymmcboot\0" \
153 "trymmcbootmenu=setenv mmctype fat && run trymmcscriptboot || " \
154 "setenv mmctype ext4 && run trymmcscriptboot\0" \
155 "preboot=setenv mmcpart 1; setenv mmcscriptfile bootmenu.scr;" \
156 "setenv mmcnum 0 && run trymmcbootmenu || " \
157 "setenv mmcnum 1 && run trymmcbootmenu;" \
158 "if run slide; then true; else " \
159 "setenv bootmenu_delay 0;" \
160 "setenv bootdelay 0;" \
162 "menucmd=bootmenu\0" \
163 "bootmenu_0=Attached kernel=run attachboot\0" \
164 "bootmenu_1=Internal eMMC=run emmcboot\0" \
165 "bootmenu_2=External SD card=run sdboot\0" \
166 "bootmenu_3=U-Boot boot order=boot\0" \
167 "bootmenu_delay=30\0" \
170 #define CONFIG_POSTBOOTMENU \
172 "echo Extra commands:;" \
173 "echo run sdboot - Boot from SD card slot.;" \
174 "echo run emmcboot - Boot internal eMMC memory.;" \
175 "echo run attachboot - Boot attached kernel image.;" \
178 #define CONFIG_BOOTCOMMAND \
185 * OMAP3 has 12 GP timers, they can be driven by the system clock
186 * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
187 * This rate is divided by a local divisor.
189 #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
190 #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
193 * Physical Memory Map
195 #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
198 * FLASH and environment organization
201 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
202 #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
203 #define CONFIG_SYS_INIT_RAM_SIZE 0x800
204 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
205 CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
208 * Attached kernel image
211 #define SDRAM_SIZE 0x10000000 /* 256 MB */
212 #define SDRAM_END (CONFIG_SYS_SDRAM_BASE + SDRAM_SIZE)
214 #define IMAGE_MAXSIZE 0x1FF800 /* 2 MB - 2 kB */
215 #define KERNEL_OFFSET 0x40000 /* 256 kB */
216 #define KERNEL_MAXSIZE (IMAGE_MAXSIZE-KERNEL_OFFSET)
217 #define KERNEL_ADDRESS (SDRAM_END-KERNEL_MAXSIZE)
219 /* Reserve protected RAM for attached kernel */
220 #define CONFIG_PRAM ((KERNEL_MAXSIZE >> 10)+1)
222 #endif /* __CONFIG_H */