Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: dt-bindings: arm,pl022: Move child node properties to separate schema

In order to validate SPI peripherals, SPI controller-specific child node
properties need to be in a separate schema, spi-peripheral-props.yaml,
which SPI peripheral schemas reference. Move the arm,pl022 child
properties to their own schema file and add a $ref in
spi-peripheral-props.yaml.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230914190033.1852600-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Rob Herring and committed by
Mark Brown
b0ef97ac fd811b62

+62 -51
+61
Documentation/devicetree/bindings/spi/arm,pl022-peripheral-props.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/spi/arm,pl022-peripheral-props.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Peripheral-specific properties for Arm PL022 SPI controller 8 + 9 + maintainers: 10 + - Linus Walleij <linus.walleij@linaro.org> 11 + 12 + select: false 13 + 14 + properties: 15 + pl022,interface: 16 + description: SPI interface type 17 + $ref: /schemas/types.yaml#/definitions/uint32 18 + enum: 19 + - 0 # SPI 20 + - 1 # Texas Instruments Synchronous Serial Frame Format 21 + - 2 # Microwire (Half Duplex) 22 + 23 + pl022,com-mode: 24 + description: Specifies the transfer mode 25 + $ref: /schemas/types.yaml#/definitions/uint32 26 + enum: 27 + - 0 # interrupt mode 28 + - 1 # polling mode 29 + - 2 # DMA mode 30 + default: 1 31 + 32 + pl022,rx-level-trig: 33 + description: Rx FIFO watermark level 34 + $ref: /schemas/types.yaml#/definitions/uint32 35 + minimum: 0 36 + maximum: 4 37 + 38 + pl022,tx-level-trig: 39 + description: Tx FIFO watermark level 40 + $ref: /schemas/types.yaml#/definitions/uint32 41 + minimum: 0 42 + maximum: 4 43 + 44 + pl022,ctrl-len: 45 + description: Microwire interface - Control length 46 + $ref: /schemas/types.yaml#/definitions/uint32 47 + minimum: 0x03 48 + maximum: 0x1f 49 + 50 + pl022,wait-state: 51 + description: Microwire interface - Wait state 52 + $ref: /schemas/types.yaml#/definitions/uint32 53 + enum: [0, 1] 54 + 55 + pl022,duplex: 56 + description: Microwire interface - Full/Half duplex 57 + $ref: /schemas/types.yaml#/definitions/uint32 58 + enum: [0, 1] 59 + 60 + additionalProperties: true 61 + ...
+1
Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
··· 115 115 116 116 # The controller specific properties go here. 117 117 allOf: 118 + - $ref: arm,pl022-peripheral-props.yaml# 118 119 - $ref: cdns,qspi-nor-peripheral-props.yaml# 119 120 - $ref: samsung,spi-peripheral-props.yaml# 120 121 - $ref: nvidia,tegra210-quad-peripheral-props.yaml#
-51
Documentation/devicetree/bindings/spi/spi-pl022.yaml
··· 74 74 resets: 75 75 maxItems: 1 76 76 77 - patternProperties: 78 - "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-f]+$": 79 - type: object 80 - # SPI slave nodes must be children of the SPI master node and can 81 - # contain the following properties. 82 - properties: 83 - pl022,interface: 84 - description: SPI interface type 85 - $ref: /schemas/types.yaml#/definitions/uint32 86 - enum: 87 - - 0 # SPI 88 - - 1 # Texas Instruments Synchronous Serial Frame Format 89 - - 2 # Microwire (Half Duplex) 90 - 91 - pl022,com-mode: 92 - description: Specifies the transfer mode 93 - $ref: /schemas/types.yaml#/definitions/uint32 94 - enum: 95 - - 0 # interrupt mode 96 - - 1 # polling mode 97 - - 2 # DMA mode 98 - default: 1 99 - 100 - pl022,rx-level-trig: 101 - description: Rx FIFO watermark level 102 - $ref: /schemas/types.yaml#/definitions/uint32 103 - minimum: 0 104 - maximum: 4 105 - 106 - pl022,tx-level-trig: 107 - description: Tx FIFO watermark level 108 - $ref: /schemas/types.yaml#/definitions/uint32 109 - minimum: 0 110 - maximum: 4 111 - 112 - pl022,ctrl-len: 113 - description: Microwire interface - Control length 114 - $ref: /schemas/types.yaml#/definitions/uint32 115 - minimum: 0x03 116 - maximum: 0x1f 117 - 118 - pl022,wait-state: 119 - description: Microwire interface - Wait state 120 - $ref: /schemas/types.yaml#/definitions/uint32 121 - enum: [0, 1] 122 - 123 - pl022,duplex: 124 - description: Microwire interface - Full/Half duplex 125 - $ref: /schemas/types.yaml#/definitions/uint32 126 - enum: [0, 1] 127 - 128 77 required: 129 78 - compatible 130 79 - reg