diff mbox series

[v3,6/6] dt-bindings: pinctrl: convert ocelot-pinctrl to YAML format

Message ID 20220319204628.1759635-7-michael@walle.cc
State Accepted
Commit 61b23e484f9f95d2d5710e2c9078373143c1436e
Headers show
Series pinctrl: ocelot: convert to YAML format | expand

Commit Message

Michael Walle March 19, 2022, 8:46 p.m. UTC
Convert the ocelot-pinctrl device tree binding to the new YAML format.

Additionally to the original binding documentation, add interrupt
properties which are optional and already used on several SoCs like
SparX-5, Luton, Ocelot and LAN966x but were not documented before.

Also, on the sparx5 and the lan966x SoCs there are two items for the
reg property.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 .../bindings/pinctrl/mscc,ocelot-pinctrl.txt  |  42 -------
 .../bindings/pinctrl/mscc,ocelot-pinctrl.yaml | 108 ++++++++++++++++++
 2 files changed, 108 insertions(+), 42 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
 create mode 100644 Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml

Comments

Krzysztof Kozlowski March 20, 2022, 10:54 a.m. UTC | #1
On 19/03/2022 21:46, Michael Walle wrote:
> Convert the ocelot-pinctrl device tree binding to the new YAML format.
> 
> Additionally to the original binding documentation, add interrupt
> properties which are optional and already used on several SoCs like
> SparX-5, Luton, Ocelot and LAN966x but were not documented before.
> 
> Also, on the sparx5 and the lan966x SoCs there are two items for the
> reg property.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
>  .../bindings/pinctrl/mscc,ocelot-pinctrl.txt  |  42 -------
>  .../bindings/pinctrl/mscc,ocelot-pinctrl.yaml | 108 ++++++++++++++++++
>  2 files changed, 108 insertions(+), 42 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
>  create mode 100644 Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
> deleted file mode 100644
> index 5d84fd299ccf..000000000000
> --- a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -Microsemi Ocelot pin controller Device Tree Bindings
> -----------------------------------------------------
> -
> -Required properties:
> - - compatible		: Should be "mscc,ocelot-pinctrl",
> -			  "mscc,jaguar2-pinctrl", "microchip,sparx5-pinctrl",
> -			  "mscc,luton-pinctrl", "mscc,serval-pinctrl",
> -			  "microchip,lan966x-pinctrl" or "mscc,servalt-pinctrl"
> - - reg			: Address and length of the register set for the device
> - - gpio-controller	: Indicates this device is a GPIO controller
> - - #gpio-cells		: Must be 2.
> -			  The first cell is the pin number and the
> -			  second cell specifies GPIO flags, as defined in
> -			  <dt-bindings/gpio/gpio.h>.
> - - gpio-ranges		: Range of pins managed by the GPIO controller.
> -
> -
> -The ocelot-pinctrl driver uses the generic pin multiplexing and generic pin
> -configuration documented in pinctrl-bindings.txt.
> -
> -The following generic properties are supported:
> - - function
> - - pins
> -
> -Example:
> -	gpio: pinctrl@71070034 {
> -		compatible = "mscc,ocelot-pinctrl";
> -		reg = <0x71070034 0x28>;
> -		gpio-controller;
> -		#gpio-cells = <2>;
> -		gpio-ranges = <&gpio 0 0 22>;
> -
> -		uart_pins: uart-pins {
> -				pins = "GPIO_6", "GPIO_7";
> -				function = "uart";
> -		};
> -
> -		uart2_pins: uart2-pins {
> -				pins = "GPIO_12", "GPIO_13";
> -				function = "uart2";
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
> new file mode 100644
> index 000000000000..7149a6655623
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
> @@ -0,0 +1,108 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/mscc,ocelot-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microsemi Ocelot pin controller
> +
> +maintainers:
> +  - Alexandre Belloni <alexandre.belloni@bootlin.com>
> +  - Lars Povlsen <lars.povlsen@microchip.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - microchip,lan966x-pinctrl
> +      - microchip,sparx5-pinctrl
> +      - mscc,jaguar2-pinctrl
> +      - mscc,luton-pinctrl
> +      - mscc,ocelot-pinctrl
> +      - mscc,serval-pinctrl
> +      - mscc,servalt-pinctrl
> +
> +  reg:
> +    items:
> +      - description: Base address
> +      - description: Extended pin configuration registers
> +    minItems: 1
> +
> +  gpio-controller: true
> +
> +  '#gpio-cells':
> +    const: 2
> +
> +  gpio-ranges: true
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  interrupt-controller: true
> +
> +  "#interrupt-cells":
> +    const: 2

Thanks for the changes in other files, but I think you did not respond
to my comments here. Can you address them?


Best regards,
Krzysztof
Michael Walle March 20, 2022, 11:08 a.m. UTC | #2
Am 2022-03-20 11:54, schrieb Krzysztof Kozlowski:
> On 19/03/2022 21:46, Michael Walle wrote:
>> Convert the ocelot-pinctrl device tree binding to the new YAML format.
>> 
>> Additionally to the original binding documentation, add interrupt
>> properties which are optional and already used on several SoCs like
>> SparX-5, Luton, Ocelot and LAN966x but were not documented before.
>> 
>> Also, on the sparx5 and the lan966x SoCs there are two items for the
>> reg property.
>> 
>> Signed-off-by: Michael Walle <michael@walle.cc>
>> ---
>>  .../bindings/pinctrl/mscc,ocelot-pinctrl.txt  |  42 -------
>>  .../bindings/pinctrl/mscc,ocelot-pinctrl.yaml | 108 
>> ++++++++++++++++++
>>  2 files changed, 108 insertions(+), 42 deletions(-)
>>  delete mode 100644 
>> Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
>>  create mode 100644 
>> Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
>> 
>> diff --git 
>> a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt 
>> b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
>> deleted file mode 100644
>> index 5d84fd299ccf..000000000000
>> --- 
>> a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
>> +++ /dev/null
>> @@ -1,42 +0,0 @@
>> -Microsemi Ocelot pin controller Device Tree Bindings
>> -----------------------------------------------------
>> -
>> -Required properties:
>> - - compatible		: Should be "mscc,ocelot-pinctrl",
>> -			  "mscc,jaguar2-pinctrl", "microchip,sparx5-pinctrl",
>> -			  "mscc,luton-pinctrl", "mscc,serval-pinctrl",
>> -			  "microchip,lan966x-pinctrl" or "mscc,servalt-pinctrl"
>> - - reg			: Address and length of the register set for the device
>> - - gpio-controller	: Indicates this device is a GPIO controller
>> - - #gpio-cells		: Must be 2.
>> -			  The first cell is the pin number and the
>> -			  second cell specifies GPIO flags, as defined in
>> -			  <dt-bindings/gpio/gpio.h>.
>> - - gpio-ranges		: Range of pins managed by the GPIO controller.
>> -
>> -
>> -The ocelot-pinctrl driver uses the generic pin multiplexing and 
>> generic pin
>> -configuration documented in pinctrl-bindings.txt.
>> -
>> -The following generic properties are supported:
>> - - function
>> - - pins
>> -
>> -Example:
>> -	gpio: pinctrl@71070034 {
>> -		compatible = "mscc,ocelot-pinctrl";
>> -		reg = <0x71070034 0x28>;
>> -		gpio-controller;
>> -		#gpio-cells = <2>;
>> -		gpio-ranges = <&gpio 0 0 22>;
>> -
>> -		uart_pins: uart-pins {
>> -				pins = "GPIO_6", "GPIO_7";
>> -				function = "uart";
>> -		};
>> -
>> -		uart2_pins: uart2-pins {
>> -				pins = "GPIO_12", "GPIO_13";
>> -				function = "uart2";
>> -		};
>> -	};
>> diff --git 
>> a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml 
>> b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
>> new file mode 100644
>> index 000000000000..7149a6655623
>> --- /dev/null
>> +++ 
>> b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
>> @@ -0,0 +1,108 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/pinctrl/mscc,ocelot-pinctrl.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Microsemi Ocelot pin controller
>> +
>> +maintainers:
>> +  - Alexandre Belloni <alexandre.belloni@bootlin.com>
>> +  - Lars Povlsen <lars.povlsen@microchip.com>
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - microchip,lan966x-pinctrl
>> +      - microchip,sparx5-pinctrl
>> +      - mscc,jaguar2-pinctrl
>> +      - mscc,luton-pinctrl
>> +      - mscc,ocelot-pinctrl
>> +      - mscc,serval-pinctrl
>> +      - mscc,servalt-pinctrl
>> +
>> +  reg:
>> +    items:
>> +      - description: Base address
>> +      - description: Extended pin configuration registers
>> +    minItems: 1
>> +
>> +  gpio-controller: true
>> +
>> +  '#gpio-cells':
>> +    const: 2
>> +
>> +  gpio-ranges: true
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  interrupt-controller: true
>> +
>> +  "#interrupt-cells":
>> +    const: 2
> 
> Thanks for the changes in other files, but I think you did not respond
> to my comments here. Can you address them?

Sorry, I might missunderstood you. They are currently used on all except
on serval and servalt SoCs like described in the updated commit message.
I thought it was clear from the commit message, so I didn't answer your
questions in v2. Or is there something else?

-michael
Krzysztof Kozlowski March 20, 2022, 11:17 a.m. UTC | #3
On 20/03/2022 12:08, Michael Walle wrote:
> Am 2022-03-20 11:54, schrieb Krzysztof Kozlowski:
>> On 19/03/2022 21:46, Michael Walle wrote:
>>> Convert the ocelot-pinctrl device tree binding to the new YAML format.
>>>
>>> Additionally to the original binding documentation, add interrupt
>>> properties which are optional and already used on several SoCs like
>>> SparX-5, Luton, Ocelot and LAN966x but were not documented before.
>>>
>>> Also, on the sparx5 and the lan966x SoCs there are two items for the
>>> reg property.
>>>
>>> Signed-off-by: Michael Walle <michael@walle.cc>
>>> ---
>>>  .../bindings/pinctrl/mscc,ocelot-pinctrl.txt  |  42 -------
>>>  .../bindings/pinctrl/mscc,ocelot-pinctrl.yaml | 108 
>>> ++++++++++++++++++
>>>  2 files changed, 108 insertions(+), 42 deletions(-)
>>>  delete mode 100644 
>>> Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
>>>  create mode 100644 
>>> Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
>>>
>>> diff --git 
>>> a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt 
>>> b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
>>> deleted file mode 100644
>>> index 5d84fd299ccf..000000000000
>>> --- 
>>> a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
>>> +++ /dev/null
>>> @@ -1,42 +0,0 @@
>>> -Microsemi Ocelot pin controller Device Tree Bindings
>>> -----------------------------------------------------
>>> -
>>> -Required properties:
>>> - - compatible		: Should be "mscc,ocelot-pinctrl",
>>> -			  "mscc,jaguar2-pinctrl", "microchip,sparx5-pinctrl",
>>> -			  "mscc,luton-pinctrl", "mscc,serval-pinctrl",
>>> -			  "microchip,lan966x-pinctrl" or "mscc,servalt-pinctrl"
>>> - - reg			: Address and length of the register set for the device
>>> - - gpio-controller	: Indicates this device is a GPIO controller
>>> - - #gpio-cells		: Must be 2.
>>> -			  The first cell is the pin number and the
>>> -			  second cell specifies GPIO flags, as defined in
>>> -			  <dt-bindings/gpio/gpio.h>.
>>> - - gpio-ranges		: Range of pins managed by the GPIO controller.
>>> -
>>> -
>>> -The ocelot-pinctrl driver uses the generic pin multiplexing and 
>>> generic pin
>>> -configuration documented in pinctrl-bindings.txt.
>>> -
>>> -The following generic properties are supported:
>>> - - function
>>> - - pins
>>> -
>>> -Example:
>>> -	gpio: pinctrl@71070034 {
>>> -		compatible = "mscc,ocelot-pinctrl";
>>> -		reg = <0x71070034 0x28>;
>>> -		gpio-controller;
>>> -		#gpio-cells = <2>;
>>> -		gpio-ranges = <&gpio 0 0 22>;
>>> -
>>> -		uart_pins: uart-pins {
>>> -				pins = "GPIO_6", "GPIO_7";
>>> -				function = "uart";
>>> -		};
>>> -
>>> -		uart2_pins: uart2-pins {
>>> -				pins = "GPIO_12", "GPIO_13";
>>> -				function = "uart2";
>>> -		};
>>> -	};
>>> diff --git 
>>> a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml 
>>> b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
>>> new file mode 100644
>>> index 000000000000..7149a6655623
>>> --- /dev/null
>>> +++ 
>>> b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
>>> @@ -0,0 +1,108 @@
>>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/pinctrl/mscc,ocelot-pinctrl.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Microsemi Ocelot pin controller
>>> +
>>> +maintainers:
>>> +  - Alexandre Belloni <alexandre.belloni@bootlin.com>
>>> +  - Lars Povlsen <lars.povlsen@microchip.com>
>>> +
>>> +properties:
>>> +  compatible:
>>> +    enum:
>>> +      - microchip,lan966x-pinctrl
>>> +      - microchip,sparx5-pinctrl
>>> +      - mscc,jaguar2-pinctrl
>>> +      - mscc,luton-pinctrl
>>> +      - mscc,ocelot-pinctrl
>>> +      - mscc,serval-pinctrl
>>> +      - mscc,servalt-pinctrl
>>> +
>>> +  reg:
>>> +    items:
>>> +      - description: Base address
>>> +      - description: Extended pin configuration registers
>>> +    minItems: 1
>>> +
>>> +  gpio-controller: true
>>> +
>>> +  '#gpio-cells':
>>> +    const: 2
>>> +
>>> +  gpio-ranges: true
>>> +
>>> +  interrupts:
>>> +    maxItems: 1
>>> +
>>> +  interrupt-controller: true
>>> +
>>> +  "#interrupt-cells":
>>> +    const: 2
>>
>> Thanks for the changes in other files, but I think you did not respond
>> to my comments here. Can you address them?
> 
> Sorry, I might missunderstood you. They are currently used on all except
> on serval and servalt SoCs like described in the updated commit message.
> I thought it was clear from the commit message, so I didn't answer your
> questions in v2. Or is there something else?
> 

No, it's okay.

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>


Best regards,
Krzysztof
Linus Walleij April 17, 2022, 11:41 p.m. UTC | #4
On Sat, Mar 19, 2022 at 9:47 PM Michael Walle <michael@walle.cc> wrote:

> Convert the ocelot-pinctrl device tree binding to the new YAML format.
>
> Additionally to the original binding documentation, add interrupt
> properties which are optional and already used on several SoCs like
> SparX-5, Luton, Ocelot and LAN966x but were not documented before.
>
> Also, on the sparx5 and the lan966x SoCs there are two items for the
> reg property.
>
> Signed-off-by: Michael Walle <michael@walle.cc>

So is this single patch something I should apply to the pin control tree?
If you want to merge it all through ARM SoC go ahead:
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Michael Walle April 18, 2022, 8:16 a.m. UTC | #5
Am 2022-04-18 01:41, schrieb Linus Walleij:
> On Sat, Mar 19, 2022 at 9:47 PM Michael Walle <michael@walle.cc> wrote:
> 
>> Convert the ocelot-pinctrl device tree binding to the new YAML format.
>> 
>> Additionally to the original binding documentation, add interrupt
>> properties which are optional and already used on several SoCs like
>> SparX-5, Luton, Ocelot and LAN966x but were not documented before.
>> 
>> Also, on the sparx5 and the lan966x SoCs there are two items for the
>> reg property.
>> 
>> Signed-off-by: Michael Walle <michael@walle.cc>
> 
> So is this single patch something I should apply to the pin control 
> tree?

The first five patches will fix the validation errrors once the
binding is converted to the YAML format. So, do they need to go
through the same tree?

Also as mentioned, there is this pending series [1] which is the
reason I've converted the binding to YAML in the first place. So
at least the first patch of this series will have to go through
the same tree as the YAML conversion patch.

How can we move forward here? Krzysztof, maybe all of the dt
bindings patches can go through your tree and I'll reposting
the second patch of [1] afterwards?

-michael

[1] 
https://lore.kernel.org/linux-gpio/20220313154640.63813-1-michael@walle.cc/
Michael Walle April 18, 2022, 8:19 a.m. UTC | #6
[resend, use Krysztof's new email address]

Am 2022-04-18 01:41, schrieb Linus Walleij:
> On Sat, Mar 19, 2022 at 9:47 PM Michael Walle <michael@walle.cc> wrote:
> 
>> Convert the ocelot-pinctrl device tree binding to the new YAML format.
>> 
>> Additionally to the original binding documentation, add interrupt
>> properties which are optional and already used on several SoCs like
>> SparX-5, Luton, Ocelot and LAN966x but were not documented before.
>> 
>> Also, on the sparx5 and the lan966x SoCs there are two items for the
>> reg property.
>> 
>> Signed-off-by: Michael Walle <michael@walle.cc>
> 
> So is this single patch something I should apply to the pin control 
> tree?

The first five patches will fix the validation errrors once the
binding is converted to the YAML format. So, do they need to go
through the same tree?

Also as mentioned, there is this pending series [1] which is the
reason I've converted the binding to YAML in the first place. So
at least the first patch of this series will have to go through
the same tree as the YAML conversion patch.

How can we move forward here? Krzysztof, maybe all of the dt
bindings patches can go through your tree and I'll reposting
the second patch of [1] afterwards?

-michael

[1] 
https://lore.kernel.org/linux-gpio/20220313154640.63813-1-michael@walle.cc/
Krzysztof Kozlowski April 18, 2022, 11:13 a.m. UTC | #7
On 18/04/2022 10:19, Michael Walle wrote:
> [resend, use Krysztof's new email address]
> 
> Am 2022-04-18 01:41, schrieb Linus Walleij:
>> On Sat, Mar 19, 2022 at 9:47 PM Michael Walle <michael@walle.cc> wrote:
>>
>>> Convert the ocelot-pinctrl device tree binding to the new YAML format.
>>>
>>> Additionally to the original binding documentation, add interrupt
>>> properties which are optional and already used on several SoCs like
>>> SparX-5, Luton, Ocelot and LAN966x but were not documented before.
>>>
>>> Also, on the sparx5 and the lan966x SoCs there are two items for the
>>> reg property.
>>>
>>> Signed-off-by: Michael Walle <michael@walle.cc>
>>
>> So is this single patch something I should apply to the pin control 
>> tree?
> 
> The first five patches will fix the validation errrors once the
> binding is converted to the YAML format. So, do they need to go
> through the same tree?
> 
> Also as mentioned, there is this pending series [1] which is the
> reason I've converted the binding to YAML in the first place. So
> at least the first patch of this series will have to go through
> the same tree as the YAML conversion patch.
> 
> How can we move forward here? Krzysztof, maybe all of the dt
> bindings patches can go through your tree and I'll reposting
> the second patch of [1] afterwards?

I think you got all necessary acks for this pinctrl bindings change and
the dependency ("add reset property"), so both can go via Linus' tree.
That's preferred.

DTS patches goes through your SoC maintainer tree.

At least this is the usual scenario, but maybe I missed here something.

Best regards,
Krzysztof
Michael Walle April 18, 2022, 12:04 p.m. UTC | #8
Am 2022-04-18 13:13, schrieb Krzysztof Kozlowski:
> On 18/04/2022 10:19, Michael Walle wrote:
>> [resend, use Krysztof's new email address]
>> 
>> Am 2022-04-18 01:41, schrieb Linus Walleij:
>>> On Sat, Mar 19, 2022 at 9:47 PM Michael Walle <michael@walle.cc> 
>>> wrote:
>>> 
>>>> Convert the ocelot-pinctrl device tree binding to the new YAML 
>>>> format.
>>>> 
>>>> Additionally to the original binding documentation, add interrupt
>>>> properties which are optional and already used on several SoCs like
>>>> SparX-5, Luton, Ocelot and LAN966x but were not documented before.
>>>> 
>>>> Also, on the sparx5 and the lan966x SoCs there are two items for the
>>>> reg property.
>>>> 
>>>> Signed-off-by: Michael Walle <michael@walle.cc>
>>> 
>>> So is this single patch something I should apply to the pin control
>>> tree?
>> 
>> The first five patches will fix the validation errrors once the
>> binding is converted to the YAML format. So, do they need to go
>> through the same tree?
>> 
>> Also as mentioned, there is this pending series [1] which is the
>> reason I've converted the binding to YAML in the first place. So
>> at least the first patch of this series will have to go through
>> the same tree as the YAML conversion patch.
>> 
>> How can we move forward here? Krzysztof, maybe all of the dt
>> bindings patches can go through your tree and I'll reposting
>> the second patch of [1] afterwards?
> 
> I think you got all necessary acks for this pinctrl bindings change and
> the dependency ("add reset property"), so both can go via Linus' tree.
> That's preferred.
> 
> DTS patches goes through your SoC maintainer tree.

Ah, ok, I wasn't aware of that. Then yes, please go ahead and
pick this and the first patch of [1] up, Linus.

Of course if you like you can pick the second patch of [1],
too. But I can also repost it without the RFC tag if that is
preferred.

-michael

[1] 
https://lore.kernel.org/linux-gpio/20220313154640.63813-1-michael@walle.cc/
Linus Walleij April 19, 2022, 10:33 p.m. UTC | #9
On Mon, Apr 18, 2022 at 2:04 PM Michael Walle <michael@walle.cc> wrote:
> Am 2022-04-18 13:13, schrieb Krzysztof Kozlowski:

> > I think you got all necessary acks for this pinctrl bindings change and
> > the dependency ("add reset property"), so both can go via Linus' tree.
> > That's preferred.
> >
> > DTS patches goes through your SoC maintainer tree.
>
> Ah, ok, I wasn't aware of that. Then yes, please go ahead and
> pick this and the first patch of [1] up, Linus.

I picked up this patch but:

> [1]
> https://lore.kernel.org/linux-gpio/20220313154640.63813-1-michael@walle.cc/

These patches don't apply to my tree. Please rebase on
the pinctrl "devel" branch and resend!
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=devel

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
deleted file mode 100644
index 5d84fd299ccf..000000000000
--- a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt
+++ /dev/null
@@ -1,42 +0,0 @@ 
-Microsemi Ocelot pin controller Device Tree Bindings
-----------------------------------------------------
-
-Required properties:
- - compatible		: Should be "mscc,ocelot-pinctrl",
-			  "mscc,jaguar2-pinctrl", "microchip,sparx5-pinctrl",
-			  "mscc,luton-pinctrl", "mscc,serval-pinctrl",
-			  "microchip,lan966x-pinctrl" or "mscc,servalt-pinctrl"
- - reg			: Address and length of the register set for the device
- - gpio-controller	: Indicates this device is a GPIO controller
- - #gpio-cells		: Must be 2.
-			  The first cell is the pin number and the
-			  second cell specifies GPIO flags, as defined in
-			  <dt-bindings/gpio/gpio.h>.
- - gpio-ranges		: Range of pins managed by the GPIO controller.
-
-
-The ocelot-pinctrl driver uses the generic pin multiplexing and generic pin
-configuration documented in pinctrl-bindings.txt.
-
-The following generic properties are supported:
- - function
- - pins
-
-Example:
-	gpio: pinctrl@71070034 {
-		compatible = "mscc,ocelot-pinctrl";
-		reg = <0x71070034 0x28>;
-		gpio-controller;
-		#gpio-cells = <2>;
-		gpio-ranges = <&gpio 0 0 22>;
-
-		uart_pins: uart-pins {
-				pins = "GPIO_6", "GPIO_7";
-				function = "uart";
-		};
-
-		uart2_pins: uart2-pins {
-				pins = "GPIO_12", "GPIO_13";
-				function = "uart2";
-		};
-	};
diff --git a/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
new file mode 100644
index 000000000000..7149a6655623
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.yaml
@@ -0,0 +1,108 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/mscc,ocelot-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microsemi Ocelot pin controller
+
+maintainers:
+  - Alexandre Belloni <alexandre.belloni@bootlin.com>
+  - Lars Povlsen <lars.povlsen@microchip.com>
+
+properties:
+  compatible:
+    enum:
+      - microchip,lan966x-pinctrl
+      - microchip,sparx5-pinctrl
+      - mscc,jaguar2-pinctrl
+      - mscc,luton-pinctrl
+      - mscc,ocelot-pinctrl
+      - mscc,serval-pinctrl
+      - mscc,servalt-pinctrl
+
+  reg:
+    items:
+      - description: Base address
+      - description: Extended pin configuration registers
+    minItems: 1
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+
+  gpio-ranges: true
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-controller: true
+
+  "#interrupt-cells":
+    const: 2
+
+patternProperties:
+  '-pins$':
+    type: object
+    allOf:
+      - $ref: "pinmux-node.yaml"
+      - $ref: "pincfg-node.yaml"
+
+    properties:
+      function: true
+      pins: true
+      output-high: true
+      output-low: true
+      drive-strength: true
+
+    required:
+      - function
+      - pins
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - gpio-controller
+  - '#gpio-cells'
+  - gpio-ranges
+
+allOf:
+  - $ref: "pinctrl.yaml#"
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - microchip,lan966x-pinctrl
+              - microchip,sparx5-pinctrl
+    then:
+      properties:
+        reg:
+          minItems: 2
+
+additionalProperties: false
+
+examples:
+  - |
+    gpio: pinctrl@71070034 {
+        compatible = "mscc,ocelot-pinctrl";
+        reg = <0x71070034 0x28>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        gpio-ranges = <&gpio 0 0 22>;
+
+        uart_pins: uart-pins {
+            pins = "GPIO_6", "GPIO_7";
+            function = "uart";
+        };
+
+        uart2_pins: uart2-pins {
+            pins = "GPIO_12", "GPIO_13";
+            function = "uart2";
+        };
+    };
+
+...