Commit 96521b72 authored by Siarhei Siamashka's avatar Siarhei Siamashka Committed by Maxime Ripard

ARM: dts: sun4i: Allow to use the PH6 pin for GPIO on pcDuino1/2

The pcDuino1 board does not use any power switches at all for its
two USB host ports and the VBUS pins are always connected to 5V.

The pcDuino2 board uses the RT9701GB power switch for its single
USB host port, but the USB_EN pin (PD2) is pulled up with a 10K
resistor. So that the USB power is still enabled by default,
resulting in the same behaviour as pcDuino1 if nobody touches
the PD2 pin. This minor difference is going to be handled in a
follow-up patch, introducing a separate dts file for pcDuino2.

The primary reason for this fix is that the current dts file
unnecessarily meddles with the PH3 and PH6 pins. But the PH6 pin
is available on the Arduino-compatible expansion header and may
have a better use for other purposes. This patch fixes the
problem and now the PH6 pin can be used with the GPIO sysfs
interface. Tested on a pcDuino2 board with a multimeter:

    echo 230 > /sys/class/gpio/export
    echo "out" > /sys/class/gpio/gpio230/direction
    echo 0 > /sys/class/gpio/gpio230/value
    echo 1 > /sys/class/gpio/gpio230/value

USB still works as expected too.
Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent dcfd8443
...@@ -180,14 +180,6 @@ key_pins_pcduino: key_pins@0 { ...@@ -180,14 +180,6 @@ key_pins_pcduino: key_pins@0 {
}; };
}; };
&reg_usb1_vbus {
status = "okay";
};
&reg_usb2_vbus {
status = "okay";
};
#include "axp209.dtsi" #include "axp209.dtsi"
&reg_dcdc2 { &reg_dcdc2 {
...@@ -222,7 +214,7 @@ &uart0 { ...@@ -222,7 +214,7 @@ &uart0 {
}; };
&usbphy { &usbphy {
usb1_vbus-supply = <&reg_usb1_vbus>; usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
usb2_vbus-supply = <&reg_usb2_vbus>; usb2_vbus-supply = <&reg_vcc5v0>; /* USB2 VBUS is always on */
status = "okay"; status = "okay";
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment