* [PATCH v2] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration
@ 2021-10-28 1:46 ` Kunihiko Hayashi
0 siblings, 0 replies; 6+ messages in thread
From: Kunihiko Hayashi @ 2021-10-28 1:46 UTC (permalink / raw)
To: Rob Herring, Linus Walleij, Masami Hiramatsu
Cc: linux-gpio, devicetree, linux-arm-kernel, linux-kernel, Kunihiko Hayashi
In arch/arm/boot/dts/uniphier-pinctrl.dtsi, there are child nodes of
pinctrl that defines pinmux and pincfg, however, there are no rules about
that in dt-bindings.
'make dtbs_check' results an error with the following message:
pinctrl: 'ain1', 'ain2', 'ainiec1', 'aout', 'aout1', 'aout2', ...
... 'usb2', 'usb3' do not match any of the regexes: 'pinctrl-[0-9]+'
To avoid this issue, add the rules of pinmux and pincfg in each child node
and grandchild node.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
Changes since v1:
- Replace additionalProperties with unevaluatedProperties
- Add additionalProperties for child and grandchild nodes
.../pinctrl/socionext,uniphier-pinctrl.yaml | 50 +++++++++++++++++++++-
1 file changed, 49 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
index a804d9bc1602..7e504e003181 100644
--- a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
@@ -26,10 +26,58 @@ properties:
- socionext,uniphier-pxs3-pinctrl
- socionext,uniphier-nx1-pinctrl
+additionalProperties:
+ type: object
+
+patternProperties:
+ "^.*$":
+ if:
+ type: object
+ then:
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
+
+ properties:
+ phandle: true
+ function: true
+ groups: true
+ pins: true
+ bias-pull-up: true
+ bias-pull-down: true
+ bias-pull-pin-default: true
+ drive-strength: true
+
+ additionalProperties:
+ type: object
+
+ patternProperties:
+ "^.*$":
+ if:
+ type: object
+ then:
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
+
+ properties:
+ phandle: true
+ function: true
+ groups: true
+ pins: true
+ bias-pull-up: true
+ bias-pull-down: true
+ bias-pull-pin-default: true
+ drive-strength: true
+
+ unevaluatedProperties: false
+
+ unevaluatedProperties: false
+
required:
- compatible
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration
@ 2021-10-28 1:46 ` Kunihiko Hayashi
0 siblings, 0 replies; 6+ messages in thread
From: Kunihiko Hayashi @ 2021-10-28 1:46 UTC (permalink / raw)
To: Rob Herring, Linus Walleij, Masami Hiramatsu
Cc: linux-gpio, devicetree, linux-arm-kernel, linux-kernel, Kunihiko Hayashi
In arch/arm/boot/dts/uniphier-pinctrl.dtsi, there are child nodes of
pinctrl that defines pinmux and pincfg, however, there are no rules about
that in dt-bindings.
'make dtbs_check' results an error with the following message:
pinctrl: 'ain1', 'ain2', 'ainiec1', 'aout', 'aout1', 'aout2', ...
... 'usb2', 'usb3' do not match any of the regexes: 'pinctrl-[0-9]+'
To avoid this issue, add the rules of pinmux and pincfg in each child node
and grandchild node.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
Changes since v1:
- Replace additionalProperties with unevaluatedProperties
- Add additionalProperties for child and grandchild nodes
.../pinctrl/socionext,uniphier-pinctrl.yaml | 50 +++++++++++++++++++++-
1 file changed, 49 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
index a804d9bc1602..7e504e003181 100644
--- a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
@@ -26,10 +26,58 @@ properties:
- socionext,uniphier-pxs3-pinctrl
- socionext,uniphier-nx1-pinctrl
+additionalProperties:
+ type: object
+
+patternProperties:
+ "^.*$":
+ if:
+ type: object
+ then:
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
+
+ properties:
+ phandle: true
+ function: true
+ groups: true
+ pins: true
+ bias-pull-up: true
+ bias-pull-down: true
+ bias-pull-pin-default: true
+ drive-strength: true
+
+ additionalProperties:
+ type: object
+
+ patternProperties:
+ "^.*$":
+ if:
+ type: object
+ then:
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
+
+ properties:
+ phandle: true
+ function: true
+ groups: true
+ pins: true
+ bias-pull-up: true
+ bias-pull-down: true
+ bias-pull-pin-default: true
+ drive-strength: true
+
+ unevaluatedProperties: false
+
+ unevaluatedProperties: false
+
required:
- compatible
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
--
2.7.4
_______________________________________________
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 v2] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration
2021-10-28 1:46 ` Kunihiko Hayashi
@ 2021-11-02 20:57 ` Rob Herring
-1 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2021-11-02 20:57 UTC (permalink / raw)
To: Kunihiko Hayashi
Cc: Linus Walleij, Masami Hiramatsu, linux-gpio, devicetree,
linux-arm-kernel, linux-kernel
On Thu, Oct 28, 2021 at 10:46:39AM +0900, Kunihiko Hayashi wrote:
> In arch/arm/boot/dts/uniphier-pinctrl.dtsi, there are child nodes of
> pinctrl that defines pinmux and pincfg, however, there are no rules about
> that in dt-bindings.
>
> 'make dtbs_check' results an error with the following message:
>
> pinctrl: 'ain1', 'ain2', 'ainiec1', 'aout', 'aout1', 'aout2', ...
> ... 'usb2', 'usb3' do not match any of the regexes: 'pinctrl-[0-9]+'
>
> To avoid this issue, add the rules of pinmux and pincfg in each child node
> and grandchild node.
>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> ---
> Changes since v1:
> - Replace additionalProperties with unevaluatedProperties
> - Add additionalProperties for child and grandchild nodes
>
> .../pinctrl/socionext,uniphier-pinctrl.yaml | 50 +++++++++++++++++++++-
> 1 file changed, 49 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
> index a804d9bc1602..7e504e003181 100644
> --- a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
> @@ -26,10 +26,58 @@ properties:
> - socionext,uniphier-pxs3-pinctrl
> - socionext,uniphier-nx1-pinctrl
>
> +additionalProperties:
> + type: object
> +
> +patternProperties:
> + "^.*$":
> + if:
> + type: object
> + then:
> + allOf:
All of the above should be:
additionalProperties:
type: object
allOf:
...
> + - $ref: pincfg-node.yaml#
> + - $ref: pinmux-node.yaml#
> +
> + properties:
> + phandle: true
> + function: true
> + groups: true
> + pins: true
> + bias-pull-up: true
> + bias-pull-down: true
> + bias-pull-pin-default: true
> + drive-strength: true
> +
> + additionalProperties:
> + type: object
> +
> + patternProperties:
> + "^.*$":
> + if:
> + type: object
> + then:
> + allOf:
> + - $ref: pincfg-node.yaml#
> + - $ref: pinmux-node.yaml#
> +
> + properties:
> + phandle: true
> + function: true
> + groups: true
> + pins: true
> + bias-pull-up: true
> + bias-pull-down: true
> + bias-pull-pin-default: true
> + drive-strength: true
> +
> + unevaluatedProperties: false
> +
> + unevaluatedProperties: false
> +
> required:
> - compatible
>
> -additionalProperties: false
> +unevaluatedProperties: false
Drop +unevaluatedProperties.
>
> examples:
> - |
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration
@ 2021-11-02 20:57 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2021-11-02 20:57 UTC (permalink / raw)
To: Kunihiko Hayashi
Cc: Linus Walleij, Masami Hiramatsu, linux-gpio, devicetree,
linux-arm-kernel, linux-kernel
On Thu, Oct 28, 2021 at 10:46:39AM +0900, Kunihiko Hayashi wrote:
> In arch/arm/boot/dts/uniphier-pinctrl.dtsi, there are child nodes of
> pinctrl that defines pinmux and pincfg, however, there are no rules about
> that in dt-bindings.
>
> 'make dtbs_check' results an error with the following message:
>
> pinctrl: 'ain1', 'ain2', 'ainiec1', 'aout', 'aout1', 'aout2', ...
> ... 'usb2', 'usb3' do not match any of the regexes: 'pinctrl-[0-9]+'
>
> To avoid this issue, add the rules of pinmux and pincfg in each child node
> and grandchild node.
>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> ---
> Changes since v1:
> - Replace additionalProperties with unevaluatedProperties
> - Add additionalProperties for child and grandchild nodes
>
> .../pinctrl/socionext,uniphier-pinctrl.yaml | 50 +++++++++++++++++++++-
> 1 file changed, 49 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
> index a804d9bc1602..7e504e003181 100644
> --- a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
> @@ -26,10 +26,58 @@ properties:
> - socionext,uniphier-pxs3-pinctrl
> - socionext,uniphier-nx1-pinctrl
>
> +additionalProperties:
> + type: object
> +
> +patternProperties:
> + "^.*$":
> + if:
> + type: object
> + then:
> + allOf:
All of the above should be:
additionalProperties:
type: object
allOf:
...
> + - $ref: pincfg-node.yaml#
> + - $ref: pinmux-node.yaml#
> +
> + properties:
> + phandle: true
> + function: true
> + groups: true
> + pins: true
> + bias-pull-up: true
> + bias-pull-down: true
> + bias-pull-pin-default: true
> + drive-strength: true
> +
> + additionalProperties:
> + type: object
> +
> + patternProperties:
> + "^.*$":
> + if:
> + type: object
> + then:
> + allOf:
> + - $ref: pincfg-node.yaml#
> + - $ref: pinmux-node.yaml#
> +
> + properties:
> + phandle: true
> + function: true
> + groups: true
> + pins: true
> + bias-pull-up: true
> + bias-pull-down: true
> + bias-pull-pin-default: true
> + drive-strength: true
> +
> + unevaluatedProperties: false
> +
> + unevaluatedProperties: false
> +
> required:
> - compatible
>
> -additionalProperties: false
> +unevaluatedProperties: false
Drop +unevaluatedProperties.
>
> examples:
> - |
> --
> 2.7.4
>
>
_______________________________________________
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 v2] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration
2021-11-02 20:57 ` Rob Herring
@ 2021-11-04 7:32 ` Kunihiko Hayashi
-1 siblings, 0 replies; 6+ messages in thread
From: Kunihiko Hayashi @ 2021-11-04 7:32 UTC (permalink / raw)
To: Rob Herring
Cc: Linus Walleij, Masami Hiramatsu, linux-gpio, devicetree,
linux-arm-kernel, linux-kernel
On 2021/11/03 5:57, Rob Herring wrote:
> On Thu, Oct 28, 2021 at 10:46:39AM +0900, Kunihiko Hayashi wrote:
>> In arch/arm/boot/dts/uniphier-pinctrl.dtsi, there are child nodes of
>> pinctrl that defines pinmux and pincfg, however, there are no rules about
>> that in dt-bindings.
>>
>> 'make dtbs_check' results an error with the following message:
>>
>> pinctrl: 'ain1', 'ain2', 'ainiec1', 'aout', 'aout1', 'aout2', ...
>> ... 'usb2', 'usb3' do not match any of the regexes: 'pinctrl-[0-9]+'
>>
>> To avoid this issue, add the rules of pinmux and pincfg in each child node
>> and grandchild node.
>>
>> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
>> ---
>> Changes since v1:
>> - Replace additionalProperties with unevaluatedProperties
>> - Add additionalProperties for child and grandchild nodes
>>
>> .../pinctrl/socionext,uniphier-pinctrl.yaml | 50 +++++++++++++++++++++-
>> 1 file changed, 49 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
> b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
>> index a804d9bc1602..7e504e003181 100644
>> --- a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
>> +++ b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
>> @@ -26,10 +26,58 @@ properties:
>> - socionext,uniphier-pxs3-pinctrl
>> - socionext,uniphier-nx1-pinctrl
>>
>> +additionalProperties:
>> + type: object
>> +
>> +patternProperties:
>> + "^.*$":
>> + if:
>> + type: object
>> + then:
>> + allOf:
>
> All of the above should be:
>
> additionalProperties:
> type: object
> allOf:
> ...
I see. I'll rewrite it instead of "patternProperties".
>
>> + - $ref: pincfg-node.yaml#
>> + - $ref: pinmux-node.yaml#
>> +
>> + properties:
>> + phandle: true
>> + function: true
>> + groups: true
>> + pins: true
>> + bias-pull-up: true
>> + bias-pull-down: true
>> + bias-pull-pin-default: true
>> + drive-strength: true
>> +
>> + additionalProperties:
>> + type: object
>> +
>> + patternProperties:
>> + "^.*$":
>> + if:
>> + type: object
>> + then:
>> + allOf:
>> + - $ref: pincfg-node.yaml#
>> + - $ref: pinmux-node.yaml#
>> +
>> + properties:
>> + phandle: true
>> + function: true
>> + groups: true
>> + pins: true
>> + bias-pull-up: true
>> + bias-pull-down: true
>> + bias-pull-pin-default: true
>> + drive-strength: true
>> +
>> + unevaluatedProperties: false
>> +
>> + unevaluatedProperties: false
>> +
>> required:
>> - compatible
>>
>> -additionalProperties: false
>> +unevaluatedProperties: false
>
> Drop +unevaluatedProperties.
I understand that "additionalProperties" has already been used at the top
level, so this "unevaluatedProperties" is unnecessary.
For the same reason, "unevaluatedProperties" at the child node is also unnecessary.
I think "unevaluatedProperties" at the grandchild node should be left because
the grandchild node doesn't have "additionalProperties".
additionalProperties:
type: object
allOf:
...
additionalProperties:
type: object
allOf:
...
unevaluatedProperties: false
[X]
[X]
Thank you,
---
Best Regards
Kunihiko Hayashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration
@ 2021-11-04 7:32 ` Kunihiko Hayashi
0 siblings, 0 replies; 6+ messages in thread
From: Kunihiko Hayashi @ 2021-11-04 7:32 UTC (permalink / raw)
To: Rob Herring
Cc: Linus Walleij, Masami Hiramatsu, linux-gpio, devicetree,
linux-arm-kernel, linux-kernel
On 2021/11/03 5:57, Rob Herring wrote:
> On Thu, Oct 28, 2021 at 10:46:39AM +0900, Kunihiko Hayashi wrote:
>> In arch/arm/boot/dts/uniphier-pinctrl.dtsi, there are child nodes of
>> pinctrl that defines pinmux and pincfg, however, there are no rules about
>> that in dt-bindings.
>>
>> 'make dtbs_check' results an error with the following message:
>>
>> pinctrl: 'ain1', 'ain2', 'ainiec1', 'aout', 'aout1', 'aout2', ...
>> ... 'usb2', 'usb3' do not match any of the regexes: 'pinctrl-[0-9]+'
>>
>> To avoid this issue, add the rules of pinmux and pincfg in each child node
>> and grandchild node.
>>
>> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
>> ---
>> Changes since v1:
>> - Replace additionalProperties with unevaluatedProperties
>> - Add additionalProperties for child and grandchild nodes
>>
>> .../pinctrl/socionext,uniphier-pinctrl.yaml | 50 +++++++++++++++++++++-
>> 1 file changed, 49 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
> b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
>> index a804d9bc1602..7e504e003181 100644
>> --- a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
>> +++ b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
>> @@ -26,10 +26,58 @@ properties:
>> - socionext,uniphier-pxs3-pinctrl
>> - socionext,uniphier-nx1-pinctrl
>>
>> +additionalProperties:
>> + type: object
>> +
>> +patternProperties:
>> + "^.*$":
>> + if:
>> + type: object
>> + then:
>> + allOf:
>
> All of the above should be:
>
> additionalProperties:
> type: object
> allOf:
> ...
I see. I'll rewrite it instead of "patternProperties".
>
>> + - $ref: pincfg-node.yaml#
>> + - $ref: pinmux-node.yaml#
>> +
>> + properties:
>> + phandle: true
>> + function: true
>> + groups: true
>> + pins: true
>> + bias-pull-up: true
>> + bias-pull-down: true
>> + bias-pull-pin-default: true
>> + drive-strength: true
>> +
>> + additionalProperties:
>> + type: object
>> +
>> + patternProperties:
>> + "^.*$":
>> + if:
>> + type: object
>> + then:
>> + allOf:
>> + - $ref: pincfg-node.yaml#
>> + - $ref: pinmux-node.yaml#
>> +
>> + properties:
>> + phandle: true
>> + function: true
>> + groups: true
>> + pins: true
>> + bias-pull-up: true
>> + bias-pull-down: true
>> + bias-pull-pin-default: true
>> + drive-strength: true
>> +
>> + unevaluatedProperties: false
>> +
>> + unevaluatedProperties: false
>> +
>> required:
>> - compatible
>>
>> -additionalProperties: false
>> +unevaluatedProperties: false
>
> Drop +unevaluatedProperties.
I understand that "additionalProperties" has already been used at the top
level, so this "unevaluatedProperties" is unnecessary.
For the same reason, "unevaluatedProperties" at the child node is also unnecessary.
I think "unevaluatedProperties" at the grandchild node should be left because
the grandchild node doesn't have "additionalProperties".
additionalProperties:
type: object
allOf:
...
additionalProperties:
type: object
allOf:
...
unevaluatedProperties: false
[X]
[X]
Thank you,
---
Best Regards
Kunihiko Hayashi
_______________________________________________
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:[~2021-11-04 7:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 1:46 [PATCH v2] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration Kunihiko Hayashi
2021-10-28 1:46 ` Kunihiko Hayashi
2021-11-02 20:57 ` Rob Herring
2021-11-02 20:57 ` Rob Herring
2021-11-04 7:32 ` Kunihiko Hayashi
2021-11-04 7:32 ` Kunihiko Hayashi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.