Skip to contentSkip to conversation

R-Car Gen3 IMP-X5 prototype code

PATCH New Magnus Damm 1 participant 7 messages Jan 21, 2019

Subsystems (2)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

cover R-Car Gen3 IMP-X5 prototype code

R-Car Gen3 IMP-X5 prototype code

[PATCH/RFC 01/06] Prototype code for IMP-X5
[PATCH/RFC 02/06] arm64: dts: renesas: r8a7795: One IMP-X5 device for R-Car H3 [PATCH/RFC 03/06] arm64: dts: renesas: r8a7796: One IMP-X5 device for R-Car M3-W [PATCH/RFC 04/06] arm64: dts: renesas: r8a77965: One IMP-X5 device for R-Car M3-N [PATCH/RFC 05/06] arm64: dts: renesas: r8a77970: One IMP-X5 device for R-Car V3M [PATCH/RFC 06/06] arm64: dts: renesas: r8a77980: One IMP-X5 device for R-Car V3H

These patches temporarily introduce a IMP-X5 driver that uses Runtime PM to control clocks and power when trying to access the device.

The user should check console printouts and comment out Run-time PM bits of the code with/without power domain DT information to verify that register settings are changed as expected. Per-SoC modifications of the Clock, Reset and Power domain code may be required.

Not intended for upstream merge. Written for H3 ES2 ULCB.

Created as an example of how to test power domains for a certain device. I hope to use this approach to test IPMMU power domain support in the future.

---

Developed on top of v5.0-rc3

 arch/arm64/boot/dts/renesas/r8a7795.dtsi  |    9 +++
 arch/arm64/boot/dts/renesas/r8a7796.dtsi  |    9 +++
 arch/arm64/boot/dts/renesas/r8a77965.dtsi |    9 +++
 arch/arm64/boot/dts/renesas/r8a77970.dtsi |    9 +++
 arch/arm64/boot/dts/renesas/r8a77980.dtsi |    9 +++
 drivers/soc/renesas/Makefile              |    2 
 drivers/soc/renesas/renesas-test-imp-x5.c |   77 +++++++++++++++++++++++++++++
 7 files changed, 123 insertions(+), 1 deletion(-)
author maintainer
#1 lore raw

PATCH 1/6 Prototype code for IMP-X5

From: Magnus Damm <[email protected]>

Prototype code to read out the IMP-X5 register settings at probe() time.

Not for upstream merge.

Not-Yet-Signed-off-by Magnus Damm <[email protected]>

---

 drivers/soc/renesas/Makefile              |    2 
 drivers/soc/renesas/renesas-test-imp-x5.c |   77 +++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+), 1 deletion(-)
drivers/soc/renesas/Makefile +1 -1
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 # Generic, must be first because of soc_device_register()
-obj-$(CONFIG_SOC_RENESAS)	+= renesas-soc.o
+obj-$(CONFIG_SOC_RENESAS)	+= renesas-soc.o renesas-test-imp-x5.o
 
 # SoC
 obj-$(CONFIG_SYSC_R8A7743)	+= r8a7743-sysc.o
drivers/soc/renesas/renesas-test-imp-x5.c new file +77 -0

77 lines not on this page · raw message

author maintainer
#2 lore raw

PATCH 2/6 arm64: dts: renesas: r8a7795: One IMP-X5 device for R-Car H3

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Add an IMP-X5 device node to the r8a7795 device tree source.

Not for upstream merge.

Not-Yet-Signed-off-by Magnus Damm <[email protected]>

---

 arch/arm64/boot/dts/renesas/r8a7795.dtsi |    9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +9 -0
@@ -3047,6 +3047,15 @@
 			};
 		};
 
+		imp-x5@ff900000 {
+			compatible = "renesas,imp-x5";
+			reg = <0 0xff900000 0 0x300000>;
+			interrupts = <GIC_SPI 439 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 824>;
+			power-domains = <&sysc R8A7795_PD_A3IR>;
+			resets = <&cpg 824>;
+		};
+
 		prr: chipid@fff00044 {
 			compatible = "renesas,prr";
 			reg = <0 0xfff00044 0 4>;
author maintainer
#3 lore raw

PATCH 3/6 arm64: dts: renesas: r8a7796: One IMP-X5 device for R-Car M3-W

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Add an IMP-X5 device node to the r8a7796 device tree source.

Not for upstream merge.

Not-Yet-Signed-off-by Magnus Damm <[email protected]>

---

 arch/arm64/boot/dts/renesas/r8a7796.dtsi |    9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/renesas/r8a7796.dtsi +9 -0
@@ -2791,6 +2791,15 @@
 			};
 		};
 
+		imp-x5@ff900000 {
+			compatible = "renesas,imp-x5";
+			reg = <0 0xff900000 0 0x300000>;
+			interrupts = <GIC_SPI 439 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 824>;
+			power-domains = <&sysc R8A7796_PD_A3IR>;
+			resets = <&cpg 824>;
+		};
+
 		prr: chipid@fff00044 {
 			compatible = "renesas,prr";
 			reg = <0 0xfff00044 0 4>;
author maintainer
#4 lore raw

PATCH 4/6 arm64: dts: renesas: r8a77965: One IMP-X5 device for R-Car M3-N

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Add an IMP-X5 device node to the r8a77965 device tree source.

Not for upstream merge.

Not-Yet-Signed-off-by Magnus Damm <[email protected]>

---

 arch/arm64/boot/dts/renesas/r8a77965.dtsi |    9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/renesas/r8a77965.dtsi +9 -0
@@ -2225,6 +2225,15 @@
 			};
 		};
 
+		imp-x5@ff900000 {
+			compatible = "renesas,imp-x5";
+			reg = <0 0xff900000 0 0x300000>;
+			interrupts = <GIC_SPI 439 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 824>;
+			power-domains = <&sysc R8A77965_PD_A3IR>;
+			resets = <&cpg 824>;
+		};
+
 		prr: chipid@fff00044 {
 			compatible = "renesas,prr";
 			reg = <0 0xfff00044 0 4>;
author maintainer
#5 lore raw

PATCH 5/6 arm64: dts: renesas: r8a77970: One IMP-X5 device for R-Car V3M

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Add an IMP-X5 device node to the r8a77970 device tree source.

Not for upstream merge.

Not-Yet-Signed-off-by Magnus Damm <[email protected]>

---

 arch/arm64/boot/dts/renesas/r8a77970.dtsi |    9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/renesas/r8a77970.dtsi +9 -0
@@ -1169,6 +1169,15 @@
 			};
 		};
 
+		imp-x5@ff900000 {
+			compatible = "renesas,imp-x5";
+			reg = <0 0xff900000 0 0x300000>;
+			interrupts = <GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 827>;
+			power-domains = <&sysc R8A77970_PD_A3IR>;
+			resets = <&cpg 827>;
+		};
+
 		prr: chipid@fff00044 {
 			compatible = "renesas,prr";
 			reg = <0 0xfff00044 0 4>;
author maintainer
#6 lore raw

PATCH 6/6 arm64: dts: renesas: r8a77980: One IMP-X5 device for R-Car V3H

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Add an IMP-X5 device node to the r8a77980 device tree source.

Not for upstream merge.

Not-Yet-Signed-off-by Magnus Damm <[email protected]>

---

 arch/arm64/boot/dts/renesas/r8a77980.dtsi |    9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/renesas/r8a77980.dtsi +9 -0
@@ -1529,6 +1529,15 @@
 			};
 		};
 
+		imp-x5@ff900000 {
+			compatible = "renesas,imp-x5";
+			reg = <0 0xff900000 0 0x300000>;
+			interrupts = <GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 827>;
+			power-domains = <&sysc R8A77980_PD_A3IR>;
+			resets = <&cpg 827>;
+		};
+		
 		prr: chipid@fff00044 {
 			compatible = "renesas,prr";
 			reg = <0 0xfff00044 0 4>;