ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano
Subsystems (2)
PATCH 1/1 ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano
The LinkSprite pcDuino v3 Nano's two USB host ports are powered by a single RT9701GB regulator, which has its enable input tied to the A20's PD2 pin, pulled up to 3v3 via a 10k resistor.
However, the script.bin that shipped with the device listed PH11 and PH3 as Vbus control pins for the two USB ports. Neither of these are actually connected to anything.
Siarhei Siamashka spotted this problem while reviewing the other LinkSprite boards. This patch fixes it by only defining a single regulator, controlled by PD2. Testing shows that the USB ports are now (correctly) only powered up once the USB PHY driver is loaded.
--- arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts +6 -7
@@ -158,7 +158,7 @@ }; usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin at 0 { - allwinner,pins = "PH11"; + allwinner,pins = "PD2"; allwinner,function = "gpio_out"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
@@ -166,18 +166,17 @@ }; ®_ahci_5v { + pinctrl-names = "default"; pinctrl-0 = <&ahci_pwr_pin_pcduino3_nano>; gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ status = "okay"; }; +/* A single regulator (U24) powers both USB host ports. */ ®_usb1_vbus { + pinctrl-names = "default"; pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>; - gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ - status = "okay"; -}; - -®_usb2_vbus { + gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */ status = "okay"; };
@@ -189,6 +188,6 @@ &usbphy { usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; + usb2_vbus-supply = <®_usb1_vbus>; status = "okay"; };
Signature · 1 line
2.1.4
PATCH 1/1 ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano
Hi,
Quoted 8 lines · Adam Sampson
The LinkSprite pcDuino v3 Nano's two USB host ports are powered by a single RT9701GB regulator, which has its enable input tied to the A20's PD2 pin, pulled up to 3v3 via a 10k resistor.
However, the script.bin that shipped with the device listed PH11 and PH3 as Vbus control pins for the two USB ports. Neither of these are actually connected to anything.
Quoted 6 lines
Siarhei Siamashka spotted this problem while reviewing the other LinkSprite boards. This patch fixes it by only defining a single regulator, controlled by PD2. Testing shows that the USB ports are now (correctly) only powered up once the USB PHY driver is loaded.
Signed-off-by Adam Sampson <[email protected]>
Since Siarhei spotted the issue, maybe add a Reported-by tag where credit is due?
Quoted 18 lines
--- arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts +1
-1@@ -158,7 +158,7 @@ }; usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin at 0 { - allwinner,pins = "PH11"; + allwinner,pins = "PD2"; allwinner,function = "gpio_out"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts line 169
Quoted 4 lines
arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts +1
-0@@ -166,18 +166,17 @@ }; ®_ahci_5v { + pinctrl-names = "default";
This is already in sunxi-common-regulators.dtsi.
No need to add it again.
arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts line 177
Quoted 8 lines
arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts +2
-0pinctrl-0 = <&ahci_pwr_pin_pcduino3_nano>; gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ status = "okay"; }; +/* A single regulator (U24) powers both USB host ports. */ ®_usb1_vbus { + pinctrl-names = "default";
And this.
The rest looks good.
Thanks!
ChenYu
Quoted 25 lines
arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts +2
-7pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>; - gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ - status = "okay"; -}; - -®_usb2_vbus { + gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */ status = "okay"; };@@ -189,6 +188,6 @@ &usbphy { usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; + usb2_vbus-supply = <®_usb1_vbus>; status = "okay"; }; --2.1.4
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com. For more options, visit https://groups.google.com/d/optout.
PATCH 1/1 ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano
Quoted 2 lines · Chen-Yu Tsai
Since Siarhei spotted the issue, maybe add a Reported-by tag where credit is due?
Will do.
Quoted 2 lines
Quoted 2 lines
®_ahci_5v{
+ pinctrl-names = "default";
[twice]
Quoted 3 lines
This is already in
sunxi-common-regulators.dtsi.
No need to add it again.
OK -- fixed. v2 incoming.
Thanks,
Signature · 1 line
Adam Sampson <[email protected]> <http://offog.org/>