* [PATCH v2 0/3] Fix regulators and assign them on NanoPi NEO Plus2
@ 2024-08-27 21:00 Kryštof Černý
2024-08-27 21:00 ` [PATCH v2 1/3] Fix NanoPi NEO Plus2 regulators Kryštof Černý
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Kryštof Černý @ 2024-08-27 21:00 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland
Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel,
Kryštof Černý
Many thanks for your feedback, especially from André Przywara,
I learned a lot from you and your kind words motivated me to do a follow-up.
Regulators should correspond to reality (schematics).
Proper regulators were added for pio and r_pio.
Added missing regulator for mmc2.
Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com>
---
Kryštof Černý (3):
Fix NanoPi NEO Plus2 regulators
Use regulators for pio on NanoPi NEO Plus2
Add vqmmc-supply on NanoPi NEO Plus2
.../dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 38 ++++++++++++++++++++++
1 file changed, 38 insertions(+)
---
base-commit: 6f923748057a4f6aa187e0d5b22990d633a48d12
change-id: 20240827-nanopi-neo-plus2-regfix-b60116ce12ca
Best regards,
--
Kryštof Černý <cleverline1mc@gmail.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] Fix NanoPi NEO Plus2 regulators
2024-08-27 21:00 [PATCH v2 0/3] Fix regulators and assign them on NanoPi NEO Plus2 Kryštof Černý
@ 2024-08-27 21:00 ` Kryštof Černý
2024-09-04 16:44 ` Andre Przywara
2024-08-27 21:00 ` [PATCH v2 2/3] Use regulators for pio on NanoPi NEO Plus2 Kryštof Černý
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Kryštof Černý @ 2024-08-27 21:00 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland
Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel,
Kryštof Černý
Added the main board 5 V supply regulator,
a 2.5 V supply regulator for GMAC PHY IO and correct vin-supply elements.
Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com>
---
.../dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
index b69032c44557..dee4cd82636b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
@@ -45,16 +45,40 @@ reg_gmac_3v3: gmac-3v3 {
startup-delay-us = <100000>;
enable-active-high;
gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
+ vin-supply = <®_vcc3v3>;
+ };
+
+ reg_gmac_2v5: gmac-2v5 {
+ /* 2V5 supply for GMAC PHY IO */
+ compatible = "regulator-fixed";
+ regulator-name = "gmac-2v5";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-always-on;
+ vin-supply = <®_vcc3v3>;
+ };
+
+ reg_vcc5v: regulator-vcc5v {
+ /* board 5V supply from micro USB or pin headers */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
};
reg_vcc3v3: vcc3v3 {
+ /* board 3V3 supply by SY8089A */
compatible = "regulator-fixed";
regulator-name = "vcc3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ vin-supply = <®_vcc5v>;
};
vdd_cpux: gpio-regulator {
+ /* cpu voltage regulator MP2143DJ */
compatible = "regulator-gpio";
regulator-name = "vdd-cpux";
regulator-type = "voltage";
@@ -66,6 +90,7 @@ vdd_cpux: gpio-regulator {
gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
gpios-states = <0x1>;
states = <1100000 0>, <1300000 1>;
+ vin-supply = <®_vcc5v>;
};
wifi_pwrseq: pwrseq {
--
2.39.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] Use regulators for pio on NanoPi NEO Plus2
2024-08-27 21:00 [PATCH v2 0/3] Fix regulators and assign them on NanoPi NEO Plus2 Kryštof Černý
2024-08-27 21:00 ` [PATCH v2 1/3] Fix NanoPi NEO Plus2 regulators Kryštof Černý
@ 2024-08-27 21:00 ` Kryštof Černý
2024-09-04 15:27 ` Andre Przywara
2024-08-27 21:00 ` [PATCH v2 3/3] Add vqmmc-supply " Kryštof Černý
2024-09-04 14:52 ` [PATCH v2 0/3] Fix regulators and assign them " Chen-Yu Tsai
3 siblings, 1 reply; 8+ messages in thread
From: Kryštof Černý @ 2024-08-27 21:00 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland
Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel,
Kryštof Černý
Pin controllers pio and r_pio will have proper regulators assigned.
Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
index dee4cd82636b..526443bb736c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
@@ -171,6 +171,18 @@ &ohci3 {
status = "okay";
};
+&pio {
+ vcc-pa-supply = <®_vcc3v3>;
+ vcc-pc-supply = <®_vcc3v3>;
+ vcc-pd-supply = <®_gmac_2v5>;
+ vcc-pf-supply = <®_vcc3v3>;
+ vcc-pg-supply = <®_vcc3v3>;
+};
+
+&r_pio {
+ vcc-pl-supply = <®_vcc3v3>;
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
--
2.39.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] Add vqmmc-supply on NanoPi NEO Plus2
2024-08-27 21:00 [PATCH v2 0/3] Fix regulators and assign them on NanoPi NEO Plus2 Kryštof Černý
2024-08-27 21:00 ` [PATCH v2 1/3] Fix NanoPi NEO Plus2 regulators Kryštof Černý
2024-08-27 21:00 ` [PATCH v2 2/3] Use regulators for pio on NanoPi NEO Plus2 Kryštof Černý
@ 2024-08-27 21:00 ` Kryštof Černý
2024-09-04 15:25 ` Andre Przywara
2024-09-04 14:52 ` [PATCH v2 0/3] Fix regulators and assign them " Chen-Yu Tsai
3 siblings, 1 reply; 8+ messages in thread
From: Kryštof Černý @ 2024-08-27 21:00 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland
Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel,
Kryštof Černý
Adds missing vqmmc-supply for mmc2.
Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
index 526443bb736c..609560a9d6dc 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
@@ -157,6 +157,7 @@ &mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_pins>;
vmmc-supply = <®_vcc3v3>;
+ vqmmc-supply = <®_vcc3v3>;
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
--
2.39.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/3] Fix regulators and assign them on NanoPi NEO Plus2
2024-08-27 21:00 [PATCH v2 0/3] Fix regulators and assign them on NanoPi NEO Plus2 Kryštof Černý
` (2 preceding siblings ...)
2024-08-27 21:00 ` [PATCH v2 3/3] Add vqmmc-supply " Kryštof Černý
@ 2024-09-04 14:52 ` Chen-Yu Tsai
3 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2024-09-04 14:52 UTC (permalink / raw)
To: Kryštof Černý
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
Samuel Holland, devicetree, linux-arm-kernel, linux-sunxi,
linux-kernel
Hi,
On Wed, Aug 28, 2024 at 5:01 AM Kryštof Černý <cleverline1mc@gmail.com> wrote:
>
> Many thanks for your feedback, especially from André Przywara,
> I learned a lot from you and your kind words motivated me to do a follow-up.
> Regulators should correspond to reality (schematics).
> Proper regulators were added for pio and r_pio.
> Added missing regulator for mmc2.
>
> Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com>
> ---
> Kryštof Černý (3):
> Fix NanoPi NEO Plus2 regulators
> Use regulators for pio on NanoPi NEO Plus2
> Add vqmmc-supply on NanoPi NEO Plus2
I just realized that all your patch subjects are missing the proper prefixes.
Can you check the history of the file you changed to see what is usually
used and send a revised version?
Thanks
ChenYu
>
> .../dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 38 ++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
> ---
> base-commit: 6f923748057a4f6aa187e0d5b22990d633a48d12
> change-id: 20240827-nanopi-neo-plus2-regfix-b60116ce12ca
>
> Best regards,
> --
> Kryštof Černý <cleverline1mc@gmail.com>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/3] Add vqmmc-supply on NanoPi NEO Plus2
2024-08-27 21:00 ` [PATCH v2 3/3] Add vqmmc-supply " Kryštof Černý
@ 2024-09-04 15:25 ` Andre Przywara
0 siblings, 0 replies; 8+ messages in thread
From: Andre Przywara @ 2024-09-04 15:25 UTC (permalink / raw)
To: Kryštof Černý
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel
On Tue, 27 Aug 2024 23:00:45 +0200
Kryštof Černý <cleverline1mc@gmail.com> wrote:
> Adds missing vqmmc-supply for mmc2.
Does that patch actually fix anything? Does the kernel complain about the
missing vqmmc regulator?
I am asking because I wonder if we need this patch in the first place. The
generic MMC DT binding marks the vqmmc property as optional.
So I appreciate the idea of making everything neat and tidy, but after all
we have little actual proof that the voltage is really 3.3V, so I'd just
leave it as it is.
Cheers,
Andre
>
> Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com>
> ---
> arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
> index 526443bb736c..609560a9d6dc 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
> @@ -157,6 +157,7 @@ &mmc2 {
> pinctrl-names = "default";
> pinctrl-0 = <&mmc2_8bit_pins>;
> vmmc-supply = <®_vcc3v3>;
> + vqmmc-supply = <®_vcc3v3>;
> bus-width = <8>;
> non-removable;
> cap-mmc-hw-reset;
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/3] Use regulators for pio on NanoPi NEO Plus2
2024-08-27 21:00 ` [PATCH v2 2/3] Use regulators for pio on NanoPi NEO Plus2 Kryštof Černý
@ 2024-09-04 15:27 ` Andre Przywara
0 siblings, 0 replies; 8+ messages in thread
From: Andre Przywara @ 2024-09-04 15:27 UTC (permalink / raw)
To: Kryštof Černý
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel
On Tue, 27 Aug 2024 23:00:44 +0200
Kryštof Černý <cleverline1mc@gmail.com> wrote:
Hi,
> Pin controllers pio and r_pio will have proper regulators assigned.
>
> Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com>
Checked against the schematic, it's indeed all 3.3V, except for PortD.
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
> arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
> index dee4cd82636b..526443bb736c 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
> @@ -171,6 +171,18 @@ &ohci3 {
> status = "okay";
> };
>
> +&pio {
> + vcc-pa-supply = <®_vcc3v3>;
> + vcc-pc-supply = <®_vcc3v3>;
> + vcc-pd-supply = <®_gmac_2v5>;
> + vcc-pf-supply = <®_vcc3v3>;
> + vcc-pg-supply = <®_vcc3v3>;
> +};
> +
> +&r_pio {
> + vcc-pl-supply = <®_vcc3v3>;
> +};
> +
> &uart0 {
> pinctrl-names = "default";
> pinctrl-0 = <&uart0_pa_pins>;
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] Fix NanoPi NEO Plus2 regulators
2024-08-27 21:00 ` [PATCH v2 1/3] Fix NanoPi NEO Plus2 regulators Kryštof Černý
@ 2024-09-04 16:44 ` Andre Przywara
0 siblings, 0 replies; 8+ messages in thread
From: Andre Przywara @ 2024-09-04 16:44 UTC (permalink / raw)
To: Kryštof Černý
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel
On Tue, 27 Aug 2024 23:00:43 +0200
Kryštof Černý <cleverline1mc@gmail.com> wrote:
Hi,
> Added the main board 5 V supply regulator,
> a 2.5 V supply regulator for GMAC PHY IO and correct vin-supply elements.
thanks for sending this and fixing the DT!
That looks correct when comparing to the schematics:
> Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
> .../dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 25 ++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
> index b69032c44557..dee4cd82636b 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
> @@ -45,16 +45,40 @@ reg_gmac_3v3: gmac-3v3 {
> startup-delay-us = <100000>;
> enable-active-high;
> gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
> + vin-supply = <®_vcc3v3>;
> + };
> +
> + reg_gmac_2v5: gmac-2v5 {
> + /* 2V5 supply for GMAC PHY IO */
> + compatible = "regulator-fixed";
> + regulator-name = "gmac-2v5";
> + regulator-min-microvolt = <2500000>;
> + regulator-max-microvolt = <2500000>;
> + regulator-always-on;
> + vin-supply = <®_vcc3v3>;
> + };
> +
> + reg_vcc5v: regulator-vcc5v {
> + /* board 5V supply from micro USB or pin headers */
> + compatible = "regulator-fixed";
> + regulator-name = "vcc-5v";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + regulator-always-on;
> };
>
> reg_vcc3v3: vcc3v3 {
> + /* board 3V3 supply by SY8089A */
> compatible = "regulator-fixed";
> regulator-name = "vcc3v3";
> regulator-min-microvolt = <3300000>;
> regulator-max-microvolt = <3300000>;
> + regulator-always-on;
> + vin-supply = <®_vcc5v>;
> };
>
> vdd_cpux: gpio-regulator {
> + /* cpu voltage regulator MP2143DJ */
> compatible = "regulator-gpio";
> regulator-name = "vdd-cpux";
> regulator-type = "voltage";
> @@ -66,6 +90,7 @@ vdd_cpux: gpio-regulator {
> gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
> gpios-states = <0x1>;
> states = <1100000 0>, <1300000 1>;
> + vin-supply = <®_vcc5v>;
> };
>
> wifi_pwrseq: pwrseq {
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-09-04 16:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 21:00 [PATCH v2 0/3] Fix regulators and assign them on NanoPi NEO Plus2 Kryštof Černý
2024-08-27 21:00 ` [PATCH v2 1/3] Fix NanoPi NEO Plus2 regulators Kryštof Černý
2024-09-04 16:44 ` Andre Przywara
2024-08-27 21:00 ` [PATCH v2 2/3] Use regulators for pio on NanoPi NEO Plus2 Kryštof Černý
2024-09-04 15:27 ` Andre Przywara
2024-08-27 21:00 ` [PATCH v2 3/3] Add vqmmc-supply " Kryštof Černý
2024-09-04 15:25 ` Andre Przywara
2024-09-04 14:52 ` [PATCH v2 0/3] Fix regulators and assign them " Chen-Yu Tsai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox