* [PATCH 1/1] arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply @ 2019-11-26 11:05 Stefan Mavrodiev 2019-11-26 16:27 ` Maxime Ripard 0 siblings, 1 reply; 6+ messages in thread From: Stefan Mavrodiev @ 2019-11-26 11:05 UTC (permalink / raw) 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 Cc: linux-sunxi, 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 <stefan@olimex.com> --- arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts index 01a9a52edae4..c9d8c9c4ef20 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts @@ -163,6 +163,10 @@ status = "okay"; }; +&pio { + vcc-pg-supply=<®_dldo4>; +}; + &r_rsb { status = "okay"; -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply 2019-11-26 11:05 [PATCH 1/1] arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply Stefan Mavrodiev @ 2019-11-26 16:27 ` Maxime Ripard 2019-11-27 7:07 ` Stefan Mavrodiev 0 siblings, 1 reply; 6+ messages in thread From: Maxime Ripard @ 2019-11-26 16:27 UTC (permalink / raw) To: Stefan Mavrodiev Cc: Mark Rutland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-sunxi, open list, Chen-Yu Tsai, Rob Herring, moderated list:ARM/Allwinner sunXi SoC support [-- Attachment #1.1: Type: text/plain, Size: 971 bytes --] Hi Stefan, On Tue, Nov 26, 2019 at 01:05:08PM +0200, Stefan Mavrodiev wrote: > 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 <stefan@olimex.com> > --- > arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts > index 01a9a52edae4..c9d8c9c4ef20 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts > @@ -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 > [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply 2019-11-26 16:27 ` Maxime Ripard @ 2019-11-27 7:07 ` Stefan Mavrodiev 2019-11-28 10:33 ` Maxime Ripard 0 siblings, 1 reply; 6+ messages in thread From: Stefan Mavrodiev @ 2019-11-27 7:07 UTC (permalink / raw) To: Maxime Ripard Cc: Mark Rutland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Stefan Mavrodiev, linux-sunxi, open list, Chen-Yu Tsai, Rob Herring, moderated list:ARM/Allwinner sunXi SoC support On 11/26/19 6:27 PM, Maxime Ripard wrote: > Hi Stefan, > > On Tue, Nov 26, 2019 at 01:05:08PM +0200, Stefan Mavrodiev wrote: >> 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 <stefan@olimex.com> >> --- >> arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts >> index 01a9a52edae4..c9d8c9c4ef20 100644 >> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts >> @@ -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? 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 > > Thanks! > Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply 2019-11-27 7:07 ` Stefan Mavrodiev @ 2019-11-28 10:33 ` Maxime Ripard 2019-11-29 7:22 ` Stefan Mavrodiev 0 siblings, 1 reply; 6+ messages in thread From: Maxime Ripard @ 2019-11-28 10:33 UTC (permalink / raw) To: Stefan Mavrodiev Cc: Mark Rutland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-sunxi, open list, Chen-Yu Tsai, Rob Herring, moderated list:ARM/Allwinner sunXi SoC support [-- Attachment #1.1: Type: text/plain, Size: 1673 bytes --] Hi Stefan, On Wed, Nov 27, 2019 at 09:07:40AM +0200, Stefan Mavrodiev wrote: > On 11/26/19 6:27 PM, Maxime Ripard wrote: > > Hi Stefan, > > > > On Tue, Nov 26, 2019 at 01:05:08PM +0200, Stefan Mavrodiev wrote: > > > 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 <stefan@olimex.com> > > > --- > > > arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts > > > index 01a9a52edae4..c9d8c9c4ef20 100644 > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts > > > @@ -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? > > Sure. Should the supplies defined as regulators names be added also to the > pio node? > For example reg_aldo1 is 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) > 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 [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply 2019-11-28 10:33 ` Maxime Ripard @ 2019-11-29 7:22 ` Stefan Mavrodiev 2019-11-29 7:34 ` Chen-Yu Tsai 0 siblings, 1 reply; 6+ messages in thread From: Stefan Mavrodiev @ 2019-11-29 7:22 UTC (permalink / raw) To: Maxime Ripard Cc: Mark Rutland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Stefan Mavrodiev, linux-sunxi, open list, Chen-Yu Tsai, Rob Herring, moderated list:ARM/Allwinner sunXi SoC support On 11/28/19 12:33 PM, Maxime Ripard wrote: Hi Maxime, > Hi Stefan, > > On Wed, Nov 27, 2019 at 09:07:40AM +0200, Stefan Mavrodiev wrote: >> On 11/26/19 6:27 PM, Maxime Ripard wrote: >>> Hi Stefan, >>> >>> On Tue, Nov 26, 2019 at 01:05:08PM +0200, Stefan Mavrodiev wrote: >>>> 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 <stefan@olimex.com> >>>> --- >>>> arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ >>>> 1 file changed, 4 insertions(+) >>>> >>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts >>>> index 01a9a52edae4..c9d8c9c4ef20 100644 >>>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts >>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts >>>> @@ -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? >> Sure. Should the supplies defined as regulators names be added also to the >> pio node? >> For example reg_aldo1 is 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 > >> 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply 2019-11-29 7:22 ` Stefan Mavrodiev @ 2019-11-29 7:34 ` Chen-Yu Tsai 0 siblings, 0 replies; 6+ messages in thread From: Chen-Yu Tsai @ 2019-11-29 7:34 UTC (permalink / raw) To: Stefan Mavrodiev Cc: Mark Rutland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list, Maxime Ripard, linux-sunxi, Rob Herring, moderated list:ARM/Allwinner sunXi SoC support On Fri, Nov 29, 2019 at 3:22 PM Stefan Mavrodiev <stefan@olimex.com> wrote: > > > On 11/28/19 12:33 PM, Maxime Ripard wrote: > Hi Maxime, > > Hi Stefan, > > > > On Wed, Nov 27, 2019 at 09:07:40AM +0200, Stefan Mavrodiev wrote: > >> On 11/26/19 6:27 PM, Maxime Ripard wrote: > >>> Hi Stefan, > >>> > >>> On Tue, Nov 26, 2019 at 01:05:08PM +0200, Stefan Mavrodiev wrote: > >>>> 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 <stefan@olimex.com> > >>>> --- > >>>> arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ > >>>> 1 file changed, 4 insertions(+) > >>>> > >>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts > >>>> index 01a9a52edae4..c9d8c9c4ef20 100644 > >>>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts > >>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts > >>>> @@ -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? > >> Sure. Should the supplies defined as regulators names be added also to the > >> pio node? > >> For example reg_aldo1 is 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). 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. > 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 > >> 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-11-29 7:34 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-11-26 11:05 [PATCH 1/1] arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply Stefan Mavrodiev 2019-11-26 16:27 ` Maxime Ripard 2019-11-27 7:07 ` Stefan Mavrodiev 2019-11-28 10:33 ` Maxime Ripard 2019-11-29 7:22 ` Stefan Mavrodiev 2019-11-29 7:34 ` 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; as well as URLs for NNTP newsgroup(s).