From 43c8352e3e6b5142c9295d4934e2fd657ff6be39 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 13 May 2017 15:57:34 +0200 Subject: ARM: rmobile: Update link address to match latest BL2 Update the CONFIG_SYS_TEXT_BASE to match BL2 Rev.1.0.9 and newer, which loads the U-Boot to 0x50000000 . Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- include/configs/rcar-gen3-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h index 056aea3fdb0..c87d31950fd 100644 --- a/include/configs/rcar-gen3-common.h +++ b/include/configs/rcar-gen3-common.h @@ -52,7 +52,7 @@ #define CONFIG_SYS_BAUDRATE_TABLE { 115200, 38400 } /* MEMORY */ -#define CONFIG_SYS_TEXT_BASE 0x49000000 +#define CONFIG_SYS_TEXT_BASE 0x50000000 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0x7fff0) #define CONFIG_SYS_SDRAM_BASE (0x48000000) -- cgit v1.2.3 From 2dea3b3e7b281f6b3b9fde318749212e02b3e0a2 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 13 May 2017 15:57:39 +0200 Subject: ARM: rmobile: Add R8A7796 support Add Kconfig entry for the R8A7796 RCar M3 SoC. Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- include/configs/rcar-gen3-common.h | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h index c87d31950fd..304478af073 100644 --- a/include/configs/rcar-gen3-common.h +++ b/include/configs/rcar-gen3-common.h @@ -2,7 +2,7 @@ * include/configs/rcar-gen3-common.h * This file is R-Car Gen3 common configuration file. * - * Copyright (C) 2015 Renesas Electronics Corporation + * Copyright (C) 2015-2017 Renesas Electronics Corporation * * SPDX-License-Identifier: GPL-2.0+ */ @@ -55,10 +55,31 @@ #define CONFIG_SYS_TEXT_BASE 0x50000000 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0x7fff0) -#define CONFIG_SYS_SDRAM_BASE (0x48000000) -#define CONFIG_SYS_SDRAM_SIZE (1024u * 1024 * 1024 - 0x08000000) -#define CONFIG_SYS_LOAD_ADDR (0x48080000) -#define CONFIG_NR_DRAM_BANKS 1 +#define DRAM_RSV_SIZE 0x08000000 +#if defined(CONFIG_R8A7795) +#define CONFIG_NR_DRAM_BANKS 4 +#define PHYS_SDRAM_1 (0x40000000 + DRAM_RSV_SIZE) +#define PHYS_SDRAM_1_SIZE (0x40000000u - DRAM_RSV_SIZE) +#define PHYS_SDRAM_2 0x500000000 +#define PHYS_SDRAM_2_SIZE 0x40000000u +#define PHYS_SDRAM_3 0x600000000 +#define PHYS_SDRAM_3_SIZE 0x40000000u +#define PHYS_SDRAM_4 0x700000000 +#define PHYS_SDRAM_4_SIZE 0x40000000u +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_SDRAM_SIZE PHYS_SDRAM_1_SIZE +#elif defined(CONFIG_R8A7796) +#define CONFIG_NR_DRAM_BANKS 2 +#define PHYS_SDRAM_1 (0x40000000 + DRAM_RSV_SIZE) +#define PHYS_SDRAM_1_SIZE (0x80000000u - DRAM_RSV_SIZE) +#define PHYS_SDRAM_2 0x0600000000 +#define PHYS_SDRAM_2_SIZE 0x80000000u +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_SDRAM_SIZE PHYS_SDRAM_1_SIZE +#endif +#define CONFIG_SYS_LOAD_ADDR 0x48080000 +#define CONFIG_VERY_BIG_RAM +#define CONFIG_MAX_MEM_MAPPED CONFIG_SYS_SDRAM_SIZE #define CONFIG_SYS_MONITOR_BASE 0x00000000 #define CONFIG_SYS_MONITOR_LEN (256 * 1024) -- cgit v1.2.3 From c94cb71d95d1a152d27685bc95897999ea17278d Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 13 May 2017 15:57:42 +0200 Subject: ARM: rmobile: salvator-x: Move OF_LIBFDT and CMD_FDT to board config Move these two Kconfig symbols to the salvator-x_defconfig. Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- include/configs/rcar-gen3-common.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h index 304478af073..6bc8ab18b6c 100644 --- a/include/configs/rcar-gen3-common.h +++ b/include/configs/rcar-gen3-common.h @@ -17,7 +17,6 @@ #define CONFIG_CMD_EXT2 #define CONFIG_CMD_EXT4 #define CONFIG_CMD_EXT4_WRITE -#define CONFIG_CMD_FDT #define CONFIG_REMAKE_ELF @@ -34,7 +33,6 @@ #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG #define CONFIG_CMDLINE_EDITING -#define CONFIG_OF_LIBFDT #undef CONFIG_SHOW_BOOT_PROGRESS -- cgit v1.2.3 From f7fda5d1c05e6c86cf60cbd16b7258be56477dfc Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 13 May 2017 15:57:43 +0200 Subject: ARM: rmobile: salvator-x: Set default device tree Set default device tree file in the salvator-x_defconfig and use it in the environment. Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- include/configs/rcar-gen3-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h index 6bc8ab18b6c..e73bc618563 100644 --- a/include/configs/rcar-gen3-common.h +++ b/include/configs/rcar-gen3-common.h @@ -100,7 +100,7 @@ #define CONFIG_BOOTCOMMAND \ "tftp 0x48080000 Image; " \ - "tftp 0x48000000 Image-r8a7795-salvator-x.dtb; " \ + "tftp 0x48000000 Image-"CONFIG_DEFAULT_FDT_FILE"; " \ "booti 0x48080000 - 0x48000000" #endif /* __RCAR_GEN3_COMMON_H */ -- cgit v1.2.3 From 8474681c3eb37f65c08eb9080cef817c38ee60c4 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 13 May 2017 15:57:45 +0200 Subject: ARM: rmobile: salvator-x: Adjust UART clock The UART uses internal SCIF clock except on R8A7795 H3 WS1.0 . Use the internal clock and ignore the early version of the chip. Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- include/configs/salvator-x.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/salvator-x.h b/include/configs/salvator-x.h index 81a7226d62d..94f62a7358c 100644 --- a/include/configs/salvator-x.h +++ b/include/configs/salvator-x.h @@ -20,7 +20,7 @@ #define CONFIG_SCIF_CONSOLE #define CONFIG_CONS_SCIF2 #define CONFIG_CONS_INDEX 2 -#define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ +#define CONFIG_SH_SCIF_CLK_FREQ CONFIG_S3D4_CLK_FREQ /* [A] Hyper Flash */ /* use to RPC(SPI Multi I/O Bus Controller) */ @@ -31,10 +31,11 @@ #define RCAR_XTAL_CLK 33333333u #define CONFIG_SYS_CLK_FREQ RCAR_XTAL_CLK /* ch0to2 CPclk, ch3to11 S3D2_PEREclk, ch12to14 S3D2_RTclk */ -/* CPclk 16.66MHz, S3D2 133.33MHz */ +/* CPclk 16.66MHz, S3D2 133.33MHz , S3D4 66.66MHz */ #define CONFIG_CP_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2) #define CONFIG_PLL1_CLK_FREQ (CONFIG_SYS_CLK_FREQ * 192 / 2) #define CONFIG_S3D2_CLK_FREQ (266666666u/2) +#define CONFIG_S3D4_CLK_FREQ (266666666u/4) /* Generic Timer Definitions (use in assembler source) */ #define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ -- cgit v1.2.3 From 50fb0c451f8219d26612451933c7905457459bc4 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 13 May 2017 15:57:46 +0200 Subject: ARM: rmobile: salvator-x: Add SD support Add support for the SD card slots on the Salvator-X board. Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- include/configs/salvator-x.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/salvator-x.h b/include/configs/salvator-x.h index 94f62a7358c..91307eb3536 100644 --- a/include/configs/salvator-x.h +++ b/include/configs/salvator-x.h @@ -24,7 +24,6 @@ /* [A] Hyper Flash */ /* use to RPC(SPI Multi I/O Bus Controller) */ -#define CONFIG_ENV_IS_NOWHERE /* Board Clock */ /* XTAL_CLK : 33.33MHz */ @@ -45,6 +44,15 @@ #define GICD_BASE 0xF1010000 #define GICC_BASE 0xF1020000 +/* SDHI */ +#define CONFIG_SH_SDHI_FREQ 200000000 + +/* Environment in eMMC, at the end of 2nd "boot sector" */ +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE) +#define CONFIG_SYS_MMC_ENV_DEV 1 +#define CONFIG_SYS_MMC_ENV_PART 2 + /* Module stop status bits */ /* MFIS, SCIF1 */ #define CONFIG_SMSTP2_ENA 0x00002040 -- cgit v1.2.3 From 90e53f8b455e762c04cb154a381c8f1513af847f Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 13 May 2017 15:57:47 +0200 Subject: ARM: rmobile: salvator-x: Add RAVB ethernet support Add support for the AVB ethernet on the Salvator-X board. Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- include/configs/salvator-x.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/configs/salvator-x.h b/include/configs/salvator-x.h index 91307eb3536..b5a98d6db2b 100644 --- a/include/configs/salvator-x.h +++ b/include/configs/salvator-x.h @@ -25,6 +25,12 @@ /* [A] Hyper Flash */ /* use to RPC(SPI Multi I/O Bus Controller) */ +/* Ethernet RAVB */ +#define CONFIG_NET_MULTI +#define CONFIG_PHY_MICREL +#define CONFIG_BITBANGMII +#define CONFIG_BITBANGMII_MULTI + /* Board Clock */ /* XTAL_CLK : 33.33MHz */ #define RCAR_XTAL_CLK 33333333u -- cgit v1.2.3 From fe2e8ff955ad18a7f7f26d3d56ebaa96167139b6 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 13 May 2017 15:57:48 +0200 Subject: ARM: rmobile: salvator-x: Add DVFS and PMIC support Add support for rebooting the board using the ROHM BD9571MWV I2C PMIC, but keep the CPU reboot option as a fallback. Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- include/configs/salvator-x.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/configs/salvator-x.h b/include/configs/salvator-x.h index b5a98d6db2b..0e5c130b13a 100644 --- a/include/configs/salvator-x.h +++ b/include/configs/salvator-x.h @@ -50,6 +50,18 @@ #define GICD_BASE 0xF1010000 #define GICC_BASE 0xF1020000 +/* i2c */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SH +#define CONFIG_SYS_I2C_SLAVE 0x60 +#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 1 +#define CONFIG_SYS_I2C_SH_SPEED0 400000 +#define CONFIG_SH_I2C_DATA_HIGH 4 +#define CONFIG_SH_I2C_DATA_LOW 5 +#define CONFIG_SH_I2C_CLOCK 10000000 + +#define CONFIG_SYS_I2C_POWERIC_ADDR 0x30 + /* SDHI */ #define CONFIG_SH_SDHI_FREQ 200000000 -- cgit v1.2.3 From d1018f5f9f6433a0ba5da64a431c4e6fa6299962 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 13 May 2017 15:57:49 +0200 Subject: ARM: rmobile: salvator-x: Add USB support Add support for the EHCI USB. Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- include/configs/salvator-x.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/configs/salvator-x.h b/include/configs/salvator-x.h index 0e5c130b13a..4ac9328e1b9 100644 --- a/include/configs/salvator-x.h +++ b/include/configs/salvator-x.h @@ -62,6 +62,13 @@ #define CONFIG_SYS_I2C_POWERIC_ADDR 0x30 +/* USB */ +#ifdef CONFIG_R8A7795 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 3 +#else +#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#endif + /* SDHI */ #define CONFIG_SH_SDHI_FREQ 200000000 -- cgit v1.2.3 From 4c443bdbf60d221786b6827d92df33a47b9cd5fb Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 13 May 2017 15:57:51 +0200 Subject: ARM: rmobile: salvator-x: Enable SCIF2 clock There are two UARTs on the board, so enable the clock for the second one as well. Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- include/configs/salvator-x.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/configs/salvator-x.h b/include/configs/salvator-x.h index 4ac9328e1b9..0ac39003266 100644 --- a/include/configs/salvator-x.h +++ b/include/configs/salvator-x.h @@ -81,6 +81,8 @@ /* Module stop status bits */ /* MFIS, SCIF1 */ #define CONFIG_SMSTP2_ENA 0x00002040 +/* SCIF2 */ +#define CONFIG_SMSTP3_ENA 0x00000400 /* INTC-AP, IRQC */ #define CONFIG_SMSTP4_ENA 0x00000180 -- cgit v1.2.3