ARM: pxa: raumfeld-controller: add pinctrl for charger pins
authorDaniel Mack <daniel@zonque.org>
Wed, 24 Apr 2019 18:58:57 +0000 (20:58 +0200)
committerRobert Jarzmik <robert.jarzmik@free.fr>
Mon, 24 Jun 2019 09:35:01 +0000 (11:35 +0200)
The PEN2 line needs to be pulled up for the charger to enter high-current
mode. Do this with a static pull on the GPIO.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
arch/arm/boot/dts/pxa300-raumfeld-controller.dts

index e0e1f99..12b1594 100644 (file)
@@ -41,6 +41,8 @@
        };
 
        charger: charger {
+               pinctrl-names = "default";
+               pinctrl-0 = <&charger_pins>;
                compatible = "gpio-charger";
                charger-type = "mains";
                gpios = <&gpio 101 GPIO_ACTIVE_LOW>;
                pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_FLOAT);
        };
 
+       charger_pins: charger_pins {
+               pinctrl-single,pins = <
+                       MFP_PIN_PXA300(31) MFP_AF0      /* PEN2 */
+               >;
+               pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_PULL_HIGH);
+               pinctrl-single,bias-pullup = MPF_PULL_UP;
+       };
+
        dock_detect_pins: dock_detect_pins {
                pinctrl-single,pins = <
                        MFP_PIN_PXA300(116) MFP_AF0     /* DOCK_DETECT  */