BLANCHE is development board based on R-Car V2H SoC (R8A7792) This commit supports the following periherals: - SCIF, Ethernet, QSPI, MMC Signed-off-by: Masakazu Mochizuki <masakazu.mochizuki.wd@hitachi.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>master
parent
7593194685
commit
6f107e4cf6
@ -0,0 +1,220 @@ |
||||
#ifndef __ASM_R8A7792_GPIO_H__ |
||||
#define __ASM_R8A7792_GPIO_H__ |
||||
|
||||
/* Pin Function Controller:
|
||||
* GPIO_FN_xx - GPIO used to select pin function |
||||
* GPIO_GP_x_x - GPIO mapped to real I/O pin on CPU |
||||
*/ |
||||
enum { |
||||
GPIO_GP_0_0, GPIO_GP_0_1, GPIO_GP_0_2, GPIO_GP_0_3, |
||||
GPIO_GP_0_4, GPIO_GP_0_5, GPIO_GP_0_6, GPIO_GP_0_7, |
||||
GPIO_GP_0_8, GPIO_GP_0_9, GPIO_GP_0_10, GPIO_GP_0_11, |
||||
GPIO_GP_0_12, GPIO_GP_0_13, GPIO_GP_0_14, GPIO_GP_0_15, |
||||
GPIO_GP_0_16, GPIO_GP_0_17, GPIO_GP_0_18, GPIO_GP_0_19, |
||||
GPIO_GP_0_20, GPIO_GP_0_21, GPIO_GP_0_22, GPIO_GP_0_23, |
||||
GPIO_GP_0_24, GPIO_GP_0_25, GPIO_GP_0_26, GPIO_GP_0_27, |
||||
GPIO_GP_0_28, |
||||
|
||||
GPIO_GP_1_0, GPIO_GP_1_1, GPIO_GP_1_2, GPIO_GP_1_3, |
||||
GPIO_GP_1_4, GPIO_GP_1_5, GPIO_GP_1_6, GPIO_GP_1_7, |
||||
GPIO_GP_1_8, GPIO_GP_1_9, GPIO_GP_1_10, GPIO_GP_1_11, |
||||
GPIO_GP_1_12, GPIO_GP_1_13, GPIO_GP_1_14, GPIO_GP_1_15, |
||||
GPIO_GP_1_16, GPIO_GP_1_17, GPIO_GP_1_18, GPIO_GP_1_19, |
||||
GPIO_GP_1_20, GPIO_GP_1_21, GPIO_GP_1_22, |
||||
|
||||
GPIO_GP_2_0, GPIO_GP_2_1, GPIO_GP_2_2, GPIO_GP_2_3, |
||||
GPIO_GP_2_4, GPIO_GP_2_5, GPIO_GP_2_6, GPIO_GP_2_7, |
||||
GPIO_GP_2_8, GPIO_GP_2_9, GPIO_GP_2_10, GPIO_GP_2_11, |
||||
GPIO_GP_2_12, GPIO_GP_2_13, GPIO_GP_2_14, GPIO_GP_2_15, |
||||
GPIO_GP_2_16, GPIO_GP_2_17, GPIO_GP_2_18, GPIO_GP_2_19, |
||||
GPIO_GP_2_20, GPIO_GP_2_21, GPIO_GP_2_22, GPIO_GP_2_23, |
||||
GPIO_GP_2_24, GPIO_GP_2_25, GPIO_GP_2_26, GPIO_GP_2_27, |
||||
GPIO_GP_2_28, GPIO_GP_2_29, GPIO_GP_2_30, GPIO_GP_2_31, |
||||
|
||||
GPIO_GP_3_0, GPIO_GP_3_1, GPIO_GP_3_2, GPIO_GP_3_3, |
||||
GPIO_GP_3_4, GPIO_GP_3_5, GPIO_GP_3_6, GPIO_GP_3_7, |
||||
GPIO_GP_3_8, GPIO_GP_3_9, GPIO_GP_3_10, GPIO_GP_3_11, |
||||
GPIO_GP_3_12, GPIO_GP_3_13, GPIO_GP_3_14, GPIO_GP_3_15, |
||||
GPIO_GP_3_16, GPIO_GP_3_17, GPIO_GP_3_18, GPIO_GP_3_19, |
||||
GPIO_GP_3_20, GPIO_GP_3_21, GPIO_GP_3_22, GPIO_GP_3_23, |
||||
GPIO_GP_3_24, GPIO_GP_3_25, GPIO_GP_3_26, GPIO_GP_3_27, |
||||
GPIO_GP_3_28, |
||||
|
||||
GPIO_GP_4_0, GPIO_GP_4_1, GPIO_GP_4_2, GPIO_GP_4_3, |
||||
GPIO_GP_4_4, GPIO_GP_4_5, GPIO_GP_4_6, GPIO_GP_4_7, |
||||
GPIO_GP_4_8, GPIO_GP_4_9, GPIO_GP_4_10, GPIO_GP_4_11, |
||||
GPIO_GP_4_12, GPIO_GP_4_13, GPIO_GP_4_14, GPIO_GP_4_15, |
||||
GPIO_GP_4_16, |
||||
|
||||
GPIO_GP_5_0, GPIO_GP_5_1, GPIO_GP_5_2, GPIO_GP_5_3, |
||||
GPIO_GP_5_4, GPIO_GP_5_5, GPIO_GP_5_6, GPIO_GP_5_7, |
||||
GPIO_GP_5_8, GPIO_GP_5_9, GPIO_GP_5_10, GPIO_GP_5_11, |
||||
GPIO_GP_5_12, GPIO_GP_5_13, GPIO_GP_5_14, GPIO_GP_5_15, |
||||
GPIO_GP_5_16, |
||||
|
||||
GPIO_GP_6_0, GPIO_GP_6_1, GPIO_GP_6_2, GPIO_GP_6_3, |
||||
GPIO_GP_6_4, GPIO_GP_6_5, GPIO_GP_6_6, GPIO_GP_6_7, |
||||
GPIO_GP_6_8, GPIO_GP_6_9, GPIO_GP_6_10, GPIO_GP_6_11, |
||||
GPIO_GP_6_12, GPIO_GP_6_13, GPIO_GP_6_14, GPIO_GP_6_15, |
||||
GPIO_GP_6_16, |
||||
|
||||
GPIO_GP_7_0, GPIO_GP_7_1, GPIO_GP_7_2, GPIO_GP_7_3, |
||||
GPIO_GP_7_4, GPIO_GP_7_5, GPIO_GP_7_6, GPIO_GP_7_7, |
||||
GPIO_GP_7_8, GPIO_GP_7_9, GPIO_GP_7_10, GPIO_GP_7_11, |
||||
GPIO_GP_7_12, GPIO_GP_7_13, GPIO_GP_7_14, GPIO_GP_7_15, |
||||
GPIO_GP_7_16, |
||||
|
||||
GPIO_GP_8_0, GPIO_GP_8_1, GPIO_GP_8_2, GPIO_GP_8_3, |
||||
GPIO_GP_8_4, GPIO_GP_8_5, GPIO_GP_8_6, GPIO_GP_8_7, |
||||
GPIO_GP_8_8, GPIO_GP_8_9, GPIO_GP_8_10, GPIO_GP_8_11, |
||||
GPIO_GP_8_12, GPIO_GP_8_13, GPIO_GP_8_14, GPIO_GP_8_15, |
||||
GPIO_GP_8_16, |
||||
|
||||
GPIO_GP_9_0, GPIO_GP_9_1, GPIO_GP_9_2, GPIO_GP_9_3, |
||||
GPIO_GP_9_4, GPIO_GP_9_5, GPIO_GP_9_6, GPIO_GP_9_7, |
||||
GPIO_GP_9_8, GPIO_GP_9_9, GPIO_GP_9_10, GPIO_GP_9_11, |
||||
GPIO_GP_9_12, GPIO_GP_9_13, GPIO_GP_9_14, GPIO_GP_9_15, |
||||
GPIO_GP_9_16, |
||||
|
||||
GPIO_GP_10_0, GPIO_GP_10_1, GPIO_GP_10_2, GPIO_GP_10_3, |
||||
GPIO_GP_10_4, GPIO_GP_10_5, GPIO_GP_10_6, GPIO_GP_10_7, |
||||
GPIO_GP_10_8, GPIO_GP_10_9, GPIO_GP_10_10, GPIO_GP_10_11, |
||||
GPIO_GP_10_12, GPIO_GP_10_13, GPIO_GP_10_14, GPIO_GP_10_15, |
||||
GPIO_GP_10_16, GPIO_GP_10_17, GPIO_GP_10_18, GPIO_GP_10_19, |
||||
GPIO_GP_10_20, GPIO_GP_10_21, GPIO_GP_10_22, GPIO_GP_10_23, |
||||
GPIO_GP_10_24, GPIO_GP_10_25, GPIO_GP_10_26, GPIO_GP_10_27, |
||||
GPIO_GP_10_28, GPIO_GP_10_29, GPIO_GP_10_30, GPIO_GP_10_31, |
||||
|
||||
GPIO_GP_11_0, GPIO_GP_11_1, GPIO_GP_11_2, GPIO_GP_11_3, |
||||
GPIO_GP_11_4, GPIO_GP_11_5, GPIO_GP_11_6, GPIO_GP_11_7, |
||||
GPIO_GP_11_8, GPIO_GP_11_9, GPIO_GP_11_10, GPIO_GP_11_11, |
||||
GPIO_GP_11_12, GPIO_GP_11_13, GPIO_GP_11_14, GPIO_GP_11_15, |
||||
GPIO_GP_11_16, GPIO_GP_11_17, GPIO_GP_11_18, GPIO_GP_11_19, |
||||
GPIO_GP_11_20, GPIO_GP_11_21, GPIO_GP_11_22, GPIO_GP_11_23, |
||||
GPIO_GP_11_24, GPIO_GP_11_25, GPIO_GP_11_26, GPIO_GP_11_27, |
||||
GPIO_GP_11_28, GPIO_GP_11_29, |
||||
|
||||
GPIO_FN_DU1_DB2_C0_DATA12, GPIO_FN_DU1_DB3_C1_DATA13, |
||||
GPIO_FN_DU1_DB4_C2_DATA14, GPIO_FN_DU1_DB5_C3_DATA15, |
||||
GPIO_FN_DU1_DB6_C4, GPIO_FN_DU1_DB7_C5, GPIO_FN_DU1_EXHSYNC_DU1_HSYNC, GPIO_FN_DU1_EXVSYNC_DU1_VSYNC, |
||||
GPIO_FN_DU1_EXODDF_DU1_ODDF_DISP_CDE, GPIO_FN_DU1_DISP, GPIO_FN_DU1_CDE, |
||||
|
||||
GPIO_FN_D0, GPIO_FN_D1, GPIO_FN_D2, GPIO_FN_D3, GPIO_FN_D4, GPIO_FN_D5, |
||||
GPIO_FN_D6, GPIO_FN_D7, GPIO_FN_D8, GPIO_FN_D9, GPIO_FN_D10, GPIO_FN_D11, |
||||
GPIO_FN_D12, GPIO_FN_D13, GPIO_FN_D14, GPIO_FN_D15, GPIO_FN_A0, GPIO_FN_A1, |
||||
GPIO_FN_A2, GPIO_FN_A3, GPIO_FN_A4, GPIO_FN_A5, GPIO_FN_A6, GPIO_FN_A7, |
||||
GPIO_FN_A8, GPIO_FN_A9, GPIO_FN_A10, GPIO_FN_A11, GPIO_FN_A12, GPIO_FN_A13, |
||||
GPIO_FN_A14, GPIO_FN_A15, |
||||
|
||||
GPIO_FN_A16, GPIO_FN_A17, GPIO_FN_A18, GPIO_FN_A19, |
||||
GPIO_FN_CS1_A26, GPIO_FN_EX_CS0, GPIO_FN_EX_CS1, GPIO_FN_EX_CS2, |
||||
GPIO_FN_EX_CS3, GPIO_FN_EX_CS4, GPIO_FN_EX_CS5, GPIO_FN_BS, |
||||
GPIO_FN_RD, GPIO_FN_RD_WR, GPIO_FN_WE0, GPIO_FN_WE1, GPIO_FN_EX_WAIT0, |
||||
GPIO_FN_IRQ0, GPIO_FN_IRQ1, GPIO_FN_IRQ2, GPIO_FN_IRQ3, GPIO_FN_CS0, |
||||
|
||||
GPIO_FN_VI0_CLK, GPIO_FN_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O_FN_RTS1, GPIO_FN_TX1, GPIO_FN_RX1, |
||||
GPIO_FN_SCIF_CLK, GPIO_FN_CAN0_TX, GPIO_FN_CAN0_RX, |
||||
GPIO_FN_CAN_CLK, GPIO_FN_CAN1_TX, GPIO_FN_CAN1_RX, |
||||
|
||||
GPIO_FN_SD0_CLK, GPIO_FN_SD0_CMD, GPIO_FN_SD0_DAT0, |
||||
GPIO_FN_SD0_DAT1, GPIO_FN_SD0_DAT2, GPIO_FN_SD0_DAT3, |
||||
GPIO_FN_SD0_CD, GPIO_FN_SD0_WP, GPIO_FN_ADICLK, |
||||
GPIO_FN_ADICS_SAMP, GPIO_FN_ADIDATA, GPIO_FN_ADICHS0, |
||||
GPIO_FN_ADICHS1, GPIO_FN_ADICHS2, GPIO_FN_AVS1, GPIO_FN_AVS2, |
||||
|
||||
GPIO_FN_DU0_DR0_DATA0, GPIO_FN_DU0_DR1_DATA1, GPIO_FN_DU0_DR2_Y4_DATA2, |
||||
GPIO_FN_DU0_DR3_Y5_DATA3, GPIO_FN_DU0_DR4_Y6_DATA4, GPIO_FN_DU0_DR5_Y7_DATA5, |
||||
GPIO_FN_DU0_DR6_Y8_DATA6, GPIO_FN_DU0_DR7_Y9_DATA7, GPIO_FN_DU0_DG0_DATA8, |
||||
GPIO_FN_DU0_DG1_DATA9, GPIO_FN_DU0_DG2_C6_DATA10, GPIO_FN_DU0_DG3_C7_DATA11, |
||||
GPIO_FN_DU0_DG4_Y0_DATA12, GPIO_FN_DU0_DG5_Y1_DATA13, GPIO_FN_DU0_DG6_Y2_DATA14, |
||||
GPIO_FN_DU0_DG7_Y3_DATA15, GPIO_FN_DU0_DB0, GPIO_FN_DU0_DB1, |
||||
GPIO_FN_DU0_DB2_C0, GPIO_FN_DU0_DB3_C1, GPIO_FN_DU0_DB4_C2, |
||||
GPIO_FN_DU0_DB5_C3, GPIO_FN_DU0_DB6_C4, GPIO_FN_DU0_DB7_C5, |
||||
|
||||
GPIO_FN_DU0_EXHSYNC_DU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_VI1_D22_R6, GPIO_FN_VI5_D8_Y0, GPIO_FN_VI1_D23_R7, |
||||
|
||||
GPIO_FN_MSIOF0_SCK, GPIO_FN_HSCK0, GPIO_FN_MSIOF0_SYNC, GPIO_FN_HCTS0, |
||||
GPIO_FN_MSIOF0_TXD, GPIO_FN_HTX0, GPIO_FN_MSIOF0_RXD, GPIO_FN_HRX0, |
||||
GPIO_FN_MSIOF1_SCK, GPIO_FN_HSCK1, GPIO_FN_MSIOF1_SYNC, GPIO_FN_HRTS1, |
||||
GPIO_FN_MSIOF1_TXD, GPIO_FN_HTX1, GPIO_FN_MSIOF1_RXD, GPIO_FN_HRX1, |
||||
GPIO_FN_DRACK0, GPIO_FN_SCK2, GPIO_FN_DACK0, GPIO_FN_TX2, |
||||
GPIO_FN_DREQ0, GPIO_FN_RX2, GPIO_FN_DACK1, GPIO_FN_SCK3, |
||||
GPIO_FN_TX3, GPIO_FN_DREQ1, GPIO_FN_RX3, |
||||
|
||||
GPIO_FN_PWM0, GPIO_FN_TCLK1, GPIO_FN_FSO_CFE_0, |
||||
GPIO_FN_PWM1, GPIO_FN_TCLK2, GPIO_FN_FSO_CFE_1, |
||||
GPIO_FN_PWM2, GPIO_FN_TCLK3, GPIO_FN_FSO_TOE, |
||||
GPIO_FN_PWM3, GPIO_FN_PWM4, GPIO_FN_SSI_SCK3, GPIO_FN_TPU0TO0, |
||||
GPIO_FN_SSI_WS3, GPIO_FN_TPU0TO1, GPIO_FN_SSI_SDATA3, GPIO_FN_TPU0TO2, |
||||
GPIO_FN_SSI_SCK4, GPIO_FN_TPU0TO3, GPIO_FN_SSI_WS4, |
||||
GPIO_FN_SSI_SDATA4, GPIO_FN_AUDIO_CLKOUT, |
||||
GPIO_FN_AUDIO_CLKA, GPIO_FN_AUDIO_CLKB, |
||||
}; |
||||
|
||||
#endif /* __ASM_R8A7792_GPIO_H__ */ |
@ -0,0 +1,34 @@ |
||||
/*
|
||||
* arch/arm/include/asm/arch-rmobile/r8a7792.h |
||||
* |
||||
* Copyright (C) 2016 Renesas Electronics Corporation |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0 |
||||
*/ |
||||
|
||||
#ifndef __ASM_ARCH_R8A7792_H |
||||
#define __ASM_ARCH_R8A7792_H |
||||
|
||||
#include "rcar-base.h" |
||||
|
||||
/* SH-I2C */ |
||||
#define CONFIG_SYS_I2C_SH_BASE2 0xE6520000 |
||||
#define CONFIG_SYS_I2C_SH_BASE3 0xE60B0000 |
||||
|
||||
/* Module stop control/status register bits */ |
||||
#define MSTP0_BITS 0x00400801 |
||||
#define MSTP1_BITS 0x9B6F987F |
||||
#define MSTP2_BITS 0x108CE100 |
||||
#define MSTP3_BITS 0x20004010 |
||||
#define MSTP4_BITS 0x80000184 |
||||
#define MSTP5_BITS 0x44C00004 |
||||
#define MSTP7_BITS 0x01BF0000 |
||||
#define MSTP8_BITS 0x1FE01FB0 |
||||
#define MSTP9_BITS 0xFE2BFFB2 |
||||
#define MSTP10_BITS 0x00001820 |
||||
#define MSTP11_BITS 0x00000008 |
||||
|
||||
/* SDHI */ |
||||
#define CONFIG_SYS_SH_SDHI_NR_CHANNEL 1 |
||||
|
||||
#endif /* __ASM_ARCH_R8A7792_H */ |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@ |
||||
if TARGET_BLANCHE |
||||
|
||||
config SYS_BOARD |
||||
default "blanche" |
||||
|
||||
config SYS_VENDOR |
||||
default "renesas" |
||||
|
||||
config SYS_CONFIG_NAME |
||||
default "blanche" |
||||
|
||||
endif |
@ -0,0 +1,9 @@ |
||||
#
|
||||
# board/renesas/blanche/Makefile
|
||||
#
|
||||
# Copyright (C) 2016 Renesas Electronics Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
|
||||
obj-y := blanche.o qos.o ../rcar-common/common.o
|
@ -0,0 +1,458 @@ |
||||
/*
|
||||
* board/renesas/blanche/blanche.c |
||||
* This file is blanche board support. |
||||
* |
||||
* Copyright (C) 2016 Renesas Electronics Corporation |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0 |
||||
*/ |
||||
|
||||
#include <common.h> |
||||
#include <malloc.h> |
||||
#include <netdev.h> |
||||
#include <dm.h> |
||||
#include <dm/platform_data/serial_sh.h> |
||||
#include <asm/processor.h> |
||||
#include <asm/mach-types.h> |
||||
#include <asm/io.h> |
||||
#include <asm/errno.h> |
||||
#include <asm/arch/sys_proto.h> |
||||
#include <asm/gpio.h> |
||||
#include <asm/arch/rmobile.h> |
||||
#include <asm/arch/rcar-mstp.h> |
||||
#include <asm/arch/mmc.h> |
||||
#include <asm/arch/sh_sdhi.h> |
||||
#include <miiphy.h> |
||||
#include <i2c.h> |
||||
#include <mmc.h> |
||||
#include "qos.h" |
||||
|
||||
DECLARE_GLOBAL_DATA_PTR; |
||||
|
||||
struct pin_db { |
||||
u32 addr; /* register address */ |
||||
u32 mask; /* mask value */ |
||||
u32 val; /* setting value */ |
||||
}; |
||||
|
||||
#define PMMR 0xE6060000 |
||||
#define GPSR10 0xE606002C |
||||
#define PUPR3 0xE606010C |
||||
#define PUPR10 0xE6060128 |
||||
#define PUPR11 0xE606012C |
||||
|
||||
#define CPG_PLL1CR 0xE6150028 |
||||
#define CPG_PLL3CR 0xE61500DC |
||||
|
||||
#define SetREG(x) \ |
||||
writel((readl((x)->addr) & ~((x)->mask)) | ((x)->val), (x)->addr) |
||||
|
||||
#define SetGuardREG(x) \ |
||||
{ \
|
||||
u32 val; \
|
||||
val = (readl((x)->addr) & ~((x)->mask)) | ((x)->val); \
|
||||
writel(~val, PMMR); \
|
||||
writel(val, (x)->addr); \
|
||||
} |
||||
|
||||
struct pin_db pin_guard[] = { |
||||
{ GPSR10, 0xFFFFFFFF, 0x04006000 }, |
||||
}; |
||||
|
||||
struct pin_db pin_tbl[] = { |
||||
{ PUPR3, 0xFFFFFFFF, 0x0803FF40 }, |
||||
{ PUPR10, 0xFFFFFFFF, 0xC0438001 }, |
||||
{ PUPR11, 0xFFFFFFFF, 0x0FC00007 }, |
||||
}; |
||||
|
||||
void pin_init(void) |
||||
{ |
||||
struct pin_db *db; |
||||
|
||||
for (db = pin_guard; db < &pin_guard[sizeof(pin_guard)/sizeof(struct pin_db)]; db++) { |
||||
SetGuardREG(db); |
||||
} |
||||
for (db = pin_tbl; db < &pin_tbl[sizeof(pin_tbl) /sizeof(struct pin_db)]; db++) { |
||||
SetREG(db); |
||||
} |
||||
} |
||||
|
||||
#define s_init_wait(cnt) \ |
||||
({ \
|
||||
volatile u32 i = 0x10000 * cnt; \
|
||||
while (i > 0) \
|
||||
i--; \
|
||||
}) |
||||
|
||||
void s_init(void) |
||||
{ |
||||
struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE; |
||||
struct rcar_swdt *swdt = (struct rcar_swdt *)SWDT_BASE; |
||||
u32 cpu_type; |
||||
|
||||
cpu_type = rmobile_get_cpu_type(); |
||||
if (cpu_type == 0x4A) { |
||||
writel(0x4D000000, CPG_PLL1CR); |
||||
writel(0x4F000000, CPG_PLL3CR); |
||||
} |
||||
|
||||
/* Watchdog init */ |
||||
writel(0xA5A5A500, &rwdt->rwtcsra); |
||||
writel(0xA5A5A500, &swdt->swtcsra); |
||||
|
||||
/* QoS(Quality-of-Service) Init */ |
||||
qos_init(); |
||||
|
||||
/* SCIF Init */ |
||||
pin_init(); |
||||
|
||||
#if !defined(CONFIG_SYS_NO_FLASH) |
||||
struct rcar_lbsc *lbsc = (struct rcar_lbsc *)LBSC_BASE; |
||||
struct rcar_dbsc3 *dbsc3_0 = (struct rcar_dbsc3 *)DBSC3_0_BASE; |
||||
|
||||
/* LBSC */ |
||||
writel(0x00000020, &lbsc->cs0ctrl); |
||||
writel(0x00000020, &lbsc->cs1ctrl); |
||||
writel(0x00002020, &lbsc->ecs0ctrl); |
||||
writel(0x00002020, &lbsc->ecs1ctrl); |
||||
|
||||
writel(0x2A103320, &lbsc->cswcr0); |
||||
writel(0x2A103320, &lbsc->cswcr1); |
||||
writel(0x19102110, &lbsc->ecswcr0); |
||||
writel(0x19102110, &lbsc->ecswcr1); |
||||
|
||||
/* DBSC3 */ |
||||
s_init_wait(10); |
||||
|
||||
writel(0x0000A55A, &dbsc3_0->dbpdlck); |
||||
|
||||
writel(0x21000000, &dbsc3_0->dbcmd); /* opc=RstH (RESET => H) */ |
||||
writel(0x11000000, &dbsc3_0->dbcmd); /* opc=PDXt(CKE=H) */ |
||||
writel(0x10000000, &dbsc3_0->dbcmd); /* opc=PDEn(CKE=L) */ |
||||
|
||||
/* Stop Auto-Calibration */ |
||||
writel(0x00000001, &dbsc3_0->dbpdrga); |
||||
writel(0x80000000, &dbsc3_0->dbpdrgd); |
||||
|
||||
writel(0x00000004, &dbsc3_0->dbpdrga); |
||||
while ((readl(&dbsc3_0->dbpdrgd) & 0x00000001) != 0x00000001); |
||||
|
||||
/* PLLCR: PLL Control Register */ |
||||
writel(0x00000006, &dbsc3_0->dbpdrga); |
||||
writel(0x0001C000, &dbsc3_0->dbpdrgd); // > DDR1440
|
||||
|
||||
/* DXCCR: DATX8 Common Configuration Register */ |
||||
writel(0x0000000F, &dbsc3_0->dbpdrga); |
||||
writel(0x00181EE4, &dbsc3_0->dbpdrgd); |
||||
|
||||
/* DSGCR :DDR System General Configuration Register */ |
||||
writel(0x00000010, &dbsc3_0->dbpdrga); |
||||
writel(0xF00464DB, &dbsc3_0->dbpdrgd); |
||||
|
||||
writel(0x00000061, &dbsc3_0->dbpdrga); |
||||
writel(0x0000008D, &dbsc3_0->dbpdrgd); |
||||
|
||||
/* Re-Execute ZQ calibration */ |
||||
writel(0x00000001, &dbsc3_0->dbpdrga); |
||||
writel(0x00000073, &dbsc3_0->dbpdrgd); |
||||
|
||||
writel(0x00000007, &dbsc3_0->dbkind); |
||||
writel(0x0F030A02, &dbsc3_0->dbconf0); |
||||
writel(0x00000001, &dbsc3_0->dbphytype); |
||||
writel(0x00000000, &dbsc3_0->dbbl); |
||||
|
||||
writel(0x0000000B, &dbsc3_0->dbtr0); // tCL=11
|
||||
writel(0x00000008, &dbsc3_0->dbtr1); // tCWL=8
|
||||
writel(0x00000000, &dbsc3_0->dbtr2); // tAL=0
|
||||
writel(0x0000000B, &dbsc3_0->dbtr3); // tRCD=11
|
||||
writel(0x000C000B, &dbsc3_0->dbtr4); // tRPA=12,tRP=11
|
||||
writel(0x00000027, &dbsc3_0->dbtr5); // tRC = 39
|
||||
writel(0x0000001C, &dbsc3_0->dbtr6); // tRAS = 28
|
||||
writel(0x00000006, &dbsc3_0->dbtr7); // tRRD = 6
|
||||
writel(0x00000020, &dbsc3_0->dbtr8); // tRFAW = 32
|
||||
writel(0x00000008, &dbsc3_0->dbtr9); // tRDPR = 8
|
||||
writel(0x0000000C, &dbsc3_0->dbtr10); // tWR = 12
|
||||
writel(0x00000009, &dbsc3_0->dbtr11); // tRDWR = 9
|
||||
writel(0x00000012, &dbsc3_0->dbtr12); // tWRRD = 18
|
||||
writel(0x000000D0, &dbsc3_0->dbtr13); // tRFC = 208
|
||||
writel(0x00140005, &dbsc3_0->dbtr14); |
||||
writel(0x00050004, &dbsc3_0->dbtr15); |
||||
writel(0x70233005, &dbsc3_0->dbtr16); /* DQL = 35, WDQL = 5 */ |
||||
writel(0x000C0000, &dbsc3_0->dbtr17); |
||||
writel(0x00000300, &dbsc3_0->dbtr18); |
||||
writel(0x00000040, &dbsc3_0->dbtr19); |
||||
writel(0x00000001, &dbsc3_0->dbrnk0); |
||||
writel(0x00020001, &dbsc3_0->dbadj0); |
||||
writel(0x20082004, &dbsc3_0->dbadj2); /* blanche QoS rev0.1 */ |
||||
writel(0x00020002, &dbsc3_0->dbwt0cnf0); /* 1600 */ |
||||
writel(0x0000001F, &dbsc3_0->dbwt0cnf4); |
||||
|
||||
while ((readl(&dbsc3_0->dbdfistat) & 0x00000001) != 0x00000001); |
||||
writel(0x00000011, &dbsc3_0->dbdficnt); |
||||
|
||||
/* PGCR1 :PHY General Configuration Register 1 */ |
||||
writel(0x00000003, &dbsc3_0->dbpdrga); |
||||
writel(0x0300C4E1, &dbsc3_0->dbpdrgd); /* DDR3 */ |
||||
|
||||
/* PGCR2: PHY General Configuration Registers 2 */ |
||||
writel(0x00000023, &dbsc3_0->dbpdrga); |
||||
writel(0x00FCDB60, &dbsc3_0->dbpdrgd); |
||||
|
||||
writel(0x00000011, &dbsc3_0->dbpdrga); |
||||
writel(0x1000040B, &dbsc3_0->dbpdrgd); |
||||
|
||||
/* DTPR0 :DRAM Timing Parameters Register 0 */ |
||||
writel(0x00000012, &dbsc3_0->dbpdrga); |
||||
writel(0x9D9CBB66, &dbsc3_0->dbpdrgd); |
||||
|
||||
/* DTPR1 :DRAM Timing Parameters Register 1 */ |
||||
writel(0x00000013, &dbsc3_0->dbpdrga); |
||||
writel(0x1A868400, &dbsc3_0->dbpdrgd); |
||||
|
||||
/* DTPR2 ::DRAM Timing Parameters Register 2 */ |
||||
writel(0x00000014, &dbsc3_0->dbpdrga); |
||||
writel(0x300214D8, &dbsc3_0->dbpdrgd); |
||||
|
||||
/* MR0 :Mode Register 0 */ |
||||
writel(0x00000015, &dbsc3_0->dbpdrga); |
||||
writel(0x00000D70, &dbsc3_0->dbpdrgd); |
||||
|
||||
/* MR1 :Mode Register 1 */ |
||||
writel(0x00000016, &dbsc3_0->dbpdrga); |
||||
writel(0x00000004, &dbsc3_0->dbpdrgd); /* DRAM Drv 40ohm */ |
||||
|
||||
/* MR2 :Mode Register 2 */ |
||||
writel(0x00000017, &dbsc3_0->dbpdrga); |
||||
writel(0x00000018, &dbsc3_0->dbpdrgd); /* CWL=8 */ |
||||
|
||||
/* VREF(ZQCAL) */ |
||||
writel(0x0000001A, &dbsc3_0->dbpdrga); |
||||
writel(0x910035C7, &dbsc3_0->dbpdrgd); |
||||
|
||||
/* PGSR0 :PHY General Status Registers 0 */ |
||||
writel(0x00000004, &dbsc3_0->dbpdrga); |
||||
while ((readl(&dbsc3_0->dbpdrgd) & 0x00000001) != 0x00000001); |
||||
|
||||
/* DRAM Init (set MRx etc) */ |
||||
writel(0x00000001, &dbsc3_0->dbpdrga); |
||||
writel(0x00000181, &dbsc3_0->dbpdrgd); |
||||
|
||||
/* CKE = H */ |
||||
writel(0x11000000, &dbsc3_0->dbcmd); /* opc=PDXt(CKE=H) */ |
||||
|
||||
/* PGSR0 :PHY General Status Registers 0 */ |
||||
writel(0x00000004, &dbsc3_0->dbpdrga); |
||||
while ((readl(&dbsc3_0->dbpdrgd) & 0x00000001) != 0x00000001); |
||||
|
||||
/* RAM ACC Training */ |
||||
writel(0x00000001, &dbsc3_0->dbpdrga); |
||||
writel(0x0000FE01, &dbsc3_0->dbpdrgd); |
||||
|
||||
/* Bus control 0 */ |
||||
writel(0x00000000, &dbsc3_0->dbbs0cnt1); |
||||
/* DDR3 Calibration set */ |
||||
writel(0x01004C20, &dbsc3_0->dbcalcnf); |
||||
/* DDR3 Calibration timing */ |
||||
writel(0x014000AA, &dbsc3_0->dbcaltr); |
||||
/* Refresh */ |
||||
writel(0x00000140, &dbsc3_0->dbrfcnf0); |
||||
writel(0x00081860, &dbsc3_0->dbrfcnf1); |
||||
writel(0x00010000, &dbsc3_0->dbrfcnf2); |
||||
|
||||
/* PGSR0 :PHY General Status Registers 0 */ |
||||
writel(0x00000004, &dbsc3_0->dbpdrga); |
||||
while ((readl(&dbsc3_0->dbpdrgd) & 0x00000001) != 0x00000001); |
||||
|
||||
/* Enable Auto-Refresh */ |
||||
writel(0x00000001, &dbsc3_0->dbrfen); |
||||
/* Permit DDR-Access */ |
||||
writel(0x00000001, &dbsc3_0->dbacen); |
||||
|
||||
/* This locks the access to the PHY unit registers */ |
||||
writel(0x00000000, &dbsc3_0->dbpdlck); |
||||
#endif /* CONFIG_SYS_NO_FLASH */ |
||||
|
||||
} |
||||
|
||||
#define TMU0_MSTP125 (1 << 25) |
||||
#define SCIF0_MSTP721 (1 << 21) |
||||
#define SDHI0_MSTP314 (1 << 14) |
||||
#define QSPI_MSTP917 (1 << 17) |
||||
|
||||
int board_early_init_f(void) |
||||
{ |
||||
/* TMU0 */ |
||||
mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125); |
||||
/* SCIF0 */ |
||||
mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF0_MSTP721); |
||||
/* SDHI0 */ |
||||
mstp_clrbits_le32(MSTPSR3, SMSTPCR3, SDHI0_MSTP314); |
||||
/* QSPI */ |
||||
mstp_clrbits_le32(MSTPSR9, SMSTPCR9, QSPI_MSTP917); |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
DECLARE_GLOBAL_DATA_PTR; |
||||
int board_init(void) |
||||
{ |
||||
/* adress of boot parameters */ |
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; |
||||
|
||||
/* Init PFC controller */ |
||||
r8a7792_pinmux_init(); |
||||
|
||||
gpio_request(GPIO_FN_D0, NULL); |
||||
gpio_request(GPIO_FN_D1, NULL); |
||||
gpio_request(GPIO_FN_D2, NULL); |
||||
gpio_request(GPIO_FN_D3, NULL); |
||||
gpio_request(GPIO_FN_D4, NULL); |
||||
gpio_request(GPIO_FN_D5, NULL); |
||||
gpio_request(GPIO_FN_D6, NULL); |
||||
gpio_request(GPIO_FN_D7, NULL); |
||||
gpio_request(GPIO_FN_D8, NULL); |
||||
gpio_request(GPIO_FN_D9, NULL); |
||||
gpio_request(GPIO_FN_D10, NULL); |
||||
gpio_request(GPIO_FN_D11, NULL); |
||||
gpio_request(GPIO_FN_D12, NULL); |
||||
gpio_request(GPIO_FN_D13, NULL); |
||||
gpio_request(GPIO_FN_D14, NULL); |
||||
gpio_request(GPIO_FN_D15, NULL); |
||||
gpio_request(GPIO_FN_A0, NULL); |
||||
gpio_request(GPIO_FN_A1, NULL); |
||||
gpio_request(GPIO_FN_A2, NULL); |
||||
gpio_request(GPIO_FN_A3, NULL); |
||||
gpio_request(GPIO_FN_A4, NULL); |
||||
gpio_request(GPIO_FN_A5, NULL); |
||||
gpio_request(GPIO_FN_A6, NULL); |
||||
gpio_request(GPIO_FN_A7, NULL); |
||||
gpio_request(GPIO_FN_A8, NULL); |
||||
gpio_request(GPIO_FN_A9, NULL); |
||||
gpio_request(GPIO_FN_A10, NULL); |
||||
gpio_request(GPIO_FN_A11, NULL); |
||||
gpio_request(GPIO_FN_A12, NULL); |
||||
gpio_request(GPIO_FN_A13, NULL); |
||||
gpio_request(GPIO_FN_A14, NULL); |
||||
gpio_request(GPIO_FN_A15, NULL); |
||||
gpio_request(GPIO_FN_A16, NULL); |
||||
gpio_request(GPIO_FN_A17, NULL); |
||||
gpio_request(GPIO_FN_A18, NULL); |
||||
gpio_request(GPIO_FN_A19, NULL); |
||||
#if defined(CONFIG_SYS_NO_FLASH) |
||||
gpio_request(GPIO_FN_MOSI_IO0, NULL); |
||||
gpio_request(GPIO_FN_MISO_IO1, NULL); |
||||
gpio_request(GPIO_FN_IO2, NULL); |
||||
gpio_request(GPIO_FN_IO3, NULL); |
||||
gpio_request(GPIO_FN_SPCLK, NULL); |
||||
gpio_request(GPIO_FN_SSL, NULL); |
||||
#else /* CONFIG_SYS_NO_FLASH */ |
||||
gpio_request(GPIO_FN_A20, NULL); |
||||
gpio_request(GPIO_FN_A21, NULL); |
||||
gpio_request(GPIO_FN_A22, NULL); |
||||
gpio_request(GPIO_FN_A23, NULL); |
||||
gpio_request(GPIO_FN_A24, NULL); |
||||
gpio_request(GPIO_FN_A25, NULL); |
||||
#endif /* CONFIG_SYS_NO_FLASH */ |
||||
|
||||
gpio_request(GPIO_FN_CS1_A26, NULL); |
||||
gpio_request(GPIO_FN_EX_CS0, NULL); |
||||
gpio_request(GPIO_FN_EX_CS1, NULL); |
||||
gpio_request(GPIO_FN_BS, NULL); |
||||
gpio_request(GPIO_FN_RD, NULL); |
||||
gpio_request(GPIO_FN_WE0, NULL); |
||||
gpio_request(GPIO_FN_WE1, NULL); |
||||
gpio_request(GPIO_FN_EX_WAIT0, NULL); |
||||
gpio_request(GPIO_FN_IRQ0, NULL); |
||||
gpio_request(GPIO_FN_IRQ2, NULL); |
||||
gpio_request(GPIO_FN_IRQ3, NULL); |
||||
gpio_request(GPIO_FN_CS0, NULL); |
||||
|
||||
/* Init timer */ |
||||
timer_init(); |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
/*
|
||||
Added for BLANCHE(R-CarV2H board) |
||||
*/ |
||||
int board_eth_init(bd_t *bis) |
||||
{ |
||||
int rc = 0; |
||||
|
||||
#ifdef CONFIG_SMC911X |
||||
#define STR_ENV_ETHADDR "ethaddr" |
||||
|
||||
struct eth_device *dev; |
||||
uchar eth_addr[6]; |
||||
|
||||
rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); |
||||
|
||||
if (!eth_getenv_enetaddr(STR_ENV_ETHADDR, eth_addr)) { |
||||
dev = eth_get_dev_by_index(0); |
||||
if (dev) { |
||||
eth_setenv_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); |
||||
} else { |
||||
printf("blanche: Couldn't get eth device\n"); |
||||
rc = -1; |
||||
} |
||||
} |
||||
|
||||
#endif |
||||
|
||||
return rc; |
||||
} |
||||
|
||||
int board_mmc_init(bd_t *bis) |
||||
{ |
||||
int ret = -ENODEV; |
||||
|
||||
#ifdef CONFIG_SH_SDHI |
||||
gpio_request(GPIO_FN_SD0_DAT0, NULL); |
||||
gpio_request(GPIO_FN_SD0_DAT1, NULL); |
||||
gpio_request(GPIO_FN_SD0_DAT2, NULL); |
||||
gpio_request(GPIO_FN_SD0_DAT3, NULL); |
||||
gpio_request(GPIO_FN_SD0_CLK, NULL); |
||||
gpio_request(GPIO_FN_SD0_CMD, NULL); |
||||
gpio_request(GPIO_FN_SD0_CD, NULL); |
||||
|
||||
gpio_request(GPIO_GP_11_12, NULL); |
||||
gpio_direction_output(GPIO_GP_11_12, 1); /* power on */ |
||||
|
||||
|
||||
ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI0_BASE, 0, |
||||
SH_SDHI_QUIRK_16BIT_BUF); |
||||
|
||||
if (ret) |
||||
return ret; |
||||
#endif |
||||
return ret; |
||||
} |
||||
|
||||
int dram_init(void) |
||||
{ |
||||
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; |
||||
gd->ram_size = CONFIG_SYS_SDRAM_SIZE; |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
const struct rmobile_sysinfo sysinfo = { |
||||
CONFIG_RMOBILE_BOARD_STRING |
||||
}; |
||||
|
||||
void reset_cpu(ulong addr) |
||||
{ |
||||
} |
||||
|
||||
static const struct sh_serial_platdata serial_platdata = { |
||||
.base = SCIF0_BASE, |
||||
.type = PORT_SCIF, |
||||
.clk = 14745600, |
||||
.clk_mode = EXT_CLK, |
||||
}; |
||||
|
||||
U_BOOT_DEVICE(blanche_serials) = { |
||||
.name = "serial_sh", |
||||
.platdata = &serial_platdata, |
||||
}; |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@ |
||||
/*
|
||||
* Copyright (C) 2016 Renesas Electronics Corporation |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0 |
||||
*/ |
||||
|
||||
#ifndef __QOS_H__ |
||||
#define __QOS_H__ |
||||
|
||||
void qos_init(void); |
||||
|
||||
#endif |
@ -0,0 +1,22 @@ |
||||
CONFIG_ARM=y |
||||
CONFIG_RMOBILE=y |
||||
CONFIG_TARGET_BLANCHE=y |
||||
# CONFIG_CMD_BDI is not set |
||||
# CONFIG_CMD_CONSOLE is not set |
||||
# CONFIG_CMD_BOOTD is not set |
||||
# CONFIG_CMD_IMI is not set |
||||
# CONFIG_CMD_IMLS is not set |
||||
# CONFIG_CMD_XIMG is not set |
||||
# CONFIG_CMD_ENV_EXISTS is not set |
||||
# CONFIG_CMD_LOADB is not set |
||||
# CONFIG_CMD_FLASH is not set |
||||
# CONFIG_CMD_FPGA is not set |
||||
# CONFIG_CMD_ECHO is not set |
||||
# CONFIG_CMD_ITEST is not set |
||||
# CONFIG_CMD_SOURCE is not set |
||||
# CONFIG_CMD_SETEXPR is not set |
||||
# CONFIG_CMD_MISC is not set |
||||
CONFIG_SH_SDHI=y |
||||
CONFIG_SPI_FLASH=y |
||||
CONFIG_SPI_FLASH_BAR=y |
||||
CONFIG_SPI_FLASH_SPANSION=y |
@ -0,0 +1,124 @@ |
||||
/*
|
||||
* include/configs/blanche.h |
||||
* This file is blanche board configuration. |
||||
* |
||||
* Copyright (C) 2016 Renesas Electronics Corporation |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0 |
||||
*/ |
||||
|
||||
#ifndef __BLANCHE_H |
||||
#define __BLANCHE_H |
||||
|
||||
#undef DEBUG |
||||
#define CONFIG_R8A7792 |
||||
#define CONFIG_RMOBILE_BOARD_STRING "Blanche" |
||||
|
||||
#include "rcar-gen2-common.h" |
||||
|
||||
#define CONFIG_USE_ARCH_MEMSET |
||||
#define CONFIG_USE_ARCH_MEMCPY |
||||
|
||||
/* STACK */ |
||||
#define CONFIG_SYS_INIT_SP_ADDR 0xE817FFFC |
||||
#define STACK_AREA_SIZE 0xC000 |
||||
#define LOW_LEVEL_MERAM_STACK \ |
||||
(CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4) |
||||
|
||||
/* MEMORY */ |
||||
#define RCAR_GEN2_SDRAM_BASE 0x40000000 |
||||
#define RCAR_GEN2_SDRAM_SIZE (1024u * 1024 * 1024) |
||||
#define RCAR_GEN2_UBOOT_SDRAM_SIZE (512 * 1024 * 1024) |
||||
|
||||
/* SCIF */ |
||||
#define CONFIG_SCIF_CONSOLE |
||||
#define CONFIG_CONS_SCIF0 |
||||
|
||||
#define CONFIG_SYS_MEMTEST_START (RCAR_GEN2_SDRAM_BASE) |
||||
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 504 * 1024 * 1024) |
||||
|
||||
#undef CONFIG_SYS_ALT_MEMTEST |
||||
#undef CONFIG_SYS_MEMTEST_SCRATCH |
||||
#undef CONFIG_SYS_LOADS_BAUD_CHANGE |
||||
|
||||
/* FLASH */ |
||||
/* #define CONFIG_SYS_NO_FLASH */ /* uncomment if use QSPI-FLASH */ |
||||
#if defined(CONFIG_SYS_NO_FLASH) |
||||
#define CONFIG_SYS_TEXT_BASE 0x40000000 |
||||
#define CONFIG_SPI |
||||
#define CONFIG_SH_QSPI |
||||
#define CONFIG_SH_QSPI_BASE 0xE6B10000 |
||||
#else |
||||
#define CONFIG_SYS_TEXT_BASE 0x00000000 |
||||
#define CONFIG_SYS_FLASH_CFI |
||||
#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT |
||||
#define CONFIG_FLASH_CFI_DRIVER |
||||
#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS |
||||
#define CONFIG_FLASH_SHOW_PROGRESS 45 |
||||
#define CONFIG_SYS_FLASH_BASE 0x00000000 |
||||
#define CONFIG_SYS_FLASH_SIZE 0x04000000 /* 64 MB */ |
||||
#define CONFIG_SYS_MAX_FLASH_SECT 1024 |
||||
#define CONFIG_SYS_MAX_FLASH_BANKS 1 |
||||
#define CONFIG_SYS_FLASH_BANKS_LIST { (CONFIG_SYS_FLASH_BASE) } |
||||
#define CONFIG_SYS_FLASH_BANKS_SIZES { (CONFIG_SYS_FLASH_SIZE) } |
||||
|
||||
#define CONFIG_SYS_FLASH_ERASE_TOUT 3000 |
||||
#define CONFIG_SYS_FLASH_WRITE_TOUT 3000 |
||||
#define CONFIG_SYS_FLASH_LOCK_TOUT 3000 |
||||
#define CONFIG_SYS_FLASH_UNLOCK_TOUT 3000 |
||||
#define CONFIG_CMD_FLASH |
||||
#undef CONFIG_CMD_SF |
||||
#undef CONFIG_CMD_SPI |
||||
#endif |
||||
|
||||
/* BLANCHE on board LANC: SMC89218 (ExCS0) */ |
||||
#define CONFIG_NET_MULTI |
||||
#define CONFIG_SMC911X 1 |
||||
#define CONFIG_SMC911X_16_BIT 1 |
||||
#define CONFIG_SMC911X_BASE 0x18000000 |
||||
|
||||
/* Board Clock */ |
||||
#define RMOBILE_XTAL_CLK 20000000u |
||||
#define CONFIG_SYS_CLK_FREQ RMOBILE_XTAL_CLK |
||||
#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2) /* EXT / 2 */ |
||||
#define CONFIG_SYS_TMU_CLK_DIV 4 |
||||
|
||||
/* ENV setting */ |
||||
#if defined(CONFIG_SYS_NO_FLASH) |
||||
#else |
||||
#undef CONFIG_ENV_IS_IN_SPI_FLASH |
||||
#undef CONFIG_ENV_ADDR |
||||
#define CONFIG_ENV_IS_IN_FLASH |
||||
#define CONFIG_ENV_SECT_SIZE (256 * 1024) |
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) |
||||
#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR) |
||||
#define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE) |
||||
#define CONFIG_ENV_SIZE_REDUND (CONFIG_SYS_MONITOR_LEN) |
||||
#endif |
||||
|
||||
/* USB */ |
||||
#undef CONFIG_CMD_USB |
||||
|
||||
/* MMC */ |
||||
#define CONFIG_MMC |
||||
#define CONFIG_CMD_MMC |
||||
#define CONFIG_GENERIC_MMC |
||||
|
||||
/* Module stop status bits */ |
||||
/* INTC-RT */ |
||||
#define CONFIG_SMSTP0_ENA 0x00400000 |
||||
/* SDHI0 */ |
||||
#define CONFIG_SMSTP3_ENA 0x00004000 |
||||
/* INTC-SYS, IRQC */ |
||||
#define CONFIG_SMSTP4_ENA 0x00000180 |
||||
/* SCIF0 */ |
||||
#define CONFIG_SMSTP7_ENA 0x00200000 |
||||
/* QSPI */ |
||||
#define CONFIG_SMSTP9_ENA 0x00020000 |
||||
/* SYS-DMAC0 */ |
||||
#define CONFIG_RMSTP2_ENA 0x00080000 |
||||
|
||||
/* SDHI */ |
||||
#define CONFIG_SH_SDHI_FREQ 97500000 |
||||
|
||||
#endif /* __BLANCHE_H */ |
Loading…
Reference in new issue