Commit f2e83c19 authored by Rob Herring's avatar Rob Herring Committed by Linus Walleij
Browse files

dt-bindings: pinctrl: aspeed: Allow only defined pin mux node properties



The Aspeed pinctrl bindings are missing an additionalProperties/
unevaluatedProperties schemas on the child pin mux nodes which means any
undefined properties are allowed. In addition, using
'additionalProperties' for child nodes with any name works better than a
pattern matching everything with an if/then schema to select nodes only.

With 'additionalProperties' added, 'pins' and 'bias-disable'
properties need to be added as they were not defined. A $ref to
pinmux-node.yaml which defines the common property types was also
missing.

Signed-off-by: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230819010907.916061-1-robh@kernel.org


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e77f06be
Loading
Loading
Loading
Loading
+26 −26
Original line number Diff line number Diff line
@@ -25,14 +25,16 @@ properties:
  reg:
    maxItems: 2

patternProperties:
  '^.*$':
    if:
      type: object
    then:
additionalProperties:
  $ref: pinmux-node.yaml#
  additionalProperties: false

  properties:
    pins: true
    bias-disable: true

  patternProperties:
    "^function|groups$":
          $ref: /schemas/types.yaml#/definitions/string
      enum: [ ACPI, ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15,
              ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, DDCCLK, DDCDAT,
              EXTRST, FLACK, FLBUSY, FLWP, GPID, GPID0, GPID2, GPID4, GPID6, GPIE0,
@@ -56,8 +58,6 @@ allOf:
required:
  - compatible

additionalProperties: false

examples:
  - |
    syscon: scu@1e6e2000 {
+28 −28
Original line number Diff line number Diff line
@@ -37,14 +37,16 @@ properties:
      0: compatible with "aspeed,ast2500-gfx", "syscon"
      1: compatible with "aspeed,ast2500-lhc", "syscon"

patternProperties:
  '^.*$':
    if:
      type: object
    then:
additionalProperties:
  $ref: pinmux-node.yaml#
  additionalProperties: false

  properties:
    pins: true
    bias-disable: true

  patternProperties:
    "^function|groups$":
          $ref: /schemas/types.yaml#/definitions/string
      enum: [ ACPI, ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15,
              ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, DDCCLK, DDCDAT,
              ESPI, FWSPICS1, FWSPICS2, GPID0, GPID2, GPID4, GPID6, GPIE0, GPIE2,
@@ -71,8 +73,6 @@ required:
  - compatible
  - aspeed,external-nodes

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/aspeed-clock.h>
+59 −61
Original line number Diff line number Diff line
@@ -23,14 +23,12 @@ properties:
  compatible:
    const: aspeed,ast2600-pinctrl

patternProperties:
  '^.*$':
    if:
      type: object
    then:
additionalProperties:
  $ref: pinmux-node.yaml#
  additionalProperties: false

  properties:
    function:
          $ref: /schemas/types.yaml#/definitions/string
      enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15, ADC2,
              ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, EMMC, ESPI, ESPIALT,
              FSI1, FSI2, FWQSPI, FWSPIABR, FWSPID, FWSPIWP, GPIT0, GPIT1, GPIT2, GPIT3,
@@ -55,7 +53,6 @@ patternProperties:
              USB2BD, USB2BH, VB, VGAHS, VGAVS, WDTRST1, WDTRST2, WDTRST3, WDTRST4 ]

    groups:
          $ref: /schemas/types.yaml#/definitions/string
      enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15, ADC2,
              ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, EMMCG1, EMMCG4,
              EMMCG8, ESPI, ESPIALT, FSI1, FSI2, FWQSPI, FWSPIABR, FWSPID, FWSPIWP,
@@ -83,14 +80,15 @@ patternProperties:
              UART7, UART8, UART9, USBA, USBB, VB, VGAHS, VGAVS, WDTRST1, WDTRST2,
              WDTRST3, WDTRST4]

    pins: true
    bias-disable: true

allOf:
  - $ref: pinctrl.yaml#

required:
  - compatible

additionalProperties: false

examples:
  - |
    syscon: scu@1e6e2000 {