linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration
@ 2021-11-09  0:11 Kunihiko Hayashi
  2021-11-19  1:28 ` Rob Herring
  2021-11-21 23:56 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Kunihiko Hayashi @ 2021-11-09  0:11 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 the 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 v2:
- Describe additionalProperties directly instead of patternProperties
- Remove unnecessary unevaluatedProperties

Changes since v1:
- Replace additionalProperties with unevaluatedProperties
- Add additionalProperties for child and grandchild nodes

.../pinctrl/socionext,uniphier-pinctrl.yaml        | 38 ++++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
index a804d9bc1602..27c5762b9cf8 100644
--- a/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml
@@ -26,11 +26,45 @@ properties:
       - socionext,uniphier-pxs3-pinctrl
       - socionext,uniphier-nx1-pinctrl
 
+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
+
+    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
+
 required:
   - compatible
 
-additionalProperties: false
-
 examples:
   - |
     // The UniPhier pinctrl should be a subnode of a "syscon" compatible node.
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration
  2021-11-09  0:11 [PATCH v3] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration Kunihiko Hayashi
@ 2021-11-19  1:28 ` Rob Herring
  2021-11-21 23:56 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2021-11-19  1:28 UTC (permalink / raw)
  To: Kunihiko Hayashi
  Cc: devicetree, Linus Walleij, linux-arm-kernel, Masami Hiramatsu,
	Rob Herring, linux-gpio, linux-kernel

On Tue, 09 Nov 2021 09:11:39 +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 the 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 v2:
> - Describe additionalProperties directly instead of patternProperties
> - Remove unnecessary unevaluatedProperties
> 
> Changes since v1:
> - Replace additionalProperties with unevaluatedProperties
> - Add additionalProperties for child and grandchild nodes
> 
> .../pinctrl/socionext,uniphier-pinctrl.yaml        | 38 ++++++++++++++++++++--
>  1 file changed, 36 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration
  2021-11-09  0:11 [PATCH v3] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration Kunihiko Hayashi
  2021-11-19  1:28 ` Rob Herring
@ 2021-11-21 23:56 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2021-11-21 23:56 UTC (permalink / raw)
  To: Kunihiko Hayashi
  Cc: Rob Herring, Masami Hiramatsu, linux-gpio, devicetree,
	linux-arm-kernel, linux-kernel

On Tue, Nov 9, 2021 at 1:11 AM Kunihiko Hayashi
<hayashi.kunihiko@socionext.com> 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 the issue, add the rules of pinmux and pincfg in each child node
> and grandchild node.
>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-21 23:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09  0:11 [PATCH v3] dt-bindings: pinctrl: uniphier: Add child node definitions to describe pin mux and configuration Kunihiko Hayashi
2021-11-19  1:28 ` Rob Herring
2021-11-21 23:56 ` Linus Walleij

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).