Skip to contentSkip to conversation

Add R8A7792/Blanche board support

PATCH New Sergei Shtylyov 3 participants 39 messages Jun 12, 2016 – May 23, 2018

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

v5 cover Add R8A7792/Blanche board support

Hello.

Here's the set of 12 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160606-v4.7-rc2' tag. We add the device tree support for the R8A7792-based Blanche board. The R-Car 'clk' driver patch was posted separately and 2 'clk' binding patches were split from this series...

[01/12] ARM: shmobile: r8a7792: add clock index macros [02/12] ARM: shmobile: r8a7792: add power domain index macros [03/12] soc: renesas: rcar-sysc: add R8A7792 support [04/12] ARM: shmobile: r8a7792: basic SoC support [05/12] ARM: shmobile: r8a7792: add SMP support [06/12] ARM: dts: r8a7792: initial SoC device tree [07/12] ARM: dts: r8a7792: add SYS-DMAC support [08/12] ARM: dts: r8a7792: add [H]SCIF support [09/12] ARM: dts: r8a7792: add IRQC support
[10/12] DT: arm: shmobile: document Blanche board [11/12] ARM: dts: blanche: initial device tree [12/12] ARM: dts: blanche: add Ethernet support

WBR, Sergei

#1 lore raw

PATCH v5 1/12 ARM: shmobile: r8a7792: add clock index macros

Add macros usable by the device tree sources to reference the R8A7792 clocks by index.

---
Changes in version 5:
- removed the RCAN clock index.

Changes in version 4:
- added Geert's tag.

Changes in version 2:
- removed the SDH, SD0, and SD1 clocks;
- added RCAN and ADSP clock indeces;
- fixed SYS-DMAC0/1 clock indeces.

 include/dt-bindings/clock/r8a7792-clock.h |  102 ++++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)
include/dt-bindings/clock/r8a7792-clock.h new file +102 -0
Index: renesas/include/dt-bindings/clock/r8a7792-clock.h
===================================================================
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2016 Cogent Embedded, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_R8A7792_H__
+#define __DT_BINDINGS_CLOCK_R8A7792_H__
+
+/* CPG */
+#define R8A7792_CLK_MAIN		0
+#define R8A7792_CLK_PLL0		1
+#define R8A7792_CLK_PLL1		2
+#define R8A7792_CLK_PLL3		3
+#define R8A7792_CLK_LB			4
+#define R8A7792_CLK_QSPI		5
+#define R8A7792_CLK_Z			6
+#define R8A7792_CLK_ADSP		7
+
+/* MSTP0 */
+#define R8A7792_CLK_MSIOF0		0
+
+/* MSTP1 */
+#define R8A7792_CLK_TMU1		11
+#define R8A7792_CLK_TMU3		21
+#define R8A7792_CLK_TMU2		22
+#define R8A7792_CLK_CMT0		24
+#define R8A7792_CLK_TMU0		25
+#define R8A7792_CLK_VSP1DU1		27
+#define R8A7792_CLK_VSP1DU0		28
+#define R8A7792_CLK_VSP1_SY		31
+
+/* MSTP2 */
+#define R8A7792_CLK_MSIOF1		8
+#define R8A7792_CLK_SYS_DMAC1		18
+#define R8A7792_CLK_SYS_DMAC0		19
+
+/* MSTP3 */
+#define R8A7792_CLK_TPU0		4
+#define R8A7792_CLK_SDHI0		14
+#define R8A7792_CLK_CMT1		29
+
+/* MSTP4 */
+#define R8A7792_CLK_IRQC		7
+
+/* MSTP5 */
+#define R8A7792_CLK_AUDIO_DMAC0		2
+#define R8A7792_CLK_THERMAL		22
+#define R8A7792_CLK_PWM			23
+
+/* MSTP7 */
+#define R8A7792_CLK_HSCIF1		16
+#define R8A7792_CLK_HSCIF0		17
+#define R8A7792_CLK_SCIF3		18
+#define R8A7792_CLK_SCIF2		19
+#define R8A7792_CLK_SCIF1		20
+#define R8A7792_CLK_SCIF0		21
+#define R8A7792_CLK_DU1			23
+#define R8A7792_CLK_DU0			24
+
+/* MSTP8 */
+#define R8A7792_CLK_VIN5		4
+#define R8A7792_CLK_VIN4		5
+#define R8A7792_CLK_VIN3		8
+#define R8A7792_CLK_VIN2		9
+#define R8A7792_CLK_VIN1		10
+#define R8A7792_CLK_VIN0		11
+#define R8A7792_CLK_ETHERAVB		12
+
+/* MSTP9 */
+#define R8A7792_CLK_GPIO7		4
+#define R8A7792_CLK_GPIO6		5
+#define R8A7792_CLK_GPIO5		7
+#define R8A7792_CLK_GPIO4		8
+#define R8A7792_CLK_GPIO3		9
+#define R8A7792_CLK_GPIO2		10
+#define R8A7792_CLK_GPIO1		11
+#define R8A7792_CLK_GPIO0		12
+#define R8A7792_CLK_GPIO11		13
+#define R8A7792_CLK_GPIO10		14
+#define R8A7792_CLK_CAN1		15
+#define R8A7792_CLK_CAN0		16
+#define R8A7792_CLK_QSPI_MOD		17
+#define R8A7792_CLK_GPIO9		19
+#define R8A7792_CLK_GPIO8		21
+#define R8A7792_CLK_I2C5		25
+#define R8A7792_CLK_IICDVFS		26
+#define R8A7792_CLK_I2C4		27
+#define R8A7792_CLK_I2C3		28
+#define R8A7792_CLK_I2C2		29
+#define R8A7792_CLK_I2C1		30
+#define R8A7792_CLK_I2C0		31
+
+/* MSTP10 */
+#define R8A7792_CLK_SSI_ALL		5
+#define R8A7792_CLK_SSI4		11
+#define R8A7792_CLK_SSI3		12
+
+#endif /* __DT_BINDINGS_CLOCK_R8A7792_H__ */
#2 lore raw

PATCH v5 2/12 ARM: shmobile: r8a7792: add power domain index macros

In reply to Sergei Shtylyov

Add macros usable by the device tree sources to reference R8A7792 SYSC power domains by index.

---
Changes in version 2:
- added Geert's tag.

 include/dt-bindings/power/r8a7792-sysc.h |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
include/dt-bindings/power/r8a7792-sysc.h new file +26 -0
Index: renesas/include/dt-bindings/power/r8a7792-sysc.h
===================================================================
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2016 Cogent Embedded Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ */
+#ifndef __DT_BINDINGS_POWER_R8A7792_SYSC_H__
+#define __DT_BINDINGS_POWER_R8A7792_SYSC_H__
+
+/*
+ * These power domain indices match the numbers of the interrupt bits
+ * representing the power areas in the various Interrupt Registers
+ * (e.g. SYSCISR, Interrupt Status Register)
+ */
+
+#define R8A7792_PD_CA15_CPU0		0
+#define R8A7792_PD_CA15_CPU1		1
+#define R8A7792_PD_CA15_SCU		12
+#define R8A7792_PD_SGX			20
+#define R8A7792_PD_IMP			24
+
+/* Always-on power area */
+#define R8A7792_PD_ALWAYS_ON		32
+
+#endif /* __DT_BINDINGS_POWER_R8A7792_SYSC_H__ */
#3 lore raw

PATCH v5 3/12 soc: renesas: rcar-sysc: add R8A7792 support

In reply to Sergei Shtylyov

Add support for R-Car V2H (R8A7792) SoC power areas to the SYSC driver.

---
Changes in version 5:
- refreshed the patch.

Changes in version 2:
- added Geert's tag.

 drivers/soc/renesas/Makefile       |    1 +
 drivers/soc/renesas/r8a7792-sysc.c |   34 ++++++++++++++++++++++++++++++++++
 drivers/soc/renesas/rcar-sysc.c    |    3 +++
 drivers/soc/renesas/rcar-sysc.h    |    1 +
 4 files changed, 39 insertions(+)
drivers/soc/renesas/Makefile +1 -0
Index: renesas/drivers/soc/renesas/Makefile
===================================================================
@@ -1,6 +1,7 @@
 obj-$(CONFIG_ARCH_R8A7779)	+= rcar-sysc.o r8a7779-sysc.o
 obj-$(CONFIG_ARCH_R8A7790)	+= rcar-sysc.o r8a7790-sysc.o
 obj-$(CONFIG_ARCH_R8A7791)	+= rcar-sysc.o r8a7791-sysc.o
+obj-$(CONFIG_ARCH_R8A7792)	+= rcar-sysc.o r8a7792-sysc.o
 # R-Car M2-N is identical to R-Car M2-W w.r.t. power domains.
 obj-$(CONFIG_ARCH_R8A7793)	+= rcar-sysc.o r8a7791-sysc.o
 obj-$(CONFIG_ARCH_R8A7794)	+= rcar-sysc.o r8a7794-sysc.o
drivers/soc/renesas/r8a7792-sysc.c new file +34 -0
Index: renesas/drivers/soc/renesas/r8a7792-sysc.c
===================================================================
@@ -0,0 +1,34 @@
+/*
+ * Renesas R-Car V2H (R8A7792) System Controller
+ *
+ * Copyright (C) 2016 Cogent Embedded Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ */
+
+#include <linux/bug.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+
+#include <dt-bindings/power/r8a7792-sysc.h>
+
+#include "rcar-sysc.h"
+
+static const struct rcar_sysc_area r8a7792_areas[] __initconst = {
+	{ "always-on",	    0, 0, R8A7792_PD_ALWAYS_ON,	-1, PD_ALWAYS_ON },
+	{ "ca15-scu",	0x180, 0, R8A7792_PD_CA15_SCU,	R8A7792_PD_ALWAYS_ON,
+	  PD_SCU },
+	{ "ca15-cpu0",	 0x40, 0, R8A7792_PD_CA15_CPU0,	R8A7792_PD_CA15_SCU,
+	  PD_CPU_NOCR },
+	{ "ca15-cpu1",	 0x40, 1, R8A7792_PD_CA15_CPU1,	R8A7792_PD_CA15_SCU,
+	  PD_CPU_NOCR },
+	{ "sgx",	 0xc0, 0, R8A7792_PD_SGX,	R8A7792_PD_ALWAYS_ON },
+	{ "imp",	0x140, 0, R8A7792_PD_IMP,	R8A7792_PD_ALWAYS_ON },
+};
+
+const struct rcar_sysc_info r8a7792_sysc_info __initconst = {
+	.areas = r8a7792_areas,
+	.num_areas = ARRAY_SIZE(r8a7792_areas),
+};
drivers/soc/renesas/rcar-sysc.c +3 -0
Index: renesas/drivers/soc/renesas/rcar-sysc.c
===================================================================
@@ -293,6 +293,9 @@ static const struct of_device_id rcar_sy
 #ifdef CONFIG_ARCH_R8A7791
 	{ .compatible = "renesas,r8a7791-sysc", .data = &r8a7791_sysc_info },
 #endif
+#ifdef CONFIG_ARCH_R8A7792
+	{ .compatible = "renesas,r8a7792-sysc", .data = &r8a7792_sysc_info },
+#endif
 #ifdef CONFIG_ARCH_R8A7793
 	/* R-Car M2-N is identical to R-Car M2-W w.r.t. power domains. */
 	{ .compatible = "renesas,r8a7793-sysc", .data = &r8a7791_sysc_info },
drivers/soc/renesas/rcar-sysc.h +1 -0
Index: renesas/drivers/soc/renesas/rcar-sysc.h
===================================================================
@@ -53,6 +53,7 @@ struct rcar_sysc_info {
 extern const struct rcar_sysc_info r8a7779_sysc_info;
 extern const struct rcar_sysc_info r8a7790_sysc_info;
 extern const struct rcar_sysc_info r8a7791_sysc_info;
+extern const struct rcar_sysc_info r8a7792_sysc_info;
 extern const struct rcar_sysc_info r8a7794_sysc_info;
 extern const struct rcar_sysc_info r8a7795_sysc_info;
 extern const struct rcar_sysc_info r8a7796_sysc_info;
#4 lore raw

PATCH v5 4/12 ARM: shmobile: r8a7792: basic SoC support

In reply to Sergei Shtylyov

Add minimal support for the R-Car V2H (R8A7792) SoC.

---
Changes in version 3:
- added Cogent Embedded's copyright;
- removed a supefluous space in Renesas Electronics' copyright.

Changes in version 2:
- removed 'select I2C';
- added Simon's ACK and Geert's tag too.

 arch/arm/mach-shmobile/Kconfig         |    4 +++
 arch/arm/mach-shmobile/Makefile        |    1 
 arch/arm/mach-shmobile/setup-r8a7792.c |   35 +++++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+)
arch/arm/mach-shmobile/Kconfig +4 -0
Index: renesas/arch/arm/mach-shmobile/Kconfig
===================================================================
@@ -86,6 +86,10 @@ config ARCH_R8A7791
 	select ARCH_RCAR_GEN2
 	select I2C
 
+config ARCH_R8A7792
+	bool "R-Car V2H (R8A77920)"
+	select ARCH_RCAR_GEN2
+
 config ARCH_R8A7793
 	bool "R-Car M2-N (R8A7793)"
 	select ARCH_RCAR_GEN2
arch/arm/mach-shmobile/Makefile +1 -0
Index: renesas/arch/arm/mach-shmobile/Makefile
===================================================================
@@ -13,6 +13,7 @@ obj-$(CONFIG_ARCH_R8A7778)	+= setup-r8a7
 obj-$(CONFIG_ARCH_R8A7779)	+= setup-r8a7779.o pm-r8a7779.o
 obj-$(CONFIG_ARCH_R8A7790)	+= setup-r8a7790.o
 obj-$(CONFIG_ARCH_R8A7791)	+= setup-r8a7791.o
+obj-$(CONFIG_ARCH_R8A7792)	+= setup-r8a7792.o
 obj-$(CONFIG_ARCH_R8A7793)	+= setup-r8a7793.o
 obj-$(CONFIG_ARCH_R8A7794)	+= setup-r8a7794.o
 obj-$(CONFIG_ARCH_EMEV2)	+= setup-emev2.o
arch/arm/mach-shmobile/setup-r8a7792.c new file +35 -0
Index: renesas/arch/arm/mach-shmobile/setup-r8a7792.c
===================================================================
@@ -0,0 +1,35 @@
+/*
+ * r8a7792 processor support
+ *
+ * Copyright (C) 2014 Renesas Electronics Corporation
+ * Copyright (C) 2016 Cogent  Embedded, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/of_platform.h>
+
+#include <asm/mach/arch.h>
+
+#include "common.h"
+#include "rcar-gen2.h"
+
+static const char * const r8a7792_boards_compat_dt[] __initconst = {
+	"renesas,r8a7792",
+	NULL,
+};
+
+DT_MACHINE_START(R8A7792_DT, "Generic R8A7792 (Flattened Device Tree)")
+	.init_early	= shmobile_init_delay,
+	.init_late	= shmobile_init_late,
+	.init_time	= rcar_gen2_timer_init,
+	.reserve	= rcar_gen2_reserve,
+	.dt_compat	= r8a7792_boards_compat_dt,
+MACHINE_END
#5 lore raw

PATCH v5 5/12 ARM: shmobile: r8a7792: add SMP support

In reply to Sergei Shtylyov

Add R8A7792 SMP support using the shared APMU code. This SoC has 2 ARM Cortex-A15 CPU cores.

---
Changes in version 3:
- new patch.

 arch/arm/mach-shmobile/Makefile        |    1 
 arch/arm/mach-shmobile/r8a7792.h       |    6 +++
 arch/arm/mach-shmobile/setup-r8a7792.c |    2 +
 arch/arm/mach-shmobile/smp-r8a7792.c   |   62 +++++++++++++++++++++++++++++++++
 4 files changed, 71 insertions(+)
arch/arm/mach-shmobile/Makefile +1 -0
Index: renesas/arch/arm/mach-shmobile/Makefile
===================================================================
@@ -35,6 +35,7 @@ smp-$(CONFIG_ARCH_SH73A0)	+= smp-sh73a0.
 smp-$(CONFIG_ARCH_R8A7779)	+= smp-r8a7779.o headsmp-scu.o platsmp-scu.o
 smp-$(CONFIG_ARCH_R8A7790)	+= smp-r8a7790.o
 smp-$(CONFIG_ARCH_R8A7791)	+= smp-r8a7791.o
+smp-$(CONFIG_ARCH_R8A7792)	+= smp-r8a7792.o
 smp-$(CONFIG_ARCH_EMEV2)	+= smp-emev2.o headsmp-scu.o platsmp-scu.o
 
 # PM objects
arch/arm/mach-shmobile/r8a7792.h new file +6 -0
Index: renesas/arch/arm/mach-shmobile/r8a7792.h
===================================================================
@@ -0,0 +1,6 @@
+#ifndef __ASM_R8A7792_H__
+#define __ASM_R8A7792_H__
+
+extern const struct smp_operations r8a7792_smp_ops;
+
+#endif /* __ASM_R8A7792_H__ */
arch/arm/mach-shmobile/setup-r8a7792.c +2 -0
Index: renesas/arch/arm/mach-shmobile/setup-r8a7792.c
===================================================================
@@ -20,6 +20,7 @@
 
 #include "common.h"
 #include "rcar-gen2.h"
+#include "r8a7792.h"
 
 static const char * const r8a7792_boards_compat_dt[] __initconst = {
 	"renesas,r8a7792",
@@ -27,6 +28,7 @@ static const char * const r8a7792_boards
 };
 
 DT_MACHINE_START(R8A7792_DT, "Generic R8A7792 (Flattened Device Tree)")
+	.smp		= smp_ops(r8a7792_smp_ops),
 	.init_early	= shmobile_init_delay,
 	.init_late	= shmobile_init_late,
 	.init_time	= rcar_gen2_timer_init,
arch/arm/mach-shmobile/smp-r8a7792.c new file +62 -0

62 lines not on this page · raw message

#9 lore raw

PATCH v5 6/12 ARM: dts: r8a7792: initial SoC device tree

In reply to Sergei Shtylyov

The initial R8A7792 SoC device tree including CPU cores, GIC, timer, SYSC, and the required clock descriptions.

---
Changes in version 5:
- removed the RCAN CPG clock;
- added Geert's tag.

Changes in version 4:
- fixed the CP clock divisor;
- indented the P clock's "compatible" prop correctly;
- removed leftover DU0/1 clock names from the MSTP7 clock node.

Changes in version 3:
- moved the fixed factor clocks under the "soc" node;
- added back the CPU1 node, adjusted the changelog.

Changes in version 2:
- explicitly included the IRQ header;
- removed the CPU1 node;
- removed the audio and PCIe bus clocks;
- removed the SDH, SD0, and SD1 CPG clocks;
- added RCAN and ADSP CPG clocks;
- removed the PLL1/2, Z2, ZS, I, B, P, CL, M2, RCLK, OSCCLK, ZB3, ZB3D2, DDR, and MP fixed factor clocks;
- fixed up the parent and divisor for the CP fixed factor clock;

- swapped  the SYS-DMAC0/1 clocks;
- removed  all gated clocks except the [H]SCIF, IRQC, and SYS-DMAC ones;
- created  the "soc" subnode, moving the SoC  device  nodes there;
- removed  the "clocks" node, moving its fixed clock  subnodes to the root and

the MSTP subnodes into the "soc" node.

 arch/arm/boot/dts/r8a7792.dtsi |  179 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 179 insertions(+)
arch/arm/boot/dts/r8a7792.dtsi new file +179 -0
Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
@@ -0,0 +1,179 @@
+/*
+ * Device Tree Source for the r8a7792 SoC
+ *
+ * Copyright (C) 2016 Cogent Embedded Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <dt-bindings/clock/r8a7792-clock.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/r8a7792-sysc.h>
+
+/ {
+	compatible = "renesas,r8a7792";
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu0: cpu at 0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a15";
+			reg = <0>;
+			clock-frequency = <1000000000>;
+			clocks = <&cpg_clocks R8A7792_CLK_Z>;
+			power-domains = <&sysc R8A7792_PD_CA15_CPU0>;
+			next-level-cache = <&L2_CA15>;
+		};
+
+		cpu1: cpu at 1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a15";
+			reg = <1>;
+			clock-frequency = <1000000000>;
+			power-domains = <&sysc R8A7792_PD_CA15_CPU1>;
+			next-level-cache = <&L2_CA15>;
+		};
+
+		L2_CA15: cache-controller at 0 {
+			compatible = "cache";
+			reg = <0>;
+			cache-unified;
+			cache-level = <2>;
+			power-domains = <&sysc R8A7792_PD_CA15_SCU>;
+		};
+	};
+
+	soc {
+		compatible = "simple-bus";
+		interrupt-parent = <&gic>;
+
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		gic: interrupt-controller at f1001000 {
+			compatible = "arm,gic-400";
+			#interrupt-cells = <3>;
+			interrupt-controller;
+			reg = <0 0xf1001000 0 0x1000>,
+			      <0 0xf1002000 0 0x1000>,
+			      <0 0xf1004000 0 0x2000>,
+			      <0 0xf1006000 0 0x2000>;
+			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) |
+				      IRQ_TYPE_LEVEL_HIGH)>;
+		};
+
+		timer {
+			compatible = "arm,armv7-timer";
+			interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) |
+				      IRQ_TYPE_LEVEL_LOW)>,
+				     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) |
+				      IRQ_TYPE_LEVEL_LOW)>,
+				     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) |
+				      IRQ_TYPE_LEVEL_LOW)>,
+				     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) |
+				      IRQ_TYPE_LEVEL_LOW)>;
+		};
+
+		sysc: system-controller at e6180000 {
+			compatible = "renesas,r8a7792-sysc";
+			reg = <0 0xe6180000 0 0x0200>;
+			#power-domain-cells = <1>;
+		};
+
+		/* Special CPG clocks */
+		cpg_clocks: cpg_clocks at e6150000 {
+			compatible = "renesas,r8a7792-cpg-clocks",
+				     "renesas,rcar-gen2-cpg-clocks";
+			reg = <0 0xe6150000 0 0x1000>;
+			clocks = <&extal_clk>;
+			#clock-cells = <1>;
+			clock-output-names = "main", "pll0", "pll1", "pll3",
+					     "lb", "qspi", "z", "adsp";
+			#power-domain-cells = <0>;
+		};
+
+		/* Fixed factor clocks */
+		zs_clk: zs {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <6>;
+			clock-mult = <1>;
+		};
+		p_clk: p {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <24>;
+			clock-mult = <1>;
+		};
+		cp_clk: cp {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <48>;
+			clock-mult = <1>;
+		};
+
+		/* Gate clocks */
+		mstp2_clks: mstp2_clks at e6150138 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
+			clocks = <&zs_clk>, <&zs_clk>;
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7792_CLK_SYS_DMAC1 R8A7792_CLK_SYS_DMAC0
+			>;
+			clock-output-names = "sys-dmac1", "sys-dmac0";
+		};
+		mstp4_clks: mstp4_clks at e6150140 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150140 0 4>, <0 0xe615004c 0 4>;
+			clocks = <&cp_clk>;
+			#clock-cells = <1>;
+			clock-indices = <R8A7792_CLK_IRQC>;
+			clock-output-names = "irqc";
+		};
+		mstp7_clks: mstp7_clks at e615014c {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
+			clocks = <&zs_clk>, <&zs_clk>, <&p_clk>, <&p_clk>,
+				 <&p_clk>, <&p_clk>;
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7792_CLK_HSCIF1 R8A7792_CLK_HSCIF0
+				R8A7792_CLK_SCIF3 R8A7792_CLK_SCIF2
+				R8A7792_CLK_SCIF1 R8A7792_CLK_SCIF0
+			>;
+			clock-output-names = "hscif1", "hscif0", "scif3",
+					     "scif2", "scif1", "scif0";
+		};
+	};
+
+	/* External root clock */
+	extal_clk: extal {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		/* This value must be overridden by the board. */
+		clock-frequency = <0>;
+	};
+
+	/* External SCIF clock */
+	scif_clk: scif {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		/* This value must be overridden by the board. */
+		clock-frequency = <0>;
+	};
+};
#10 lore raw

PATCH v5 7/12 ARM: dts: r8a7792: add SYS-DMAC support

In reply to Sergei Shtylyov

Describe SYS-DMAC0/1 in the R8A7792 device tree.

---
Changes in version 3:
- refreshed the patch.

Changes in version 2:
- resolved reject, indenting the device nodes that are now under the "soc" node;
- added Simon's ACK and Geert's tag too.

 arch/arm/boot/dts/r8a7792.dtsi |   64 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
arch/arm/boot/dts/r8a7792.dtsi +64 -0
Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
@@ -88,6 +88,70 @@
 			#power-domain-cells = <1>;
 		};
 
+		dmac0: dma-controller at e6700000 {
+			compatible = "renesas,dmac-r8a7792",
+				     "renesas,rcar-dmac";
+			reg = <0 0xe6700000 0 0x20000>;
+			interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "error",
+					  "ch0", "ch1", "ch2", "ch3",
+					  "ch4", "ch5", "ch6", "ch7",
+					  "ch8", "ch9", "ch10", "ch11",
+					  "ch12", "ch13", "ch14";
+			clocks = <&mstp2_clks R8A7792_CLK_SYS_DMAC0>;
+			clock-names = "fck";
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			#dma-cells = <1>;
+			dma-channels = <15>;
+		};
+
+		dmac1: dma-controller at e6720000 {
+			compatible = "renesas,dmac-r8a7792",
+				     "renesas,rcar-dmac";
+			reg = <0 0xe6720000 0 0x20000>;
+			interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "error",
+					  "ch0", "ch1", "ch2", "ch3",
+					  "ch4", "ch5", "ch6", "ch7",
+					  "ch8", "ch9", "ch10", "ch11",
+					  "ch12", "ch13", "ch14";
+			clocks = <&mstp2_clks R8A7792_CLK_SYS_DMAC1>;
+			clock-names = "fck";
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			#dma-cells = <1>;
+			dma-channels = <15>;
+		};
+
 		/* Special CPG clocks */
 		cpg_clocks: cpg_clocks at e6150000 {
 			compatible = "renesas,r8a7792-cpg-clocks",
#11 lore raw

PATCH v5 8/12 ARM: dts: r8a7792: add [H]SCIF support

In reply to Sergei Shtylyov

Describe [H]SCIFs in the R8A7792 device tree.

---
Changes in version 3:
- refreshed the patch.

Changes in version 2:
- resolved reject, indenting the device nodes that are now under the "soc" node;
- added Geert's tag.

 arch/arm/boot/dts/r8a7792.dtsi |   90 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)
arch/arm/boot/dts/r8a7792.dtsi +90 -0
Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
@@ -152,6 +152,96 @@
 			dma-channels = <15>;
 		};
 
+		scif0: serial at e6e60000 {
+			compatible = "renesas,scif-r8a7792",
+				     "renesas,rcar-gen2-scif", "renesas,scif";
+			reg = <0 0xe6e60000 0 64>;
+			interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&mstp7_clks R8A7792_CLK_SCIF0>, <&zs_clk>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac0 0x29>, <&dmac0 0x2a>,
+			       <&dmac1 0x29>, <&dmac1 0x2a>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		scif1: serial at e6e68000 {
+			compatible = "renesas,scif-r8a7792",
+				     "renesas,rcar-gen2-scif", "renesas,scif";
+			reg = <0 0xe6e68000 0 64>;
+			interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&mstp7_clks R8A7792_CLK_SCIF1>, <&zs_clk>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac0 0x2d>, <&dmac0 0x2e>,
+			       <&dmac1 0x2d>, <&dmac1 0x2e>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		scif2: serial at e6e58000 {
+			compatible = "renesas,scif-r8a7792",
+				     "renesas,rcar-gen2-scif", "renesas,scif";
+			reg = <0 0xe6e58000 0 64>;
+			interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&mstp7_clks R8A7792_CLK_SCIF2>, <&zs_clk>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac0 0x2b>, <&dmac0 0x2c>,
+			       <&dmac1 0x2b>, <&dmac1 0x2c>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		scif3: serial at e6ea8000 {
+			compatible = "renesas,scif-r8a7792",
+				     "renesas,rcar-gen2-scif", "renesas,scif";
+			reg = <0 0xe6ea8000 0 64>;
+			interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&mstp7_clks R8A7792_CLK_SCIF3>, <&zs_clk>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac0 0x2f>, <&dmac0 0x30>,
+			       <&dmac1 0x2f>, <&dmac1 0x30>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		hscif0: serial at e62c0000 {
+			compatible = "renesas,hscif-r8a7792",
+				     "renesas,rcar-gen2-hscif", "renesas,hscif";
+			reg = <0 0xe62c0000 0 96>;
+			interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&mstp7_clks R8A7792_CLK_HSCIF0>, <&zs_clk>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac0 0x39>, <&dmac0 0x3a>,
+			       <&dmac1 0x39>, <&dmac1 0x3a>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		hscif1: serial at e62c8000 {
+			compatible = "renesas,hscif-r8a7792",
+				     "renesas,rcar-gen2-hscif", "renesas,hscif";
+			reg = <0 0xe62c8000 0 96>;
+			interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&mstp7_clks R8A7792_CLK_HSCIF1>, <&zs_clk>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac0 0x4d>, <&dmac0 0x4e>,
+			       <&dmac1 0x4d>, <&dmac1 0x4e>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		/* Special CPG clocks */
 		cpg_clocks: cpg_clocks at e6150000 {
 			compatible = "renesas,r8a7792-cpg-clocks",
#12 lore raw

PATCH v5 9/12 ARM: dts: r8a7792: add IRQC support

In reply to Sergei Shtylyov

Describe the IRQC interrupt controller in the R8A7792 device tree.

---
Changes in version 3:
- refreshed the patch.

Changes in version 2:
- resolved reject, indenting the IRQC node that is now under the "soc" node;
- added Geert's tag.

 arch/arm/boot/dts/r8a7792.dtsi |   13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/boot/dts/r8a7792.dtsi +13 -0
Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
@@ -70,6 +70,19 @@
 				      IRQ_TYPE_LEVEL_HIGH)>;
 		};
 
+		irqc: interrupt-controller at e61c0000 {
+			compatible = "renesas,irqc-r8a7792", "renesas,irqc";
+			#interrupt-cells = <2>;
+			interrupt-controller;
+			reg = <0 0xe61c0000 0 0x200>;
+			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&mstp4_clks R8A7792_CLK_IRQC>;
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+		};
+
 		timer {
 			compatible = "arm,armv7-timer";
 			interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) |
#13 lore raw

PATCH v5 10/12 DT: arm: shmobile: document Blanche board

In reply to Sergei Shtylyov

Document the Blanche device tree bindings, listing it as a supported board.

This allows to use checkpatch.pl to validate .dts files referring to the Blanche board.

---
Changes in version 2:
- added Rob's ACK.

Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++

 Documentation/devicetree/bindings/arm/shmobile.txt |    2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/shmobile.txt +2 -0
Index: renesas/Documentation/devicetree/bindings/arm/shmobile.txt
===================================================================
@@ -39,6 +39,8 @@ Boards:
     compatible = "renesas,ape6evm", "renesas,r8a73a4"
   - Atmark Techno Armadillo-800 EVA
     compatible = "renesas,armadillo800eva"
+  - Blanche (RTP0RC7792SEB00010S)
+    compatible = "renesas,blanche", "renesas,r8a7792"
   - BOCK-W
     compatible = "renesas,bockw", "renesas,r8a7778"
   - Genmai (RTK772100BC00000BR)
#14 lore raw

PATCH v5 11/12 ARM: dts: blanche: initial device tree

In reply to Sergei Shtylyov

Add the initial device tree for the R8A7792 SoC based Blanche board. The board has 2 debug serial ports: SCIF0 and SCIF3; include support for them, so that the serial console can work.

---
Changes in version 3:
- added Renesas Electronics' copyright.

Changes in version 2:
- added Simon's ACK and Geert's tag too.

 arch/arm/boot/dts/Makefile            |    1 
 arch/arm/boot/dts/r8a7792-blanche.dts |   45 ++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)
arch/arm/boot/dts/Makefile +1 -0
Index: renesas/arch/arm/boot/dts/Makefile
===================================================================
@@ -638,6 +638,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
 	r8a7790-lager.dtb \
 	r8a7791-koelsch.dtb \
 	r8a7791-porter.dtb \
+	r8a7792-blanche.dtb \
 	r8a7793-gose.dtb \
 	r8a7794-alt.dtb \
 	r8a7794-silk.dtb \
arch/arm/boot/dts/r8a7792-blanche.dts new file +45 -0

45 lines not on this page · raw message

#15 lore raw

PATCH v5 12/12 ARM: dts: blanche: add Ethernet support

In reply to Sergei Shtylyov

R8A7792 SoC doesn't have the EtherMAC core, so SMSC LAN89218 Ethernet chip was used instead on the Blanche board; this chip is compatible with

SMSC LAN9115  for  which there's a (device tree aware) driver. Describe
the  chip in  the  Blanche device tree;  enable DHCP and NFS root in the

kernel command line for the kernel booting.

---
Changes in version 3:
- refreshed the patch.

Changes in version 2:
- added Simon's ACK.

 arch/arm/boot/dts/r8a7792-blanche.dts |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
arch/arm/boot/dts/r8a7792-blanche.dts +22 -1
Index: renesas/arch/arm/boot/dts/r8a7792-blanche.dts
===================================================================
@@ -22,7 +22,7 @@
 	};
 
 	chosen {
-		bootargs = "ignore_loglevel";
+		bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
 		stdout-path = "serial0:115200n8";
 	};
 
@@ -30,6 +30,27 @@
 		device_type = "memory";
 		reg = <0 0x40000000 0 0x40000000>;
 	};
+
+	d3_3v: regulator-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "D3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	ethernet at 18000000 {
+		compatible = "smsc,lan89218", "smsc,lan9115";
+		reg = <0 0x18000000 0 0x100>;
+		phy-mode = "mii";
+		interrupt-parent = <&irqc>;
+		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+		smsc,irq-push-pull;
+		reg-io-width = <4>;
+		vddvario-supply = <&d3_3v>;
+		vdd33a-supply = <&d3_3v>;
+	};
 };
 
 &extal_clk {
#6 lore raw

PATCH v5 5/12 ARM: shmobile: r8a7792: add SMP support

In reply to Sergei Shtylyov

Hi Sergei,

Quoted 4 lines · Sergei Shtylyov

Add R8A7792 SMP support using the shared APMU code. This SoC has 2 ARM Cortex-A15 CPU cores.

I apologise for not raising this earlier.

I would like you to remove SMP support from this series as I do not wish to merge any more per-SoC C SMP code for Gen-2 SoCs.

Rather, I believe the future is to use generic code to support the APMU hardware and then describe it in DT. Something like this:

http://www.spinics.net/lists/linux-sh/msg45229.html

As that code is not merged my suggestion is that we merge UP r8a7792 for now. This is the same approach that has been taken for the r8a7793.

Thanks!

#7 lore raw

PATCH v5 5/12 ARM: shmobile: r8a7792: add SMP support

Quoted 7 lines · Simon Horman
Quoted 4 lines

Add R8A7792 SMP support using the shared APMU code. This SoC has 2 ARM Cortex-A15 CPU cores.

I apologise for not raising this earlier.

Quoted 7 lines

I would like you to remove SMP support from this series as I do not wish to merge any more per-SoC C SMP code for Gen-2 SoCs.

Rather, I believe the future is to use generic code to support the APMU hardware and then describe it in DT. Something like this:

http://www.spinics.net/lists/linux-sh/msg45229.html

    Sigh...
Quoted 2 lines

As that code is not merged my suggestion is that we merge UP r8a7792 for now. This is the same approach that has been taken for the r8a7793.

It should be enough to drop the SMP patch from the series. Could you do it
or should I repost again?

Quoted 1 line

Thanks!

MBR, Sergei

#8 lore raw

PATCH v5 5/12 ARM: shmobile: r8a7792: add SMP support

Quoted 17 lines · Sergei Shtylyov
Quoted 7 lines · Simon Horman
Quoted 4 lines

Add R8A7792 SMP support using the shared APMU code. This SoC has 2 ARM Cortex-A15 CPU cores.

I apologise for not raising this earlier.

Quoted 7 lines

I would like you to remove SMP support from this series as I do not wish to merge any more per-SoC C SMP code for Gen-2 SoCs.

Rather, I believe the future is to use generic code to support the APMU hardware and then describe it in DT. Something like this:

http://www.spinics.net/lists/linux-sh/msg45229.html

Quoted 7 lines
   Sigh...
Quoted 2 lines

As that code is not merged my suggestion is that we merge UP r8a7792 for now. This is the same approach that has been taken for the r8a7793.

It should be enough to drop the SMP patch from the series. Could you do
it or should I repost again?

Sure, I think that is reasonable.

I have queued up the series with the following modifications:

* Omitted: "[PATCH v5 05/12] ARM: shmobile: r8a7792: add SMP support"
* Omitted cpu1 node from " [PATCH v5 06/12] ARM: dts: r8a7792: initial SoC device tree"

#16 lore raw

PATCH 1/1 ARM: dts: r8a7792: add SMP support

In reply to Sergei Shtylyov

Add the device tree nodes for the Advanced Power Management Unit (APMU) and the second Cortex-A15 CPU core.
Use the "enable-method" prop to point out that the APMU should be used for the SMP support.

---
This patch is against the 'renesas-devel-20160620-v4.7-rc4' tag of Simon Horman's 'renesas.git' repo. It depends on Magnus'/Geert's SMP patchset...

 arch/arm/boot/dts/r8a7792.dtsi |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/r8a7792.dtsi +16 -0
Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
@@ -21,6 +21,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "renesas,apmu";
 
 		cpu0: cpu at 0 {
 			device_type = "cpu";
@@ -32,6 +33,15 @@
 			next-level-cache = <&L2_CA15>;
 		};
 
+		cpu1: cpu at 1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a15";
+			reg = <1>;
+			clock-frequency = <1000000000>;
+			power-domains = <&sysc R8A7792_PD_CA15_CPU1>;
+			next-level-cache = <&L2_CA15>;
+		};
+
 		L2_CA15: cache-controller at 0 {
 			compatible = "cache";
 			reg = <0>;
@@ -49,6 +59,12 @@
 		#size-cells = <2>;
 		ranges;
 
+		apmu at e6152000 {
+			compatible = "renesas,r8a7792-apmu", "renesas,apmu";
+			reg = <0 0xe6152000 0 0x188>;
+			cpus = <&cpu0 &cpu1>;
+		};
+
 		gic: interrupt-controller at f1001000 {
 			compatible = "arm,gic-400";
 			#interrupt-cells = <3>;
#17 lore raw

PATCH 1/1 ARM: dts: r8a7792: add SMP support

Quoted 6 lines · Sergei Shtylyov

Add the device tree nodes for the Advanced Power Management Unit (APMU) and the second Cortex-A15 CPU core.
Use the "enable-method" prop to point out that the APMU should be used for the SMP support.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#21 lore raw

PATCH 1/1 ARM: dts: r8a7794: add SMP support

In reply to Sergei Shtylyov

Add the device tree node for the Advanced Power Management Unit (APMU). Use the "enable-method" prop to point out that the APMU should be used for the SMP support.

---
This patch is against the 'renesas-devel-20160621-v4.7-rc4' tag of Simon Horman's 'renesas.git' repo. It depends on Magnus'/Geert's SMP patchset...

SMP/PM basically works but you can't offline CPU0 (system hangs)...

 arch/arm/boot/dts/r8a7794.dtsi |    7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/r8a7794.dtsi +7 -0
Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
@@ -37,6 +37,7 @@
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
+		enable-method = "renesas,apmu";
 
 		cpu0: cpu at 0 {
 			device_type = "cpu";
@@ -65,6 +66,12 @@
 		};
 	};
 
+	apmu at e6151000 {
+		compatible = "renesas,r8a7794-apmu", "renesas,apmu";
+		reg = <0 0xe6151000 0 0x188>;
+		cpus = <&cpu0 &cpu1>;
+	};
+
 	gic: interrupt-controller at f1001000 {
 		compatible = "arm,gic-400";
 		#interrupt-cells = <3>;
#22 lore raw

PATCH 1/1 ARM: dts: r8a7794: add SMP support

Hi Sergei,

Quoted 5 lines · Sergei Shtylyov

Add the device tree node for the Advanced Power Management Unit (APMU). Use the "enable-method" prop to point out that the APMU should be used for the SMP support.

Quoted 1 line

SMP/PM basically works but you can't offline CPU0 (system hangs)...

On #renesas-soc you said it hangs on SILK only, and succeeds on Porter, with a WARNING in the clk core (which one?) during suspend?

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#23 lore raw

PATCH 1/1 ARM: dts: r8a7794: add SMP support

Quoted 4 lines · Geert Uytterhoeven
Quoted 4 lines

Add the device tree node for the Advanced Power Management Unit (APMU). Use the "enable-method" prop to point out that the APMU should be used for the SMP support.

Quoted 8 lines
Quoted 1 line
Quoted 1 line

SMP/PM basically works but you can't offline CPU0 (system hangs)...

On #renesas-soc you said it hangs on SILK only, and succeeds on Porter, with a WARNING in the clk core (which one?) during suspend?

Porter is based on R8A7791 (WARNING seemed to be caused by the CAN
driver). :-)

Quoted 5 lines

Thanks!

Gr{oetje,eeting}s,

Geert

MBR, Sergei

#24 lore raw

PATCH 1/1 ARM: dts: r8a7794: add SMP support

Hi Sergei,

Quoted 11 lines · Sergei Shtylyov
Quoted 9 lines · Geert Uytterhoeven
Quoted 5 lines

Add the device tree node for the Advanced Power Management Unit (APMU). Use the "enable-method" prop to point out that the APMU should be used for the SMP support.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

SMP/PM basically works but you can't offline CPU0 (system hangs)...

On #renesas-soc you said it hangs on SILK only, and succeeds on Porter, with a WARNING in the clk core (which one?) during suspend?

Porter is based on R8A7791 (WARNING seemed to be caused by the CAN
driver). :-)

Oh right, mixing up boards.

Will try on (remote) ALT when I find some time...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#25 lore raw

PATCH 1/1 ARM: dts: r8a7794: add SMP support

Hi Sergei,

Quoted 19 lines · Geert Uytterhoeven
Quoted 17 lines · Sergei Shtylyov
Quoted 14 lines · Geert Uytterhoeven
Quoted 5 lines

Add the device tree node for the Advanced Power Management Unit (APMU). Use the "enable-method" prop to point out that the APMU should be used for the SMP support.

Quoted 1 line

SMP/PM basically works but you can't offline CPU0 (system hangs)...

On #renesas-soc you said it hangs on SILK only, and succeeds on Porter, with a WARNING in the clk core (which one?) during suspend?

Quoted 6 lines
Quoted 2 lines

Porter is based on R8A7791 (WARNING seemed to be caused by the CAN
driver). :-)

Oh right, mixing up boards.

Will try on (remote) ALT when I find some time...

The second CPU boots (irrespective of MD21 setting), but the kernel starts spewing:

clocksource: Switched to clocksource arch_sys_counter
WARNING: Underflow in clocksource 'arch_sys_counter' observed,
time update ignored.
Please report this, consider using a different
clocksource, if possible.
Your kernel is probably still fine.
WARNING: Underflow in clocksource 'arch_sys_counter' observed,
time update ignored.
Please report this, consider using a different
clocksource, if possible.
Your kernel is probably still fine.

Seems like the secondary CPU also needs CNTVOFF initialization, which is done in the BSP in arch/arm/mach-shmobile/headsmp.S.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#18 lore raw

PATCH 1/1 ARM: dts: r8a7792: add SMP support

In reply to Sergei Shtylyov

Hello.

Quoted 10 lines · Sergei Shtylyov

Add the device tree nodes for the Advanced Power Management Unit (APMU) and the second Cortex-A15 CPU core.
Use the "enable-method" prop to point out that the APMU should be used for the SMP support.

---
This patch is against the 'renesas-devel-20160620-v4.7-rc4' tag of Simon Horman's 'renesas.git' repo. It depends on Magnus'/Geert's SMP patchset...

simon, now that this patchset has been merged (for 4.8?), could you also
merge this patch?

MBR, Sergei

#19 lore raw

PATCH 1/1 ARM: dts: r8a7792: add SMP support

Quoted 9 lines · Sergei Shtylyov

Hello.

Quoted 5 lines · Sergei Shtylyov

Add the device tree nodes for the Advanced Power Management Unit (APMU) and the second Cortex-A15 CPU core.
Use the "enable-method" prop to point out that the APMU should be used for the SMP support.

Quoted 8 lines
Quoted 5 lines

---
This patch is against the 'renesas-devel-20160620-v4.7-rc4' tag of Simon Horman's 'renesas.git' repo. It depends on Magnus'/Geert's SMP patchset...

simon, now that this patchset has been merged (for 4.8?), could you also
merge this patch?

Sure, as this is for a new board I'll make a last minute exception and take this. I am trusting that cpu hotplug and suspend/resume have been adequately tested.

#20 lore raw

PATCH 1/1 ARM: dts: r8a7792: add SMP support

Quoted 11 lines · Simon Horman
Quoted 11 lines
Quoted 10 lines

Add the device tree nodes for the Advanced Power Management Unit (APMU) and the second Cortex-A15 CPU core.
Use the "enable-method" prop to point out that the APMU should be used for the SMP support.

---
This patch is against the 'renesas-devel-20160620-v4.7-rc4' tag of Simon Horman's 'renesas.git' repo. It depends on Magnus'/Geert's SMP patchset...

Quoted 5 lines
Quoted 2 lines

simon, now that this patchset has been merged (for 4.8?), could you also
merge this patch?

Sure, as this is for a new board I'll make a last minute exception and take this.

    Thank you! :-)
Quoted 2 lines

I am trusting that cpu hotplug and suspend/resume have been adequately tested.

Don't worry, all tests suggested by you have passed on this board.
Only the R8A7794/SILK board had trouble with hot-unplugging CPU0...

MBR, Sergei

#26 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77970: add SMP support

In reply to Sergei Shtylyov

Add the device node for the second Cortex-A53 CPU core.

Based on the original (and large) patch by Daisuke Matsushita <[email protected]>.

---
This patch is against the 'renesas-devel-20180508-v4.17-rc4' tag of Simon Horman's 'renesas.git' repo.

 arch/arm64/boot/dts/renesas/r8a77970.dtsi |   10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/renesas/r8a77970.dtsi +10 -0
Index: renesas/arch/arm64/boot/dts/renesas/r8a77970.dtsi
===================================================================
@@ -41,6 +41,16 @@
 			enable-method = "psci";
 		};
 
+		a53_1: cpu at 1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53","arm,armv8";
+			reg = <1>;
+			clocks = <&cpg CPG_CORE R8A77970_CLK_Z2>;
+			power-domains = <&sysc R8A77970_PD_CA53_CPU1>;
+			next-level-cache = <&L2_CA53>;
+			enable-method = "psci";
+		};
+
 		L2_CA53: cache-controller {
 			compatible = "cache";
 			power-domains = <&sysc R8A77970_PD_CA53_SCU>;
#27 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77970: add SMP support

Hi Sergei,

Quoted 7 lines · Sergei Shtylyov

Add the device node for the second Cortex-A53 CPU core.

Based on the original (and large) patch by Daisuke Matsushita <[email protected]>.

Dupe of https://patchwork.kernel.org/patch/10032875/

Quoted 1 line

From series "[PATCH 0/2] arm64: dts: renesas: r8a77970: Add SMP Support"

(https://www.spinics.net/lists/linux-renesas-soc/msg19681.html)

arch/arm64/boot/dts/renesas/r8a77970.dtsi line 46

Quoted 9 lines
arch/arm64/boot/dts/renesas/r8a77970.dtsi +3 -0
@@ -41,6 +41,16 @@
                        enable-method = "psci";
                };
 
+               a53_1: cpu at 1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";

Missing space after the comma.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#28 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77970: add SMP support

Quoted 9 lines · Geert Uytterhoeven
Quoted 7 lines

Add the device node for the second Cortex-A53 CPU core.

Based on the original (and large) patch by Daisuke Matsushita <[email protected]>.

Dupe of https://patchwork.kernel.org/patch/10032875/

Sorry!
Not an exact dupe, though -- mine has clock/power #define's used,
yours -- only bare #s. :-)

Quoted 2 lines

From series "[PATCH 0/2] arm64: dts: renesas: r8a77970: Add SMP Support"
(https://www.spinics.net/lists/linux-renesas-soc/msg19681.html)

Hmm... what's the fate of this series?

Quoted 11 lines

arch/arm64/boot/dts/renesas/r8a77970.dtsi line 46

Quoted 9 lines
arch/arm64/boot/dts/renesas/r8a77970.dtsi +3 -0
@@ -41,6 +41,16 @@
                        enable-method = "psci";
                };
 
+               a53_1: cpu at 1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";

Missing space after the comma.

Oops. :-)

Quoted 3 lines

Gr{oetje,eeting}s,

Geert

MBR, Sergei

#29 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77970: add SMP support

Quoted 12 lines · Sergei Shtylyov
Quoted 9 lines · Geert Uytterhoeven
Quoted 7 lines

Add the device node for the second Cortex-A53 CPU core.

Based on the original (and large) patch by Daisuke Matsushita <[email protected]>.

Dupe of https://patchwork.kernel.org/patch/10032875/

Quoted 8 lines

Sorry!
Not an exact dupe, though -- mine has clock/power #define's used,
yours -- only bare #s. :-)

Quoted 2 lines

From series "[PATCH 0/2] arm64: dts: renesas: r8a77970: Add SMP Support"
(https://www.spinics.net/lists/linux-renesas-soc/msg19681.html)

Hmm... what's the fate of this series?

There is now a v2 of Geert's series which incorporates your enhancements. I will apply that.

#30 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77970: add SMP support

Hello!

Quoted 14 lines · Simon Horman
Quoted 14 lines
Quoted 9 lines
Quoted 7 lines

Add the device node for the second Cortex-A53 CPU core.

Based on the original (and large) patch by Daisuke Matsushita <[email protected]>.

Dupe of https://patchwork.kernel.org/patch/10032875/

Sorry!
Not an exact dupe, though -- mine has clock/power #define's used,
yours -- only bare #s. :-)

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

From series "[PATCH 0/2] arm64: dts: renesas: r8a77970: Add SMP Support"
(https://www.spinics.net/lists/linux-renesas-soc/msg19681.html)

Hmm... what's the fate of this series?

There is now a v2 of Geert's series which incorporates your enhancements.

I suggested to respin it. :-)

Quoted 1 line

I will apply that.

Thank you.
For the record, I had better luck than Geert testing SMP on Eagle: only CPU0
couldn't be offlined (and I was unable to find a workaround), others could be on/ offlined w/o issues. As for suspend/resume -- it did work but I could only test s2idle (/sys/power/mem_sleep had no other variants)...

MBR, Sergei

#31 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77970: add SMP support

Quoted 18 lines · Sergei Shtylyov

Hello!

Quoted 14 lines · Simon Horman
Quoted 14 lines
Quoted 9 lines
Quoted 7 lines

Add the device node for the second Cortex-A53 CPU core.

Based on the original (and large) patch by Daisuke Matsushita <[email protected]>.

Dupe of https://patchwork.kernel.org/patch/10032875/

Sorry!
Not an exact dupe, though -- mine has clock/power #define's used,
yours -- only bare #s. :-)

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

From series "[PATCH 0/2] arm64: dts: renesas: r8a77970: Add SMP Support"
(https://www.spinics.net/lists/linux-renesas-soc/msg19681.html)

Hmm... what's the fate of this series?

There is now a v2 of Geert's series which incorporates your enhancements.

I suggested to respin it. :-)

Thanks, that would have been my suggestion too :)

Quoted 8 lines
Quoted 1 line

I will apply that.

Thank you.
For the record, I had better luck than Geert testing SMP on Eagle:
only CPU0 couldn't be offlined (and I was unable to find a workaround), others could be on/ offlined w/o issues. As for suspend/resume -- it did work but I could only test s2idle (/sys/power/mem_sleep had no other variants)...

Thanks. Perhaps you have a more recent firmware than Geert. I would expect the CPU0 issue you describe will be resolved in time in the firmware.

#32 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77980: add SMP support

In reply to Sergei Shtylyov

Add the device nodes for 3 more Cortex-A53 CPU cores; adjust the interrupt delivery masks for the ARM GIC and Architectured Timer.

Based on the original (and large) patch by Vladimir Barinov.

---
The patch is against the 'renesas-devel-20180516v2-v4.17-rc5' tag of Simon Horman's 'renesas.git' repo. Tested successfully on the V3M Starter Kit board (except offlining CPU0 hangs the kernel).

 arch/arm64/boot/dts/renesas/r8a77980.dtsi |   40 ++++++++++++++++++++++++++----
 1 file changed, 35 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/renesas/r8a77980.dtsi +35 -5
Index: renesas/arch/arm64/boot/dts/renesas/r8a77980.dtsi
===================================================================
@@ -30,6 +30,36 @@
 			enable-method = "psci";
 		};
 
+		a53_1: cpu at 1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53","arm,armv8";
+			reg = <1>;
+			clocks = <&cpg CPG_CORE R8A77980_CLK_Z2>;
+			power-domains = <&sysc R8A77980_PD_CA53_CPU1>;
+			next-level-cache = <&L2_CA53>;
+			enable-method = "psci";
+		};
+
+		a53_2: cpu at 2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53","arm,armv8";
+			reg = <2>;
+			clocks = <&cpg CPG_CORE R8A77980_CLK_Z2>;
+			power-domains = <&sysc R8A77980_PD_CA53_CPU2>;
+			next-level-cache = <&L2_CA53>;
+			enable-method = "psci";
+		};
+
+		a53_3: cpu at 3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53","arm,armv8";
+			reg = <3>;
+			clocks = <&cpg CPG_CORE R8A77980_CLK_Z2>;
+			power-domains = <&sysc R8A77980_PD_CA53_CPU3>;
+			next-level-cache = <&L2_CA53>;
+			enable-method = "psci";
+		};
+
 		L2_CA53: cache-controller {
 			compatible = "cache";
 			power-domains = <&sysc R8A77980_PD_CA53_SCU>;
@@ -408,7 +438,7 @@
 			      <0x0 0xf1020000 0 0x20000>,
 			      <0x0 0xf1040000 0 0x20000>,
 			      <0x0 0xf1060000 0 0x20000>;
-			interrupts = <GIC_PPI 9	(GIC_CPU_MASK_SIMPLE(1) |
+			interrupts = <GIC_PPI 9	(GIC_CPU_MASK_SIMPLE(4) |
 				      IRQ_TYPE_LEVEL_HIGH)>;
 			clocks = <&cpg CPG_MOD 408>;
 			clock-names = "clk";
@@ -424,13 +454,13 @@
 
 	timer {
 		compatible = "arm,armv8-timer";
-		interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) |
+		interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) |
 				       IRQ_TYPE_LEVEL_LOW)>,
-				      <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) |
+				      <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) |
 				       IRQ_TYPE_LEVEL_LOW)>,
-				      <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) |
+				      <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
 				       IRQ_TYPE_LEVEL_LOW)>,
-				      <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) |
+				      <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
 				       IRQ_TYPE_LEVEL_LOW)>;
 	};
 };
#33 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77980: add SMP support

Hi Sergei,

Quoted 7 lines · Sergei Shtylyov

Add the device nodes for 3 more Cortex-A53 CPU cores; adjust the interrupt delivery masks for the ARM GIC and Architectured Timer.

Based on the original (and large) patch by Vladimir Barinov.

Thanks for your patch!

arch/arm64/boot/dts/renesas/r8a77980.dtsi line 35

Quoted 9 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +3 -0
@@ -30,6 +30,36 @@
                        enable-method = "psci";
                };
 
+               a53_1: cpu at 1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";

Please stop copying spaceless lists ;-)

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#34 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77980: add SMP support

Quoted 16 lines · Geert Uytterhoeven
Quoted 7 lines

Add the device nodes for 3 more Cortex-A53 CPU cores; adjust the interrupt delivery masks for the ARM GIC and Architectured Timer.

Based on the original (and large) patch by Vladimir Barinov.

Thanks for your patch!

Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +0 -0
@@ -30,6 +30,36 @@
                        enable-method = "psci";
                };
 
Quoted 5 lines

arch/arm64/boot/dts/renesas/r8a77980.dtsi line 35

Quoted 3 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +3 -0
+               a53_1: cpu at 1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";

Please stop copying spaceless lists ;-)

Oops! Simon, do I need to re-post?

Quoted 3 lines

Gr{oetje,eeting}s,

Geert

MBR, Sergei

#35 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77980: add SMP support

Quoted 18 lines · Sergei Shtylyov
Quoted 16 lines · Geert Uytterhoeven
Quoted 7 lines

Add the device nodes for 3 more Cortex-A53 CPU cores; adjust the interrupt delivery masks for the ARM GIC and Architectured Timer.

Based on the original (and large) patch by Vladimir Barinov.

Thanks for your patch!

Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +0 -0
@@ -30,6 +30,36 @@
                        enable-method = "psci";
                };
 
Quoted 7 lines
Quoted 5 lines

arch/arm64/boot/dts/renesas/r8a77980.dtsi line 35

Quoted 3 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +3 -0
+               a53_1: cpu at 1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";

Please stop copying spaceless lists ;-)

Oops! Simon, do I need to re-post?

No, but Geert, are you otherwise ok with this patch?

#38 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77980: add SMP support

In reply to Sergei Shtylyov
Quoted 5 lines · Sergei Shtylyov

Add the device nodes for 3 more Cortex-A53 CPU cores; adjust the interrupt delivery masks for the ARM GIC and Architectured Timer.

Based on the original (and large) patch by Vladimir Barinov.

Quoted 7 lines

---
The patch is against the 'renesas-devel-20180516v2-v4.17-rc5' tag of Simon Horman's 'renesas.git' repo. Tested successfully on the V3M Starter Kit board (except offlining CPU0 hangs the kernel).

This looks fine but I will wait to see if there are other reviews completed before applying.

#36 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77980: add SMP support

In reply to Simon Horman
Quoted 25 lines · Simon Horman
Quoted 24 lines · Sergei Shtylyov
Quoted 21 lines · Geert Uytterhoeven
Quoted 7 lines

Add the device nodes for 3 more Cortex-A53 CPU cores; adjust the interrupt delivery masks for the ARM GIC and Architectured Timer.

Based on the original (and large) patch by Vladimir Barinov.

Thanks for your patch!

arch/arm64/boot/dts/renesas/r8a77980.dtsi line 35

Quoted 9 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +3 -0
@@ -30,6 +30,36 @@
                        enable-method = "psci";
                };
 
+               a53_1: cpu at 1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";

Please stop copying spaceless lists ;-)

Quoted 3 lines
Quoted 1 line

Oops! Simon, do I need to re-post?

No, but Geert, are you otherwise ok with this patch?

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#37 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77980: add SMP support

Quoted 26 lines · Geert Uytterhoeven
Quoted 25 lines · Simon Horman
Quoted 24 lines · Sergei Shtylyov
Quoted 21 lines · Geert Uytterhoeven
Quoted 7 lines

Add the device nodes for 3 more Cortex-A53 CPU cores; adjust the interrupt delivery masks for the ARM GIC and Architectured Timer.

Based on the original (and large) patch by Vladimir Barinov.

Thanks for your patch!

arch/arm64/boot/dts/renesas/r8a77980.dtsi line 35

Quoted 9 lines
arch/arm64/boot/dts/renesas/r8a77980.dtsi +3 -0
@@ -30,6 +30,36 @@
                        enable-method = "psci";
                };
 
+               a53_1: cpu at 1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";

Please stop copying spaceless lists ;-)

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Oops! Simon, do I need to re-post?

No, but Geert, are you otherwise ok with this patch?

Thanks, I have applied the following:

From: Sergei Shtylyov <[email protected]>
Subject: [PATCH] arm64: dts: renesas: r8a77980: add SMP support

Add the device nodes for 3 more Cortex-A53 CPU cores; adjust the interrupt delivery masks for the ARM GIC and Architectured Timer.

Based on the original (and large) patch by Vladimir Barinov.

---
 arch/arm64/boot/dts/renesas/r8a77980.dtsi | 40 +++++++++++++++++++++++++++----
 1 file changed, 35 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/renesas/r8a77980.dtsi +35 -5
index 4c40f9f0ebc9..6d2b61d83caf 100644
@@ -30,6 +30,36 @@
 			enable-method = "psci";
 		};
 
+		a53_1: cpu at 1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53", "arm,armv8";
+			reg = <1>;
+			clocks = <&cpg CPG_CORE R8A77980_CLK_Z2>;
+			power-domains = <&sysc R8A77980_PD_CA53_CPU1>;
+			next-level-cache = <&L2_CA53>;
+			enable-method = "psci";
+		};
+
+		a53_2: cpu at 2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53", "arm,armv8";
+			reg = <2>;
+			clocks = <&cpg CPG_CORE R8A77980_CLK_Z2>;
+			power-domains = <&sysc R8A77980_PD_CA53_CPU2>;
+			next-level-cache = <&L2_CA53>;
+			enable-method = "psci";
+		};
+
+		a53_3: cpu at 3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53", "arm,armv8";
+			reg = <3>;
+			clocks = <&cpg CPG_CORE R8A77980_CLK_Z2>;
+			power-domains = <&sysc R8A77980_PD_CA53_CPU3>;
+			next-level-cache = <&L2_CA53>;
+			enable-method = "psci";
+		};
+
 		L2_CA53: cache-controller {
 			compatible = "cache";
 			power-domains = <&sysc R8A77980_PD_CA53_SCU>;
@@ -408,7 +438,7 @@
 			      <0x0 0xf1020000 0 0x20000>,
 			      <0x0 0xf1040000 0 0x20000>,
 			      <0x0 0xf1060000 0 0x20000>;
-			interrupts = <GIC_PPI 9	(GIC_CPU_MASK_SIMPLE(1) |
+			interrupts = <GIC_PPI 9	(GIC_CPU_MASK_SIMPLE(4) |
 				      IRQ_TYPE_LEVEL_HIGH)>;
 			clocks = <&cpg CPG_MOD 408>;
 			clock-names = "clk";
@@ -424,13 +454,13 @@
 
 	timer {
 		compatible = "arm,armv8-timer";
-		interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) |
+		interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) |
 				       IRQ_TYPE_LEVEL_LOW)>,
-				      <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) |
+				      <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) |
 				       IRQ_TYPE_LEVEL_LOW)>,
-				      <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) |
+				      <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
 				       IRQ_TYPE_LEVEL_LOW)>,
-				      <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) |
+				      <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
 				       IRQ_TYPE_LEVEL_LOW)>;
 	};
 };
Signature · 1 line
2.11.0