@@ -15,16 +15,27 @@ description: |
controller may be described for use in SPI master mode or in SPI slave mode,
but not for both at the same time.
+allOf:
+ - if:
+ required:
+ - spi-slave
+ then:
+ properties:
+ "#address-cells":
+ const: 0
+ "#size-cells":
+ const: 0
+ else:
+ properties:
+ "#address-cells":
+ const: 1
+ "#size-cells":
+ const: 0
+
properties:
$nodename:
pattern: "^spi(@.*|-[0-9a-f])*$"
- "#address-cells":
- const: 1
-
- "#size-cells":
- const: 0
-
cs-gpios:
description: |
GPIOs used as chip selects.
SPI controllers in slave mode have a single child node that has no address. Enforce #address-cells of zero instead of one. Fixes: 0a1b929356830 ("spi: Add YAML schemas for the generic SPI options") Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> --- .../bindings/spi/spi-controller.yaml | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-)