Skip to contentSkip to conversation

ARM: dts: exynos: add max77693 irq configuration for midas

PATCH In review Simon Shields 2 participants 4 messages Jul 7, 2018

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

PATCH 1/1 ARM: dts: exynos: add max77693 irq configuration for midas

Currently, we assume that the bootloader has correctly configured the interrupt pin for max77693. This might not actually be the case - so it's better to configure it explicitly.

---
 arch/arm/boot/dts/exynos4412-midas.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/exynos4412-midas.dtsi +9 -0
index f35176a35a15..30760bf2eb71 100644
@@ -156,6 +156,8 @@
 			compatible = "maxim,max77693";
 			interrupt-parent = <&gpx1>;
 			interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&max77693_irq>;
 			reg = <0x66>;
 
 			regulators {
@@ -1117,6 +1119,13 @@
 		samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
 	};
 
+	max77693_irq: max77693-irq {
+		samsung,pins = "gpx1-5";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+
 	sleep1: sleep-states {
 		PIN_SLP(gpk0-0, PREV, NONE);
 		PIN_SLP(gpk0-1, PREV, NONE);
Signature · 1 line
2.18.0
#1 lore raw
Quoted 23 lines · Simon Shields

Currently, we assume that the bootloader has correctly configured the interrupt pin for max77693. This might not actually be the case - so it's better to configure it explicitly.

---
 arch/arm/boot/dts/exynos4412-midas.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/exynos4412-midas.dtsi +2 -0
index f35176a35a15..30760bf2eb71 100644
@@ -156,6 +156,8 @@
                        compatible = "maxim,max77693";
                        interrupt-parent = <&gpx1>;
                        interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&max77693_irq>;
                        reg = <0x66>;
 
                        regulators {

arch/arm/boot/dts/exynos4412-midas.dtsi line 1128

Quoted 10 lines
arch/arm/boot/dts/exynos4412-midas.dtsi +7 -0
@@ -1117,6 +1119,13 @@
                samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
        };
 
+       max77693_irq: max77693-irq {
+               samsung,pins = "gpx1-5";
+               samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+       };
+

Please put it before hdmi-hpd (gpx3-7). What about the interrupt for max77693 fuel gauge? Maybe another patch for it as well?

Best regards,
Krzysztof

Quoted 6 lines
arch/arm/boot/dts/exynos4412-midas.dtsi +0 -1
        sleep1: sleep-states {
                PIN_SLP(gpk0-0, PREV, NONE);
                PIN_SLP(gpk0-1, PREV, NONE);
--

2.18.0

#2 lore raw
Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Simon Shields

Currently, we assume that the bootloader has correctly configured the interrupt pin for max77693. This might not actually be the case - so it's better to configure it explicitly.

---
 arch/arm/boot/dts/exynos4412-midas.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/exynos4412-midas.dtsi +2 -0
index f35176a35a15..30760bf2eb71 100644
@@ -156,6 +156,8 @@
                        compatible = "maxim,max77693";
                        interrupt-parent = <&gpx1>;
                        interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&max77693_irq>;
                        reg = <0x66>;
 
                        regulators {
@@ -1117,6 +1119,13 @@
                samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
        };
 
Quoted 9 lines

arch/arm/boot/dts/exynos4412-midas.dtsi line 1128

Quoted 7 lines
arch/arm/boot/dts/exynos4412-midas.dtsi +7 -0
+       max77693_irq: max77693-irq {
+               samsung,pins = "gpx1-5";
+               samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+       };
+

Please put it before hdmi-hpd (gpx3-7).

OK.

Quoted 2 lines

What about the interrupt for max77693 fuel gauge?
Maybe another patch for it as well?

Yes - in fact, it looks like most interrupt pins are configured by the vendor kernel to have PULL_NONE, something which (as far as i can tell) mainline doesn't do.

Maybe I should just prepare a series (or a single patch) which fixes all of them? Or would you prefer I added the (remaining) eint configurations to exynos4412-pinctrl.dtsi, and then used those?

Quoted 4 lines

Best regards,
Krzysztof

Cheers,
Simon

Quoted 7 lines
Quoted 7 lines
arch/arm/boot/dts/exynos4412-midas.dtsi +0 -1
        sleep1: sleep-states {
                PIN_SLP(gpk0-0, PREV, NONE);
                PIN_SLP(gpk0-1, PREV, NONE);
--

2.18.0

#3 lore raw
Quoted 38 lines · Simon Shields
Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Simon Shields

Currently, we assume that the bootloader has correctly configured the interrupt pin for max77693. This might not actually be the case - so it's better to configure it explicitly.

---
 arch/arm/boot/dts/exynos4412-midas.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/exynos4412-midas.dtsi +2 -0
index f35176a35a15..30760bf2eb71 100644
@@ -156,6 +156,8 @@
                        compatible = "maxim,max77693";
                        interrupt-parent = <&gpx1>;
                        interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&max77693_irq>;
                        reg = <0x66>;
 
                        regulators {
@@ -1117,6 +1119,13 @@
                samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
        };
 
Quoted 9 lines

arch/arm/boot/dts/exynos4412-midas.dtsi line 1128

Quoted 7 lines
arch/arm/boot/dts/exynos4412-midas.dtsi +7 -0
+       max77693_irq: max77693-irq {
+               samsung,pins = "gpx1-5";
+               samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+       };
+

Please put it before hdmi-hpd (gpx3-7).

Quoted 8 lines

OK.

Quoted 2 lines

What about the interrupt for max77693 fuel gauge?
Maybe another patch for it as well?

Yes - in fact, it looks like most interrupt pins are configured by the vendor kernel to have PULL_NONE, something which (as far as i can tell) mainline doesn't do.

The interrupt line of max77693 is marked as open-drain and there is 200k external pull up, so AFAIU such pin should have internal pull down disabled. Mostly it works with pull down so no one cares. :)

Quoted 3 lines

Maybe I should just prepare a series (or a single patch) which fixes all of them? Or would you prefer I added the (remaining) eint configurations to exynos4412-pinctrl.dtsi, and then used those?

Series will be ok but leave them in midas.dtsi.

Best regards,
Krzysztof