Skip to contentSkip to conversation

Add R8A7794 GPIO DT support

PATCH New Sergei Shtylyov 4 participants 15 messages Feb 21, 2015 – Feb 25, 2015

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

cover Add R8A7794 GPIO DT support

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20150220-v3.19' tag. Here we add the GPIO device tree support for the R8A7794 SoC. It depends on the R8A7794 PFC/MMCIF device tree patches posted recently in order to apply.

[1/2] ARM: shmobile: r8a7794: add GPIO clocks
[2/2] ARM: shmobile: r8a7794: add GPIO DT support

WBR, Sergei

#1 lore raw

PATCH 1/2 ARM: shmobile: r8a7794: add GPIO clocks

Describe the GPIO clocks in the R8A7794 device tree.

Based on the original patch by Koji Matsuoka <[email protected]>.

---
 arch/arm/boot/dts/r8a7794.dtsi |   22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
arch/arm/boot/dts/r8a7794.dtsi +14 -8
Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
@@ -651,16 +651,22 @@
 		mstp9_clks: mstp9_clks at e6150994 {
 			compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
-			clocks = <&cpg_clocks R8A7794_CLK_QSPI>, <&hp_clk>, <&hp_clk>,
-				<&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>;
+			clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
+				 <&cp_clk>, <&cp_clk>, <&cp_clk>,
+				 <&cpg_clocks R8A7794_CLK_QSPI>, <&hp_clk>, <&hp_clk>,
+				 <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>;
 			#clock-cells = <1>;
-			clock-indices = <
-				R8A7794_CLK_QSPI_MOD R8A7794_CLK_I2C5 R8A7794_CLK_I2C4
-				R8A7794_CLK_I2C3 R8A7794_CLK_I2C2 R8A7794_CLK_I2C1
-				R8A7794_CLK_I2C0
-			>;
+			clock-indices = <R8A7794_CLK_GPIO6 R8A7794_CLK_GPIO5
+					 R8A7794_CLK_GPIO4 R8A7794_CLK_GPIO3
+					 R8A7794_CLK_GPIO2 R8A7794_CLK_GPIO1
+					 R8A7794_CLK_GPIO0 R8A7794_CLK_QSPI_MOD
+					 R8A7794_CLK_I2C5 R8A7794_CLK_I2C4
+					 R8A7794_CLK_I2C3 R8A7794_CLK_I2C2
+					 R8A7794_CLK_I2C1 R8A7794_CLK_I2C0>;
 			clock-output-names =
-				"qspi_mod", "i2c5", "i2c4", "i2c3", "i2c2", "i2c1", "i2c0";
+				"gpio6", "gpio5", "gpio4", "gpio3", "gpio2",
+				"gpio1", "gpio0", "qspi_mod",
+				"i2c5", "i2c4", "i2c3", "i2c2", "i2c1", "i2c0";
 		};
 		mstp11_clks: mstp11_clks at e615099c {
 			compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
#2 lore raw

PATCH 1/2 ARM: shmobile: r8a7794: add GPIO clocks

Quoted 5 lines · Sergei Shtylyov

Describe the GPIO clocks in the R8A7794 device tree.

Based on the original patch by Koji Matsuoka <[email protected]>.

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

#3 lore raw

PATCH 1/2 ARM: shmobile: r8a7794: add GPIO clocks

In reply to Sergei Shtylyov

Hi Sergei,

Thank you for the patch.

Quoted 5 lines · On Sunday 22 February 2015 01:11:25 Sergei Shtylyov wrote:

Describe the GPIO clocks in the R8A7794 device tree.

Based on the original patch by Koji Matsuoka <[email protected]>.

arch/arm/boot/dts/r8a7794.dtsi line 652

Quoted 12 lines
---
 arch/arm/boot/dts/r8a7794.dtsi |   22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================

arch/arm/boot/dts/r8a7794.dtsi +0 -0
@@ -651,16 +651,22 @@
 		mstp9_clks: mstp9_clks at e6150994 {
 			compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-

clocks";

Quoted 18 lines
arch/arm/boot/dts/r8a7794.dtsi +9 -7
 			reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
-			clocks = <&cpg_clocks R8A7794_CLK_QSPI>, <&hp_clk>, <&hp_clk>,
-				<&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>;
+			clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
+				 <&cp_clk>, <&cp_clk>, <&cp_clk>,
+				 <&cpg_clocks R8A7794_CLK_QSPI>, <&hp_clk>, <&hp_clk>,
+				 <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>;
 			#clock-cells = <1>;
-			clock-indices = <
-				R8A7794_CLK_QSPI_MOD R8A7794_CLK_I2C5 R8A7794_CLK_I2C4
-				R8A7794_CLK_I2C3 R8A7794_CLK_I2C2 R8A7794_CLK_I2C1
-				R8A7794_CLK_I2C0
-			>;
+			clock-indices = <R8A7794_CLK_GPIO6 R8A7794_CLK_GPIO5
+					 R8A7794_CLK_GPIO4 R8A7794_CLK_GPIO3
+					 R8A7794_CLK_GPIO2 R8A7794_CLK_GPIO1
+					 R8A7794_CLK_GPIO0 R8A7794_CLK_QSPI_MOD
+					 R8A7794_CLK_I2C5 R8A7794_CLK_I2C4

arch/arm/boot/dts/r8a7794.dtsi

Quoted 10 lines
arch/arm/boot/dts/r8a7794.dtsi +5 -1
+					 R8A7794_CLK_I2C3 R8A7794_CLK_I2C2
+					 R8A7794_CLK_I2C1 R8A7794_CLK_I2C0>;
 			clock-output-names =
-				"qspi_mod", "i2c5", "i2c4", "i2c3", "i2c2", "i2c1", "i2c0";
+				"gpio6", "gpio5", "gpio4", "gpio3", "gpio2",
+				"gpio1", "gpio0", "qspi_mod",
+				"i2c5", "i2c4", "i2c3", "i2c2", "i2c1", "i2c0";
 		};
 		mstp11_clks: mstp11_clks at e615099c {
 			compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-

clocks";

Signature · 3 lines
Regards,

Laurent Pinchart
#4 lore raw

PATCH 2/2 ARM: shmobile: r8a7794: add GPIO DT support

In reply to Sergei Shtylyov

Describe GPIO[0-6] controllers in the R8A7794 device tree.

Based on original patch by Hisashi Nakamura <[email protected]>.

---
 arch/arm/boot/dts/r8a7794.dtsi |   84 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)
arch/arm/boot/dts/r8a7794.dtsi +84 -0
Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
@@ -50,6 +50,90 @@
 		interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
 	};
 
+	gpio0: gpio at e6050000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6050000 0 0x50>;
+		interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 0 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO0>;
+	};
+
+	gpio1: gpio at e6051000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6051000 0 0x50>;
+		interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 32 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO1>;
+	};
+
+	gpio2: gpio at e6052000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6052000 0 0x50>;
+		interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 64 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO2>;
+	};
+
+	gpio3: gpio at e6053000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6053000 0 0x50>;
+		interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 96 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO3>;
+	};
+
+	gpio4: gpio at e6054000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6054000 0 0x50>;
+		interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 128 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO4>;
+	};
+
+	gpio5: gpio at e6055000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6055000 0 0x50>;
+		interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 160 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO5>;
+	};
+
+	gpio6: gpio at e6055400 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6055400 0 0x50>;
+		interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 192 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO6>;
+	};
+
 	cmt0: timer at ffca0000 {
 		compatible = "renesas,cmt-48-gen2";
 		reg = <0 0xffca0000 0 0x1004>;
#5 lore raw

PATCH 2/2 ARM: shmobile: r8a7794: add GPIO DT support

Quoted 5 lines · Sergei Shtylyov

Describe GPIO[0-6] controllers in the R8A7794 device tree.

Based on original patch by Hisashi Nakamura <[email protected]>.

Acked-?by: Geert Uytterhoeven <[email protected]>

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

#6 lore raw

PATCH 2/2 ARM: shmobile: r8a7794: add GPIO DT support

In reply to Sergei Shtylyov

Hi Sergei,

Thank you for the patch.

Quoted 28 lines · On Sunday 22 February 2015 01:12:31 Sergei Shtylyov wrote:

Describe GPIO[0-6] controllers in the R8A7794 device tree.

Based on original patch by Hisashi Nakamura
<[email protected]>.

---
 arch/arm/boot/dts/r8a7794.dtsi |   84 +++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================

arch/arm/boot/dts/r8a7794.dtsi +9 -0
@@ -50,6 +50,90 @@
 		interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
 	};
 
+	gpio0: gpio at e6050000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6050000 0 0x50>;
+		interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 0 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;

arch/arm/boot/dts/r8a7794.dtsi line 71

Quoted 10 lines
arch/arm/boot/dts/r8a7794.dtsi +10 -0
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO0>;
+	};
+
+	gpio1: gpio at e6051000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6051000 0 0x50>;
+		interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 32 32>;

This GPIO block has 26 GPIOs only.

Quoted 38 lines
arch/arm/boot/dts/r8a7794.dtsi +38 -0
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO1>;
+	};
+
+	gpio2: gpio at e6052000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6052000 0 0x50>;
+		interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 64 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO2>;
+	};
+
+	gpio3: gpio at e6053000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6053000 0 0x50>;
+		interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 96 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO3>;
+	};
+
+	gpio4: gpio at e6054000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6054000 0 0x50>;
+		interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 128 32>;
+		#interrupt-cells = <2>;
+		interrupt-controller;

arch/arm/boot/dts/r8a7794.dtsi line 119

Quoted 10 lines
arch/arm/boot/dts/r8a7794.dtsi +10 -0
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO4>;
+	};
+
+	gpio5: gpio at e6055000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6055000 0 0x50>;
+		interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 160 32>;

This GPIO block has 28 GPIOs only.

arch/arm/boot/dts/r8a7794.dtsi line 131

Quoted 12 lines
arch/arm/boot/dts/r8a7794.dtsi +12 -0
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO5>;
+	};
+
+	gpio6: gpio at e6055400 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6055400 0 0x50>;
+		interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 192 32>;

This GPIO block has 26 GPIOs only.

Quoted 8 lines
arch/arm/boot/dts/r8a7794.dtsi +5 -0
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO6>;
+	};
+
 	cmt0: timer at ffca0000 {
 		compatible = "renesas,cmt-48-gen2";
 		reg = <0 0xffca0000 0 0x1004>;
Signature · 3 lines
Regards,

Laurent Pinchart
#7 lore raw

PATCH 2/2 ARM: shmobile: r8a7794: add GPIO DT support

Hi Laurent,

Quoted 32 lines · Laurent Pinchart

arch/arm/boot/dts/r8a7794.dtsi line 57

Quoted 11 lines
arch/arm/boot/dts/r8a7794.dtsi +7 -0
@@ -50,6 +50,90 @@
 
+     gpio1: gpio at e6051000 {
+             compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+             reg = <0 0xe6051000 0 0x50>;
+             interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
+             #gpio-cells = <2>;
+             gpio-controller;
+             gpio-ranges = <&pfc 0 32 32>;

This GPIO block has 26 GPIOs only.

arch/arm/boot/dts/r8a7794.dtsi line 119

Quoted 7 lines
arch/arm/boot/dts/r8a7794.dtsi +7 -0
+     gpio5: gpio at e6055000 {
+             compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+             reg = <0 0xe6055000 0 0x50>;
+             interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
+             #gpio-cells = <2>;
+             gpio-controller;
+             gpio-ranges = <&pfc 0 160 32>;

This GPIO block has 28 GPIOs only.

arch/arm/boot/dts/r8a7794.dtsi line 131

Quoted 7 lines
arch/arm/boot/dts/r8a7794.dtsi +7 -0
+     gpio6: gpio at e6055400 {
+             compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+             reg = <0 0xe6055400 0 0x50>;
+             interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
+             #gpio-cells = <2>;
+             gpio-controller;
+             gpio-ranges = <&pfc 0 192 32>;
Quoted 1 line

This GPIO block has 26 GPIOs only.

I guess you hear me coming... r8a779[01].dtsi need to be fixed, too.

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

#8 lore raw

PATCH 2/2 ARM: shmobile: r8a7794: add GPIO DT support

Hi Geert,

Quoted 33 lines · On Wednesday 25 February 2015 11:27:37 Geert Uytterhoeven wrote:
Quoted 32 lines · Laurent Pinchart

arch/arm/boot/dts/r8a7794.dtsi line 57

Quoted 11 lines
arch/arm/boot/dts/r8a7794.dtsi +7 -0
@@ -50,6 +50,90 @@
 
+     gpio1: gpio at e6051000 {
+             compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+             reg = <0 0xe6051000 0 0x50>;
+             interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
+             #gpio-cells = <2>;
+             gpio-controller;
+             gpio-ranges = <&pfc 0 32 32>;

This GPIO block has 26 GPIOs only.

arch/arm/boot/dts/r8a7794.dtsi line 119

Quoted 7 lines
arch/arm/boot/dts/r8a7794.dtsi +7 -0
+     gpio5: gpio at e6055000 {
+             compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+             reg = <0 0xe6055000 0 0x50>;
+             interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
+             #gpio-cells = <2>;
+             gpio-controller;
+             gpio-ranges = <&pfc 0 160 32>;

This GPIO block has 28 GPIOs only.

Quoted 7 lines
arch/arm/boot/dts/r8a7794.dtsi +7 -0
+     gpio6: gpio at e6055400 {
+             compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+             reg = <0 0xe6055400 0 0x50>;
+             interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
+             #gpio-cells = <2>;
+             gpio-controller;
+             gpio-ranges = <&pfc 0 192 32>;
Quoted 3 lines
Quoted 1 line

This GPIO block has 26 GPIOs only.

I guess you hear me coming... r8a779[01].dtsi need to be fixed, too.

Yes. We're first investigating issues in the pfc driver and/or pinctrl core due to holes in GPIO banks pins though.

Signature · 3 lines
Regards,

Laurent Pinchart
#9 lore raw

PATCH 2/2 ARM: shmobile: r8a7794: add GPIO DT support

In reply to Laurent Pinchart

Hello.

Quoted 17 lines · Laurent Pinchart
Quoted 17 lines

Describe GPIO[0-6] controllers in the R8A7794 device tree.

Based on original patch by Hisashi Nakamura
<[email protected]>.

---
  arch/arm/boot/dts/r8a7794.dtsi |   84 +++++++++++++++++++++++++++++++++++++
  1 file changed, 84 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================

arch/arm/boot/dts/r8a7794.dtsi +0 -0
@@ -50,6 +50,90 @@

[...]

Quoted 9 lines

arch/arm/boot/dts/r8a7794.dtsi line 71

Quoted 7 lines
arch/arm/boot/dts/r8a7794.dtsi +7 -0
+	gpio1: gpio at e6051000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6051000 0 0x50>;
+		interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 32 32>;

This GPIO block has 26 GPIOs only.

[...]

Quoted 10 lines

arch/arm/boot/dts/r8a7794.dtsi line 119

Quoted 7 lines
arch/arm/boot/dts/r8a7794.dtsi +7 -0
+	gpio5: gpio at e6055000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6055000 0 0x50>;
+		interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 160 32>;

This GPIO block has 28 GPIOs only.

Quoted 14 lines

arch/arm/boot/dts/r8a7794.dtsi line 131

Quoted 12 lines
arch/arm/boot/dts/r8a7794.dtsi +12 -0
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO5>;
+	};
+
+	gpio6: gpio at e6055400 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6055400 0 0x50>;
+		interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 192 32>;

This GPIO block has 26 GPIOs only.

Yes, I know; I just wasn't sure what to do with the "gpio-ranges" prop of
the following GPIO node. Should I keep the base GPIO # or update it as well?

WBR, Sergei

#10 lore raw

PATCH 2/2 ARM: shmobile: r8a7794: add GPIO DT support

Hi Sergei,

Quoted 58 lines · On Wednesday 25 February 2015 17:04:53 Sergei Shtylyov wrote:
Quoted 17 lines · Laurent Pinchart
Quoted 17 lines

Describe GPIO[0-6] controllers in the R8A7794 device tree.

Based on original patch by Hisashi Nakamura
<[email protected]>.

---

  arch/arm/boot/dts/r8a7794.dtsi |   84 +++++++++++++++++++++++++++++++++
  1 file changed, 84 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================

arch/arm/boot/dts/r8a7794.dtsi +0 -0
@@ -50,6 +50,90 @@

[...]

Quoted 9 lines

arch/arm/boot/dts/r8a7794.dtsi line 71

Quoted 7 lines
arch/arm/boot/dts/r8a7794.dtsi +7 -0
+	gpio1: gpio at e6051000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6051000 0 0x50>;
+		interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 32 32>;

This GPIO block has 26 GPIOs only.

[...]

Quoted 10 lines

arch/arm/boot/dts/r8a7794.dtsi line 119

Quoted 7 lines
arch/arm/boot/dts/r8a7794.dtsi +7 -0
+	gpio5: gpio at e6055000 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6055000 0 0x50>;
+		interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 160 32>;

This GPIO block has 28 GPIOs only.

Quoted 14 lines

arch/arm/boot/dts/r8a7794.dtsi line 131

Quoted 12 lines
arch/arm/boot/dts/r8a7794.dtsi +12 -0
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		clocks = <&mstp9_clks R8A7794_CLK_GPIO5>;
+	};
+
+	gpio6: gpio at e6055400 {
+		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
+		reg = <0 0xe6055400 0 0x50>;
+		interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-ranges = <&pfc 0 192 32>;

This GPIO block has 26 GPIOs only.

Quoted 2 lines

Yes, I know; I just wasn't sure what to do with the "gpio-ranges" prop of the following GPIO node. Should I keep the base GPIO # or update it as well?

I think the base number should be kept as-is, as the pfc driver indexes GPIOs using 32 * bank + offset. There are thus holes in the pfc pins array, but that shouldn't be a big deal (of course if you can find an easy way to optimize that, it would be welcome :-)).

Signature · 3 lines
Regards,

Laurent Pinchart
#11 lore raw

cover Add R8A7794 GPIO DT support

In reply to Sergei Shtylyov
Quoted 9 lines · Sergei Shtylyov

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20150220-v3.19' tag. Here we add the GPIO device tree support for the R8A7794 SoC. It depends on the R8A7794 PFC/MMCIF device tree patches posted recently in order to apply.

[1/2] ARM: shmobile: r8a7794: add GPIO clocks
[2/2] ARM: shmobile: r8a7794: add GPIO DT support

Thanks, I have queued these up with Geert's Acks.

#12 lore raw

cover Add R8A7794 GPIO DT support

Quoted 8 lines · Simon Horman
Quoted 7 lines · Sergei Shtylyov

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20150220-v3.19' tag. Here we add the GPIO device tree support for the R8A7794 SoC. It depends on the R8A7794 PFC/MMCIF device tree patches posted recently in order to apply.

Quoted 4 lines
Quoted 2 lines

[1/2] ARM: shmobile: r8a7794: add GPIO clocks
[2/2] ARM: shmobile: r8a7794: add GPIO DT support

Thanks, I have queued these up with Geert's Acks.

Sorry, I was too hasty again. I have dropped these pending the dependencies being queued up.

#13 lore raw

cover Add R8A7794 GPIO DT support

Hello.

Quoted 5 lines · Simon Horman
Quoted 4 lines
Quoted 4 lines

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20150220-v3.19' tag. Here we add the GPIO device tree support for the R8A7794 SoC. It depends on the R8A7794 PFC/MMCIF device tree patches posted recently in order to apply.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

[1/2] ARM: shmobile: r8a7794: add GPIO clocks
[2/2] ARM: shmobile: r8a7794: add GPIO DT support

Thanks, I have queued these up with Geert's Acks.

Sorry, I was too hasty again. I have dropped these pending the dependencies being queued up.

Ah, I just didn't mention that the PFC patch is necessary for the latter
patch to compile (but I don't expect it to change, so IMHO you can apply the PFC patch now). The former patch still can be merged, I think.

WBR, Sergei

#14 lore raw

cover Add R8A7794 GPIO DT support

Quoted 12 lines · Sergei Shtylyov

Hello.

Quoted 7 lines · Simon Horman
Quoted 7 lines
Quoted 7 lines

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20150220-v3.19' tag. Here we add the GPIO device tree support for the R8A7794 SoC. It depends on the R8A7794 PFC/MMCIF device tree patches posted recently in order to apply.

[1/2] ARM: shmobile: r8a7794: add GPIO clocks
[2/2] ARM: shmobile: r8a7794: add GPIO DT support

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Thanks, I have queued these up with Geert's Acks.

Sorry, I was too hasty again. I have dropped these pending the dependencies being queued up.

Ah, I just didn't mention that the PFC patch is necessary for the latter
patch to compile (but I don't expect it to change, so IMHO you can apply the PFC patch now). The former patch still can be merged, I think.

Thanks, I am coming around to your view that it is unlikely that the PFC bindings will to change at this point.

It would help me greatly if you could put together all the silk/R8A7794 .dts and .dtsi patches that you think are ready to be merged into a single series for me to look over (again).

Thanks in advance.