public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano
@ 2015-10-10 12:52 Adam Sampson
  2015-10-10 13:53 ` [linux-sunxi] " Chen-Yu Tsai
  2015-10-11 17:27 ` Maxime Ripard
  0 siblings, 2 replies; 3+ messages in thread
From: Adam Sampson @ 2015-10-10 12:52 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Adam Sampson <ats@offog.org>
---
Changes in v2:
- Add Reported-by line
- Remove redundant pinctrl-names entries
---
 arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts b/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts
index 5361fce..b304778 100644
--- a/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts
+++ b/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts
@@ -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>;
@@ -171,13 +171,10 @@
 	status = "okay";
 };
 
+/* A single regulator (U24) powers both USB host ports. */
 &reg_usb1_vbus {
 	pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
-	gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
-	status = "okay";
-};
-
-&reg_usb2_vbus {
+	gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
 	status = "okay";
 };
 
@@ -189,6 +186,6 @@
 
 &usbphy {
 	usb1_vbus-supply = <&reg_usb1_vbus>;
-	usb2_vbus-supply = <&reg_usb2_vbus>;
+	usb2_vbus-supply = <&reg_usb1_vbus>;
 	status = "okay";
 };
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [linux-sunxi] [PATCH v2] ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano
  2015-10-10 12:52 [PATCH v2] ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano Adam Sampson
@ 2015-10-10 13:53 ` Chen-Yu Tsai
  2015-10-11 17:27 ` Maxime Ripard
  1 sibling, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2015-10-10 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Oct 10, 2015 at 8:52 PM, Adam Sampson <ats@offog.org> wrote:
> 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.
>
> Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
> Signed-off-by: Adam Sampson <ats@offog.org>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano
  2015-10-10 12:52 [PATCH v2] ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano Adam Sampson
  2015-10-10 13:53 ` [linux-sunxi] " Chen-Yu Tsai
@ 2015-10-11 17:27 ` Maxime Ripard
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2015-10-11 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Oct 10, 2015 at 01:52:52PM +0100, Adam Sampson wrote:
> 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.
> 
> Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
> Signed-off-by: Adam Sampson <ats@offog.org>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151011/298206df/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-11 17:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-10 12:52 [PATCH v2] ARM: dts: sun7i: Correct USB regulators on pcDuino v3 Nano Adam Sampson
2015-10-10 13:53 ` [linux-sunxi] " Chen-Yu Tsai
2015-10-11 17:27 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox