* [PATCH v2] arm64: dts: rockchip: enable UFS controller on FriendlyElec NanoPi M5
@ 2025-12-01 11:35 Alexey Charkov
2025-12-18 14:05 ` Alexey Charkov
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Charkov @ 2025-12-01 11:35 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Alexey Charkov
The NanoPi M5 board supports pluggable UFS modules using the UFSHC
inside its Rockchip RK3576 SoC.
Enable the respective devicetree node and add its supply regulators.
Link: https://wiki.friendlyelec.com/wiki/images/9/97/NanoPi_M5_LP5_2411_SCH.pdf
Signed-off-by: Alexey Charkov <alchark@gmail.com>
---
Changes in v2:
- Describe UFS supply regulators
- Add link to schematic
- Link to v1: https://lore.kernel.org/r/20251127-nanopi-m5-ufs-v1-1-0d28d157712c@gmail.com
---
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts | 27 +++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
index cce34c541f7c..4f2930cff70a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
@@ -110,6 +110,24 @@ vcc12v_dcin: regulator-vcc12v-dcin {
regulator-name = "vcc12v_dcin";
};
+ vcc1v2_ufs_vccq: regulator-vcc1v2-ufs-vccq {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-name = "vcc1v2_ufs_vccq";
+ vin-supply = <&vcc5v0_sys_s5>;
+ en-supply = <&vcc_3v3_s3>;
+ };
+
+ vcc1v8_ufs_vccq2: regulator-vcc1v8-ufs-vccq2 {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc1v8_ufs_vccq2";
+ vin-supply = <&vcc_1v8_s3>;
+ en-supply = <&vdda_1v2_s0>;
+ };
+
vcc3v3_m2_keym: regulator-vcc3v3-m2-keym {
compatible = "regulator-fixed";
enable-active-high;
@@ -906,6 +924,15 @@ &uart0 {
status = "okay";
};
+&ufshc {
+ vcc-supply = <&vcc_3v3_s3>;
+ vccq-supply = <&vcc1v2_ufs_vccq>;
+ vccq2-supply = <&vcc1v8_ufs_vccq2>;
+ vdd-hba-supply = <&vdda_1v2_s0>;
+
+ status = "okay";
+};
+
&usbdp_phy {
status = "okay";
};
---
base-commit: 7d31f578f3230f3b7b33b0930b08f9afd8429817
change-id: 20251127-nanopi-m5-ufs-52f2c5070167
Best regards,
--
Alexey Charkov <alchark@gmail.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] arm64: dts: rockchip: enable UFS controller on FriendlyElec NanoPi M5
2025-12-01 11:35 [PATCH v2] arm64: dts: rockchip: enable UFS controller on FriendlyElec NanoPi M5 Alexey Charkov
@ 2025-12-18 14:05 ` Alexey Charkov
2025-12-22 12:41 ` Heiko Stuebner
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Charkov @ 2025-12-18 14:05 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
Hi Heiko,
On Mon, Dec 1, 2025 at 3:35 PM Alexey Charkov <alchark@gmail.com> wrote:
>
> The NanoPi M5 board supports pluggable UFS modules using the UFSHC
> inside its Rockchip RK3576 SoC.
>
> Enable the respective devicetree node and add its supply regulators.
>
> Link: https://wiki.friendlyelec.com/wiki/images/9/97/NanoPi_M5_LP5_2411_SCH.pdf
> Signed-off-by: Alexey Charkov <alchark@gmail.com>
> ---
> Changes in v2:
> - Describe UFS supply regulators
> - Add link to schematic
> - Link to v1: https://lore.kernel.org/r/20251127-nanopi-m5-ufs-v1-1-0d28d157712c@gmail.com
> ---
> arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts | 27 +++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
Would you mind pulling this one, or do you have any reservations?
There hasn't been any discussion, but it looks like a pretty simple
change, runtime tested and schema-tested.
Best regards,
Alexey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] arm64: dts: rockchip: enable UFS controller on FriendlyElec NanoPi M5
2025-12-18 14:05 ` Alexey Charkov
@ 2025-12-22 12:41 ` Heiko Stuebner
2025-12-22 13:28 ` Alexey Charkov
0 siblings, 1 reply; 4+ messages in thread
From: Heiko Stuebner @ 2025-12-22 12:41 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alexey Charkov
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
Hi Alexey,
Am Donnerstag, 18. Dezember 2025, 15:05:39 Mitteleuropäische Normalzeit schrieb Alexey Charkov:
> Hi Heiko,
>
> On Mon, Dec 1, 2025 at 3:35 PM Alexey Charkov <alchark@gmail.com> wrote:
> >
> > The NanoPi M5 board supports pluggable UFS modules using the UFSHC
> > inside its Rockchip RK3576 SoC.
> >
> > Enable the respective devicetree node and add its supply regulators.
> >
> > Link: https://wiki.friendlyelec.com/wiki/images/9/97/NanoPi_M5_LP5_2411_SCH.pdf
> > Signed-off-by: Alexey Charkov <alchark@gmail.com>
> > ---
> > Changes in v2:
> > - Describe UFS supply regulators
> > - Add link to schematic
> > - Link to v1: https://lore.kernel.org/r/20251127-nanopi-m5-ufs-v1-1-0d28d157712c@gmail.com
> > ---
> > arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts | 27 +++++++++++++++++++++++
> > 1 file changed, 27 insertions(+)
>
> Would you mind pulling this one, or do you have any reservations?
> There hasn't been any discussion, but it looks like a pretty simple
> change, runtime tested and schema-tested.
Your patch fell directly into the dead-zone between -rc7 and -rc1 ;-)
> + vcc1v2_ufs_vccq: regulator-vcc1v2-ufs-vccq {
> + compatible = "regulator-fixed";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <1200000>;
> + regulator-name = "vcc1v2_ufs_vccq";
> + vin-supply = <&vcc5v0_sys_s5>;
> + en-supply = <&vcc_3v3_s3>;
> + };
> +
> + vcc1v8_ufs_vccq2: regulator-vcc1v8-ufs-vccq2 {
> + compatible = "regulator-fixed";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-name = "vcc1v8_ufs_vccq2";
> + vin-supply = <&vcc_1v8_s3>;
> + en-supply = <&vdda_1v2_s0>;
> + };
But where does the "en-supply" come from? For the life of me, I can't find
any reference to it in either the bindings in the kernel, nor the dt-schema.
Can you please point me to the part of the documentation where that is
described?
Thanks
Heiko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] arm64: dts: rockchip: enable UFS controller on FriendlyElec NanoPi M5
2025-12-22 12:41 ` Heiko Stuebner
@ 2025-12-22 13:28 ` Alexey Charkov
0 siblings, 0 replies; 4+ messages in thread
From: Alexey Charkov @ 2025-12-22 13:28 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel
Hi Heiko,
On Mon, Dec 22, 2025 at 4:41 PM Heiko Stuebner <heiko@sntech.de> wrote:
>
> Hi Alexey,
>
> Am Donnerstag, 18. Dezember 2025, 15:05:39 Mitteleuropäische Normalzeit schrieb Alexey Charkov:
> > Hi Heiko,
> >
> > On Mon, Dec 1, 2025 at 3:35 PM Alexey Charkov <alchark@gmail.com> wrote:
> > >
> > > The NanoPi M5 board supports pluggable UFS modules using the UFSHC
> > > inside its Rockchip RK3576 SoC.
> > >
> > > Enable the respective devicetree node and add its supply regulators.
> > >
> > > Link: https://wiki.friendlyelec.com/wiki/images/9/97/NanoPi_M5_LP5_2411_SCH.pdf
> > > Signed-off-by: Alexey Charkov <alchark@gmail.com>
> > > ---
> > > Changes in v2:
> > > - Describe UFS supply regulators
> > > - Add link to schematic
> > > - Link to v1: https://lore.kernel.org/r/20251127-nanopi-m5-ufs-v1-1-0d28d157712c@gmail.com
> > > ---
> > > arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts | 27 +++++++++++++++++++++++
> > > 1 file changed, 27 insertions(+)
> >
> > Would you mind pulling this one, or do you have any reservations?
> > There hasn't been any discussion, but it looks like a pretty simple
> > change, runtime tested and schema-tested.
>
> Your patch fell directly into the dead-zone between -rc7 and -rc1 ;-)
Understood :)
> > + vcc1v2_ufs_vccq: regulator-vcc1v2-ufs-vccq {
> > + compatible = "regulator-fixed";
> > + regulator-min-microvolt = <1200000>;
> > + regulator-max-microvolt = <1200000>;
> > + regulator-name = "vcc1v2_ufs_vccq";
> > + vin-supply = <&vcc5v0_sys_s5>;
> > + en-supply = <&vcc_3v3_s3>;
> > + };
> > +
> > + vcc1v8_ufs_vccq2: regulator-vcc1v8-ufs-vccq2 {
> > + compatible = "regulator-fixed";
> > + regulator-min-microvolt = <1800000>;
> > + regulator-max-microvolt = <1800000>;
> > + regulator-name = "vcc1v8_ufs_vccq2";
> > + vin-supply = <&vcc_1v8_s3>;
> > + en-supply = <&vdda_1v2_s0>;
> > + };
>
>
> But where does the "en-supply" come from? For the life of me, I can't find
> any reference to it in either the bindings in the kernel, nor the dt-schema.
>
> Can you please point me to the part of the documentation where that is
> described?
The bindings [1] describe supplies by a wildcard pattern '.*-supply$',
and the device in question is a DC-DC regulator (see page 17 of the
schematic [2]), which produces the 1.2V power for the chip, its VIN
pin directly wired to VCC5V0_SYS_S5 and its EN pin directly wired to
VCC_3V3_S3, both of which need to be active for the 1.2V feed to
appear - thus both are 'supplies' of sorts. VCCQ2 is similar, but
implemented using a simple gate circuit. This is done to ensure
correct power sequencing, from what I understood.
I've just checked the fixed regulator driver though, and it only
handles 'vin-supply', not any other '.*-supply$' - thus, technically,
it doesn't currently implement the full schema :) Not sure if there is
another existing facility to model multi-parent regulators that I
missed, or if it's a good idea to extend the fixed.c driver to handle
an arbitrary number of supplies?
Any guidance would be appreciated.
Thanks a lot,
Alexey
[1] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/regulator/regulator.yaml#L246-L248
[2] https://wiki.friendlyelec.com/wiki/images/9/97/NanoPi_M5_LP5_2411_SCH.pdf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-22 13:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-01 11:35 [PATCH v2] arm64: dts: rockchip: enable UFS controller on FriendlyElec NanoPi M5 Alexey Charkov
2025-12-18 14:05 ` Alexey Charkov
2025-12-22 12:41 ` Heiko Stuebner
2025-12-22 13:28 ` Alexey Charkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox