Skip to contentSkip to conversation

ARM: dts: r8a779x: Configure PMIC IRQ pinmux

PATCH Superseded [email protected] 2 participants 5 messages May 2, 2019 – May 15, 2019 Device tree bindings

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: r8a779x: Configure PMIC IRQ pinmux

From: Marek Vasut <[email protected]>

The PMIC IRQ line pin multiplexing configuration is missing from the DTs. Since the line is configured correctly by default, the system works fine. However, add the IRQ line pin multiplexing configuration for completeness.

Cc Geert Uytterhoeven <[email protected]>
Cc Simon Horman <[email protected]>

To: [email protected]

---
 arch/arm/boot/dts/r8a7790-lager.dts   | 7 +++++++
 arch/arm/boot/dts/r8a7790-stout.dts   | 7 ++++++-
 arch/arm/boot/dts/r8a7791-koelsch.dts | 7 +++++++
 arch/arm/boot/dts/r8a7791-porter.dts  | 7 +++++++
 arch/arm/boot/dts/r8a7792-blanche.dts | 7 +++++++
 arch/arm/boot/dts/r8a7793-gose.dts    | 7 +++++++
 6 files changed, 41 insertions(+), 1 deletion(-)
arch/arm/boot/dts/r8a7790-lager.dts +7 -0
index 7b9508e83d46..d637b9727808 100644
@@ -423,6 +423,8 @@
 	 */
 	i2cpwr: i2c-13 {
 		compatible = "i2c-demux-pinctrl";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pmic_irq_pins>;
 		i2c-parent = <&iic3>, <&i2c3>;
 		i2c-bus-name = "i2c-pwr";
 		#address-cells = <1>;
@@ -615,6 +617,11 @@
 		function = "iic3";
 	};
 
+	pmic_irq_pins: pmicirq {
+		groups = "intc_irq2";
+		function = "intc";
+	};
+
 	hsusb_pins: hsusb {
 		groups = "usb0_ovc_vbus";
 		function = "usb0";
arch/arm/boot/dts/r8a7790-stout.dts +6 -1
index 7a7d3b84d1a6..ad68e6034b43 100644
@@ -179,6 +179,11 @@
 		function = "iic3";
 	};
 
+	pmic_irq_pins: pmicirq {
+		groups = "intc_irq2";
+		function = "intc";
+	};
+
 	usb0_pins: usb0 {
 		groups = "usb0";
 		function = "usb0";
@@ -317,7 +322,7 @@
 
 &iic3 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&iic3_pins>;
+	pinctrl-0 = <&iic3_pins &pmic_irq_pins>;
 	status = "okay";
 
 	pmic@58 {
arch/arm/boot/dts/r8a7791-koelsch.dts +7 -0
index e6580aa0cea3..a116bfc11f0b 100644
@@ -540,6 +540,11 @@
 		function = "intc";
 	};
 
+	pmic_irq_pins: pmicirq {
+		groups = "intc_irq2";
+		function = "intc";
+	};
+
 	sdhi0_pins: sd0 {
 		groups = "sdhi0_data4", "sdhi0_ctrl";
 		function = "sdhi0";
@@ -776,6 +781,8 @@
 };
 
 &i2c6 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pmic_irq_pins>;
 	status = "okay";
 	clock-frequency = <100000>;
 
arch/arm/boot/dts/r8a7791-porter.dts +7 -0
index fefdf8238bbe..e08d257f5d0c 100644
@@ -228,6 +228,11 @@
 		function = "intc";
 	};
 
+	pmic_irq_pins: pmicirq {
+		groups = "intc_irq2";
+		function = "intc";
+	};
+
 	sdhi0_pins: sd0 {
 		groups = "sdhi0_data4", "sdhi0_ctrl";
 		function = "sdhi0";
@@ -373,6 +378,8 @@
 };
 
 &i2c6 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pmic_irq_pins>;
 	status = "okay";
 	clock-frequency = <100000>;
 
arch/arm/boot/dts/r8a7792-blanche.dts +7 -0
index b6fa80c3b07e..7b0d17ee87fb 100644
@@ -234,6 +234,11 @@
 		groups = "du1_rgb666", "du1_sync", "du1_disp";
 		function = "du1";
 	};
+
+	pmic_irq_pins: pmicirq {
+		groups = "intc_irq2";
+		function = "intc";
+	};
 };
 
 &rwdt {
@@ -309,6 +314,8 @@
 };
 
 &iic3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pmic_irq_pins>;
 	status = "okay";
 
 	pmic@58 {
arch/arm/boot/dts/r8a7793-gose.dts +7 -0
index f51601af89a2..9984ebf06695 100644
@@ -514,6 +514,11 @@
 		function = "intc";
 	};
 
+	pmic_irq_pins: pmicirq {
+		groups = "intc_irq2";
+		function = "intc";
+	};
+
 	sdhi0_pins: sd0 {
 		groups = "sdhi0_data4", "sdhi0_ctrl";
 		function = "sdhi0";
@@ -711,6 +716,8 @@
 };
 
 &i2c6 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pmic_irq_pins>;
 	status = "okay";
 	clock-frequency = <100000>;
 
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Marek,

Quoted 7 lines · On Thu, May 2, 2019 at 4:06 PM <[email protected]> wrote:

From: Marek Vasut <[email protected]>

The PMIC IRQ line pin multiplexing configuration is missing from the DTs. Since the line is configured correctly by default, the system works fine. However, add the IRQ line pin multiplexing configuration for completeness.

Thanks for your patch!

Quoted 12 lines
arch/arm/boot/dts/r8a7790-lager.dts +2 -0
@@ -423,6 +423,8 @@
         */
        i2cpwr: i2c-13 {
                compatible = "i2c-demux-pinctrl";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pmic_irq_pins>;
                i2c-parent = <&iic3>, <&i2c3>;
                i2c-bus-name = "i2c-pwr";
                #address-cells = <1>;

arch/arm/boot/dts/r8a7790-lager.dts line 623

Quoted 7 lines
arch/arm/boot/dts/r8a7790-lager.dts +4 -0
@@ -615,6 +617,11 @@
                function = "iic3";
        };
 
+       pmic_irq_pins: pmicirq {
+               groups = "intc_irq2";
+               function = "intc";
+       };

Please insert according to alphabetical sort order.
Oh, we don't have the R-Car Gen2 entries sorted yet. Nevermind...

Quoted 15 lines
arch/arm/boot/dts/r8a7792-blanche.dts +5 -0
@@ -234,6 +234,11 @@
                groups = "du1_rgb666", "du1_sync", "du1_disp";
                function = "du1";
        };
+
+       pmic_irq_pins: pmicirq {
+               groups = "intc_irq2";
+               function = "intc";
+       };
 };
 
 &rwdt {

arch/arm/boot/dts/r8a7792-blanche.dts line 318

Quoted 5 lines
arch/arm/boot/dts/r8a7792-blanche.dts +2 -0
@@ -309,6 +314,8 @@
 };
 
 &iic3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pmic_irq_pins>;

Given Blanche has a single device connected to irq2, I think it makes sense to move the pinctrl properties to the pmic node below.

With that fixed:

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
#2 lore raw

On 5/3/19 2:36 PM, Geert Uytterhoeven wrote:
Hi,

[...]

Quoted 10 lines

arch/arm/boot/dts/r8a7792-blanche.dts line 318

Quoted 7 lines

&rwdt {

arch/arm/boot/dts/r8a7792-blanche.dts +2 -0
@@ -309,6 +314,8 @@
 };
 
 &iic3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pmic_irq_pins>;

Given Blanche has a single device connected to irq2, I think it makes sense to move the pinctrl properties to the pmic node below.

It makes blanche somehow inconsistent with the other boards, but if you insist ... ?

Quoted 7 lines

With that fixed:

Gr{oetje,eeting}s,

Geert

Signature · 2 lines
Best regards,
Marek Vasut
#3 lore raw

Hi Marek,

Quoted 12 lines · Marek Vasut
Quoted 10 lines · Geert Uytterhoeven

arch/arm/boot/dts/r8a7792-blanche.dts line 318

Quoted 7 lines

&rwdt {

arch/arm/boot/dts/r8a7792-blanche.dts +2 -0
@@ -309,6 +314,8 @@
 };
 
 &iic3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pmic_irq_pins>;

Given Blanche has a single device connected to irq2, I think it makes sense to move the pinctrl properties to the pmic node below.

Quoted 2 lines

It makes blanche somehow inconsistent with the other boards, but if you insist ... ?

Typically the pinctrl properties are part of the device node that uses them. For the other boards, that's not possible, as they are shared by all PMIC nodes. Hence the other boards are the exceptions, actually ;-)

Note that for multi-PMIC boards, adding the pinctrl properties to a single PMIC node won't work, as that would break:
1. The case where the driver for that PMIC is not compiled in,
2. The R-Car Gen2 regulator quirk.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
#4 lore raw
Quoted 1 line · Geert Uytterhoeven

Hi Marek,

Hi,

Quoted 16 lines · Marek Vasut
Quoted 12 lines · Geert Uytterhoeven
Quoted 10 lines

arch/arm/boot/dts/r8a7792-blanche.dts line 318

Quoted 7 lines

&rwdt {

arch/arm/boot/dts/r8a7792-blanche.dts +2 -0
@@ -309,6 +314,8 @@
 };
 
 &iic3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pmic_irq_pins>;

Given Blanche has a single device connected to irq2, I think it makes sense to move the pinctrl properties to the pmic node below.

Quoted 2 lines

It makes blanche somehow inconsistent with the other boards, but if you insist ... ?

Quoted 8 lines

Typically the pinctrl properties are part of the device node that uses them. For the other boards, that's not possible, as they are shared by all PMIC nodes. Hence the other boards are the exceptions, actually ;-)

Note that for multi-PMIC boards, adding the pinctrl properties to a single PMIC node won't work, as that would break:
1. The case where the driver for that PMIC is not compiled in,
2. The R-Car Gen2 regulator quirk.

Well it wouldn't work because it's shared by two PMICs and thus two driver instances in the first place.

Signature · 2 lines
Best regards,
Marek Vasut