arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply
Subsystems (2)
PATCH 1/1 arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply
On A64-OLinuXino boards, PG9 is used for USB1 enable/disable. The port is supplied by DLDO4, which is disabled by default. The patch adds the regulator as vcc-pg, which is later used by the pinctrl.
--- arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +4 -0
@@ -163,6 +163,10 @@ status = "okay"; }; +&pio { + vcc-pg-supply=<®_dldo4>; +}; + &r_rsb { status = "okay";
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Stefan,
Quoted 14 lines · Stefan Mavrodiev
On A64-OLinuXino boards, PG9 is used for USB1 enable/disable. The port is supplied by DLDO4, which is disabled by default. The patch adds the regulator as vcc-pg, which is later used by the pinctrl.
Signed-off-by Stefan Mavrodiev <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +0
-0
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts line 167
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +2
-0@@ -163,6 +163,10 @@ status = "okay"; }; +&pio { + vcc-pg-supply=<®_dldo4>;
The equal sign should have spaces around it.
Also, can you please list all the bank supplies while you're at it?
Thanks!
Maxime
Quoted 1 line
Quoted 20 lines · Maxime Ripard
Hi Stefan,
Quoted 17 lines · Stefan Mavrodiev
On A64-OLinuXino boards, PG9 is used for USB1 enable/disable. The port is supplied by DLDO4, which is disabled by default. The patch adds the regulator as vcc-pg, which is later used by the pinctrl.
Signed-off-by Stefan Mavrodiev <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +0
-0@@ -163,6 +163,10 @@ status = "okay"; };
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts line 167
Quoted 2 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +2
-0+&pio { + vcc-pg-supply=<®_dldo4>;The equal sign should have spaces around it.
Also, can you please list all the bank supplies while you're at it?
Sure. Should the supplies defined as regulators names be added also to the pio node? For example reg_aldo1 is named "vcc-pe".
Also, since the commit message will be different for better representation of the changes, should I send the next patch as v2 or as a new one?
Best regards,
Stefan
Quoted 3 lines
Thanks!
Maxime
Hi Stefan,
Quoted 25 lines · Stefan Mavrodiev
Quoted 24 lines · Maxime Ripard
Hi Stefan,
Quoted 14 lines · Stefan Mavrodiev
On A64-OLinuXino boards, PG9 is used for USB1 enable/disable. The port is supplied by DLDO4, which is disabled by default. The patch adds the regulator as vcc-pg, which is later used by the pinctrl.
Signed-off-by Stefan Mavrodiev <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +0
-0arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts line 167
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +2
-0@@ -163,6 +163,10 @@ status = "okay"; }; +&pio { + vcc-pg-supply=<®_dldo4>;The equal sign should have spaces around it.
Quoted 5 lines
Quoted 1 line
Also, can you please list all the bank supplies while you're at it?
Sure. Should the supplies defined as regulators names be added also to the pio node?
For examplereg_aldo1is named "vcc-pe".
As far as I can tell, the A64 has regulators for PC, PD, PE, PG and PL, so you should list those (PL being under r_pio)
Quoted 3 lines
Also, since the commit message will be different for better representation of the changes, should I send the next
patch as v2 or as a new one?
Either way works for me as long as the commit message matches the changes.
Thanks!
Maxime
On 11/28/19 12:33 PM, Maxime Ripard wrote:
Hi Maxime,
Quoted 28 lines
Hi Stefan,
Quoted 25 lines · Stefan Mavrodiev
Quoted 24 lines · Maxime Ripard
Hi Stefan,
Quoted 14 lines · Stefan Mavrodiev
On A64-OLinuXino boards, PG9 is used for USB1 enable/disable. The port is supplied by DLDO4, which is disabled by default. The patch adds the regulator as vcc-pg, which is later used by the pinctrl.
Signed-off-by Stefan Mavrodiev <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +0
-0arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts line 167
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +2
-0@@ -163,6 +163,10 @@ status = "okay"; }; +&pio { + vcc-pg-supply=<®_dldo4>;The equal sign should have spaces around it.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Also, can you please list all the bank supplies while you're at it?
Sure. Should the supplies defined as regulators names be added also to the pio node?
For examplereg_aldo1is named "vcc-pe".As far as I can tell, the A64 has regulators for PC, PD, PE, PG and PL, so you should list those (PL being under
r_pio)
After quick check I've found a bug (maybe?). It's not possible to specify vcc-pl-supply, because of this:
https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/sunxi/pinctrl-sunxi.c#L778
During the probe of the pmu, the pinctrl tries to get a regulator, that doesn't exist yet. Because of this the system doesn't start (as expected).
I've tried to ignore -EPROBE_DEFER. This seems to work, but only because the regulator for PL is defined as "regulator-always-on". The problem is that the refcount is not incremented. So if you export one gpio and the unexport it, the regulator will be disabled. I'm not sure how this can be resolved.
Should I skip vcc-pl-supply for now and list the other bank supplies?
Stefan
Quoted 8 lines
Quoted 4 lines
Also, since the commit message will be different for better representation of the changes, should I send the next
patch as v2 or as a new one?Either way works for me as long as the commit message matches the changes.
Thanks!
Maxime
Quoted 39 lines · Stefan Mavrodiev
On 11/28/19 12:33 PM, Maxime Ripard wrote:
Hi Maxime,Quoted 28 lines
Hi Stefan,
Quoted 25 lines · Stefan Mavrodiev
Quoted 24 lines · Maxime Ripard
Hi Stefan,
Quoted 14 lines · Stefan Mavrodiev
On A64-OLinuXino boards, PG9 is used for USB1 enable/disable. The port is supplied by DLDO4, which is disabled by default. The patch adds the regulator as vcc-pg, which is later used by the pinctrl.
Signed-off-by Stefan Mavrodiev <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +0
-0arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts line 167
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +2
-0@@ -163,6 +163,10 @@ status = "okay"; }; +&pio { + vcc-pg-supply=<®_dldo4>;The equal sign should have spaces around it.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Also, can you please list all the bank supplies while you're at it?
Sure. Should the supplies defined as regulators names be added also to the pio node?
For examplereg_aldo1is named "vcc-pe".As far as I can tell, the A64 has regulators for PC, PD, PE, PG and PL, so you should list those (PL being under
r_pio)
Quoted 8 lines
After quick check I've found a bug (maybe?). It's not possible to specify vcc-pl-supply, because of this:
https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/sunxi/pinctrl-sunxi.c#L778
During the probe of the pmu, the pinctrl tries to get a regulator, that doesn't exist yet.
Because of this the system doesn't start (as expected).
It's a circular dependency. The pinctrl driver requires a regulator, which is provided by the PMIC, which requires the pinctrl driver to mux a pin for the bus.
For now there's no way to fix it, other than breaking the dependency.
Quoted 9 lines
I've tried to ignore -EPROBE_DEFER. This seems to work, but only because the regulator for
PL is defined as "regulator-always-on". The problem is that the refcount is not incremented.
So if you export one gpio and the unexport it, the regulator will be disabled. I'm not sure
how this can be resolved.Should I skip vcc-pl-supply for now and list the other bank supplies?
Yes. That is the preferred and probably only way to deal with it. Please leave a comment saying why vcc-pl was skipped.
ChenYu
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Also, since the commit message will be different for better representation of the changes, should I send the next
patch as v2 or as a new one?Either way works for me as long as the commit message matches the changes.
Thanks!
Maxime