devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: sun8i: Open FETA40i-C regulator aldo1
@ 2023-12-26  8:40 Fuyao Kashizuku
  2023-12-26 10:40 ` Andre Przywara
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fuyao Kashizuku @ 2023-12-26  8:40 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Andre Przywara, Florian Fainelli,
	Wei Xu, Gregory CLEMENT, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel
  Cc: 麦健建

The USB PHY in the Allwinner R40 SoC seems to rely on voltage on the
VCC-TVIN/OUT supply pins for proper operation, on top of its own supply
voltage on VCC-USB. Without a 3.3V voltage supplied to VCC-TV*, USB
operation becomes unstable and can result in disconnects.

The Forlinx FETA40i-C SoM connects both the VCC-TVOUT and VCC-TVIN pins
to the ALDO1 rail of the PMIC, so we need to enable that rail for USB
operation. Since there is no supply property in the DT bindings for
the USB core, we need to always enable the regulator.

This fixes unstable USB operation on boards using the Forlinx FETA40i-C
module.

Signed-off-by: Fuyao Kashizuku <fuyao@sjterm.com>
---
Changes in v2:
 - Subject include board name.
 - regulator name changed to vcc-3v3-tv-usb.
 - explain why we need to enable the regulator.
 - use full name of the commiter
 - Link to v1: https://lore.kernel.org/lkml/ZYKjYypuAx7gNuam@debian.cyg/

 arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi b/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi
index 9f39b5a2bb35..c12361d0317f 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi
@@ -42,6 +42,13 @@ &pio {
 	vcc-pg-supply = <&reg_dldo1>;
 };
 
+&reg_aldo1 {
+	regulator-always-on;
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-3v3-tv-usb";
+};
+
 &reg_aldo2 {
 	regulator-always-on;
 	regulator-min-microvolt = <1800000>;
-- 
2.39.2

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

* Re: [PATCH v2] ARM: dts: sun8i: Open FETA40i-C regulator aldo1
  2023-12-26  8:40 [PATCH v2] ARM: dts: sun8i: Open FETA40i-C regulator aldo1 Fuyao Kashizuku
@ 2023-12-26 10:40 ` Andre Przywara
  2024-01-09 20:21 ` Jernej Škrabec
  2024-01-23 20:58 ` Jernej Škrabec
  2 siblings, 0 replies; 4+ messages in thread
From: Andre Przywara @ 2023-12-26 10:40 UTC (permalink / raw)
  To: Fuyao Kashizuku
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Florian Fainelli, Wei Xu,
	Gregory CLEMENT, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, 麦健建

On Tue, 26 Dec 2023 16:40:05 +0800
Fuyao Kashizuku <fuyao@sjterm.com> wrote:

Hi,

many thanks for the quick turnaround!

> The USB PHY in the Allwinner R40 SoC seems to rely on voltage on the
> VCC-TVIN/OUT supply pins for proper operation, on top of its own supply
> voltage on VCC-USB. Without a 3.3V voltage supplied to VCC-TV*, USB
> operation becomes unstable and can result in disconnects.
> 
> The Forlinx FETA40i-C SoM connects both the VCC-TVOUT and VCC-TVIN pins
> to the ALDO1 rail of the PMIC, so we need to enable that rail for USB
> operation. Since there is no supply property in the DT bindings for
> the USB core, we need to always enable the regulator.
> 
> This fixes unstable USB operation on boards using the Forlinx FETA40i-C
> module.
> 
> Signed-off-by: Fuyao Kashizuku <fuyao@sjterm.com>

Perfect, looks good to me now!

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Thanks!
Andre

> ---
> Changes in v2:
>  - Subject include board name.
>  - regulator name changed to vcc-3v3-tv-usb.
>  - explain why we need to enable the regulator.
>  - use full name of the commiter
>  - Link to v1: https://lore.kernel.org/lkml/ZYKjYypuAx7gNuam@debian.cyg/
> 
>  arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi b/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi
> index 9f39b5a2bb35..c12361d0317f 100644
> --- a/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi
> +++ b/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi
> @@ -42,6 +42,13 @@ &pio {
>  	vcc-pg-supply = <&reg_dldo1>;
>  };
>  
> +&reg_aldo1 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <3300000>;
> +	regulator-max-microvolt = <3300000>;
> +	regulator-name = "vcc-3v3-tv-usb";
> +};
> +
>  &reg_aldo2 {
>  	regulator-always-on;
>  	regulator-min-microvolt = <1800000>;


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

* Re: [PATCH v2] ARM: dts: sun8i: Open FETA40i-C regulator aldo1
  2023-12-26  8:40 [PATCH v2] ARM: dts: sun8i: Open FETA40i-C regulator aldo1 Fuyao Kashizuku
  2023-12-26 10:40 ` Andre Przywara
@ 2024-01-09 20:21 ` Jernej Škrabec
  2024-01-23 20:58 ` Jernej Škrabec
  2 siblings, 0 replies; 4+ messages in thread
From: Jernej Škrabec @ 2024-01-09 20:21 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Andre Przywara, Florian Fainelli,
	Wei Xu, Gregory CLEMENT, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, 麦健建

Dne torek, 26. december 2023 ob 09:40:05 CET je Fuyao Kashizuku napisal(a):
> The USB PHY in the Allwinner R40 SoC seems to rely on voltage on the
> VCC-TVIN/OUT supply pins for proper operation, on top of its own supply
> voltage on VCC-USB. Without a 3.3V voltage supplied to VCC-TV*, USB
> operation becomes unstable and can result in disconnects.
> 
> The Forlinx FETA40i-C SoM connects both the VCC-TVOUT and VCC-TVIN pins
> to the ALDO1 rail of the PMIC, so we need to enable that rail for USB
> operation. Since there is no supply property in the DT bindings for
> the USB core, we need to always enable the regulator.
> 
> This fixes unstable USB operation on boards using the Forlinx FETA40i-C
> module.
> 
> Signed-off-by: Fuyao Kashizuku <fuyao@sjterm.com>

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
> Changes in v2:
>  - Subject include board name.
>  - regulator name changed to vcc-3v3-tv-usb.
>  - explain why we need to enable the regulator.
>  - use full name of the commiter
>  - Link to v1: https://lore.kernel.org/lkml/ZYKjYypuAx7gNuam@debian.cyg/
> 
>  arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi b/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi
> index 9f39b5a2bb35..c12361d0317f 100644
> --- a/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi
> +++ b/arch/arm/boot/dts/allwinner/sun8i-r40-feta40i.dtsi
> @@ -42,6 +42,13 @@ &pio {
>  	vcc-pg-supply = <&reg_dldo1>;
>  };
>  
> +&reg_aldo1 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <3300000>;
> +	regulator-max-microvolt = <3300000>;
> +	regulator-name = "vcc-3v3-tv-usb";
> +};
> +
>  &reg_aldo2 {
>  	regulator-always-on;
>  	regulator-min-microvolt = <1800000>;
> 





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

* Re: [PATCH v2] ARM: dts: sun8i: Open FETA40i-C regulator aldo1
  2023-12-26  8:40 [PATCH v2] ARM: dts: sun8i: Open FETA40i-C regulator aldo1 Fuyao Kashizuku
  2023-12-26 10:40 ` Andre Przywara
  2024-01-09 20:21 ` Jernej Škrabec
@ 2024-01-23 20:58 ` Jernej Škrabec
  2 siblings, 0 replies; 4+ messages in thread
From: Jernej Škrabec @ 2024-01-23 20:58 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Andre Przywara, Florian Fainelli,
	Wei Xu, Gregory CLEMENT, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, 麦健建

Dne torek, 26. december 2023 ob 09:40:05 CET je Fuyao Kashizuku napisal(a):
> The USB PHY in the Allwinner R40 SoC seems to rely on voltage on the
> VCC-TVIN/OUT supply pins for proper operation, on top of its own supply
> voltage on VCC-USB. Without a 3.3V voltage supplied to VCC-TV*, USB
> operation becomes unstable and can result in disconnects.
> 
> The Forlinx FETA40i-C SoM connects both the VCC-TVOUT and VCC-TVIN pins
> to the ALDO1 rail of the PMIC, so we need to enable that rail for USB
> operation. Since there is no supply property in the DT bindings for
> the USB core, we need to always enable the regulator.
> 
> This fixes unstable USB operation on boards using the Forlinx FETA40i-C
> module.
> 
> Signed-off-by: Fuyao Kashizuku <fuyao@sjterm.com>

Merged, thanks!

Best regards,
Jernej



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

end of thread, other threads:[~2024-01-23 20:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-26  8:40 [PATCH v2] ARM: dts: sun8i: Open FETA40i-C regulator aldo1 Fuyao Kashizuku
2023-12-26 10:40 ` Andre Przywara
2024-01-09 20:21 ` Jernej Škrabec
2024-01-23 20:58 ` Jernej Škrabec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).