Skip to contentSkip to conversation

net: sh_eth: Add R8A77980 V3H gether support

PATCH New Marek Vasut 1 participant 7 messages Aug 9, 2019

Subsystems (8)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/7 net: sh_eth: Add R8A77980 V3H gether support

The R8A77980 V3H gether needs a few minor adjustments to the sh_eth driver, add them to support ethernet on R8A77980.

Cc Joe Hershberger <[email protected]>
Cc Nobuhiro Iwamatsu <[email protected]>

---
V2: No change

---
 drivers/net/sh_eth.c | 15 +++++++++++----
 drivers/net/sh_eth.h |  6 +++++-
 2 files changed, 16 insertions(+), 5 deletions(-)
drivers/net/sh_eth.c +11 -4
index da79b766a6..485c4b71ad 100644
@@ -374,10 +374,16 @@ static void sh_eth_write_hwaddr(struct sh_eth_info *port_info,
 static void sh_eth_mac_regs_config(struct sh_eth_dev *eth, unsigned char *mac)
 {
 	struct sh_eth_info *port_info = &eth->port_info[eth->port];
+	unsigned long edmr;
 
 	/* Configure e-dmac registers */
-	sh_eth_write(port_info, (sh_eth_read(port_info, EDMR) & ~EMDR_DESC_R) |
-			(EMDR_DESC | EDMR_EL), EDMR);
+	edmr = sh_eth_read(port_info, EDMR);
+	edmr &= ~EMDR_DESC_R;
+	edmr |= EMDR_DESC | EDMR_EL;
+#if defined(CONFIG_R8A77980)
+	edmr |= EDMR_NBST;
+#endif
+	sh_eth_write(port_info, edmr, EDMR);
 
 	sh_eth_write(port_info, 0, EESIPR);
 	sh_eth_write(port_info, 0, TRSCER);
@@ -407,7 +413,7 @@ static void sh_eth_mac_regs_config(struct sh_eth_dev *eth, unsigned char *mac)
 
 #if defined(CONFIG_CPU_SH7734) || defined(CONFIG_R8A7740)
 	sh_eth_write(port_info, CONFIG_SH_ETHER_SH7734_MII, RMII_MII);
-#elif defined(CONFIG_RCAR_GEN2)
+#elif defined(CONFIG_RCAR_GEN2) || defined(CONFIG_R8A77980)
 	sh_eth_write(port_info, sh_eth_read(port_info, RMIIMR) | 0x1, RMIIMR);
 #endif
 }
@@ -426,7 +432,7 @@ static int sh_eth_phy_regs_config(struct sh_eth_dev *eth)
 		sh_eth_write(port_info, GECMR_100B, GECMR);
 #elif defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7752)
 		sh_eth_write(port_info, 1, RTRATE);
-#elif defined(CONFIG_RCAR_GEN2)
+#elif defined(CONFIG_RCAR_GEN2) || defined(CONFIG_R8A77980)
 		val = ECMR_RTM;
 #endif
 	} else if (phy->speed == 10) {
@@ -931,6 +937,7 @@ static const struct udevice_id sh_ether_ids[] = {
 	{ .compatible = "renesas,ether-r8a7791" },
 	{ .compatible = "renesas,ether-r8a7793" },
 	{ .compatible = "renesas,ether-r8a7794" },
+	{ .compatible = "renesas,gether-r8a77980" },
 	{ }
 };
 
drivers/net/sh_eth.h +5 -1
index e1bbd4913f..564cdaccb7 100644
@@ -358,6 +358,9 @@ static const u16 sh_eth_offset_fast_sh4[SH_ETH_MAX_REGISTER_OFFSET] = {
 #elif defined(CONFIG_R7S72100)
 #define SH_ETH_TYPE_RZ
 #define BASE_IO_ADDR	0xE8203000
+#elif defined(CONFIG_R8A77980)
+#define SH_ETH_TYPE_GETHER
+#define BASE_IO_ADDR	0xE7400000
 #endif
 
 /*
@@ -374,6 +377,7 @@ enum EDSR_BIT {
 
 /* EDMR */
 enum DMAC_M_BIT {
+	EDMR_NBST	= 0x80, /* DMA transfer burst mode */
 	EDMR_DL1 = 0x20, EDMR_DL0 = 0x10,
 #if defined(SH_ETH_TYPE_GETHER) || defined(SH_ETH_TYPE_RZ)
 	EDMR_SRST	= 0x03, /* Receive/Send reset */
@@ -563,7 +567,7 @@ enum FELIC_MODE_BIT {
 	ECMR_PRM = 0x00000001,
 #ifdef CONFIG_CPU_SH7724
 	ECMR_RTM = 0x00000010,
-#elif defined(CONFIG_RCAR_GEN2)
+#elif defined(CONFIG_RCAR_GEN2) || defined (CONFIG_R8A77980)
 	ECMR_RTM = 0x00000004,
 #endif
 
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 2/7 net: sh_eth: Fix 64bit build warnings

Fix various type warnings when building this driver for 64bit machine.

Cc Joe Hershberger <[email protected]>
Cc Nobuhiro Iwamatsu <[email protected]>

---
V2: No change

---
 drivers/net/sh_eth.c | 24 ++++++++++++------------
 drivers/net/sh_eth.h |  8 ++++----
 2 files changed, 16 insertions(+), 16 deletions(-)
drivers/net/sh_eth.c +12 -12
index 485c4b71ad..2d5c97062f 100644
@@ -37,8 +37,8 @@
 #if defined(CONFIG_SH_ETHER_CACHE_WRITEBACK) && \
 	!CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
 #define flush_cache_wback(addr, len)    \
-		flush_dcache_range((u32)addr, \
-		(u32)(addr + ALIGN(len, CONFIG_SH_ETHER_ALIGNE_SIZE)))
+		flush_dcache_range((unsigned long)addr, \
+		(unsigned long)(addr + ALIGN(len, CONFIG_SH_ETHER_ALIGNE_SIZE)))
 #else
 #define flush_cache_wback(...)
 #endif
@@ -46,11 +46,11 @@
 #if defined(CONFIG_SH_ETHER_CACHE_INVALIDATE) && defined(CONFIG_ARM)
 #define invalidate_cache(addr, len)		\
 	{	\
-		u32 line_size = CONFIG_SH_ETHER_ALIGNE_SIZE;	\
-		u32 start, end;	\
+		unsigned long line_size = CONFIG_SH_ETHER_ALIGNE_SIZE;	\
+		unsigned long start, end;	\
 		\
-		start = (u32)addr;	\
-		end = start + len;	\
+		start = (unsigned long)addr;	\
+		end = start + len;		\
 		start &= ~(line_size - 1);	\
 		end = ((end + line_size - 1) & ~(line_size - 1));	\
 		\
@@ -74,7 +74,7 @@ static int sh_eth_send_common(struct sh_eth_dev *eth, void *packet, int len)
 	}
 
 	/* packet must be a 4 byte boundary */
-	if ((int)packet & 3) {
+	if ((uintptr_t)packet & 3) {
 		printf(SHETHER_NAME ": %s: packet not 4 byte aligned\n"
 				, __func__);
 		ret = -EFAULT;
@@ -211,7 +211,7 @@ static int sh_eth_tx_desc_init(struct sh_eth_dev *eth)
 
 	/* Make sure we use a P2 address (non-cacheable) */
 	port_info->tx_desc_base =
-		(struct tx_desc_s *)ADDR_TO_P2((u32)port_info->tx_desc_alloc);
+		(struct tx_desc_s *)ADDR_TO_P2((uintptr_t)port_info->tx_desc_alloc);
 	port_info->tx_desc_cur = port_info->tx_desc_base;
 
 	/* Initialize all descriptors */
@@ -265,7 +265,7 @@ static int sh_eth_rx_desc_init(struct sh_eth_dev *eth)
 
 	/* Make sure we use a P2 address (non-cacheable) */
 	port_info->rx_desc_base =
-		(struct rx_desc_s *)ADDR_TO_P2((u32)port_info->rx_desc_alloc);
+		(struct rx_desc_s *)ADDR_TO_P2((uintptr_t)port_info->rx_desc_alloc);
 
 	port_info->rx_desc_cur = port_info->rx_desc_base;
 
@@ -281,7 +281,7 @@ static int sh_eth_rx_desc_init(struct sh_eth_dev *eth)
 		goto err_buf_alloc;
 	}
 
-	port_info->rx_buf_base = (u8 *)ADDR_TO_P2((u32)port_info->rx_buf_alloc);
+	port_info->rx_buf_base = (u8 *)ADDR_TO_P2((uintptr_t)port_info->rx_buf_alloc);
 
 	/* Initialize all descriptors */
 	for (cur_rx_desc = port_info->rx_desc_base,
@@ -700,7 +700,7 @@ static int sh_ether_recv(struct udevice *dev, int flags, uchar **packetp)
 	struct sh_ether_priv *priv = dev_get_priv(dev);
 	struct sh_eth_dev *eth = &priv->shdev;
 	struct sh_eth_info *port_info = &eth->port_info[eth->port];
-	uchar *packet = (uchar *)ADDR_TO_P2(port_info->rx_desc_cur->rd2);
+	uchar *packet = (uchar *)ADDR_TO_P2((uintptr_t)port_info->rx_desc_cur->rd2);
 	int len;
 
 	len = sh_eth_recv_start(eth);
@@ -850,7 +850,7 @@ static int sh_ether_probe(struct udevice *udev)
 	eth->port = CONFIG_SH_ETHER_USE_PORT;
 	eth->port_info[eth->port].phy_addr = CONFIG_SH_ETHER_PHY_ADDR;
 	eth->port_info[eth->port].iobase =
-		(void __iomem *)(BASE_IO_ADDR + 0x800 * eth->port);
+		(void __iomem *)(uintptr_t)(BASE_IO_ADDR + 0x800 * eth->port);
 
 #if CONFIG_IS_ENABLED(CLK)
 	ret = clk_enable(&priv->clk);
drivers/net/sh_eth.h +4 -4
index 564cdaccb7..d197dfdc40 100644
@@ -15,20 +15,20 @@
 #if defined(CONFIG_SH)
 /* Malloc returns addresses in the P1 area (cacheable). However we need to
    use area P2 (non-cacheable) */
-#define ADDR_TO_P2(addr)	((((int)(addr) & ~0xe0000000) | 0xa0000000))
+#define ADDR_TO_P2(addr)	((((uintptr_t)(addr) & ~0xe0000000) | 0xa0000000))
 
 /* The ethernet controller needs to use physical addresses */
 #if defined(CONFIG_SH_32BIT)
-#define ADDR_TO_PHY(addr)	((((int)(addr) & ~0xe0000000) | 0x40000000))
+#define ADDR_TO_PHY(addr)	((((uintptr_t)(addr) & ~0xe0000000) | 0x40000000))
 #else
-#define ADDR_TO_PHY(addr)	((int)(addr) & ~0xe0000000)
+#define ADDR_TO_PHY(addr)	((uintptr_t)(addr) & ~0xe0000000)
 #endif
 #elif defined(CONFIG_ARM)
 #ifndef inl
 #define inl	readl
 #define outl	writel
 #endif
-#define ADDR_TO_PHY(addr)	((int)(addr))
+#define ADDR_TO_PHY(addr)	((uintptr_t)(addr))
 #define ADDR_TO_P2(addr)	(addr)
 #endif /* defined(CONFIG_SH) */
 
Signature · 1 line
2.20.1
#2 lore raw

PATCH v2 3/7 pinctrl: renesas: Add R8A77980 V3H PFC tables

In reply to Marek Vasut

Import R8A77980 V3H PFC tables from Linux 5.2.7 , commit 5697a9d3d55f.

Cc Nobuhiro Iwamatsu <[email protected]>

---
V2: Use tables from Linux 5.2.y

---
 drivers/pinctrl/renesas/Kconfig        |   10 +
 drivers/pinctrl/renesas/Makefile       |    1 +
 drivers/pinctrl/renesas/pfc-r8a77980.c | 2897 ++++++++++++++++++++++++
 drivers/pinctrl/renesas/pfc.c          |   11 +
 drivers/pinctrl/renesas/sh_pfc.h       |    1 +
 5 files changed, 2920 insertions(+)
 create mode 100644 drivers/pinctrl/renesas/pfc-r8a77980.c
drivers/pinctrl/renesas/Kconfig +10 -0
index 0ffd7fcfd4..4d3d68d307 100644
@@ -97,6 +97,16 @@ config PINCTRL_PFC_R8A77970
 	  the GPIO definitions and pin control functions for each available
 	  multiplex function.
 
+config PINCTRL_PFC_R8A77980
+	bool "Renesas RCar Gen3 R8A77980 pin control driver"
+	depends on PINCTRL_PFC
+	help
+	  Support pin multiplexing control on Renesas RCar Gen3 R8A77980 SoCs.
+
+	  The driver is controlled by a device tree node which contains both
+	  the GPIO definitions and pin control functions for each available
+	  multiplex function.
+
 config PINCTRL_PFC_R8A77990
 	bool "Renesas RCar Gen3 R8A77990 pin control driver"
 	depends on PINCTRL_PFC
drivers/pinctrl/renesas/Makefile +1 -0
index e8703f681e..a92f787a89 100644
@@ -8,6 +8,7 @@ obj-$(CONFIG_PINCTRL_PFC_R8A7795) += pfc-r8a7795.o
 obj-$(CONFIG_PINCTRL_PFC_R8A7796) += pfc-r8a7796.o
 obj-$(CONFIG_PINCTRL_PFC_R8A77965) += pfc-r8a77965.o
 obj-$(CONFIG_PINCTRL_PFC_R8A77970) += pfc-r8a77970.o
+obj-$(CONFIG_PINCTRL_PFC_R8A77980) += pfc-r8a77980.o
 obj-$(CONFIG_PINCTRL_PFC_R8A77990) += pfc-r8a77990.o
 obj-$(CONFIG_PINCTRL_PFC_R8A77995) += pfc-r8a77995.o
 obj-$(CONFIG_PINCTRL_PFC_R7S72100) += pfc-r7s72100.o
drivers/pinctrl/renesas/pfc-r8a77980.c new file +2897 -0

2,897 lines not on this page · raw message

drivers/pinctrl/renesas/pfc.c +11 -0
index f2973bebef..5ec560ec0f 100644
@@ -30,6 +30,7 @@ enum sh_pfc_model {
 	SH_PFC_R8A7796,
 	SH_PFC_R8A77965,
 	SH_PFC_R8A77970,
+	SH_PFC_R8A77980,
 	SH_PFC_R8A77990,
 	SH_PFC_R8A77995,
 };
@@ -856,6 +857,10 @@ static int sh_pfc_pinctrl_probe(struct udevice *dev)
 	if (model == SH_PFC_R8A77970)
 		priv->pfc.info = &r8a77970_pinmux_info;
 #endif
+#ifdef CONFIG_PINCTRL_PFC_R8A77980
+	if (model == SH_PFC_R8A77980)
+		priv->pfc.info = &r8a77980_pinmux_info;
+#endif
 #ifdef CONFIG_PINCTRL_PFC_R8A77990
 	if (model == SH_PFC_R8A77990)
 		priv->pfc.info = &r8a77990_pinmux_info;
@@ -927,6 +932,12 @@ static const struct udevice_id sh_pfc_pinctrl_ids[] = {
 		.data = SH_PFC_R8A77970,
 	},
 #endif
+#ifdef CONFIG_PINCTRL_PFC_R8A77980
+	{
+		.compatible = "renesas,pfc-r8a77980",
+		.data = SH_PFC_R8A77980,
+	},
+#endif
 #ifdef CONFIG_PINCTRL_PFC_R8A77990
 	{
 		.compatible = "renesas,pfc-r8a77990",
drivers/pinctrl/renesas/sh_pfc.h +1 -0
index f6159b8a3a..1cfb881e58 100644
@@ -302,6 +302,7 @@ extern const struct sh_pfc_soc_info r8a7795_pinmux_info;
 extern const struct sh_pfc_soc_info r8a7796_pinmux_info;
 extern const struct sh_pfc_soc_info r8a77965_pinmux_info;
 extern const struct sh_pfc_soc_info r8a77970_pinmux_info;
+extern const struct sh_pfc_soc_info r8a77980_pinmux_info;
 extern const struct sh_pfc_soc_info r8a77990_pinmux_info;
 extern const struct sh_pfc_soc_info r8a77995_pinmux_info;
 
Signature · 1 line
2.20.1
#3 lore raw

PATCH v2 4/7 clk: renesas: Add R8A77980 V3H clock tables

In reply to Marek Vasut

Import R8A77980 V3H clock tables from Linux 5.2.7 , commit 5697a9d3d55f.

Cc Nobuhiro Iwamatsu <[email protected]>

---
V2: Use tables from Linux 5.2.y

---
 drivers/clk/renesas/Kconfig             |   6 +
 drivers/clk/renesas/Makefile            |   1 +
 drivers/clk/renesas/r8a77980-cpg-mssr.c | 255 ++++++++++++++++++++++++
 3 files changed, 262 insertions(+)
 create mode 100644 drivers/clk/renesas/r8a77980-cpg-mssr.c
drivers/clk/renesas/Kconfig +6 -0
index 3862c1b848..e78817829b 100644
@@ -72,6 +72,12 @@ config CLK_R8A77970
 	help
 	  Enable this to support the clocks on Renesas R8A77970 SoC.
 
+config CLK_R8A77980
+	bool "Renesas R8A77980 clock driver"
+	depends on CLK_RCAR_GEN3
+	help
+	  Enable this to support the clocks on Renesas R8A77980 SoC.
+
 config CLK_R8A77990
 	bool "Renesas R8A77990 clock driver"
 	depends on CLK_RCAR_GEN3
drivers/clk/renesas/Makefile +1 -0
index 26b343994c..88339e9d7e 100644
@@ -10,5 +10,6 @@ obj-$(CONFIG_CLK_R8A7795) += r8a7795-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A7796) += r8a7796-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A77965) += r8a77965-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A77970) += r8a77970-cpg-mssr.o
+obj-$(CONFIG_CLK_R8A77980) += r8a77980-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A77990) += r8a77990-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A77995) += r8a77995-cpg-mssr.o
drivers/clk/renesas/r8a77980-cpg-mssr.c new file +255 -0

255 lines not on this page · raw message

Signature · 1 line
2.20.1
#4 lore raw

PATCH v2 5/7 ARM: dts: renesas: Add R8A77980 V3H DTs and headers

In reply to Marek Vasut

Import R8A77980 V3H DTs and headers from Linux 5.2.7 , commit 5697a9d3d55f.

Cc Nobuhiro Iwamatsu <[email protected]>

---
V2: Use DTs from Linux 5.2.y

---
 arch/arm/dts/r8a77980-u-boot.dtsi             |   24 +
 arch/arm/dts/r8a77980.dtsi                    | 1605 +++++++++++++++++
 include/dt-bindings/clock/r8a77980-cpg-mssr.h |   51 +
 include/dt-bindings/power/r8a77980-sysc.h     |   43 +
 4 files changed, 1723 insertions(+)
 create mode 100644 arch/arm/dts/r8a77980-u-boot.dtsi
 create mode 100644 arch/arm/dts/r8a77980.dtsi
 create mode 100644 include/dt-bindings/clock/r8a77980-cpg-mssr.h
 create mode 100644 include/dt-bindings/power/r8a77980-sysc.h
arch/arm/dts/r8a77980-u-boot.dtsi new file +24 -0
new file mode 100644
index 0000000000..1050f6e991
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source extras for U-Boot on RCar R8A77980 SoC
+ *
+ * Copyright (C) 2019 Marek Vasut <[email protected]>
+ */
+
+#include "r8a779x-u-boot.dtsi"
+
+&extalr_clk {
+	u-boot,dm-pre-reloc;
+};
+
+/ {
+	soc {
+		rpc: rpc at 0xee200000 {
+			compatible = "renesas,rpc-r8a77980", "renesas,rpc";
+			reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0>;
+			clocks = <&cpg CPG_MOD 917>;
+			bank-width = <2>;
+			status = "disabled";
+		};
+	};
+};
arch/arm/dts/r8a77980.dtsi new file +1605 -0

1,605 lines not on this page · raw message

include/dt-bindings/clock/r8a77980-cpg-mssr.h new file +51 -0

51 lines not on this page · raw message

include/dt-bindings/power/r8a77980-sysc.h new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
2.20.1
#5 lore raw

PATCH v2 6/7 ARM: renesas: Add R8A77980 V3H platform code

In reply to Marek Vasut

Add a few bits of platform code to support R8A77980 V3H SoC.

Cc Nobuhiro Iwamatsu <[email protected]>

---
V2: No change

---
 arch/arm/mach-rmobile/Kconfig.64             | 5 +++++
 arch/arm/mach-rmobile/cpu_info.c             | 1 +
 arch/arm/mach-rmobile/include/mach/rmobile.h | 1 +
 3 files changed, 7 insertions(+)
arch/arm/mach-rmobile/Kconfig.64 +5 -0
index 27d29f797f..2d549f7bb4 100644
@@ -22,6 +22,11 @@ config R8A77970
 	imply CLK_R8A77970
 	imply PINCTRL_PFC_R8A77970
 
+config R8A77980
+	bool "Renesas SoC R8A77980"
+	imply CLK_R8A77980
+	imply PINCTRL_PFC_R8A77980
+
 config R8A77990
 	bool "Renesas SoC R8A77990"
 	imply CLK_R8A77990
arch/arm/mach-rmobile/cpu_info.c +1 -0
index 784a2a28d5..dc407d2a61 100644
@@ -64,6 +64,7 @@ static const struct {
 	{ RMOBILE_CPU_TYPE_R8A7796, "R8A7796" },
 	{ RMOBILE_CPU_TYPE_R8A77965, "R8A77965" },
 	{ RMOBILE_CPU_TYPE_R8A77970, "R8A77970" },
+	{ RMOBILE_CPU_TYPE_R8A77980, "R8A77980" },
 	{ RMOBILE_CPU_TYPE_R8A77990, "R8A77990" },
 	{ RMOBILE_CPU_TYPE_R8A77995, "R8A77995" },
 	{ 0x0, "CPU" },
arch/arm/mach-rmobile/include/mach/rmobile.h +1 -0
index aa8d43e59b..a50249dc96 100644
@@ -36,6 +36,7 @@
 #define RMOBILE_CPU_TYPE_R8A7796	0x52
 #define RMOBILE_CPU_TYPE_R8A77965	0x55
 #define RMOBILE_CPU_TYPE_R8A77970	0x54
+#define RMOBILE_CPU_TYPE_R8A77980	0x56
 #define RMOBILE_CPU_TYPE_R8A77990	0x57
 #define RMOBILE_CPU_TYPE_R8A77995	0x58
 
Signature · 1 line
2.20.1
#6 lore raw

PATCH v2 7/7 ARM: renesas: Add R8A77980 V3H Condor board code

In reply to Marek Vasut

Add board code for the R8A77980 V3H Condor board.

Cc Nobuhiro Iwamatsu <[email protected]>

---
V2: Use DTs from Linux 5.2.y

---
 arch/arm/dts/Makefile                   |   1 +
 arch/arm/dts/r8a77980-condor-u-boot.dts |  34 +++
 arch/arm/dts/r8a77980-condor.dts        | 292 ++++++++++++++++++++++++
 arch/arm/mach-rmobile/Kconfig.64        |   7 +
 board/renesas/condor/Kconfig            |  15 ++
 board/renesas/condor/MAINTAINERS        |   6 +
 board/renesas/condor/Makefile           |  13 ++
 board/renesas/condor/condor.c           |  55 +++++
 configs/r8a77980_condor_defconfig       |  69 ++++++
 include/configs/condor.h                |  41 ++++
 10 files changed, 533 insertions(+)
 create mode 100644 arch/arm/dts/r8a77980-condor-u-boot.dts
 create mode 100644 arch/arm/dts/r8a77980-condor.dts
 create mode 100644 board/renesas/condor/Kconfig
 create mode 100644 board/renesas/condor/MAINTAINERS
 create mode 100644 board/renesas/condor/Makefile
 create mode 100644 board/renesas/condor/condor.c
 create mode 100644 configs/r8a77980_condor_defconfig
 create mode 100644 include/configs/condor.h
arch/arm/dts/Makefile +1 -0
index 7c806eee9e..9e7d6d6490 100644
@@ -645,6 +645,7 @@ dtb-$(CONFIG_RCAR_GEN3) += \
 	r8a77965-m3nulcb-u-boot.dtb \
 	r8a77965-salvator-x-u-boot.dtb \
 	r8a77970-eagle-u-boot.dtb \
+	r8a77980-condor-u-boot.dtb \
 	r8a77990-ebisu-u-boot.dtb \
 	r8a77995-draak-u-boot.dtb
 
arch/arm/dts/r8a77980-condor-u-boot.dts new file +34 -0
new file mode 100644
index 0000000000..1b22c7f0b9
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source extras for U-Boot for the Condor board
+ *
+ * Copyright (C) 2019 Marek Vasut <[email protected]>
+ */
+
+#include "r8a77980-condor.dts"
+#include "r8a77980-u-boot.dtsi"
+
+/ {
+	aliases {
+		spi0 = &rpc;
+	};
+};
+
+&rpc {
+	num-cs = <1>;
+	status = "okay";
+	spi-max-frequency = <50000000>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	flash0: spi-flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "s25fs512s", "jedec,spi-nor";
+		spi-max-frequency = <50000000>;
+		spi-tx-bus-width = <1>;
+		spi-rx-bus-width = <1>;
+		reg = <0>;
+		status = "okay";
+	};
+};
arch/arm/dts/r8a77980-condor.dts new file +292 -0

292 lines not on this page · raw message

arch/arm/mach-rmobile/Kconfig.64 +7 -0
index 2d549f7bb4..c8f93c68bb 100644
@@ -43,6 +43,12 @@ choice
 	prompt "Renesas ARM64 SoCs board select"
 	optional
 
+config TARGET_CONDOR
+	bool "Condor board"
+	imply R8A77980
+	help
+          Support for Renesas R-Car Gen3 Condor platform
+
 config TARGET_DRAAK
 	bool "Draak board"
 	imply R8A77995
@@ -88,6 +94,7 @@ endchoice
 config SYS_SOC
 	default "rmobile"
 
+source "board/renesas/condor/Kconfig"
 source "board/renesas/draak/Kconfig"
 source "board/renesas/eagle/Kconfig"
 source "board/renesas/ebisu/Kconfig"
board/renesas/condor/Kconfig new file +15 -0
new file mode 100644
index 0000000000..2286d88de7
@@ -0,0 +1,15 @@
+if TARGET_CONDOR
+
+config SYS_SOC
+	default "rmobile"
+
+config SYS_BOARD
+	default "condor"
+
+config SYS_VENDOR
+	default "renesas"
+
+config SYS_CONFIG_NAME
+	default "condor"
+
+endif
board/renesas/condor/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000000..73b010b9e7
@@ -0,0 +1,6 @@
+CONDOR BOARD
+M:	Marek Vasut <[email protected]>
+S:	Maintained
+F:	board/renesas/condor/
+F:	include/configs/condor.h
+F:	configs/r8a77980_condor_defconfig
board/renesas/condor/Makefile new file +13 -0
new file mode 100644
index 0000000000..cf6d566a9b
@@ -0,0 +1,13 @@
+#
+# board/renesas/condor/Makefile
+#
+# Copyright (C) 2019 Renesas Electronics Corporation
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+ifdef CONFIG_SPL_BUILD
+obj-y	:= ../rcar-common/gen3-spl.o
+else
+obj-y	:= condor.o ../rcar-common/common.o
+endif
board/renesas/condor/condor.c new file +55 -0

55 lines not on this page · raw message

configs/r8a77980_condor_defconfig new file +69 -0

69 lines not on this page · raw message

include/configs/condor.h new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
2.20.1