diff options
author | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2015-10-09 14:09:37 +0300 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2015-10-11 18:47:42 +0200 |
commit | 96521b72005feb41dfd014aced0ee6fba3ac0f58 (patch) | |
tree | ac40905f0b26cde10b868c04560f86a0cfb2d701 | |
parent | dcfd8443d89f593e0c667a988ab017e716b33061 (diff) | |
download | op-kernel-dev-96521b72005feb41dfd014aced0ee6fba3ac0f58.zip op-kernel-dev-96521b72005feb41dfd014aced0ee6fba3ac0f58.tar.gz |
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: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r-- | arch/arm/boot/dts/sun4i-a10-pcduino.dts | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/arm/boot/dts/sun4i-a10-pcduino.dts b/arch/arm/boot/dts/sun4i-a10-pcduino.dts index c882421..0b45d27 100644 --- a/arch/arm/boot/dts/sun4i-a10-pcduino.dts +++ b/arch/arm/boot/dts/sun4i-a10-pcduino.dts @@ -180,14 +180,6 @@ }; }; -®_usb1_vbus { - status = "okay"; -}; - -®_usb2_vbus { - status = "okay"; -}; - #include "axp209.dtsi" ®_dcdc2 { @@ -222,7 +214,7 @@ }; &usbphy { - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; + usb1_vbus-supply = <®_vcc5v0>; /* USB1 VBUS is always on */ + usb2_vbus-supply = <®_vcc5v0>; /* USB2 VBUS is always on */ status = "okay"; }; |