Commit 25d04699 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Jonathan Cameron

dt-bindings: iio: dac: use spi-peripheral-props.yaml

Instead of listing directly properties typical for SPI peripherals,
reference the spi-peripheral-props.yaml schema.  This allows using all
properties typical for SPI-connected devices, even these which device
bindings author did not tried yet.

Remove the spi-* properties which now come via spi-peripheral-props.yaml
schema, except for the cases when device schema adds some constraints
like maximum frequency.

While changing additionalProperties->unevaluatedProperties, put it in
typical place, just before example DTS.
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220816124321.67817-5-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1deca207
...@@ -95,15 +95,12 @@ properties: ...@@ -95,15 +95,12 @@ properties:
vrefD-supply: true vrefD-supply: true
vref-supply: true vref-supply: true
spi-max-frequency: true
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
allOf: allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- # Shared external vref, no internal reference - # Shared external vref, no internal reference
if: if:
properties: properties:
...@@ -232,6 +229,8 @@ allOf: ...@@ -232,6 +229,8 @@ allOf:
- vrefA-supply - vrefA-supply
- vrefB-supply - vrefB-supply
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -28,10 +28,6 @@ properties: ...@@ -28,10 +28,6 @@ properties:
vref1-supply: true vref1-supply: true
vref2-supply: true vref2-supply: true
spi-max-frequency: true
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
...@@ -39,6 +35,7 @@ required: ...@@ -39,6 +35,7 @@ required:
- vref1-supply - vref1-supply
allOf: allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- if: - if:
properties: properties:
compatible: compatible:
...@@ -63,6 +60,8 @@ allOf: ...@@ -63,6 +60,8 @@ allOf:
required: required:
- vref2-supply - vref2-supply
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -39,14 +39,15 @@ properties: ...@@ -39,14 +39,15 @@ properties:
description: description:
If not supplied devices will use internal regulators. If not supplied devices will use internal regulators.
spi-max-frequency: true
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -26,13 +26,14 @@ properties: ...@@ -26,13 +26,14 @@ properties:
maxItems: 1 maxItems: 1
description: Fault signal. description: Fault signal.
spi-max-frequency: true
required: required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -27,19 +27,16 @@ properties: ...@@ -27,19 +27,16 @@ properties:
reg: reg:
maxItems: 1 maxItems: 1
spi-max-frequency: true
VREF-supply: true VREF-supply: true
VREFA-supply: true VREFA-supply: true
VREFB-supply: true VREFB-supply: true
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
allOf: allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- if: - if:
properties: properties:
compatible: compatible:
...@@ -72,6 +69,8 @@ allOf: ...@@ -72,6 +69,8 @@ allOf:
- VREFA-supply - VREFA-supply
- VREFB-supply - VREFB-supply
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -22,17 +22,18 @@ properties: ...@@ -22,17 +22,18 @@ properties:
reg: reg:
maxItems: 1 maxItems: 1
spi-max-frequency: true
vref-supply: vref-supply:
description: If not present, internal reference will be used. description: If not present, internal reference will be used.
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -53,14 +53,15 @@ properties: ...@@ -53,14 +53,15 @@ properties:
vcc-supply: vcc-supply:
description: If not supplied the internal reference is used. description: If not supplied the internal reference is used.
spi-max-frequency: true
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -25,8 +25,6 @@ properties: ...@@ -25,8 +25,6 @@ properties:
description: Either this or spi-cpol but not both. description: Either this or spi-cpol but not both.
spi-cpol: true spi-cpol: true
spi-max-frequency: true
adi,ext-dc-dc-compenstation-resistor: adi,ext-dc-dc-compenstation-resistor:
$ref: /schemas/types.yaml#/definitions/flag $ref: /schemas/types.yaml#/definitions/flag
description: description:
...@@ -67,8 +65,6 @@ required: ...@@ -67,8 +65,6 @@ required:
- compatible - compatible
- reg - reg
additionalProperties: false
patternProperties: patternProperties:
"^channel@[0-7]$": "^channel@[0-7]$":
type: object type: object
...@@ -123,6 +119,11 @@ oneOf: ...@@ -123,6 +119,11 @@ oneOf:
- required: - required:
- spi-cpol - spi-cpol
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -16,7 +16,6 @@ properties: ...@@ -16,7 +16,6 @@ properties:
reg: reg:
maxItems: 1 maxItems: 1
spi-max-frequency: true
spi-cpha: true spi-cpha: true
adi,dc-dc-mode: adi,dc-dc-mode:
...@@ -99,6 +98,7 @@ required: ...@@ -99,6 +98,7 @@ required:
- adi,dc-dc-mode - adi,dc-dc-mode
allOf: allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- if: - if:
properties: properties:
adi,dc-dc-mode: adi,dc-dc-mode:
...@@ -115,7 +115,7 @@ allOf: ...@@ -115,7 +115,7 @@ allOf:
required: required:
- adi,range-microvolt - adi,range-microvolt
additionalProperties: false unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -22,18 +22,15 @@ properties: ...@@ -22,18 +22,15 @@ properties:
reg: reg:
maxItems: 1 maxItems: 1
spi-max-frequency: true
vref-supply: vref-supply:
description: If not supplied, internal reference will be used. description: If not supplied, internal reference will be used.
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
allOf: allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- if: - if:
properties: properties:
compatible: compatible:
...@@ -45,6 +42,8 @@ allOf: ...@@ -45,6 +42,8 @@ allOf:
required: required:
- vref-supply - vref-supply
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -22,18 +22,15 @@ properties: ...@@ -22,18 +22,15 @@ properties:
reg: reg:
maxItems: 1 maxItems: 1
spi-max-frequency: true
vrefAB-supply: true vrefAB-supply: true
vrefCD-supply: true vrefCD-supply: true
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
allOf: allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- if: - if:
properties: properties:
compatible: compatible:
...@@ -46,6 +43,8 @@ allOf: ...@@ -46,6 +43,8 @@ allOf:
- vrefAB-supply - vrefAB-supply
- vrefCD-supply - vrefCD-supply
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -49,8 +49,6 @@ properties: ...@@ -49,8 +49,6 @@ properties:
asserted during driver probe. asserted during driver probe.
maxItems: 1 maxItems: 1
spi-max-frequency: true
'#address-cells': '#address-cells':
const: 1 const: 1
...@@ -138,7 +136,10 @@ required: ...@@ -138,7 +136,10 @@ required:
- channel@4 - channel@4
- channel@5 - channel@5
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -23,19 +23,20 @@ properties: ...@@ -23,19 +23,20 @@ properties:
reg: reg:
maxItems: 1 maxItems: 1
spi-max-frequency: true
vdd-supply: true vdd-supply: true
vss-supply: true vss-supply: true
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
- vdd-supply - vdd-supply
- vss-supply - vss-supply
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -19,19 +19,16 @@ properties: ...@@ -19,19 +19,16 @@ properties:
reg: reg:
maxItems: 1 maxItems: 1
spi-max-frequency: true
vrefh-supply: true vrefh-supply: true
vrefl-supply: true vrefl-supply: true
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
- vrefh-supply - vrefh-supply
allOf: allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- if: - if:
properties: properties:
compatible: compatible:
...@@ -44,6 +41,8 @@ allOf: ...@@ -44,6 +41,8 @@ allOf:
properties: properties:
vrefl-supply: false vrefl-supply: false
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -21,17 +21,18 @@ properties: ...@@ -21,17 +21,18 @@ properties:
reg: reg:
maxItems: 1 maxItems: 1
spi-max-frequency: true
vref-supply: true vref-supply: true
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
- vref-supply - vref-supply
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
spi { spi {
......
...@@ -33,21 +33,22 @@ properties: ...@@ -33,21 +33,22 @@ properties:
vref-supply: vref-supply:
description: Needed to provide output scaling. description: Needed to provide output scaling.
spi-max-frequency: true
required: required:
- compatible - compatible
- reg - reg
- vref-supply - vref-supply
additionalProperties: false
oneOf: oneOf:
- required: - required:
- spi-cpha - spi-cpha
- required: - required:
- spi-cpol - spi-cpol
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
vref_2v5_reg: regulator-vref { vref_2v5_reg: regulator-vref {
......
...@@ -24,14 +24,15 @@ properties: ...@@ -24,14 +24,15 @@ properties:
Reference voltage must be supplied to establish the scaling of the Reference voltage must be supplied to establish the scaling of the
output voltage. output voltage.
spi-max-frequency: true
required: required:
- compatible - compatible
- reg - reg
- vref-supply - vref-supply
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -29,13 +29,14 @@ properties: ...@@ -29,13 +29,14 @@ properties:
DACs are loaded when the pin connected to this GPIO is pulled low. DACs are loaded when the pin connected to this GPIO is pulled low.
maxItems: 1 maxItems: 1
spi-max-frequency: true
required: required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment