Skip to content

Commit

Permalink
dt-bindings: net: micrel,ks8851: allow SPI device properties
Browse files Browse the repository at this point in the history
The Micrel KS8851 can be attached to SPI or parallel bus and the
difference is expressed in compatibles.  Allow common SPI properties
when this is a SPI variant and narrow the parallel memory bus properties
to the second case.

This fixes dtbs_check warning:

  qcom-msm8960-cdp.dtb: ethernet@0: Unevaluated properties are not allowed ('spi-max-frequency' was unexpected)

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230619170134.65395-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Krzysztof Kozlowski authored and Jakub Kicinski committed Jun 21, 2023
1 parent 6a0a6dd commit 1ca09f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/devicetree/bindings/net/micrel,ks8851.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ required:

allOf:
- $ref: ethernet-controller.yaml#
- $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
- if:
properties:
compatible:
contains:
const: micrel,ks8851
then:
$ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
reg:
maxItems: 1
Expand All @@ -60,6 +60,7 @@ allOf:
contains:
const: micrel,ks8851-mll
then:
$ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
properties:
reg:
minItems: 2
Expand Down

0 comments on commit 1ca09f5

Please sign in to comment.