dt-bindings: net/dsa: Add spi-peripheral-props.yaml references

SPI peripheral device bindings need to reference spi-peripheral-props.yaml
in order to use various SPI controller specific properties. Otherwise,
the unevaluatedProperties check will reject any controller specific
properties.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220531220122.2412711-1-robh@kernel.org
This commit is contained in:
Rob Herring 2022-05-31 17:01:18 -05:00
parent fe3f70eec4
commit bbba69ef47
4 changed files with 68 additions and 50 deletions

View file

@ -6,9 +6,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom BCM53xx Ethernet switches title: Broadcom BCM53xx Ethernet switches
allOf:
- $ref: dsa.yaml#
maintainers: maintainers:
- Florian Fainelli <f.fainelli@gmail.com> - Florian Fainelli <f.fainelli@gmail.com>
@ -68,53 +65,71 @@ required:
- compatible - compatible
- reg - reg
# BCM585xx/586xx/88312 SoCs allOf:
if: - $ref: dsa.yaml#
properties: - if:
compatible: properties:
contains: compatible:
enum: contains:
- brcm,bcm58522-srab enum:
- brcm,bcm58523-srab - brcm,bcm5325
- brcm,bcm58525-srab - brcm,bcm53115
- brcm,bcm58622-srab - brcm,bcm53125
- brcm,bcm58623-srab - brcm,bcm53128
- brcm,bcm58625-srab - brcm,bcm5365
- brcm,bcm88312-srab - brcm,bcm5395
then: - brcm,bcm5397
properties: - brcm,bcm5398
reg: then:
minItems: 3 $ref: /schemas/spi/spi-peripheral-props.yaml
maxItems: 3
reg-names: # BCM585xx/586xx/88312 SoCs
items: - if:
- const: srab properties:
- const: mux_config compatible:
- const: sgmii_config contains:
interrupts: enum:
minItems: 13 - brcm,bcm58522-srab
maxItems: 13 - brcm,bcm58523-srab
interrupt-names: - brcm,bcm58525-srab
items: - brcm,bcm58622-srab
- const: link_state_p0 - brcm,bcm58623-srab
- const: link_state_p1 - brcm,bcm58625-srab
- const: link_state_p2 - brcm,bcm88312-srab
- const: link_state_p3 then:
- const: link_state_p4 properties:
- const: link_state_p5 reg:
- const: link_state_p7 minItems: 3
- const: link_state_p8 maxItems: 3
- const: phy reg-names:
- const: ts items:
- const: imp_sleep_timer_p5 - const: srab
- const: imp_sleep_timer_p7 - const: mux_config
- const: imp_sleep_timer_p8 - const: sgmii_config
required: interrupts:
- interrupts minItems: 13
else: maxItems: 13
properties: interrupt-names:
reg: items:
maxItems: 1 - const: link_state_p0
- const: link_state_p1
- const: link_state_p2
- const: link_state_p3
- const: link_state_p4
- const: link_state_p5
- const: link_state_p7
- const: link_state_p8
- const: phy
- const: ts
- const: imp_sleep_timer_p5
- const: imp_sleep_timer_p7
- const: imp_sleep_timer_p8
required:
- interrupts
else:
properties:
reg:
maxItems: 1
unevaluatedProperties: false unevaluatedProperties: false

View file

@ -12,6 +12,7 @@ maintainers:
allOf: allOf:
- $ref: dsa.yaml# - $ref: dsa.yaml#
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties: properties:
# See Documentation/devicetree/bindings/net/dsa/dsa.yaml for a list of additional # See Documentation/devicetree/bindings/net/dsa/dsa.yaml for a list of additional

View file

@ -14,6 +14,7 @@ description:
allOf: allOf:
- $ref: "dsa.yaml#" - $ref: "dsa.yaml#"
- $ref: /schemas/spi/spi-peripheral-props.yaml#
maintainers: maintainers:
- Vladimir Oltean <vladimir.oltean@nxp.com> - Vladimir Oltean <vladimir.oltean@nxp.com>

View file

@ -108,6 +108,7 @@ if:
- reg - reg
then: then:
$ref: /schemas/spi/spi-peripheral-props.yaml#
not: not:
required: required:
- mdc-gpios - mdc-gpios