blob: 45a76f8010befcf94496b8242301ea813f9133f8 [file] [log] [blame]
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +09001/*
2 * include/configs/lager.h
3 * This file is lager board configuration.
4 *
Nobuhiro Iwamatsu5ca6dfe2014-11-10 14:34:07 +09005 * Copyright (C) 2013, 2014 Renesas Electronics Corporation
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +09006 *
7 * SPDX-License-Identifier: GPL-2.0
8 */
9
10#ifndef __LAGER_H
11#define __LAGER_H
12
13#undef DEBUG
Nobuhiro Iwamatsu1cc95f62015-10-10 05:58:28 +090014#define CONFIG_ARCH_RMOBILE_BOARD_STRING "Lager"
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090015
Nobuhiro Iwamatsu5ca6dfe2014-11-10 14:34:07 +090016#include "rcar-gen2-common.h"
Nobuhiro Iwamatsud80149b2014-03-31 15:22:31 +090017
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090018/* STACK */
Nobuhiro Iwamatsufb6f6002014-10-31 16:16:26 +090019#if defined(CONFIGF_RMOBILE_EXTRAM_BOOT)
20#define CONFIG_SYS_INIT_SP_ADDR 0xB003FFFC
21#else
22#define CONFIG_SYS_INIT_SP_ADDR 0xE827FFFC
23#endif
24#define STACK_AREA_SIZE 0xC000
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090025#define LOW_LEVEL_MERAM_STACK \
26 (CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4)
27
28/* MEMORY */
Nobuhiro Iwamatsu5ca6dfe2014-11-10 14:34:07 +090029#define RCAR_GEN2_SDRAM_BASE 0x40000000
30#define RCAR_GEN2_SDRAM_SIZE (2048u * 1024 * 1024)
31#define RCAR_GEN2_UBOOT_SDRAM_SIZE (512 * 1024 * 1024)
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090032
33/* SCIF */
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090034
Nobuhiro Iwamatsu5ca6dfe2014-11-10 14:34:07 +090035/* SPI */
Nobuhiro Iwamatsu0e05b212014-01-08 10:32:22 +090036#define CONFIG_SPI
Nobuhiro Iwamatsu0e05b212014-01-08 10:32:22 +090037
Nobuhiro Iwamatsu23565c62013-10-20 20:28:24 +090038/* SH Ether */
Nobuhiro Iwamatsu23565c62013-10-20 20:28:24 +090039#define CONFIG_SH_ETHER_USE_PORT 0
40#define CONFIG_SH_ETHER_PHY_ADDR 0x1
41#define CONFIG_SH_ETHER_PHY_MODE PHY_INTERFACE_MODE_RMII
42#define CONFIG_SH_ETHER_ALIGNE_SIZE 64
43#define CONFIG_SH_ETHER_CACHE_WRITEBACK
44#define CONFIG_SH_ETHER_CACHE_INVALIDATE
Nobuhiro Iwamatsu23565c62013-10-20 20:28:24 +090045#define CONFIG_BITBANGMII
46#define CONFIG_BITBANGMII_MULTI
47
Nobuhiro Iwamatsub9107ad2013-09-30 10:08:40 +090048/* I2C */
49#define CONFIG_SYS_I2C
50#define CONFIG_SYS_I2C_RCAR
Nobuhiro Iwamatsub9107ad2013-09-30 10:08:40 +090051#define CONFIG_SYS_RCAR_I2C0_SPEED 400000
Nobuhiro Iwamatsub9107ad2013-09-30 10:08:40 +090052#define CONFIG_SYS_RCAR_I2C1_SPEED 400000
Nobuhiro Iwamatsub9107ad2013-09-30 10:08:40 +090053#define CONFIG_SYS_RCAR_I2C2_SPEED 400000
Nobuhiro Iwamatsub9107ad2013-09-30 10:08:40 +090054#define CONFIG_SYS_RCAR_I2C3_SPEED 400000
55#define CONFIF_SYS_RCAR_I2C_NUM_CONTROLLERS 4
56
Nobuhiro Iwamatsub9986be2013-10-10 09:13:41 +090057#define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */
58
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090059/* Board Clock */
Nobuhiro Iwamatsub1f78a22014-03-31 14:03:07 +090060#define RMOBILE_XTAL_CLK 20000000u
61#define CONFIG_SYS_CLK_FREQ RMOBILE_XTAL_CLK
62#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2) /* EXT / 2 */
63#define CONFIG_PLL1_CLK_FREQ (CONFIG_SYS_CLK_FREQ * 156 / 2)
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090064#define CONFIG_PLL1_DIV2_CLK_FREQ (CONFIG_PLL1_CLK_FREQ / 2)
65#define CONFIG_MP_CLK_FREQ (CONFIG_PLL1_DIV2_CLK_FREQ / 15)
Nobuhiro Iwamatsub9107ad2013-09-30 10:08:40 +090066#define CONFIG_HP_CLK_FREQ (CONFIG_PLL1_CLK_FREQ / 12)
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090067
68#define CONFIG_SYS_TMU_CLK_DIV 4
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090069
Nobuhiro Iwamatsu5c4bb962014-03-27 14:14:58 +090070/* USB */
Nobuhiro Iwamatsu5c4bb962014-03-27 14:14:58 +090071#define CONFIG_USB_EHCI_RMOBILE
Nobuhiro Iwamatsu5906fad2014-07-28 15:29:31 +090072#define CONFIG_USB_MAX_CONTROLLER_COUNT 3
Nobuhiro Iwamatsu5c4bb962014-03-27 14:14:58 +090073
Nobuhiro Iwamatsud7916b12014-12-03 15:30:30 +090074/* MMC */
Nobuhiro Iwamatsud7916b12014-12-03 15:30:30 +090075#define CONFIG_SH_MMCIF
76#define CONFIG_SH_MMCIF_ADDR 0xEE220000
77#define CONFIG_SH_MMCIF_CLK 97500000
78
Nobuhiro Iwamatsu8e2e5882014-12-02 16:52:24 +090079/* Module stop status bits */
80/* INTC-RT */
81#define CONFIG_SMSTP0_ENA 0x00400000
82/* MSIF */
83#define CONFIG_SMSTP2_ENA 0x00002000
84/* INTC-SYS, IRQC */
85#define CONFIG_SMSTP4_ENA 0x00000180
86/* SCIF0 */
87#define CONFIG_SMSTP7_ENA 0x00200000
88
Nobuhiro Iwamatsuacdfecb2014-11-21 10:19:32 +090089/* SDHI */
90#define CONFIG_SH_SDHI_FREQ 97500000
91
Nobuhiro Iwamatsuf4ec4522013-11-21 17:06:46 +090092#endif /* __LAGER_H */