diff mbox series

[v3,9/9] rockchip: dts: rock64: Fix XHCI usage

Message ID 20200427065254.15397-10-wens@kernel.org
State New
Headers show
Series rockchip: rk3328: sync dts and add ROC-RK3328-CC board | expand

Commit Message

Chen-Yu Tsai April 27, 2020, 6:52 a.m. UTC
From: Chen-Yu Tsai <wens at csie.org>

If the VBUS regulator is always-on, XHCI will fail to detect USB 3.0
devices; USB 2.0 devices will work however.

Make the VBUS regulator controllable and tie it to only the XHCI. This
makes all three USB ports usable.

Signed-off-by: Chen-Yu Tsai <wens at csie.org>
---
Changes since v2:
  - new patch
---
 arch/arm/dts/rk3328-rock64-u-boot.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Kever Yang April 28, 2020, 2:26 p.m. UTC | #1
On 2020/4/27 ??2:52, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens at csie.org>
>
> If the VBUS regulator is always-on, XHCI will fail to detect USB 3.0
> devices; USB 2.0 devices will work however.
>
> Make the VBUS regulator controllable and tie it to only the XHCI. This
> makes all three USB ports usable.
>
> Signed-off-by: Chen-Yu Tsai <wens at csie.org>

Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Thanks,
- Kever
> ---
> Changes since v2:
>    - new patch
> ---
>   arch/arm/dts/rk3328-rock64-u-boot.dtsi | 11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
> index e5946d2d2dc7..8318bf4e6030 100644
> --- a/arch/arm/dts/rk3328-rock64-u-boot.dtsi
> +++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
> @@ -12,5 +12,16 @@
>   };
>   
>   &usb_host0_xhci {
> +	vbus-supply = <&vcc_host_5v>;
>   	status = "okay";
>   };
> +
> +/*
> + * This makes XHCI responsible for toggling VBUS. This is needed to work
> + * around an issue where either XHCI only works with USB 2.0 or OTG doesn't
> + * work, depending on how VBUS is configured. Having USB 3.0 seems better.
> + */
> +&vcc_host_5v {
> +	/delete-property/ regulator-always-on;
> +	/delete-property/ regulator-boot-on;
> +};
diff mbox series

Patch

diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
index e5946d2d2dc7..8318bf4e6030 100644
--- a/arch/arm/dts/rk3328-rock64-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
@@ -12,5 +12,16 @@ 
 };
 
 &usb_host0_xhci {
+	vbus-supply = <&vcc_host_5v>;
 	status = "okay";
 };
+
+/*
+ * This makes XHCI responsible for toggling VBUS. This is needed to work
+ * around an issue where either XHCI only works with USB 2.0 or OTG doesn't
+ * work, depending on how VBUS is configured. Having USB 3.0 seems better.
+ */
+&vcc_host_5v {
+	/delete-property/ regulator-always-on;
+	/delete-property/ regulator-boot-on;
+};