blob: 74c998f3d45d0768e65966e29e78d15a0964c476 [file] [log] [blame]
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +09001/*
2 * include/configs/lager.h
3 * This file is lager board configuration.
4 *
5 * Copyright (C) 2013 Renesas Electronics Corporation
6 *
7 * SPDX-License-Identifier: GPL-2.0
8 */
9
10#ifndef __LAGER_H
11#define __LAGER_H
12
13#undef DEBUG
14#define CONFIG_ARMV7
15#define CONFIG_R8A7790
16#define CONFIG_RMOBILE
17#define CONFIG_RMOBILE_BOARD_STRING "Lager"
18#define CONFIG_SH_GPIO_PFC
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090019
20#include <asm/arch/rmobile.h>
21
22#define CONFIG_CMD_EDITENV
23#define CONFIG_CMD_SAVEENV
24#define CONFIG_CMD_MEMORY
25#define CONFIG_CMD_DFL
26#define CONFIG_CMD_SDRAM
27#define CONFIG_CMD_RUN
28#define CONFIG_CMD_LOADS
Nobuhiro Iwamatsu23565c62013-10-20 20:28:24 +090029#define CONFIG_CMD_NET
30#define CONFIG_CMD_MII
31#define CONFIG_CMD_PING
32#define CONFIG_CMD_DHCP
33#define CONFIG_CMD_NFS
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090034#define CONFIG_CMD_BOOTZ
Nobuhiro Iwamatsu5c4bb962014-03-27 14:14:58 +090035#define CONFIG_CMD_USB
Nobuhiro Iwamatsuf55bb6a2014-03-28 17:07:03 +090036#define CONFIG_CMD_FAT
Nobuhiro Iwamatsu0e05b212014-01-08 10:32:22 +090037#define CONFIG_CMD_SF
38#define CONFIG_CMD_SPI
Nobuhiro Iwamatsud80149b2014-03-31 15:22:31 +090039
40#define CONFIG_FAT_WRITE
41#define CONFIG_EXT4_WRITE
42
Nobuhiro Iwamatsu0e05b212014-01-08 10:32:22 +090043#define CONFIG_SYS_TEXT_BASE 0xE8080000
Nobuhiro Iwamatsu7f922e32014-04-07 17:11:52 +090044#define CONFIG_SYS_THUMB_BUILD
Nobuhiro Iwamatsu358d6ef2014-05-19 16:10:51 +090045#define CONFIG_SYS_GENERIC_BOARD
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090046
Nobuhiro Iwamatsuf55bb6a2014-03-28 17:07:03 +090047/* Support File sytems */
48#define CONFIG_DOS_PARTITION
49#define CONFIG_SUPPORT_VFAT
50
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090051#define CONFIG_CMDLINE_TAG
52#define CONFIG_SETUP_MEMORY_TAGS
53#define CONFIG_INITRD_TAG
54#define CONFIG_CMDLINE_EDITING
55#define CONFIG_OF_LIBFDT
56
57/* #define CONFIG_OF_LIBFDT */
58#define BOARD_LATE_INIT
59
60#define CONFIG_BAUDRATE 38400
61#define CONFIG_BOOTDELAY 3
62#define CONFIG_BOOTARGS ""
63
64#define CONFIG_VERSION_VARIABLE
65#undef CONFIG_SHOW_BOOT_PROGRESS
66
67#define CONFIG_ARCH_CPU_INIT
68#define CONFIG_DISPLAY_CPUINFO
69#define CONFIG_DISPLAY_BOARDINFO
70#define CONFIG_BOARD_EARLY_INIT_F
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090071#define CONFIG_TMU_TIMER
72
73/* STACK */
74#define CONFIG_SYS_INIT_SP_ADDR 0xE827fffc
75#define STACK_AREA_SIZE 0xC000
76#define LOW_LEVEL_MERAM_STACK \
77 (CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4)
78
79/* MEMORY */
80#define LAGER_SDRAM_BASE 0x40000000
81#define LAGER_SDRAM_SIZE (2048u * 1024 * 1024)
82#define LAGER_UBOOT_SDRAM_SIZE (512 * 1024 * 1024)
83
84#define CONFIG_SYS_LONGHELP
85#define CONFIG_SYS_CBSIZE 256
86#define CONFIG_SYS_PBSIZE 256
87#define CONFIG_SYS_MAXARGS 16
88#define CONFIG_SYS_BARGSIZE 512
89#define CONFIG_SYS_BAUDRATE_TABLE { 38400, 115200 }
90
91/* SCIF */
92#define CONFIG_SCIF_CONSOLE
93#define CONFIG_CONS_SCIF0
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090094#undef CONFIG_SYS_CONSOLE_INFO_QUIET
95#undef CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
96#undef CONFIG_SYS_CONSOLE_ENV_OVERWRITE
97
98#define CONFIG_SYS_MEMTEST_START (LAGER_SDRAM_BASE)
99#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + \
100 504 * 1024 * 1024)
101#undef CONFIG_SYS_ALT_MEMTEST
102#undef CONFIG_SYS_MEMTEST_SCRATCH
103#undef CONFIG_SYS_LOADS_BAUD_CHANGE
104
105#define CONFIG_SYS_SDRAM_BASE (LAGER_SDRAM_BASE)
106#define CONFIG_SYS_SDRAM_SIZE (LAGER_UBOOT_SDRAM_SIZE)
107#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fc0)
108#define CONFIG_NR_DRAM_BANKS 1
109
110#define CONFIG_SYS_MONITOR_BASE 0x00000000
111#define CONFIG_SYS_MONITOR_LEN (256 * 1024)
112#define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024)
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +0900113#define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024)
114
Nobuhiro Iwamatsu0e05b212014-01-08 10:32:22 +0900115/* USE SPI */
116#define CONFIG_SPI
117#define CONFIG_SPI_FLASH_BAR
118#define CONFIG_SH_QSPI
119#define CONFIG_SPI_FLASH
120#define CONFIG_SPI_FLASH_SPANSION
121#define CONFIG_SYS_NO_FLASH
122
123/* ENV setting */
124#define CONFIG_ENV_IS_IN_SPI_FLASH
125#define CONFIG_ENV_ADDR 0xC0000
Nobuhiro Iwamatsu0e05b212014-01-08 10:32:22 +0900126
127/* Common ENV setting */
128#define CONFIG_ENV_OVERWRITE
129#define CONFIG_ENV_SECT_SIZE (256 * 1024)
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +0900130#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR)
131#define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE)
132#define CONFIG_ENV_SIZE_REDUND (CONFIG_SYS_MONITOR_LEN)
133
Nobuhiro Iwamatsu23565c62013-10-20 20:28:24 +0900134/* SH Ether */
135#define CONFIG_NET_MULTI
136#define CONFIG_SH_ETHER
137#define CONFIG_SH_ETHER_USE_PORT 0
138#define CONFIG_SH_ETHER_PHY_ADDR 0x1
139#define CONFIG_SH_ETHER_PHY_MODE PHY_INTERFACE_MODE_RMII
140#define CONFIG_SH_ETHER_ALIGNE_SIZE 64
141#define CONFIG_SH_ETHER_CACHE_WRITEBACK
142#define CONFIG_SH_ETHER_CACHE_INVALIDATE
143#define CONFIG_PHYLIB
144#define CONFIG_PHY_MICREL
145#define CONFIG_BITBANGMII
146#define CONFIG_BITBANGMII_MULTI
147
Nobuhiro Iwamatsub9107ad2013-09-30 10:08:40 +0900148/* I2C */
149#define CONFIG_SYS_I2C
150#define CONFIG_SYS_I2C_RCAR
151#define CONFIG_SYS_RCAR_I2C0_BASE 0xE6508000
152#define CONFIG_SYS_RCAR_I2C0_SPEED 400000
153#define CONFIG_SYS_RCAR_I2C1_BASE 0xE6518000
154#define CONFIG_SYS_RCAR_I2C1_SPEED 400000
155#define CONFIG_SYS_RCAR_I2C2_BASE 0xE6530000
156#define CONFIG_SYS_RCAR_I2C2_SPEED 400000
157#define CONFIG_SYS_RCAR_I2C3_BASE 0xE6540000
158#define CONFIG_SYS_RCAR_I2C3_SPEED 400000
159#define CONFIF_SYS_RCAR_I2C_NUM_CONTROLLERS 4
160
Nobuhiro Iwamatsub9986be2013-10-10 09:13:41 +0900161#define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */
162
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +0900163/* Board Clock */
Nobuhiro Iwamatsub1f78a22014-03-31 14:03:07 +0900164#define RMOBILE_XTAL_CLK 20000000u
165#define CONFIG_SYS_CLK_FREQ RMOBILE_XTAL_CLK
166#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2) /* EXT / 2 */
167#define CONFIG_PLL1_CLK_FREQ (CONFIG_SYS_CLK_FREQ * 156 / 2)
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +0900168#define CONFIG_PLL1_DIV2_CLK_FREQ (CONFIG_PLL1_CLK_FREQ / 2)
169#define CONFIG_MP_CLK_FREQ (CONFIG_PLL1_DIV2_CLK_FREQ / 15)
Nobuhiro Iwamatsub9107ad2013-09-30 10:08:40 +0900170#define CONFIG_HP_CLK_FREQ (CONFIG_PLL1_CLK_FREQ / 12)
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +0900171#define CONFIG_SH_SCIF_CLK_FREQ CONFIG_MP_CLK_FREQ
172
173#define CONFIG_SYS_TMU_CLK_DIV 4
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +0900174
Nobuhiro Iwamatsu5c4bb962014-03-27 14:14:58 +0900175/* USB */
176#define CONFIG_USB_EHCI
177#define CONFIG_USB_EHCI_RMOBILE
Nobuhiro Iwamatsu5906fad2014-07-28 15:29:31 +0900178#define CONFIG_USB_MAX_CONTROLLER_COUNT 3
Nobuhiro Iwamatsu5c4bb962014-03-27 14:14:58 +0900179#define CONFIG_USB_STORAGE
180
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +0900181#endif /* __LAGER_H */