[PATCH 0/3] arm64: dts: allwinner: a64: olinuxino: Update regulators

37 views
Skip to first unread message

Stefan Mavrodiev

unread,
Nov 29, 2019, 4:14:12 AM11/29/19
to linux...@googlegroups.com, Stefan Mavrodiev
This patch serie updates bank regulators for A64-OLinuXino and
A64-OLinuXino-eMMC.

Also, eMMC supply is changed to ELDO1, which is the actual one. The same is
done for the SDIO card - ALDO2 is changed to DCDC1.


Stefan Mavrodiev (3):
arm64: dts: allwinner: a64: olinuxino: Fix eMMC supply regulator
arm64: dts: allwinner: a64: olinuxino: Add bank supply regulators
arm64: dts: allwinner: a64: olinuxino: Fix SDIO supply regulator

.../allwinner/sun50i-a64-olinuxino-emmc.dts | 8 ++++++--
.../dts/allwinner/sun50i-a64-olinuxino.dts | 18 +++++++++++++++++-
2 files changed, 23 insertions(+), 3 deletions(-)

--
2.17.1

Stefan Mavrodiev

unread,
Nov 29, 2019, 4:14:12 AM11/29/19
to Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list, linux...@googlegroups.com, Stefan Mavrodiev
A64-OLinuXino-eMMC uses 1.8V for eMMC supply. This is done via a triple
jumper, which sets VCC-PL to either 1.8V or 3.3V. This setting is different
for boards with and without eMMC.

This is not a big issue for DDR52 mode, however the eMMC will not work in
HS200/HS400, since these modes explicitly requires 1.8V.

Signed-off-by: Stefan Mavrodiev <ste...@olimex.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
index 96ab0227e82d..7d135decbd53 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
@@ -14,8 +14,8 @@
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins>;
- vmmc-supply = <&reg_dcdc1>;
- vqmmc-supply = <&reg_dcdc1>;
+ vmmc-supply = <&reg_eldo1>;
+ vqmmc-supply = <&reg_eldo1>;
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
--
2.17.1

Stefan Mavrodiev

unread,
Nov 29, 2019, 4:14:13 AM11/29/19
to Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list, linux...@googlegroups.com, Stefan Mavrodiev
Allwinner A64 SoC has separate supplies for PC, PD, PE, PG and PL. This
patch adds regulators for them to the pinctrl node.

Exception is PL which is used by the RSB bus. To avoid circular
dependencies, VCC-PL is omitted.

On boards with eMMC, VCC-PC is supplied by ELDO1, instead of DCDC1.

Signed-off-by: Stefan Mavrodiev <ste...@olimex.com>
---
.../dts/allwinner/sun50i-a64-olinuxino-emmc.dts | 4 ++++
.../boot/dts/allwinner/sun50i-a64-olinuxino.dts | 16 ++++++++++++++++
2 files changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
index 7d135decbd53..75f101d9cd3e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
@@ -21,3 +21,7 @@
cap-mmc-hw-reset;
status = "okay";
};
+
+&pio {
+ vcc-pc-supply = <&reg_eldo1>;
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 01a9a52edae4..ad3559c576dd 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -163,6 +163,22 @@
status = "okay";
};

+&pio {
+ vcc-pc-supply = <&reg_dcdc1>;
+ vcc-pd-supply = <&reg_dcdc1>;
+ vcc-pe-supply = <&reg_aldo1>;
+ vcc-pg-supply = <&reg_dldo4>;
+};
+
+&r_pio {
+ /**
+ * Do not add vcc-pl-supply, since PL0 and PL1 are used
+ * by the RSB bus.
+ *
+ * vcc-pl-supply = <&reg_aldo2>;
+ */
+};
+
&r_rsb {
status = "okay";

--
2.17.1

Stefan Mavrodiev

unread,
Nov 29, 2019, 4:14:21 AM11/29/19
to Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list, linux...@googlegroups.com, Stefan Mavrodiev
A64-OLinuXino uses DCDC1 (VCC-IO) for MMC1 supply. In the dts
ALDO2 is set, which is VCC-PL. Since DCDC1 is always present, the boards
are working without a problem.

THis pacth sets the correct regulator.

Signed-off-by: Stefan Mavrodiev <ste...@olimex.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index ad3559c576dd..869bb146a9ff 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -140,7 +140,7 @@
&mmc1 {
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins>;
- vmmc-supply = <&reg_aldo2>;
+ vmmc-supply = <&reg_dcdc1>;
vqmmc-supply = <&reg_dldo4>;
mmc-pwrseq = <&wifi_pwrseq>;
bus-width = <4>;
--
2.17.1

Chen-Yu Tsai

unread,
Nov 29, 2019, 4:26:56 AM11/29/19
to Stefan Mavrodiev, Maxime Ripard, Rob Herring, Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list, linux-sunxi
If I'm reading the schematics correctly, VCC on the eMMC is from 3.3V.
This corresponds to the vmmc-supply property. So you shouldn't change it.

> + vqmmc-supply = <&reg_eldo1>;

vqmmc-supply is from the VCC-PC rail, which is the one you say is triple-
jumpered. So this change makes sense.

ChenYu

Chen-Yu Tsai

unread,
Nov 29, 2019, 4:45:47 AM11/29/19
to Stefan Mavrodiev, linux-sunxi
Hi,

On Fri, Nov 29, 2019 at 5:14 PM Stefan Mavrodiev <ste...@olimex.com> wrote:
>
> This patch serie updates bank regulators for A64-OLinuXino and
> A64-OLinuXino-eMMC.
>
> Also, eMMC supply is changed to ELDO1, which is the actual one. The same is
> done for the SDIO card - ALDO2 is changed to DCDC1.
>
>
> Stefan Mavrodiev (3):
> arm64: dts: allwinner: a64: olinuxino: Fix eMMC supply regulator
> arm64: dts: allwinner: a64: olinuxino: Add bank supply regulators
> arm64: dts: allwinner: a64: olinuxino: Fix SDIO supply regulator

Can you add fixes and stable kernel tags? We want these fixes to be backported.

ChenYu

>
> .../allwinner/sun50i-a64-olinuxino-emmc.dts | 8 ++++++--
> .../dts/allwinner/sun50i-a64-olinuxino.dts | 18 +++++++++++++++++-
> 2 files changed, 23 insertions(+), 3 deletions(-)
>
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20191129091336.13104-1-stefan%40olimex.com.

Stefan Mavrodiev

unread,
Nov 29, 2019, 4:50:08 AM11/29/19
to we...@kernel.org, Stefan Mavrodiev, Maxime Ripard, Rob Herring, Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list, linux-sunxi

On 11/29/19 11:26 AM, Chen-Yu Tsai wrote:
> On Fri, Nov 29, 2019 at 5:14 PM Stefan Mavrodiev <ste...@olimex.com> wrote:
>> A64-OLinuXino-eMMC uses 1.8V for eMMC supply. This is done via a triple
>> jumper, which sets VCC-PL to either 1.8V or 3.3V. This setting is different
>> for boards with and without eMMC.
>>
>> This is not a big issue for DDR52 mode, however the eMMC will not work in
>> HS200/HS400, since these modes explicitly requires 1.8V.
>>
>> Signed-off-by: Stefan Mavrodiev <ste...@olimex.com>
>> ---
>> arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
>> index 96ab0227e82d..7d135decbd53 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
>> @@ -14,8 +14,8 @@
>> &mmc2 {
>> pinctrl-names = "default";
>> pinctrl-0 = <&mmc2_pins>;
>> - vmmc-supply = <&reg_dcdc1>;
>> - vqmmc-supply = <&reg_dcdc1>;
>> + vmmc-supply = <&reg_eldo1>;
> If I'm reading the schematics correctly, VCC on the eMMC is from 3.3V.
> This corresponds to the vmmc-supply property. So you shouldn't change it.

My bad. Don't know how I've missed that.

Stefan

Stefan Mavrodiev

unread,
Nov 29, 2019, 4:52:51 AM11/29/19
to we...@kernel.org, Stefan Mavrodiev, linux-sunxi

On 11/29/19 11:45 AM, Chen-Yu Tsai wrote:
> Hi,
>
> On Fri, Nov 29, 2019 at 5:14 PM Stefan Mavrodiev <ste...@olimex.com> wrote:
>> This patch serie updates bank regulators for A64-OLinuXino and
>> A64-OLinuXino-eMMC.
>>
>> Also, eMMC supply is changed to ELDO1, which is the actual one. The same is
>> done for the SDIO card - ALDO2 is changed to DCDC1.
>>
>>
>> Stefan Mavrodiev (3):
>> arm64: dts: allwinner: a64: olinuxino: Fix eMMC supply regulator
>> arm64: dts: allwinner: a64: olinuxino: Add bank supply regulators
>> arm64: dts: allwinner: a64: olinuxino: Fix SDIO supply regulator
> Can you add fixes and stable kernel tags? We want these fixes to be backported.
>
> ChenYu
Yes, no problem.

Stefan Mavrodiev

unread,
Nov 29, 2019, 6:40:14 AM11/29/19
to Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list, linux...@googlegroups.com, Stefan Mavrodiev
Allwinner A64 SoC has separate supplies for PC, PD, PE, PG and PL. This
patch adds regulators for them to the pinctrl node.

Exception is PL which is used by the RSB bus. To avoid circular
dependencies, VCC-PL is omitted.

On boards with eMMC, VCC-PC is supplied by ELDO1, instead of DCDC1.

Signed-off-by: Stefan Mavrodiev <ste...@olimex.com>
---
.../dts/allwinner/sun50i-a64-olinuxino-emmc.dts | 4 ++++
.../boot/dts/allwinner/sun50i-a64-olinuxino.dts | 16 ++++++++++++++++
2 files changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
index 121e6cc4849b..12f8c62c4f52 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
@@ -21,3 +21,7 @@
cap-mmc-hw-reset;
status = "okay";
};
+
+&pio {
+ vcc-pc-supply = <&reg_eldo1>;
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 01a9a52edae4..ad3559c576dd 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts

Stefan Mavrodiev

unread,
Nov 29, 2019, 6:40:14 AM11/29/19
to Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list, linux...@googlegroups.com, Stefan Mavrodiev, sta...@vger.kernel.org
A64-OLinuXino-eMMC uses 1.8V for eMMC supply. This is done via a triple
jumper, which sets VCC-PL to either 1.8V or 3.3V. This setting is different
for boards with and without eMMC.

This is not a big issue for DDR52 mode, however the eMMC will not work in
HS200/HS400, since these modes explicitly requires 1.8V.

Fixes: 94f68f3a4b2a ("arm64: dts: allwinner: a64: Add A64 OlinuXino board (with eMMC)")
Cc: sta...@vger.kernel.org # v5.4
Signed-off-by: Stefan Mavrodiev <ste...@olimex.com>
---
Changes for v2:
- Restore the original eMMC vmmc-supply property

arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
index 96ab0227e82d..121e6cc4849b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
@@ -15,7 +15,7 @@
pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins>;
vmmc-supply = <&reg_dcdc1>;
- vqmmc-supply = <&reg_dcdc1>;

Stefan Mavrodiev

unread,
Nov 29, 2019, 6:40:14 AM11/29/19
to Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list, linux...@googlegroups.com, Stefan Mavrodiev
This patch serie updates bank regulators for A64-OLinuXino and
A64-OLinuXino-eMMC.

Also, eMMC supply is changed to ELDO1, which is the actual one. The same is
done for the SDIO card - ALDO2 is changed to DCDC1.

Changes for v2:
- Restore the original eMMC vmmc-supply property
- Add fixes and kernel tags

Stefan Mavrodiev (3):
arm64: dts: allwinner: a64: olinuxino: Fix eMMC supply regulator
arm64: dts: allwinner: a64: olinuxino: Add bank supply regulators
arm64: dts: allwinner: a64: olinuxino: Fix SDIO supply regulator

.../allwinner/sun50i-a64-olinuxino-emmc.dts | 6 +++++-
.../dts/allwinner/sun50i-a64-olinuxino.dts | 18 +++++++++++++++++-
2 files changed, 22 insertions(+), 2 deletions(-)

--
2.17.1

Stefan Mavrodiev

unread,
Nov 29, 2019, 6:40:14 AM11/29/19
to Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list, linux...@googlegroups.com, Stefan Mavrodiev, sta...@vger.kernel.org
A64-OLinuXino uses DCDC1 (VCC-IO) for MMC1 supply. In commit 916b68cfe4b5
("arm64: dts: a64-olinuxino: Enable RTL8723BS WiFi") ALDO2 is set, which is
VCC-PL. Since DCDC1 is always present, the boards are working without a
problem.

This patch sets the correct regulator.

Fixes: 916b68cfe4b5 ("arm64: dts: a64-olinuxino: Enable RTL8723BS WiFi")
Cc: sta...@vger.kernel.org # v4.16+
Signed-off-by: Stefan Mavrodiev <ste...@olimex.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index ad3559c576dd..869bb146a9ff 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -140,7 +140,7 @@
&mmc1 {
pinctrl-names = "default";
Reply all
Reply to author
Forward
0 new messages