midas: fix IRQ pin configuration
Subsystems (2)
cover midas: fix IRQ pin configuration
This patch series disables the internal pull-up/down resistors for IRQ lines which are pulled up externally. Without these patches the associated IRQs never fire if the bootloader hasn't configured the pins correctly.
Simon Shields (5):
ARM: dts: exynos: add max77693 pinctrl config for midas
ARM: dts: exynos: add pinctrl config for midas keys
ARM: dts: exynos: add pinctrl for midas fuelgauge irq pin
ARM: dts: exynos: configure max77686 IRQ pin on midas
ARM: dts: exynos: configure midas SD card CD pin
arch/arm/boot/dts/exynos4412-midas.dtsi | 35 ++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-)
Signature · 1 line
2.18.0
PATCH 1/5 ARM: dts: exynos: add max77693 pinctrl config 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 | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/exynos4412-midas.dtsi +7 -0
@@ -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 {
@@ -1124,6 +1126,11 @@ pinctrl-names = "default"; pinctrl-0 = <&sleep1>; + max77693_irq: max77693-irq { + samsung,pins = "gpx1-5"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + hdmi_hpd: hdmi-hpd { samsung,pins = "gpx3-7"; samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
Signature · 1 line
2.18.0
Re: [PATCH 1/5] ARM: dts: exynos: add max77693 pinctrl config for midas
Quoted 8 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.
Signed-off-by Simon Shields <[email protected]>--- arch/arm/boot/dts/exynos4412-midas.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks, applied.
Best regards,
Krzysztof
PATCH 2/5 ARM: dts: exynos: add pinctrl config for midas keys
In reply to Simon ShieldsThis pins are externally pulled up, and so we should explicitly configure them to disable the SoC-internal pull-downs. Previously we relied on the bootloader doing this in order to allow the buttons to function properly.
--- arch/arm/boot/dts/exynos4412-midas.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/exynos4412-midas.dtsi +7 -0
@@ -112,6 +112,8 @@ gpio-keys { compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys>; key-down { gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
@@ -1126,6 +1128,11 @@ pinctrl-names = "default"; pinctrl-0 = <&sleep1>; + gpio_keys: gpio-keys { + samsung,pins = "gpx0-1", "gpx2-2", "gpx2-7", "gpx3-3"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + max77693_irq: max77693-irq { samsung,pins = "gpx1-5"; samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
Signature · 1 line
2.18.0
Re: [PATCH 2/5] ARM: dts: exynos: add pinctrl config for midas keys
Quoted 9 lines · Simon Shields
This pins are externally pulled up, and so we should explicitly configure them to disable the SoC-internal pull-downs. Previously we relied on the bootloader doing this in order to allow the buttons to function properly.
Signed-off-by Simon Shields <[email protected]>--- arch/arm/boot/dts/exynos4412-midas.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks, applied.
Best regards,
Krzysztof
PATCH 3/5 ARM: dts: exynos: add pinctrl for midas fuelgauge irq pin
In reply to Simon ShieldsThis pin is externally pulled up, so we should disable the SoC's pull down resistor in order for the interrupt to function properly.
--- arch/arm/boot/dts/exynos4412-midas.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/exynos4412-midas.dtsi +7 -0
@@ -206,6 +206,8 @@ compatible = "maxim,max17047"; interrupt-parent = <&gpx2>; interrupts = <3 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&max77693_fuel_irq>; reg = <0x36>; maxim,over-heat-temp = <700>;
@@ -1138,6 +1140,11 @@ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; }; + max77693_fuel_irq: max77693-fuel-irq { + samsung,pins = "gpx2-3"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + hdmi_hpd: hdmi-hpd { samsung,pins = "gpx3-7"; samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
Signature · 1 line
2.18.0
Re: [PATCH 3/5] ARM: dts: exynos: add pinctrl for midas fuelgauge irq pin
Quoted 7 lines · Simon Shields
This pin is externally pulled up, so we should disable the SoC's pull down resistor in order for the interrupt to function properly.
Signed-off-by Simon Shields <[email protected]>--- arch/arm/boot/dts/exynos4412-midas.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks, applied.
Best regards,
Krzysztof
PATCH 4/5 ARM: dts: exynos: configure max77686 IRQ pin on midas
In reply to Simon ShieldsThis pin is externally pulled up, so we need to disable the SoC's internal pull-down.
--- arch/arm/boot/dts/exynos4412-midas.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/exynos4412-midas.dtsi +7 -0
@@ -685,6 +685,8 @@ compatible = "maxim,max77686"; interrupt-parent = <&gpx0>; interrupts = <7 IRQ_TYPE_NONE>; + pinctrl-0 = <&max77686_irq>; + pinctrl-names = "default"; reg = <0x09>; #clock-cells = <1>;
@@ -1135,6 +1137,11 @@ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; }; + max77686_irq: max77686-irq { + samsung,pins = "gpx0-7"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + max77693_irq: max77693-irq { samsung,pins = "gpx1-5"; samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
Signature · 1 line
2.18.0
Re: [PATCH 4/5] ARM: dts: exynos: configure max77686 IRQ pin on midas
Quoted 7 lines · Simon Shields
This pin is externally pulled up, so we need to disable the SoC's internal pull-down.
Signed-off-by Simon Shields <[email protected]>--- arch/arm/boot/dts/exynos4412-midas.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks, applied.
Best regards,
Krzysztof
PATCH 5/5 ARM: dts: exynos: configure midas SD card CD pin
In reply to Simon ShieldsThis pin is externally pulled up, so we need to disable the SoC's internal pull down resistor to allow it to function properly.
--- arch/arm/boot/dts/exynos4412-midas.dtsi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/boot/dts/exynos4412-midas.dtsi +6 -1
@@ -1152,6 +1152,11 @@ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; }; + sdhci2_cd: sdhci2-cd-irq { + samsung,pins = "gpx3-4"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; + hdmi_hpd: hdmi-hpd { samsung,pins = "gpx3-7"; samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
@@ -1383,7 +1388,7 @@ bus-width = <4>; cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>; cd-inverted; - pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>; + pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sdhci2_cd>; pinctrl-names = "default"; vmmc-supply = <&ldo21_reg>; status = "okay";
Signature · 1 line
2.18.0
Re: [PATCH 5/5] ARM: dts: exynos: configure midas SD card CD pin
Quoted 7 lines · Simon Shields
This pin is externally pulled up, so we need to disable the SoC's internal pull down resistor to allow it to function properly.
Signed-off-by Simon Shields <[email protected]>--- arch/arm/boot/dts/exynos4412-midas.dtsi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Thanks, applied.
Best regards,
Krzysztof