* [PATCH] arm64: dts: rockchip: Always enable sd regulator on SOQuartz CM4IO
@ 2023-02-15 1:09 Nicolas Frattaroli
2023-02-23 0:29 ` Peter Geis
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Frattaroli @ 2023-02-15 1:09 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Heiko Stuebner,
Nicolas Frattaroli, Peter Geis
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
The 3.3V line coming from the SDMMC regulator is required for USB
on the CM4IO board. Without it, the USB mux (U13 in the CM4IO
schematic[1]) that's used likely remains unpowered, and no USB
devices show up.
The consequence of this was the behaviour of an inserted SD card
allowing USB to work, while pulling it out turned off all USB
devices.
[1]: https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf
Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts")
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
index 263ce40770dd..88a61fa8a95c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
@@ -135,6 +135,12 @@ &sdmmc0 {
};
&sdmmc_pwr {
+ /*
+ * USB also needs this regulator to work on this board, so just enable
+ * it unconditionally.
+ */
+ regulator-always-on;
+ regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
status = "okay";
--
2.39.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: Always enable sd regulator on SOQuartz CM4IO
2023-02-15 1:09 [PATCH] arm64: dts: rockchip: Always enable sd regulator on SOQuartz CM4IO Nicolas Frattaroli
@ 2023-02-23 0:29 ` Peter Geis
2023-02-23 5:53 ` Nicolas Frattaroli
0 siblings, 1 reply; 4+ messages in thread
From: Peter Geis @ 2023-02-23 0:29 UTC (permalink / raw)
To: Nicolas Frattaroli
Cc: Rob Herring, Krzysztof Kozlowski, Heiko Stuebner, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel
On Tue, Feb 14, 2023 at 8:09 PM Nicolas Frattaroli
<frattaroli.nicolas@gmail.com> wrote:
>
> The 3.3V line coming from the SDMMC regulator is required for USB
> on the CM4IO board. Without it, the USB mux (U13 in the CM4IO
> schematic[1]) that's used likely remains unpowered, and no USB
> devices show up.
>
> The consequence of this was the behaviour of an inserted SD card
> allowing USB to work, while pulling it out turned off all USB
> devices.
>
> [1]: https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf
I disagree with this. According to the datasheet u13 and half a dozen
other devices are powered by 3.3v sourced from the SOM. sdmmc_pwr
triggers SD_PWR_ON which serves only to provide an enable signal to
u18, the regulator that powers the sdmmc slot from the same 3.3v. If
you are having problems with USB working, you likely have something
else going wrong here.
Very Respectfully,
Peter Geis
>
> Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts")
> Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
> ---
> arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
> index 263ce40770dd..88a61fa8a95c 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
> @@ -135,6 +135,12 @@ &sdmmc0 {
> };
>
> &sdmmc_pwr {
> + /*
> + * USB also needs this regulator to work on this board, so just enable
> + * it unconditionally.
> + */
> + regulator-always-on;
> + regulator-boot-on;
> regulator-min-microvolt = <3300000>;
> regulator-max-microvolt = <3300000>;
> status = "okay";
> --
> 2.39.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: Always enable sd regulator on SOQuartz CM4IO
2023-02-23 0:29 ` Peter Geis
@ 2023-02-23 5:53 ` Nicolas Frattaroli
2023-02-23 21:53 ` Peter Geis
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Frattaroli @ 2023-02-23 5:53 UTC (permalink / raw)
To: Peter Geis
Cc: Rob Herring, Krzysztof Kozlowski, Heiko Stuebner, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel
On Thursday, 23 February 2023 01:29:39 CET Peter Geis wrote:
> On Tue, Feb 14, 2023 at 8:09 PM Nicolas Frattaroli
>
> <frattaroli.nicolas@gmail.com> wrote:
> > The 3.3V line coming from the SDMMC regulator is required for USB
> > on the CM4IO board. Without it, the USB mux (U13 in the CM4IO
> > schematic[1]) that's used likely remains unpowered, and no USB
> > devices show up.
> >
> > The consequence of this was the behaviour of an inserted SD card
> > allowing USB to work, while pulling it out turned off all USB
> > devices.
> >
> > [1]: https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf
>
> I disagree with this. According to the datasheet u13 and half a dozen
> other devices are powered by 3.3v sourced from the SOM. sdmmc_pwr
> triggers SD_PWR_ON which serves only to provide an enable signal to
> u18, the regulator that powers the sdmmc slot from the same 3.3v. If
> you are having problems with USB working, you likely have something
> else going wrong here.
>
> Very Respectfully,
> Peter Geis
Hello,
I don't see how else the observed behaviour would be triggered.
As far as I can tell, the sdmmc_pwr regulator is the name of the
3.3V regulator on the SOM, which is what powers the 3.3V on the
USB mux chip.
Do you have an alternate explanation for why this patch works?
Kind regards,
Nicolas Frattaroli
>
> > Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts")
> > Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
> > ---
> >
> > arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
> > b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts index
> > 263ce40770dd..88a61fa8a95c 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
> > @@ -135,6 +135,12 @@ &sdmmc0 {
> >
> > };
> >
> > &sdmmc_pwr {
> >
> > + /*
> > + * USB also needs this regulator to work on this board, so just
> > enable + * it unconditionally.
> > + */
> > + regulator-always-on;
> > + regulator-boot-on;
> >
> > regulator-min-microvolt = <3300000>;
> > regulator-max-microvolt = <3300000>;
> > status = "okay";
> >
> > --
> > 2.39.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: Always enable sd regulator on SOQuartz CM4IO
2023-02-23 5:53 ` Nicolas Frattaroli
@ 2023-02-23 21:53 ` Peter Geis
0 siblings, 0 replies; 4+ messages in thread
From: Peter Geis @ 2023-02-23 21:53 UTC (permalink / raw)
To: Nicolas Frattaroli
Cc: Rob Herring, Krzysztof Kozlowski, Heiko Stuebner, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel
On Thu, Feb 23, 2023 at 12:53 AM Nicolas Frattaroli
<frattaroli.nicolas@gmail.com> wrote:
>
> On Thursday, 23 February 2023 01:29:39 CET Peter Geis wrote:
> > On Tue, Feb 14, 2023 at 8:09 PM Nicolas Frattaroli
> >
> > <frattaroli.nicolas@gmail.com> wrote:
> > > The 3.3V line coming from the SDMMC regulator is required for USB
> > > on the CM4IO board. Without it, the USB mux (U13 in the CM4IO
> > > schematic[1]) that's used likely remains unpowered, and no USB
> > > devices show up.
> > >
> > > The consequence of this was the behaviour of an inserted SD card
> > > allowing USB to work, while pulling it out turned off all USB
> > > devices.
> > >
> > > [1]: https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf
> >
> > I disagree with this. According to the datasheet u13 and half a dozen
> > other devices are powered by 3.3v sourced from the SOM. sdmmc_pwr
> > triggers SD_PWR_ON which serves only to provide an enable signal to
> > u18, the regulator that powers the sdmmc slot from the same 3.3v. If
> > you are having problems with USB working, you likely have something
> > else going wrong here.
> >
> > Very Respectfully,
> > Peter Geis
>
> Hello,
>
> I don't see how else the observed behaviour would be triggered.
> As far as I can tell, the sdmmc_pwr regulator is the name of the
> 3.3V regulator on the SOM, which is what powers the 3.3V on the
> USB mux chip.
>
> Do you have an alternate explanation for why this patch works?
If you have the new variant of the SoQuartz, that pin is no longer
sdmmc power and now feeds nEXTRST. As the variant I built this device
tree from was not the final production version and is only operated by
a few individuals (such as myself) you should probably just adjust
this to the production variant.
On the production variant the sdmmc power pin is pulled high to 3.3v
and cannot be controlled, which lead to the issues observed with the
prototype model a baseboard.
Very Respectfully,
Peter Geis
>
> Kind regards,
> Nicolas Frattaroli
>
> >
> > > Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts")
> > > Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
> > > ---
> > >
> > > arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts | 6 ++++++
> > > 1 file changed, 6 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
> > > b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts index
> > > 263ce40770dd..88a61fa8a95c 100644
> > > --- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
> > > +++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts
> > > @@ -135,6 +135,12 @@ &sdmmc0 {
> > >
> > > };
> > >
> > > &sdmmc_pwr {
> > >
> > > + /*
> > > + * USB also needs this regulator to work on this board, so just
> > > enable + * it unconditionally.
> > > + */
> > > + regulator-always-on;
> > > + regulator-boot-on;
> > >
> > > regulator-min-microvolt = <3300000>;
> > > regulator-max-microvolt = <3300000>;
> > > status = "okay";
> > >
> > > --
> > > 2.39.1
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-23 21:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15 1:09 [PATCH] arm64: dts: rockchip: Always enable sd regulator on SOQuartz CM4IO Nicolas Frattaroli
2023-02-23 0:29 ` Peter Geis
2023-02-23 5:53 ` Nicolas Frattaroli
2023-02-23 21:53 ` Peter Geis
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).