Commit edb9bd8f authored by Kunihiko Hayashi's avatar Kunihiko Hayashi Committed by Philipp Zabel
Browse files

dt-bindings: reset: uniphier-glue: Clean up clocks, resets, and their names using compatible string



Instead of "oneOf:" choices, use "allOf:" and "if:" to define clocks,
resets, and their names that can be taken by the compatible string.

The order of clock-names and reset-names doesn't change here.

Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/1649145378-30358-1-git-send-email-hayashi.kunihiko@socionext.com
parent 9fe7dd4e
Loading
Loading
Loading
Loading
+38 −14
Original line number Diff line number Diff line
@@ -38,25 +38,49 @@ properties:
    minItems: 1
    maxItems: 2

  clock-names:
    oneOf:
      - items:           # for Pro4, Pro5
          - const: gio
          - const: link
      - items:           # for others
          - const: link
  clock-names: true

  resets:
    minItems: 1
    maxItems: 2

  reset-names:
    oneOf:
      - items:           # for Pro4, Pro5
  reset-names: true

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - socionext,uniphier-pro4-usb3-reset
              - socionext,uniphier-pro5-usb3-reset
              - socionext,uniphier-pro4-ahci-reset
    then:
      properties:
        clocks:
          minItems: 2
          maxItems: 2
        clock-names:
          items:
            - const: gio
            - const: link
      - items:           # for others
        resets:
          minItems: 2
          maxItems: 2
        reset-names:
          items:
            - const: gio
            - const: link
    else:
      properties:
        clocks:
          maxItems: 1
        clock-names:
          const: link
        resets:
          maxItems: 1
        reset-names:
          const: link

additionalProperties: false