Commit 91e22861 authored by Michał Grzelak's avatar Michał Grzelak Committed by David S. Miller

dt-bindings: net: marvell,orion-mdio: Fix examples

As stated in marvell-orion-mdio.txt deleted in commit 0781434a
("dt-bindings: net: orion-mdio: Convert to JSON schema") if
'interrupts' property is present, width of 'reg' should be 0x84.
Otherwise, width of 'reg' should be 0x4. Fix 'examples:' and add
constraints checking whether 'interrupts' property is present
and validate it against fixed values in reg.
Signed-off-by: default avatarMichał Grzelak <mig@semihalf.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a3542b0c
...@@ -16,9 +16,6 @@ description: | ...@@ -16,9 +16,6 @@ description: |
8k has a second unit which provides an interface with the xMDIO bus. This 8k has a second unit which provides an interface with the xMDIO bus. This
driver handles these interfaces. driver handles these interfaces.
allOf:
- $ref: "mdio.yaml#"
properties: properties:
compatible: compatible:
enum: enum:
...@@ -39,13 +36,38 @@ required: ...@@ -39,13 +36,38 @@ required:
- compatible - compatible
- reg - reg
allOf:
- $ref: mdio.yaml#
- if:
required:
- interrupts
then:
properties:
reg:
items:
- items:
- $ref: /schemas/types.yaml#/definitions/cell
- const: 0x84
else:
properties:
reg:
items:
- items:
- $ref: /schemas/types.yaml#/definitions/cell
- enum:
- 0x4
- 0x10
unevaluatedProperties: false unevaluatedProperties: false
examples: examples:
- | - |
mdio@d0072004 { mdio@d0072004 {
compatible = "marvell,orion-mdio"; compatible = "marvell,orion-mdio";
reg = <0xd0072004 0x4>; reg = <0xd0072004 0x84>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
interrupts = <30>; interrupts = <30>;
......
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