Commit 3d21a460 authored by Rob Herring's avatar Rob Herring
Browse files

dt-bindings: Remove cases of 'allOf' containing a '$ref'



json-schema versions draft7 and earlier have a weird behavior in that
any keywords combined with a '$ref' are ignored (silently). The correct
form was to put a '$ref' under an 'allOf'. This behavior is now changed
in the 2019-09 json-schema spec and '$ref' can be mixed with other
keywords. The json-schema library doesn't yet support this, but the
tooling now does a fixup for this and either way works.

This has been a constant source of review comments, so let's change this
treewide so everyone copies the simpler syntax.

Scripted with ruamel.yaml with some manual fixups. Some minor whitespace
changes from the script.

Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Acked-By: default avatarVinod Koul <vkoul@kernel.org>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de> # for I2C
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio
Reviewed-by: Stephen Boyd <sboyd@kernel.org> # clock
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent ea5b8b5e
Loading
Loading
Loading
Loading
+15 −19
Original line number Diff line number Diff line
@@ -131,25 +131,22 @@ properties:
      property, describing the physical location of the children nodes.
      0 means motherboard site, while 1 and 2 are daughterboard sites, and
      0xf means "sisterboard" which is the site containing the main CPU tile.
    allOf:
      - $ref: '/schemas/types.yaml#/definitions/uint32'
      - minimum: 0
    $ref: '/schemas/types.yaml#/definitions/uint32'
    minimum: 0
    maximum: 15

  arm,vexpress,position:
    description: When daughterboards are stacked on one site, their position
      in the stack be be described this attribute.
    allOf:
      - $ref: '/schemas/types.yaml#/definitions/uint32'
      - minimum: 0
    $ref: '/schemas/types.yaml#/definitions/uint32'
    minimum: 0
    maximum: 3

  arm,vexpress,dcc:
    description: When describing tiles consisting of more than one DCC, its
      number can be specified with this attribute.
    allOf:
      - $ref: '/schemas/types.yaml#/definitions/uint32'
      - minimum: 0
    $ref: '/schemas/types.yaml#/definitions/uint32'
    minimum: 0
    maximum: 3

patternProperties:
@@ -162,8 +159,7 @@ patternProperties:
      "simple-bus". If the compatible is placed in the "motherboard" node,
      it is stricter and always has two compatibles.
    type: object
    allOf:
      - $ref: '/schemas/simple-bus.yaml'
    $ref: '/schemas/simple-bus.yaml'

    properties:
      compatible:
@@ -195,11 +191,11 @@ patternProperties:
              - const: simple-bus
          arm,v2m-memory-map:
            description: This describes the memory map type.
            allOf:
              - $ref: '/schemas/types.yaml#/definitions/string'
              - enum:
            $ref: '/schemas/types.yaml#/definitions/string'
            enum:
              - rs1
              - rs2

        required:
          - compatible
    required:
+6 −12
Original line number Diff line number Diff line
@@ -140,16 +140,14 @@ patternProperties:
        maxItems: 1

      arm,trig-in-sigs:
        allOf:
          - $ref: /schemas/types.yaml#/definitions/uint32-array
        $ref: /schemas/types.yaml#/definitions/uint32-array
        minItems: 1
        maxItems: 32
        description:
          List of CTI trigger in signal numbers in use by a trig-conns node.

      arm,trig-in-types:
        allOf:
          - $ref: /schemas/types.yaml#/definitions/uint32-array
        $ref: /schemas/types.yaml#/definitions/uint32-array
        minItems: 1
        maxItems: 32
        description:
@@ -159,16 +157,14 @@ patternProperties:
          completely, then the types will default to GEN_IO.

      arm,trig-out-sigs:
        allOf:
          - $ref: /schemas/types.yaml#/definitions/uint32-array
        $ref: /schemas/types.yaml#/definitions/uint32-array
        minItems: 1
        maxItems: 32
        description:
          List of CTI trigger out signal numbers in use by a trig-conns node.

      arm,trig-out-types:
        allOf:
          - $ref: /schemas/types.yaml#/definitions/uint32-array
        $ref: /schemas/types.yaml#/definitions/uint32-array
        minItems: 1
        maxItems: 32
        description:
@@ -178,8 +174,7 @@ patternProperties:
          or omitted completely, then the types will default to GEN_IO.

      arm,trig-filters:
        allOf:
          - $ref: /schemas/types.yaml#/definitions/uint32-array
        $ref: /schemas/types.yaml#/definitions/uint32-array
        minItems: 1
        maxItems: 32
        description:
@@ -187,8 +182,7 @@ patternProperties:
          active, unless filtering is disabled on the driver.

      arm,trig-conn-name:
        allOf:
          - $ref: /schemas/types.yaml#/definitions/string
        $ref: /schemas/types.yaml#/definitions/string
        description:
          Defines a connection name that will be displayed, if the cpu or
          arm,cs-dev-assoc properties are not being used in this connection.
+42 −43
Original line number Diff line number Diff line
@@ -171,9 +171,8 @@ properties:
      - qcom,scorpion

  enable-method:
    allOf:
      - $ref: '/schemas/types.yaml#/definitions/string'
      - oneOf:
    $ref: '/schemas/types.yaml#/definitions/string'
    oneOf:
      # On ARM v8 64-bit this property is required
      - enum:
          - psci
+37 −50
Original line number Diff line number Diff line
@@ -70,9 +70,8 @@ properties:
    description: Cycles of latency for Data RAM accesses. Specifies 3 cells of
      read, write and setup latencies. Minimum valid values are 1. Controllers
      without setup latency control should use a value of 0.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32-array
      - minItems: 2
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 2
    maxItems: 3
    items:
      minimum: 0
@@ -83,9 +82,8 @@ properties:
      read, write and setup latencies. Controllers without setup latency control
      should use 0. Controllers without separate read and write Tag RAM latency
      values should only use the first cell.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32-array
      - minItems: 1
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 3
    items:
      minimum: 0
@@ -93,18 +91,16 @@ properties:

  arm,dirty-latency:
    description: Cycles of latency for Dirty RAMs. This is a single cell.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - minimum: 1
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 1
    maximum: 8

  arm,filter-ranges:
    description: <start length> Starting address and length of window to
      filter. Addresses in the filter window are directed to the M1 port. Other
      addresses will go to the M0 port.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32-array
      - items:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    items:
      minItems: 2
      maxItems: 2

@@ -131,36 +127,31 @@ properties:
  arm,double-linefill:
    description: Override double linefill enable setting. Enable if
      non-zero, disable if zero.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [ 0, 1 ]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  arm,double-linefill-incr:
    description: Override double linefill on INCR read. Enable
      if non-zero, disable if zero.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [ 0, 1 ]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  arm,double-linefill-wrap:
    description: Override double linefill on WRAP read. Enable
      if non-zero, disable if zero.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [ 0, 1 ]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  arm,prefetch-drop:
    description: Override prefetch drop enable setting. Enable if non-zero,
      disable if zero.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [ 0, 1 ]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  arm,prefetch-offset:
    description: Override prefetch offset value.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [ 0, 1, 2, 3, 4, 5, 6, 7, 15, 23, 31 ]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3, 4, 5, 6, 7, 15, 23, 31]

  arm,shared-override:
    description: The default behavior of the L220 or PL310 cache
@@ -193,35 +184,31 @@ properties:
    description: |
      Data prefetch. Value: <0> (forcibly disable), <1>
      (forcibly enable), property absent (retain settings set by firmware)
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [ 0, 1 ]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  prefetch-instr:
    description: |
      Instruction prefetch. Value: <0> (forcibly disable),
      <1> (forcibly enable), property absent (retain settings set by
      firmware)
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [ 0, 1 ]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  arm,dynamic-clock-gating:
    description: |
      L2 dynamic clock gating. Value: <0> (forcibly
      disable), <1> (forcibly enable), property absent (OS specific behavior,
      preferably retain firmware settings)
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [ 0, 1 ]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  arm,standby-mode:
    description: L2 standby mode enable. Value <0> (forcibly disable),
      <1> (forcibly enable), property absent (OS specific behavior,
      preferably retain firmware settings)
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [ 0, 1 ]
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  arm,early-bresp-disable:
    description: Disable the CA9 optimization Early BRESP (PL310)
+7 −9
Original line number Diff line number Diff line
@@ -69,10 +69,8 @@ properties:

  method:
    description: The method of calling the PSCI firmware.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/string-array
      - enum:
          # SMC #0, with the register assignments specified in this binding.
    $ref: /schemas/types.yaml#/definitions/string-array
    enum:
      - smc
      # HVC #0, with the register assignments specified in this binding.
      - hvc
@@ -107,8 +105,8 @@ properties:

patternProperties:
  "^power-domain-":
    allOf:
      - $ref: "../power/power-domain.yaml#"
    $ref: "../power/power-domain.yaml#"

    type: object
    description: |
      ARM systems can have multiple cores, sometimes in an hierarchical
Loading