Commit 7ac57288 authored by Rob Herring's avatar Rob Herring Committed by Linus Walleij

dt-bindings: pinctrl: nvidia,tegra234-pinmux: Restructure common schema

The structure of the NVIDIA Tegra234 common pinmux schema doesn't work
for restricting properties because a child node schema can't be extended
with additional properties from another schema defining the same child
node. The 2 child node schemas are evaluated independently as the
schemas are not recursively combined in any way.

As the common schema is almost all the child node schema anyways, just
remove the parent node from the common schema. Then add 'reg' and adjust
the $ref's in the users of the common schema.
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240202223454.1667383-1-robh@kernel.orgSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e15ab05a
...@@ -10,18 +10,21 @@ maintainers: ...@@ -10,18 +10,21 @@ maintainers:
- Thierry Reding <thierry.reding@gmail.com> - Thierry Reding <thierry.reding@gmail.com>
- Jon Hunter <jonathanh@nvidia.com> - Jon Hunter <jonathanh@nvidia.com>
$ref: nvidia,tegra234-pinmux-common.yaml
properties: properties:
compatible: compatible:
const: nvidia,tegra234-pinmux-aon const: nvidia,tegra234-pinmux-aon
reg:
maxItems: 1
patternProperties: patternProperties:
"^pinmux(-[a-z0-9-]+)?$": "^pinmux(-[a-z0-9-]+)?$":
type: object type: object
# pin groups # pin groups
additionalProperties: additionalProperties:
$ref: nvidia,tegra234-pinmux-common.yaml
properties: properties:
nvidia,pins: nvidia,pins:
items: items:
......
...@@ -10,28 +10,9 @@ maintainers: ...@@ -10,28 +10,9 @@ maintainers:
- Thierry Reding <thierry.reding@gmail.com> - Thierry Reding <thierry.reding@gmail.com>
- Jon Hunter <jonathanh@nvidia.com> - Jon Hunter <jonathanh@nvidia.com>
properties: $ref: nvidia,tegra-pinmux-common.yaml
reg:
items:
- description: pinmux registers
patternProperties:
"^pinmux(-[a-z0-9-]+)?$":
type: object
# pin groups properties:
additionalProperties:
$ref: nvidia,tegra-pinmux-common.yaml
# We would typically use unevaluatedProperties here but that has the
# downside that all the properties in the common bindings become valid
# for all chip generations. In this case, however, we want the per-SoC
# bindings to be able to override which of the common properties are
# allowed, since not all pinmux generations support the same sets of
# properties. This way, the common bindings define the format of the
# properties but the per-SoC bindings define which of them apply to a
# given chip.
additionalProperties: false
properties:
nvidia,function: nvidia,function:
enum: [ gp, uartc, i2c8, spi2, i2c2, can1, can0, rsvd0, eth0, eth2, enum: [ gp, uartc, i2c8, spi2, i2c2, can1, can0, rsvd0, eth0, eth2,
eth1, dp, eth3, i2c4, i2c7, i2c9, eqos, pe2, pe1, pe0, pe3, eth1, dp, eth3, i2c4, i2c7, i2c9, eqos, pe2, pe1, pe0, pe3,
...@@ -55,12 +36,17 @@ patternProperties: ...@@ -55,12 +36,17 @@ patternProperties:
nvidia,drive-type: true nvidia,drive-type: true
nvidia,io-hv: true nvidia,io-hv: true
required: required:
- nvidia,pins - nvidia,pins
required: # We would typically use unevaluatedProperties here but that has the
- compatible # downside that all the properties in the common bindings become valid
- reg # for all chip generations. In this case, however, we want the per-SoC
# bindings to be able to override which of the common properties are
# allowed, since not all pinmux generations support the same sets of
# properties. This way, the common bindings define the format of the
# properties but the per-SoC bindings define which of them apply to a
# given chip.
additionalProperties: false
additionalProperties: true
... ...
...@@ -10,18 +10,21 @@ maintainers: ...@@ -10,18 +10,21 @@ maintainers:
- Thierry Reding <thierry.reding@gmail.com> - Thierry Reding <thierry.reding@gmail.com>
- Jon Hunter <jonathanh@nvidia.com> - Jon Hunter <jonathanh@nvidia.com>
$ref: nvidia,tegra234-pinmux-common.yaml
properties: properties:
compatible: compatible:
const: nvidia,tegra234-pinmux const: nvidia,tegra234-pinmux
reg:
maxItems: 1
patternProperties: patternProperties:
"^pinmux(-[a-z0-9-]+)?$": "^pinmux(-[a-z0-9-]+)?$":
type: object type: object
# pin groups # pin groups
additionalProperties: additionalProperties:
$ref: nvidia,tegra234-pinmux-common.yaml
properties: properties:
nvidia,pins: nvidia,pins:
items: items:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment