blob: c76c81ddd5b261a840c4a87f9ea0ca106ee87bf2 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +01002/*
3 * Configuration settings for the QUIPOS Cairo board.
4 *
5 * Copyright (C) DENX GmbH
6 *
7 * Author :
8 * Albert ARIBAUD <albert.aribaud@3adev.fr>
9 *
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>
15 *
16 * Also derived from include/configs/omap3_beagle.h
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +010017 */
18
19#ifndef __OMAP3_CAIRO_CONFIG_H
20#define __OMAP3_CAIRO_CONFIG_H
21
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +010022/*
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.
28 */
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +010029#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
33
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +010034#include <configs/ti_omap3_common.h>
35
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +010036#define CONFIG_REVISION_TAG 1
37#define CONFIG_ENV_OVERWRITE
38
39/* Enable Multi Bus support for I2C */
40#define CONFIG_I2C_MULTI_BUS 1
41
42/* Probe all devices */
43#define CONFIG_SYS_I2C_NOPROBES { {0x0, 0x0} }
44
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +010045/*
46 * TWL4030
47 */
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +010048
49/*
50 * Board NAND Info.
51 */
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +010052#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
53 /* devices */
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +010054#define CONFIG_EXTRA_ENV_SETTINGS \
55 "machid=ffffffff\0" \
56 "fdt_high=0x87000000\0" \
57 "baudrate=115200\0" \
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +010058 "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" \
64 "stdin=serial\0" \
65 "stdout=serial\0" \
66 "stderr=serial\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 " \
79 "root=/dev/nfs " \
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; " \
106 "nandecc hw; " \
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; " \
111 "nandecc sw; " \
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; " \
116 "nandecc sw; " \
117 "nand write.i 0x81600000 280000 300000;\0" \
118 "flash_rootfs=fatload mmc 0 0x81600000 rootfs.jffs2; " \
119 "nandecc sw; " \
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; " \
130 "run ledorange; " \
131 "run flash_xloader; " \
132 "run flash_uboot; " \
133 "run flash_kernel; " \
134 "run flash_rootfs; " \
135 "run ledgreen; " \
136 "run boot_nand; \0" \
137
138#define CONFIG_BOOTCOMMAND \
139 "if fatload mmc 0 0x81600000 MLO; then run flash_all; " \
140 "else run boot_nand; fi"
141
142/*
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.
146 */
147#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
148
149/*-----------------------------------------------------------------------
150 * FLASH and environment organization
151 */
152
153/* **** PISMO SUPPORT *** */
154#if defined(CONFIG_CMD_NAND)
155#define CONFIG_SYS_FLASH_BASE NAND_BASE
156#endif
157
158/* Monitor at start of flash */
159#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
160#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
161
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +0100162#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +0100163
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +0100164/* Defines for SPL */
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +0100165
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,\
174 10, 11, 12, 13}
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
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +0100181#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +0100182#endif
183
184/* env defaults */
185#define CONFIG_BOOTFILE "uImage"
186
Tom Rinic6e2db42017-01-25 20:42:38 -0500187/* Provide the MACH_TYPE value the vendor kernel requires */
188#define CONFIG_MACH_TYPE 3063
Albert ARIBAUD \(3ADEV\)05e86332015-02-03 18:13:14 +0100189
190/*-----------------------------------------------------------------------
191 * FLASH and environment organization
192 */
193
194/* **** PISMO SUPPORT *** */
195
196#define CONFIG_SYS_MAX_FLASH_SECT 520 /* max number of sectors */
197 /* on one chip */
198#define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of flash banks */
199
200/*-----------------------------------------------------------------------
201 * CFI FLASH driver setup
202 */
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)
206
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
214
215#endif /* __OMAP3_CAIRO_CONFIG_H */