xref: /openbmc/u-boot/include/configs/koelsch.h (revision b97cd681)
1 /*
2  * include/configs/koelsch.h
3  *
4  * Copyright (C) 2013 Renesas Electronics Corporation
5  *
6  * SPDX-License-Identifier: GPL-2.0
7  */
8 
9 #ifndef __KOELSCH_H
10 #define __KOELSCH_H
11 
12 #undef DEBUG
13 #define CONFIG_ARMV7
14 #define CONFIG_R8A7791
15 #define CONFIG_RMOBILE_BOARD_STRING "Koelsch"
16 #define CONFIG_SH_GPIO_PFC
17 
18 #include <asm/arch/rmobile.h>
19 
20 #define CONFIG_CMD_EDITENV
21 #define CONFIG_CMD_SAVEENV
22 #define CONFIG_CMD_MEMORY
23 #define CONFIG_CMD_DFL
24 #define CONFIG_CMD_SDRAM
25 #define CONFIG_CMD_RUN
26 #define CONFIG_CMD_LOADS
27 #define CONFIG_CMD_NET
28 #define CONFIG_CMD_MII
29 #define CONFIG_CMD_PING
30 #define CONFIG_CMD_DHCP
31 #define CONFIG_CMD_NFS
32 #define CONFIG_CMD_BOOTZ
33 #define CONFIG_CMD_USB
34 #define CONFIG_CMD_FAT
35 #define CONFIG_CMD_SF
36 #define CONFIG_CMD_SPI
37 
38 #define CONFIG_FAT_WRITE
39 #define CONFIG_EXT4_WRITE
40 
41 #if defined(CONFIG_RMOBILE_EXTRAM_BOOT)
42 #define CONFIG_SYS_TEXT_BASE	0x70000000
43 #else
44 #define CONFIG_SYS_TEXT_BASE	0xE6304000
45 #endif
46 
47 #define CONFIG_SYS_THUMB_BUILD
48 #define CONFIG_SYS_GENERIC_BOARD
49 
50 /* Support File sytems */
51 #define CONFIG_DOS_PARTITION
52 #define CONFIG_SUPPORT_VFAT
53 
54 
55 #define	CONFIG_CMDLINE_TAG
56 #define	CONFIG_SETUP_MEMORY_TAGS
57 #define	CONFIG_INITRD_TAG
58 #define	CONFIG_CMDLINE_EDITING
59 
60 #define CONFIG_OF_LIBFDT
61 #define BOARD_LATE_INIT
62 
63 #define CONFIG_BAUDRATE		38400
64 #define CONFIG_BOOTDELAY	3
65 #define CONFIG_BOOTARGS		""
66 
67 #define CONFIG_VERSION_VARIABLE
68 #undef	CONFIG_SHOW_BOOT_PROGRESS
69 
70 #define CONFIG_ARCH_CPU_INIT
71 #define CONFIG_DISPLAY_CPUINFO
72 #define CONFIG_DISPLAY_BOARDINFO
73 #define CONFIG_BOARD_EARLY_INIT_F
74 #define CONFIG_TMU_TIMER
75 
76 /* STACK */
77 #if defined(CONFIG_RMOBILE_EXTRAM_BOOT)
78 #define CONFIG_SYS_INIT_SP_ADDR		0x7003FFFC
79 #else
80 #define CONFIG_SYS_INIT_SP_ADDR		0xE633fffC
81 #endif
82 
83 #define STACK_AREA_SIZE			0xC000
84 #define LOW_LEVEL_MERAM_STACK	\
85 		(CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4)
86 
87 /* MEMORY */
88 #define KOELSCH_SDRAM_BASE	0x40000000
89 #define KOELSCH_SDRAM_SIZE	(2048u * 1024 * 1024)
90 #define KOELSCH_UBOOT_SDRAM_SIZE	(512 * 1024 * 1024)
91 
92 #define CONFIG_SYS_LONGHELP
93 #define CONFIG_SYS_CBSIZE		256
94 #define CONFIG_SYS_PBSIZE		256
95 #define CONFIG_SYS_MAXARGS		16
96 #define CONFIG_SYS_BARGSIZE		512
97 #define CONFIG_SYS_BAUDRATE_TABLE	{ 38400, 115200 }
98 
99 /* SCIF */
100 #define CONFIG_SCIF_CONSOLE
101 #define CONFIG_CONS_SCIF0
102 #define CONFIG_SCIF_USE_EXT_CLK
103 #undef	CONFIG_SYS_CONSOLE_INFO_QUIET
104 #undef	CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
105 #undef	CONFIG_SYS_CONSOLE_ENV_OVERWRITE
106 
107 #define CONFIG_SYS_MEMTEST_START	(KOELSCH_SDRAM_BASE)
108 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + \
109 					 504 * 1024 * 1024)
110 #undef	CONFIG_SYS_ALT_MEMTEST
111 #undef	CONFIG_SYS_MEMTEST_SCRATCH
112 #undef	CONFIG_SYS_LOADS_BAUD_CHANGE
113 
114 #define CONFIG_SYS_SDRAM_BASE		(KOELSCH_SDRAM_BASE)
115 #define CONFIG_SYS_SDRAM_SIZE		(KOELSCH_UBOOT_SDRAM_SIZE)
116 #define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x7fc0)
117 #define CONFIG_NR_DRAM_BANKS		1
118 
119 #define CONFIG_SYS_MONITOR_BASE		0x00000000
120 #define CONFIG_SYS_MONITOR_LEN		(256 * 1024)
121 #define CONFIG_SYS_MALLOC_LEN		(1 * 1024 * 1024)
122 #define CONFIG_SYS_BOOTMAPSZ		(8 * 1024 * 1024)
123 
124 /* FLASH */
125 #define CONFIG_SYS_NO_FLASH
126 #define CONFIG_SPI
127 #define CONFIG_SH_QSPI
128 #define CONFIG_SPI_FLASH
129 #define CONFIG_SPI_FLASH_BAR
130 #define CONFIG_SPI_FLASH_SPANSION
131 /* ENV setting */
132 #define CONFIG_ENV_IS_IN_SPI_FLASH
133 #define CONFIG_ENV_ADDR	0xC0000
134 
135 /* Common ENV setting */
136 #define CONFIG_ENV_OVERWRITE
137 #define CONFIG_ENV_SECT_SIZE	(256 * 1024)
138 #define CONFIG_ENV_OFFSET	(CONFIG_ENV_ADDR)
139 #define CONFIG_ENV_SIZE		(CONFIG_ENV_SECT_SIZE)
140 #define CONFIG_ENV_SIZE_REDUND	(CONFIG_SYS_MONITOR_LEN)
141 
142 /* SH Ether */
143 #define	CONFIG_NET_MULTI
144 #define CONFIG_SH_ETHER
145 #define CONFIG_SH_ETHER_USE_PORT	0
146 #define CONFIG_SH_ETHER_PHY_ADDR	0x1
147 #define CONFIG_SH_ETHER_PHY_MODE PHY_INTERFACE_MODE_RMII
148 #define CONFIG_SH_ETHER_CACHE_WRITEBACK
149 #define CONFIG_SH_ETHER_CACHE_INVALIDATE
150 #define CONFIG_PHYLIB
151 #define CONFIG_PHY_MICREL
152 #define CONFIG_BITBANGMII
153 #define CONFIG_BITBANGMII_MULTI
154 #define CONFIG_SH_ETHER_ALIGNE_SIZE 64
155 
156 /* Board Clock */
157 #define RMOBILE_XTAL_CLK	20000000u
158 #define CONFIG_SYS_CLK_FREQ	RMOBILE_XTAL_CLK
159 #define CONFIG_SH_TMU_CLK_FREQ	(CONFIG_SYS_CLK_FREQ / 2)
160 #define CONFIG_SH_SCIF_CLK_FREQ	14745600
161 #define CONFIG_SYS_TMU_CLK_DIV	4
162 
163 /* i2c */
164 #define CONFIG_CMD_I2C
165 #define CONFIG_SYS_I2C
166 #define CONFIG_SYS_I2C_SH
167 #define CONFIG_SYS_I2C_SLAVE	0x7F
168 #define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS	3
169 #define CONFIG_SYS_I2C_SH_BASE0		0xE6500000
170 #define CONFIG_SYS_I2C_SH_SPEED0	400000
171 #define CONFIG_SYS_I2C_SH_BASE1		0xE6510000
172 #define CONFIG_SYS_I2C_SH_SPEED1	400000
173 #define CONFIG_SYS_I2C_SH_BASE2		0xE60B0000
174 #define CONFIG_SYS_I2C_SH_SPEED2	400000
175 #define CONFIG_SH_I2C_DATA_HIGH	4
176 #define CONFIG_SH_I2C_DATA_LOW	5
177 #define CONFIG_SH_I2C_CLOCK	10000000
178 
179 #define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */
180 
181 /* USB */
182 #define CONFIG_USB_EHCI
183 #define CONFIG_USB_EHCI_RMOBILE
184 #define CONFIG_USB_MAX_CONTROLLER_COUNT	2
185 #define CONFIG_USB_STORAGE
186 
187 #endif	/* __KOELSCH_H */
188