1 /*
2  * ti_omap3_common.h
3  *
4  * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
5  *
6  * SPDX-License-Identifier:	GPL-2.0+
7  *
8  * For more details, please see the technical documents listed at
9  *   http://www.ti.com/product/omap3530
10  *   http://www.ti.com/product/omap3630
11  *   http://www.ti.com/product/dm3730
12  */
13 
14 #ifndef __CONFIG_TI_OMAP3_COMMON_H__
15 #define __CONFIG_TI_OMAP3_COMMON_H__
16 
17 
18 #include <asm/arch/cpu.h>
19 #include <asm/arch/omap3.h>
20 
21 #ifndef CONFIG_SPL_BUILD
22 # define CONFIG_OMAP_SERIAL
23 # define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
24 #endif
25 
26 /* The chip has SDRC controller */
27 #define CONFIG_SDRC
28 
29 /* Clock Defines */
30 #define V_OSCK			26000000	/* Clock output from T2 */
31 #define V_SCLK			(V_OSCK >> 1)
32 
33 /* NS16550 Configuration */
34 #define V_NS16550_CLK			48000000	/* 48MHz (APLL96/2) */
35 #define CONFIG_SYS_NS16550
36 #ifdef CONFIG_SPL_BUILD
37 # define CONFIG_SYS_NS16550_SERIAL
38 # define CONFIG_SYS_NS16550_REG_SIZE	(-4)
39 # define CONFIG_SYS_NS16550_CLK		V_NS16550_CLK
40 #endif
41 #define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600, \
42 					115200}
43 
44 /* Select serial console configuration */
45 #define CONFIG_CONS_INDEX		3
46 #ifdef CONFIG_SPL_BUILD
47 #define CONFIG_SYS_NS16550_COM3		OMAP34XX_UART3
48 #define CONFIG_SERIAL3			3
49 #endif
50 
51 /* Physical Memory Map */
52 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
53 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
54 
55 /*
56  * OMAP3 has 12 GP timers, they can be driven by the system clock
57  * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
58  * This rate is divided by a local divisor.
59  */
60 #define CONFIG_SYS_TIMERBASE		(OMAP34XX_GPT2)
61 
62 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)
63 
64 /* TWL4030 */
65 #define CONFIG_TWL4030_POWER		1
66 
67 /* SPL */
68 #define CONFIG_SPL_TEXT_BASE		0x40200800
69 #define CONFIG_SPL_MAX_SIZE		(54 * 1024)
70 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
71 #define CONFIG_SPL_POWER_SUPPORT
72 #define CONFIG_SYS_SPL_ARGS_ADDR	(CONFIG_SYS_SDRAM_BASE + \
73 					 (64 << 20))
74 
75 
76 #ifdef CONFIG_NAND
77 #define CONFIG_SPL_NAND_SUPPORT
78 #define CONFIG_SPL_NAND_SIMPLE
79 #define CONFIG_SYS_NAND_BASE		0x30000000
80 #endif
81 
82 /* Now bring in the rest of the common code. */
83 #include <configs/ti_armv7_common.h>
84 
85 #endif	/* __CONFIG_TI_OMAP3_COMMON_H__ */
86