2 * (C) Copyright 2013 CompuLab, Ltd.
3 * Author: Igor Grinberg <grinberg@compulab.co.il>
5 * Configuration settings for the CompuLab CM-T3517 board
7 * SPDX-License-Identifier: GPL-2.0+
14 * High Level Configuration Options
16 #define CONFIG_CM_T3517 /* working with CM-T3517 */
18 #define CONFIG_SYS_TEXT_BASE 0x80008000
21 * This is needed for the DMA stuff.
22 * Although the default iss 64, we still define it
23 * to be on the safe side once the default is changed.
26 #include <asm/arch/cpu.h> /* get chip and board defs */
27 #include <asm/arch/omap.h>
29 #define CONFIG_MACH_TYPE MACH_TYPE_CM_T3517
32 #define V_OSCK 26000000 /* Clock output from T2 */
33 #define V_SCLK (V_OSCK >> 1)
35 #define CONFIG_MISC_INIT_R
38 * The early kernel mapping on ARM currently only maps from the base of DRAM
39 * to the end of the kernel image. The kernel is loaded at DRAM base + 0x8000.
40 * The early kernel pagetable uses DRAM base + 0x4000 to DRAM base + 0x8000,
41 * so that leaves DRAM base to DRAM base + 0x4000 available.
43 #define CONFIG_SYS_BOOTMAPSZ 0x4000
45 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
46 #define CONFIG_SETUP_MEMORY_TAGS
47 #define CONFIG_INITRD_TAG
48 #define CONFIG_REVISION_TAG
49 #define CONFIG_SERIAL_TAG
52 * Size of malloc() pool
54 #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
55 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
62 * NS16550 Configuration
64 #define CONFIG_SYS_NS16550_SERIAL
65 #define CONFIG_SYS_NS16550_REG_SIZE (-4)
66 #define CONFIG_SYS_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
69 * select serial console configuration
71 #define CONFIG_CONS_INDEX 3
72 #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
73 #define CONFIG_SERIAL3 3 /* UART3 */
75 /* allow to overwrite serial and ethaddr */
76 #define CONFIG_ENV_OVERWRITE
77 #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
82 #ifndef CONFIG_USB_MUSB_AM35X
83 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 146
84 #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 147
85 #endif /* CONFIG_USB_MUSB_AM35X */
87 /* commands to include */
88 #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
89 #define CONFIG_MTD_PARTITIONS
91 #define CONFIG_SYS_I2C
92 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
93 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
94 #define CONFIG_SYS_I2C_EEPROM_BUS 0
95 #define CONFIG_I2C_MULTI_BUS
100 #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
102 #define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
103 /* to access nand at */
105 #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
108 /* Environment information */
109 #define CONFIG_EXTRA_ENV_SETTINGS \
110 "loadaddr=0x82000000\0" \
111 "baudrate=115200\0" \
112 "console=ttyO2,115200n8\0" \
116 "dvimode=1024x768MR-16@60\0" \
117 "defaultdisplay=dvi\0" \
119 "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \
120 "mmcrootfstype=ext4\0" \
121 "nandroot=/dev/mtdblock4 rw\0" \
122 "nandrootfstype=ubifs\0" \
123 "mmcargs=setenv bootargs console=${console} " \
124 "mpurate=${mpurate} " \
126 "omapfb.mode=dvi:${dvimode} " \
127 "omapdss.def_disp=${defaultdisplay} " \
129 "rootfstype=${mmcrootfstype}\0" \
130 "nandargs=setenv bootargs console=${console} " \
131 "mpurate=${mpurate} " \
133 "omapfb.mode=dvi:${dvimode} " \
134 "omapdss.def_disp=${defaultdisplay} " \
135 "root=${nandroot} " \
136 "rootfstype=${nandrootfstype}\0" \
137 "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
138 "bootscript=echo Running bootscript from mmc ...; " \
139 "source ${loadaddr}\0" \
140 "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
141 "mmcboot=echo Booting from mmc ...; " \
143 "bootm ${loadaddr}\0" \
144 "nandboot=echo Booting from nand ...; " \
146 "nand read ${loadaddr} 2a0000 400000; " \
147 "bootm ${loadaddr}\0" \
149 #define CONFIG_BOOTCOMMAND \
150 "mmc dev ${mmcdev}; if mmc rescan; then " \
151 "if run loadbootscript; then " \
154 "if run loaduimage; then " \
156 "else run nandboot; " \
159 "else run nandboot; fi"
162 * Miscellaneous configurable options
164 #define CONFIG_AUTO_COMPLETE
165 #define CONFIG_CMDLINE_EDITING
166 #define CONFIG_TIMESTAMP
167 #define CONFIG_SYS_AUTOLOAD "no"
168 #define CONFIG_SYS_LONGHELP /* undef to save memory */
169 #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
170 #define CONFIG_SYS_MAXARGS 32 /* max number of command args */
172 #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0 + 0x02000000)
175 * AM3517 has 12 GP timers, they can be driven by the system clock
176 * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
177 * This rate is divided by a local divisor.
179 #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
180 #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
181 #define CONFIG_SYS_HZ 1000
183 /*-----------------------------------------------------------------------
184 * Physical Memory Map
186 #define CONFIG_NR_DRAM_BANKS 1 /* CM-T3517 DRAM is only on CS0 */
187 #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
188 #define CONFIG_SYS_CS0_SIZE (256 << 20)
190 /*-----------------------------------------------------------------------
191 * FLASH and environment organization
194 /* **** PISMO SUPPORT *** */
195 /* Monitor at start of flash */
196 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
197 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
199 #define CONFIG_ENV_OFFSET 0x260000
200 #define CONFIG_ENV_ADDR 0x260000
202 #if defined(CONFIG_CMD_NET)
203 #define CONFIG_DRIVER_TI_EMAC
204 #define CONFIG_DRIVER_TI_EMAC_USE_RMII
206 #define CONFIG_ARP_TIMEOUT 200UL
207 #define CONFIG_NET_RETRY_COUNT 5
208 #endif /* CONFIG_CMD_NET */
210 /* additions for new relocation code, must be added to all boards */
211 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
212 #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
213 #define CONFIG_SYS_INIT_RAM_SIZE 0x800
214 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
215 CONFIG_SYS_INIT_RAM_SIZE - \
216 GENERATED_GBL_DATA_SIZE)
219 #define GREEN_LED_GPIO 186 /* CM-T3517 Green LED is GPIO186 */
221 /* Display Configuration */
222 #define CONFIG_VIDEO_OMAP3
223 #define LCD_BPP LCD_COLOR16
225 #define CONFIG_SPLASH_SCREEN
226 #define CONFIG_SPLASHIMAGE_GUARD
227 #define CONFIG_BMP_16BPP
228 #define CONFIG_SCF0403_LCD
231 #define CONFIG_ENV_EEPROM_IS_ON_I2C
232 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
233 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4
234 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
235 #define CONFIG_SYS_EEPROM_SIZE 256
237 #endif /* __CONFIG_H */