Blame view

include/configs/cm_t3517.h 6.44 KB
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  /*
   * (C) Copyright 2013 CompuLab, Ltd.
   * Author: Igor Grinberg <grinberg@compulab.co.il>
   *
   * Configuration settings for the CompuLab CM-T3517 board
   *
   * SPDX-License-Identifier:	GPL-2.0+
   */
  
  #ifndef __CONFIG_H
  #define __CONFIG_H
  
  /*
   * High Level Configuration Options
   */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
16
  #define CONFIG_CM_T3517	/* working with CM-T3517 */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
17

b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
18
19
20
21
22
  /*
   * This is needed for the DMA stuff.
   * Although the default iss 64, we still define it
   * to be on the safe side once the default is changed.
   */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
23

b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
24
  #include <asm/arch/cpu.h>		/* get chip and board defs */
987ec5851   Nishanth Menon   ARM: OMAP3: Renam...
25
  #include <asm/arch/omap.h>
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
26

f3b44e8b2   Dmitry Lifshitz   omap3: cm-t3517: ...
27
  #define CONFIG_MACH_TYPE                MACH_TYPE_CM_T3517
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
28
29
30
31
32
  /* Clock Defines */
  #define V_OSCK			26000000	/* Clock output from T2 */
  #define V_SCLK			(V_OSCK >> 1)
  
  #define CONFIG_MISC_INIT_R
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  /*
   * The early kernel mapping on ARM currently only maps from the base of DRAM
   * to the end of the kernel image.  The kernel is loaded at DRAM base + 0x8000.
   * The early kernel pagetable uses DRAM base + 0x4000 to DRAM base + 0x8000,
   * so that leaves DRAM base to DRAM base + 0x4000 available.
   */
  #define CONFIG_SYS_BOOTMAPSZ	        0x4000
  
  #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */
  #define CONFIG_SETUP_MEMORY_TAGS
  #define CONFIG_INITRD_TAG
  #define CONFIG_REVISION_TAG
  #define CONFIG_SERIAL_TAG
  
  /*
   * Size of malloc() pool
   */
2f6e4bf89   Dmitry Lifshitz   omap3: cm-t3517: ...
50
  #define CONFIG_ENV_SIZE		(128 << 10)	/* 128 KiB */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
51
52
53
54
55
56
57
58
59
  #define CONFIG_SYS_MALLOC_LEN	(CONFIG_ENV_SIZE + (128 << 10))
  
  /*
   * Hardware drivers
   */
  
  /*
   * NS16550 Configuration
   */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
60
61
62
63
64
65
66
67
68
69
  #define CONFIG_SYS_NS16550_SERIAL
  #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
  #define CONFIG_SYS_NS16550_CLK		48000000	/* 48MHz (APLL96/2) */
  
  /*
   * select serial console configuration
   */
  #define CONFIG_CONS_INDEX		3
  #define CONFIG_SYS_NS16550_COM3		OMAP34XX_UART3
  #define CONFIG_SERIAL3			3	/* UART3 */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
70
71
72
  
  /* allow to overwrite serial and ethaddr */
  #define CONFIG_ENV_OVERWRITE
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
73
74
  #define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600,\
  					115200}
011f5c13f   Igor Grinberg   omap3: cm-t3517: ...
75
  /* USB */
011f5c13f   Igor Grinberg   omap3: cm-t3517: ...
76
77
  
  #ifndef CONFIG_USB_MUSB_AM35X
011f5c13f   Igor Grinberg   omap3: cm-t3517: ...
78
79
  #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 146
  #define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 147
011f5c13f   Igor Grinberg   omap3: cm-t3517: ...
80
  #endif /* CONFIG_USB_MUSB_AM35X */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
81
  /* commands to include */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
82
83
  #define CONFIG_MTD_DEVICE	/* needed for mtdparts commands */
  #define CONFIG_MTD_PARTITIONS
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
84

b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
85
  #define CONFIG_SYS_I2C
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
86
87
88
89
90
91
92
93
  #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
  #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
  #define CONFIG_SYS_I2C_EEPROM_BUS	0
  #define CONFIG_I2C_MULTI_BUS
  
  /*
   * Board NAND Info.
   */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
94
95
96
97
98
99
100
101
102
  #define CONFIG_SYS_NAND_ADDR		NAND_BASE	/* physical address */
  							/* to access nand */
  #define CONFIG_SYS_NAND_BASE		NAND_BASE	/* physical address */
  							/* to access nand at */
  							/* CS0 */
  #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of NAND */
  							/* devices */
  
  /* Environment information */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
103
104
105
106
  #define CONFIG_EXTRA_ENV_SETTINGS \
  	"loadaddr=0x82000000\0" \
  	"baudrate=115200\0" \
  	"console=ttyO2,115200n8\0" \
e093d0b2e   Dmitry Lifshitz   omap3: cm-t3517: ...
107
  	"netretry=yes\0" \
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
  	"mpurate=auto\0" \
  	"vram=12M\0" \
  	"dvimode=1024x768MR-16@60\0" \
  	"defaultdisplay=dvi\0" \
  	"mmcdev=0\0" \
  	"mmcroot=/dev/mmcblk0p2 rw rootwait\0" \
  	"mmcrootfstype=ext4\0" \
  	"nandroot=/dev/mtdblock4 rw\0" \
  	"nandrootfstype=ubifs\0" \
  	"mmcargs=setenv bootargs console=${console} " \
  		"mpurate=${mpurate} " \
  		"vram=${vram} " \
  		"omapfb.mode=dvi:${dvimode} " \
  		"omapdss.def_disp=${defaultdisplay} " \
  		"root=${mmcroot} " \
  		"rootfstype=${mmcrootfstype}\0" \
  	"nandargs=setenv bootargs console=${console} " \
  		"mpurate=${mpurate} " \
  		"vram=${vram} " \
  		"omapfb.mode=dvi:${dvimode} " \
  		"omapdss.def_disp=${defaultdisplay} " \
  		"root=${nandroot} " \
  		"rootfstype=${nandrootfstype}\0" \
  	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  	"bootscript=echo Running bootscript from mmc ...; " \
  		"source ${loadaddr}\0" \
  	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
  	"mmcboot=echo Booting from mmc ...; " \
  		"run mmcargs; " \
  		"bootm ${loadaddr}\0" \
  	"nandboot=echo Booting from nand ...; " \
  		"run nandargs; " \
  		"nand read ${loadaddr} 2a0000 400000; " \
  		"bootm ${loadaddr}\0" \
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
  #define CONFIG_BOOTCOMMAND \
  	"mmc dev ${mmcdev}; if mmc rescan; then " \
  		"if run loadbootscript; then " \
  			"run bootscript; " \
  		"else " \
  			"if run loaduimage; then " \
  				"run mmcboot; " \
  			"else run nandboot; " \
  			"fi; " \
  		"fi; " \
  	"else run nandboot; fi"
  
  /*
   * Miscellaneous configurable options
   */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
157
158
  #define CONFIG_TIMESTAMP
  #define CONFIG_SYS_AUTOLOAD		"no"
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
159
  #define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
160
  #define CONFIG_SYS_MAXARGS		32	/* max number of command args */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
  
  #define CONFIG_SYS_LOAD_ADDR		(OMAP34XX_SDRC_CS0 + 0x02000000)
  
  /*
   * AM3517 has 12 GP timers, they can be driven by the system clock
   * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
   * This rate is divided by a local divisor.
   */
  #define CONFIG_SYS_TIMERBASE		(OMAP34XX_GPT2)
  #define CONFIG_SYS_PTV			2       /* Divisor: 2^(PTV+1) => 8 */
  #define CONFIG_SYS_HZ			1000
  
  /*-----------------------------------------------------------------------
   * Physical Memory Map
   */
  #define CONFIG_NR_DRAM_BANKS	1	/* CM-T3517 DRAM is only on CS0 */
  #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
  #define CONFIG_SYS_CS0_SIZE		(256 << 20)
  
  /*-----------------------------------------------------------------------
   * FLASH and environment organization
   */
  
  /* **** PISMO SUPPORT *** */
  /* Monitor at start of flash */
  #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
  #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
7672d9d58   Adam Ford   include/configs: ...
188
189
  #define CONFIG_ENV_OFFSET		0x260000
  #define CONFIG_ENV_ADDR			0x260000
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
190

a8a78c745   Igor Grinberg   omap3: cm-t3517: ...
191
192
193
194
  #if defined(CONFIG_CMD_NET)
  #define CONFIG_DRIVER_TI_EMAC
  #define CONFIG_DRIVER_TI_EMAC_USE_RMII
  #define CONFIG_MII
e093d0b2e   Dmitry Lifshitz   omap3: cm-t3517: ...
195
196
  #define CONFIG_ARP_TIMEOUT		200UL
  #define CONFIG_NET_RETRY_COUNT		5
a8a78c745   Igor Grinberg   omap3: cm-t3517: ...
197
  #endif /* CONFIG_CMD_NET */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
198
199
200
201
202
203
204
205
206
  /* additions for new relocation code, must be added to all boards */
  #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
  #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
  #define CONFIG_SYS_INIT_RAM_SIZE	0x800
  #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INIT_RAM_ADDR +	\
  					 CONFIG_SYS_INIT_RAM_SIZE -	\
  					 GENERATED_GBL_DATA_SIZE)
  
  /* Status LED */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
207
  #define GREEN_LED_GPIO			186 /* CM-T3517 Green LED is GPIO186 */
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
208

40bbd52a7   Igor Grinberg   omap3: cm-t3517: ...
209
  /* Display Configuration */
40bbd52a7   Igor Grinberg   omap3: cm-t3517: ...
210
211
  #define CONFIG_VIDEO_OMAP3
  #define LCD_BPP		LCD_COLOR16
40bbd52a7   Igor Grinberg   omap3: cm-t3517: ...
212
213
  #define CONFIG_SPLASH_SCREEN
  #define CONFIG_SPLASHIMAGE_GUARD
40bbd52a7   Igor Grinberg   omap3: cm-t3517: ...
214
215
  #define CONFIG_BMP_16BPP
  #define CONFIG_SCF0403_LCD
19a90ed67   Nikita Kiryanov   arm: cm-t3517: ad...
216
  /* EEPROM */
19a90ed67   Nikita Kiryanov   arm: cm-t3517: ad...
217
218
219
220
221
  #define CONFIG_ENV_EEPROM_IS_ON_I2C
  #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1
  #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	4
  #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	5
  #define CONFIG_SYS_EEPROM_SIZE			256
b09bf7231   Igor Grinberg   omap3: cm-t3517: ...
222
  #endif /* __CONFIG_H */