1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Configuration settings for the QUIPOS Cairo board.
5 * Copyright (C) DENX GmbH
8 * Albert ARIBAUD <albert.aribaud@3adev.fr>
10 * Derived from EVM code by
11 * Manikandan Pillai <mani.pillai@ti.com>
12 * Itself derived from Beagle Board and 3430 SDP code by
13 * Richard Woodruff <r-woodruff2@ti.com>
14 * Syed Mohammed Khasim <khasim@ti.com>
16 * Also derived from include/configs/omap3_beagle.h
19 #ifndef __OMAP3_CAIRO_CONFIG_H
20 #define __OMAP3_CAIRO_CONFIG_H
23 * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
24 * 64 bytes before this address should be set aside for u-boot.img's
25 * header. That is 0x800FFFC0--0x80100000 should not be used for any
26 * other needs. We use this rather than the inherited defines from
27 * ti_armv7_common.h for backwards compatibility.
29 #define CONFIG_SPL_BSS_START_ADDR 0x80000000
30 #define CONFIG_SPL_BSS_MAX_SIZE (512 << 10) /* 512 KB */
31 #define CONFIG_SYS_SPL_MALLOC_START 0x80208000
32 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
34 #include <configs/ti_omap3_common.h>
36 #define CONFIG_REVISION_TAG 1
37 #define CONFIG_ENV_OVERWRITE
39 /* Enable Multi Bus support for I2C */
40 #define CONFIG_I2C_MULTI_BUS 1
42 /* Probe all devices */
43 #define CONFIG_SYS_I2C_NOPROBES { {0x0, 0x0} }
52 #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
54 #define CONFIG_EXTRA_ENV_SETTINGS \
56 "fdt_high=0x87000000\0" \
58 "fec_addr=00:50:C2:7E:90:F0\0" \
59 "netmask=255.255.255.0\0" \
60 "ipaddr=192.168.2.9\0" \
61 "gateway=192.168.2.1\0" \
62 "serverip=192.168.2.10\0" \
63 "nfshost=192.168.2.10\0" \
67 "bootargs_mmc_ramdisk=mem=128M " \
68 "console=ttyO1,115200n8 " \
69 "root=/dev/ram0 rw " \
70 "initrd=0x81600000,16M " \
71 "mpurate=600 ramdisk_size=16384 omapfb.rotate=1 " \
72 "omapfb.rotate_type=1 omap_vout.vid1_static_vrfb_alloc=y\0" \
73 "mmcboot=mmc init; " \
74 "fatload mmc 0 0x80000000 uImage; " \
75 "fatload mmc 0 0x81600000 ramdisk.gz; " \
76 "setenv bootargs ${bootargs_mmc_ramdisk}; " \
77 "bootm 0x80000000\0" \
78 "bootargs_nfs=mem=99M console=ttyO0,115200n8 noinitrd rw ip=dhcp " \
80 "nfsroot=192.168.2.10:/home/spiid/workdir/Quipos/rootfs,nolock " \
81 "mpurate=600 omapfb.rotate=1 omapfb.rotate_type=1 " \
82 "omap_vout.vid1_static_vrfb_alloc=y\0" \
83 "boot_nfs=run get_kernel; setenv bootargs ${bootargs_nfs}; " \
84 "bootm 0x80000000\0" \
85 "bootargs_nand=mem=128M console=ttyO1,115200n8 noinitrd " \
86 "root=/dev/mtdblock4 rw rootfstype=jffs2 mpurate=600 " \
87 "omap_vout.vid1_static_vrfb_alloc=y omapfb.rotate=1 " \
88 "omapfb.rotate_type=1\0" \
89 "boot_nand=nand read.i 0x80000000 280000 300000; setenv " \
90 "bootargs ${bootargs_nand}; bootm 0x80000000\0" \
91 "ledorange=i2c dev 1; i2c mw 60 00 00 1; i2c mw 60 14 FF 1; " \
92 "i2c mw 60 15 FF 1; i2c mw 60 16 FF 1; i2c mw 60 17 FF 1; " \
93 "i2c mw 60 09 10 1; i2c mw 60 06 10 1\0" \
94 "ledgreen=i2c dev 1; i2c mw 60 00 00 1; i2c mw 60 14 FF 1; " \
95 "i2c mw 60 15 FF 1; i2c mw 60 16 FF 1; i2c mw 60 17 FF 1; i2c " \
96 "mw 60 09 00 1; i2c mw 60 06 10 1\0" \
97 "ledoff=i2c dev 1; i2c mw 60 00 00 1; i2c mw 60 14 FF 1; " \
98 "i2c mw 60 15 FF 1; i2c mw 60 16 FF 1; i2c mw 60 17 FF 1; " \
99 "i2c mw 60 09 00 1; i2c mw 60 06 0 1\0" \
100 "ledred=i2c dev 1; i2c mw 60 00 00 1; i2c mw 60 14 FF 1; " \
101 "i2c mw 60 15 FF 1; i2c mw 60 16 FF 1; i2c mw 60 17 FF 1; " \
102 "i2c mw 60 09 10 1; i2c mw 60 06 0 1\0" \
103 "flash_xloader=mw.b 0x81600000 0xff 0x20000; " \
104 "nand erase 0 20000; " \
105 "fatload mmc 0 0x81600000 MLO; " \
107 "nand write.i 0x81600000 0 20000;\0" \
108 "flash_uboot=mw.b 0x81600000 0xff 0x40000; " \
109 "nand erase 80000 40000; " \
110 "fatload mmc 0 0x81600000 u-boot.bin; " \
112 "nand write.i 0x81600000 80000 40000;\0" \
113 "flash_kernel=mw.b 0x81600000 0xff 0x300000; " \
114 "nand erase 280000 300000; " \
115 "fatload mmc 0 0x81600000 uImage; " \
117 "nand write.i 0x81600000 280000 300000;\0" \
118 "flash_rootfs=fatload mmc 0 0x81600000 rootfs.jffs2; " \
120 "nand write.jffs2 0x680000 0xFF ${filesize}; " \
121 "nand erase 680000 ${filesize}; " \
122 "nand write.jffs2 81600000 680000 ${filesize};\0" \
123 "flash_scrub=nand scrub; " \
124 "run flash_xloader; " \
125 "run flash_uboot; " \
126 "run flash_kernel; " \
127 "run flash_rootfs;\0" \
128 "flash_all=run ledred; " \
129 "nand erase.chip; " \
131 "run flash_xloader; " \
132 "run flash_uboot; " \
133 "run flash_kernel; " \
134 "run flash_rootfs; " \
136 "run boot_nand; \0" \
138 #define CONFIG_BOOTCOMMAND \
139 "if fatload mmc 0 0x81600000 MLO; then run flash_all; " \
140 "else run boot_nand; fi"
143 * OMAP3 has 12 GP timers, they can be driven by the system clock
144 * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
145 * This rate is divided by a local divisor.
147 #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
149 /*-----------------------------------------------------------------------
150 * FLASH and environment organization
153 /* **** PISMO SUPPORT *** */
154 #if defined(CONFIG_CMD_NAND)
155 #define CONFIG_SYS_FLASH_BASE NAND_BASE
158 /* Monitor at start of flash */
159 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
160 #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
162 #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
164 /* Defines for SPL */
166 /* NAND boot config */
167 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
168 #define CONFIG_SYS_NAND_PAGE_COUNT 64
169 #define CONFIG_SYS_NAND_PAGE_SIZE 2048
170 #define CONFIG_SYS_NAND_OOBSIZE 64
171 #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
172 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
173 #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\
175 #define CONFIG_SYS_NAND_ECCSIZE 512
176 #define CONFIG_SYS_NAND_ECCBYTES 3
177 #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW
178 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
179 /* NAND: SPL falcon mode configs */
180 #ifdef CONFIG_SPL_OS_BOOT
181 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
185 #define CONFIG_BOOTFILE "uImage"
187 /* Provide the MACH_TYPE value the vendor kernel requires */
188 #define CONFIG_MACH_TYPE 3063
190 /*-----------------------------------------------------------------------
191 * FLASH and environment organization
194 /* **** PISMO SUPPORT *** */
196 #define CONFIG_SYS_MAX_FLASH_SECT 520 /* max number of sectors */
198 #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of flash banks */
200 /*-----------------------------------------------------------------------
201 * CFI FLASH driver setup
203 /* timeout values are in ticks */
204 #define CONFIG_SYS_FLASH_ERASE_TOUT (100 * CONFIG_SYS_HZ)
205 #define CONFIG_SYS_FLASH_WRITE_TOUT (100 * CONFIG_SYS_HZ)
207 /* Flash banks JFFS2 should use */
208 #define CONFIG_SYS_MAX_MTD_BANKS (CONFIG_SYS_MAX_FLASH_BANKS + \
209 CONFIG_SYS_MAX_NAND_DEVICE)
210 #define CONFIG_SYS_JFFS2_MEM_NAND
211 /* use flash_info[2] */
212 #define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS
213 #define CONFIG_SYS_JFFS2_NUM_BANKS 1
215 #endif /* __OMAP3_CAIRO_CONFIG_H */