mbox series

[0/4] pinctrl: pinctrl-zynq: yaml conversion and minor driver updates

Message ID 1626868353-96475-1-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com
Headers show
Series pinctrl: pinctrl-zynq: yaml conversion and minor driver updates | expand

Message

Sai Krishna Potthuri July 21, 2021, 11:52 a.m. UTC
This patch series does the following
- Covert Zynq pinctrl driver binding file to yaml.
- Update the binding for Zynq pinctrl to replace the 'io-standard' with
'power-source' parameter as recommended by Linus during ZynqMP pinctrl
driver review(https://lkml.org/lkml/2021/3/25/278).
- Update the Zynq pinctrl the driver to remove custom pin
parameter(io-standard) and instead use generic parameter(power-source).
- Update Zynq dts files to replace 'io-standard' with 'power-source'.

Reason for adding the generic parameter 'power-source' in Zynq pinctrl driver
is to maintain common pin parameter across Xilinx Zynq and ZynqMP platforms
for power supply configuration.

Sai Krishna Potthuri (4):
  dt-bindings: pinctrl: pinctrl-zynq: Convert to yaml
  dt-bindings: pinctrl-zynq: Replace 'io-standard' with 'power-source'
  pinctrl: pinctrl-zynq: Add support for 'power-source' parameter
  arm: dts: zynq: Replace 'io-standard' with 'power-source' property

 .../bindings/pinctrl/xlnx,zynq-pinctrl.txt    | 105 ---------
 .../bindings/pinctrl/xlnx,zynq-pinctrl.yaml   | 214 ++++++++++++++++++
 arch/arm/boot/dts/zynq-ebaz4205.dts           |   8 +-
 arch/arm/boot/dts/zynq-microzed.dts           |   2 +-
 arch/arm/boot/dts/zynq-zc702.dts              |  20 +-
 arch/arm/boot/dts/zynq-zc706.dts              |  18 +-
 drivers/pinctrl/pinctrl-zynq.c                |   2 +
 include/dt-bindings/pinctrl/pinctrl-zynq.h    |  17 ++
 8 files changed, 257 insertions(+), 129 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.txt
 create mode 100644 Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.yaml
 create mode 100644 include/dt-bindings/pinctrl/pinctrl-zynq.h

Comments

Rob Herring (Arm) July 29, 2021, 7:59 p.m. UTC | #1
On Wed, Jul 21, 2021 at 05:22:33PM +0530, Sai Krishna Potthuri wrote:
> Replace 'io-standard' property with 'power-source' property in all zynq dts
> files to be in sync with Zynq pinctrl driver.
> 
> Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
> ---
>  arch/arm/boot/dts/zynq-ebaz4205.dts |  8 ++++----
>  arch/arm/boot/dts/zynq-microzed.dts |  2 +-
>  arch/arm/boot/dts/zynq-zc702.dts    | 20 ++++++++++----------
>  arch/arm/boot/dts/zynq-zc706.dts    | 18 +++++++++---------
>  4 files changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/zynq-ebaz4205.dts b/arch/arm/boot/dts/zynq-ebaz4205.dts
> index b0b836aedd76..be7eae611fb7 100644
> --- a/arch/arm/boot/dts/zynq-ebaz4205.dts
> +++ b/arch/arm/boot/dts/zynq-ebaz4205.dts
> @@ -57,7 +57,7 @@
>  
>  		conf {
>  			groups = "gpio0_20_grp", "gpio0_32_grp";
> -			io-standard = <3>;
> +			power-source = <3>;

This will break using a new DT with a kernel without patch 3.
Michal Simek July 30, 2021, 4:59 a.m. UTC | #2
On 7/29/21 9:59 PM, Rob Herring wrote:
> On Wed, Jul 21, 2021 at 05:22:33PM +0530, Sai Krishna Potthuri wrote:
>> Replace 'io-standard' property with 'power-source' property in all zynq dts
>> files to be in sync with Zynq pinctrl driver.
>>
>> Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
>> ---
>>  arch/arm/boot/dts/zynq-ebaz4205.dts |  8 ++++----
>>  arch/arm/boot/dts/zynq-microzed.dts |  2 +-
>>  arch/arm/boot/dts/zynq-zc702.dts    | 20 ++++++++++----------
>>  arch/arm/boot/dts/zynq-zc706.dts    | 18 +++++++++---------
>>  4 files changed, 24 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/zynq-ebaz4205.dts b/arch/arm/boot/dts/zynq-ebaz4205.dts
>> index b0b836aedd76..be7eae611fb7 100644
>> --- a/arch/arm/boot/dts/zynq-ebaz4205.dts
>> +++ b/arch/arm/boot/dts/zynq-ebaz4205.dts
>> @@ -57,7 +57,7 @@
>>  
>>  		conf {
>>  			groups = "gpio0_20_grp", "gpio0_32_grp";
>> -			io-standard = <3>;
>> +			power-source = <3>;
> 
> This will break using a new DT with a kernel without patch 3.
> 

What do you suggest? Not to update any old DT?

Thanks,
Michal
Linus Walleij July 30, 2021, 12:41 p.m. UTC | #3
On Wed, Jul 21, 2021 at 1:54 PM Sai Krishna Potthuri
<lakshmi.sai.krishna.potthuri@xilinx.com> wrote:

> This patch series does the following
> - Covert Zynq pinctrl driver binding file to yaml.
> - Update the binding for Zynq pinctrl to replace the 'io-standard' with
> 'power-source' parameter as recommended by Linus during ZynqMP pinctrl
> driver review(https://lkml.org/lkml/2021/3/25/278).
> - Update the Zynq pinctrl the driver to remove custom pin
> parameter(io-standard) and instead use generic parameter(power-source).
> - Update Zynq dts files to replace 'io-standard' with 'power-source'.
>
> Reason for adding the generic parameter 'power-source' in Zynq pinctrl driver
> is to maintain common pin parameter across Xilinx Zynq and ZynqMP platforms
> for power supply configuration.

I applied patches 1-3 to the pinctrl tree, patch 4 should be applied
to the SoC tree.

Yours,
Linus Walleij
Linus Walleij July 30, 2021, 12:43 p.m. UTC | #4
On Thu, Jul 29, 2021 at 9:59 PM Rob Herring <robh@kernel.org> wrote:
> On Wed, Jul 21, 2021 at 05:22:33PM +0530, Sai Krishna Potthuri wrote:
> > Replace 'io-standard' property with 'power-source' property in all zynq dts
> > files to be in sync with Zynq pinctrl driver.
> >
> > Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
> > ---
> >  arch/arm/boot/dts/zynq-ebaz4205.dts |  8 ++++----
> >  arch/arm/boot/dts/zynq-microzed.dts |  2 +-
> >  arch/arm/boot/dts/zynq-zc702.dts    | 20 ++++++++++----------
> >  arch/arm/boot/dts/zynq-zc706.dts    | 18 +++++++++---------
> >  4 files changed, 24 insertions(+), 24 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/zynq-ebaz4205.dts b/arch/arm/boot/dts/zynq-ebaz4205.dts
> > index b0b836aedd76..be7eae611fb7 100644
> > --- a/arch/arm/boot/dts/zynq-ebaz4205.dts
> > +++ b/arch/arm/boot/dts/zynq-ebaz4205.dts
> > @@ -57,7 +57,7 @@
> >
> >               conf {
> >                       groups = "gpio0_20_grp", "gpio0_32_grp";
> > -                     io-standard = <3>;
> > +                     power-source = <3>;
>
> This will break using a new DT with a kernel without patch 3.

The old (Linux) kernel never supported the "io-standard" property
anyway.

Unless someone is running som BSD or Windows with support for
this property it can be merged by the quality of zero real-world
impacts (no-one there to hear the tree fall in the forest).

Sai Krishna: correct?

Yours,
Linus Walleij
Michal Simek July 30, 2021, 12:46 p.m. UTC | #5
On 7/30/21 2:43 PM, Linus Walleij wrote:
> On Thu, Jul 29, 2021 at 9:59 PM Rob Herring <robh@kernel.org> wrote:
>> On Wed, Jul 21, 2021 at 05:22:33PM +0530, Sai Krishna Potthuri wrote:
>>> Replace 'io-standard' property with 'power-source' property in all zynq dts
>>> files to be in sync with Zynq pinctrl driver.
>>>
>>> Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
>>> ---
>>>  arch/arm/boot/dts/zynq-ebaz4205.dts |  8 ++++----
>>>  arch/arm/boot/dts/zynq-microzed.dts |  2 +-
>>>  arch/arm/boot/dts/zynq-zc702.dts    | 20 ++++++++++----------
>>>  arch/arm/boot/dts/zynq-zc706.dts    | 18 +++++++++---------
>>>  4 files changed, 24 insertions(+), 24 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/zynq-ebaz4205.dts b/arch/arm/boot/dts/zynq-ebaz4205.dts
>>> index b0b836aedd76..be7eae611fb7 100644
>>> --- a/arch/arm/boot/dts/zynq-ebaz4205.dts
>>> +++ b/arch/arm/boot/dts/zynq-ebaz4205.dts
>>> @@ -57,7 +57,7 @@
>>>
>>>               conf {
>>>                       groups = "gpio0_20_grp", "gpio0_32_grp";
>>> -                     io-standard = <3>;
>>> +                     power-source = <3>;
>>
>> This will break using a new DT with a kernel without patch 3.
> 
> The old (Linux) kernel never supported the "io-standard" property
> anyway.
> 
> Unless someone is running som BSD or Windows with support for
> this property it can be merged by the quality of zero real-world
> impacts (no-one there to hear the tree fall in the forest).
> 
> Sai Krishna: correct?

Linux Zynq pinctrl driver and in tree dts files are using io-standard
properties at least from 2015.

M
Linus Walleij Aug. 2, 2021, 1:19 p.m. UTC | #6
On Fri, Jul 30, 2021 at 2:46 PM Michal Simek <michal.simek@xilinx.com> wrote:

> Linux Zynq pinctrl driver and in tree dts files are using io-standard
> properties at least from 2015.

Ooops my wrong.

What about supporting both the new property and io-standard as
a fallback, simply?

Yours,
Linus Walleij
Michal Simek Aug. 2, 2021, 5:21 p.m. UTC | #7
po 2. 8. 2021 v 15:20 odesílatel Linus Walleij
<linus.walleij@linaro.org> napsal:
>
> On Fri, Jul 30, 2021 at 2:46 PM Michal Simek <michal.simek@xilinx.com> wrote:
>
> > Linux Zynq pinctrl driver and in tree dts files are using io-standard
> > properties at least from 2015.
>
> Ooops my wrong.
>
> What about supporting both the new property and io-standard as
> a fallback, simply?

That's exactly what I have Sai to do and PIN_CONFIG_IOSTANDARD is still there.

https://lore.kernel.org/linux-arm-kernel/1626868353-96475-1-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com/T/#md7d304d9d8f746e51d909237b9073f2ae8930543

But IIRC I have also asked to show any warning message when io
standard property is used to convert to new property.

Thanks,
Michal
Rob Herring (Arm) Aug. 2, 2021, 5:29 p.m. UTC | #8
On Thu, Jul 29, 2021 at 10:59 PM Michal Simek <michal.simek@xilinx.com> wrote:
>
>
>
> On 7/29/21 9:59 PM, Rob Herring wrote:
> > On Wed, Jul 21, 2021 at 05:22:33PM +0530, Sai Krishna Potthuri wrote:
> >> Replace 'io-standard' property with 'power-source' property in all zynq dts
> >> files to be in sync with Zynq pinctrl driver.
> >>
> >> Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
> >> ---
> >>  arch/arm/boot/dts/zynq-ebaz4205.dts |  8 ++++----
> >>  arch/arm/boot/dts/zynq-microzed.dts |  2 +-
> >>  arch/arm/boot/dts/zynq-zc702.dts    | 20 ++++++++++----------
> >>  arch/arm/boot/dts/zynq-zc706.dts    | 18 +++++++++---------
> >>  4 files changed, 24 insertions(+), 24 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/zynq-ebaz4205.dts b/arch/arm/boot/dts/zynq-ebaz4205.dts
> >> index b0b836aedd76..be7eae611fb7 100644
> >> --- a/arch/arm/boot/dts/zynq-ebaz4205.dts
> >> +++ b/arch/arm/boot/dts/zynq-ebaz4205.dts
> >> @@ -57,7 +57,7 @@
> >>
> >>              conf {
> >>                      groups = "gpio0_20_grp", "gpio0_32_grp";
> >> -                    io-standard = <3>;
> >> +                    power-source = <3>;
> >
> > This will break using a new DT with a kernel without patch 3.
> >
>
> What do you suggest? Not to update any old DT?

Your options are don't change the dts files, patch 3 needs to go to
stable kernels, or you document the breakage (if you don't care).

Rob
Michal Simek Aug. 5, 2021, 7:52 a.m. UTC | #9
On 8/2/21 7:29 PM, Rob Herring wrote:
> On Thu, Jul 29, 2021 at 10:59 PM Michal Simek <michal.simek@xilinx.com> wrote:
>>
>>
>>
>> On 7/29/21 9:59 PM, Rob Herring wrote:
>>> On Wed, Jul 21, 2021 at 05:22:33PM +0530, Sai Krishna Potthuri wrote:
>>>> Replace 'io-standard' property with 'power-source' property in all zynq dts
>>>> files to be in sync with Zynq pinctrl driver.
>>>>
>>>> Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
>>>> ---
>>>>  arch/arm/boot/dts/zynq-ebaz4205.dts |  8 ++++----
>>>>  arch/arm/boot/dts/zynq-microzed.dts |  2 +-
>>>>  arch/arm/boot/dts/zynq-zc702.dts    | 20 ++++++++++----------
>>>>  arch/arm/boot/dts/zynq-zc706.dts    | 18 +++++++++---------
>>>>  4 files changed, 24 insertions(+), 24 deletions(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/zynq-ebaz4205.dts b/arch/arm/boot/dts/zynq-ebaz4205.dts
>>>> index b0b836aedd76..be7eae611fb7 100644
>>>> --- a/arch/arm/boot/dts/zynq-ebaz4205.dts
>>>> +++ b/arch/arm/boot/dts/zynq-ebaz4205.dts
>>>> @@ -57,7 +57,7 @@
>>>>
>>>>              conf {
>>>>                      groups = "gpio0_20_grp", "gpio0_32_grp";
>>>> -                    io-standard = <3>;
>>>> +                    power-source = <3>;
>>>
>>> This will break using a new DT with a kernel without patch 3.
>>>
>>
>> What do you suggest? Not to update any old DT?
> 
> Your options are don't change the dts files, patch 3 needs to go to
> stable kernels, or you document the breakage (if you don't care).

There is no intention to go to stable kernel and I don't think this is
stable material. Linus has applied 3 patches and this one should go via
my tree. It means I will make sure that this DT change will be in the
tree when pinctrl changes are applied.

Thanks,
Michal
Michal Simek Aug. 16, 2021, 9:08 a.m. UTC | #10
Hi Rob,

On 8/5/21 9:52 AM, Michal Simek wrote:
> 
> 
> On 8/2/21 7:29 PM, Rob Herring wrote:
>> On Thu, Jul 29, 2021 at 10:59 PM Michal Simek <michal.simek@xilinx.com> wrote:
>>>
>>>
>>>
>>> On 7/29/21 9:59 PM, Rob Herring wrote:
>>>> On Wed, Jul 21, 2021 at 05:22:33PM +0530, Sai Krishna Potthuri wrote:
>>>>> Replace 'io-standard' property with 'power-source' property in all zynq dts
>>>>> files to be in sync with Zynq pinctrl driver.
>>>>>
>>>>> Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
>>>>> ---
>>>>>  arch/arm/boot/dts/zynq-ebaz4205.dts |  8 ++++----
>>>>>  arch/arm/boot/dts/zynq-microzed.dts |  2 +-
>>>>>  arch/arm/boot/dts/zynq-zc702.dts    | 20 ++++++++++----------
>>>>>  arch/arm/boot/dts/zynq-zc706.dts    | 18 +++++++++---------
>>>>>  4 files changed, 24 insertions(+), 24 deletions(-)
>>>>>
>>>>> diff --git a/arch/arm/boot/dts/zynq-ebaz4205.dts b/arch/arm/boot/dts/zynq-ebaz4205.dts
>>>>> index b0b836aedd76..be7eae611fb7 100644
>>>>> --- a/arch/arm/boot/dts/zynq-ebaz4205.dts
>>>>> +++ b/arch/arm/boot/dts/zynq-ebaz4205.dts
>>>>> @@ -57,7 +57,7 @@
>>>>>
>>>>>              conf {
>>>>>                      groups = "gpio0_20_grp", "gpio0_32_grp";
>>>>> -                    io-standard = <3>;
>>>>> +                    power-source = <3>;
>>>>
>>>> This will break using a new DT with a kernel without patch 3.
>>>>
>>>
>>> What do you suggest? Not to update any old DT?
>>
>> Your options are don't change the dts files, patch 3 needs to go to
>> stable kernels, or you document the breakage (if you don't care).
> 
> There is no intention to go to stable kernel and I don't think this is
> stable material. Linus has applied 3 patches and this one should go via
> my tree. It means I will make sure that this DT change will be in the
> tree when pinctrl changes are applied.

Any issue with this patch? Or can I apply it to my tree?

Thanks,
Michal