Skip to content

Commit 91e2286

Browse files
semihalf-grzelak-michaldavem330
authored andcommitted
dt-bindings: net: marvell,orion-mdio: Fix examples
As stated in marvell-orion-mdio.txt deleted in commit 0781434 ("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: Michał Grzelak <mig@semihalf.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a3542b0 commit 91e2286

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ description: |
1616
8k has a second unit which provides an interface with the xMDIO bus. This
1717
driver handles these interfaces.
1818
19-
allOf:
20-
- $ref: "mdio.yaml#"
21-
2219
properties:
2320
compatible:
2421
enum:
@@ -39,13 +36,38 @@ required:
3936
- compatible
4037
- reg
4138

39+
allOf:
40+
- $ref: mdio.yaml#
41+
42+
- if:
43+
required:
44+
- interrupts
45+
46+
then:
47+
properties:
48+
reg:
49+
items:
50+
- items:
51+
- $ref: /schemas/types.yaml#/definitions/cell
52+
- const: 0x84
53+
54+
else:
55+
properties:
56+
reg:
57+
items:
58+
- items:
59+
- $ref: /schemas/types.yaml#/definitions/cell
60+
- enum:
61+
- 0x4
62+
- 0x10
63+
4264
unevaluatedProperties: false
4365

4466
examples:
4567
- |
4668
mdio@d0072004 {
4769
compatible = "marvell,orion-mdio";
48-
reg = <0xd0072004 0x4>;
70+
reg = <0xd0072004 0x84>;
4971
#address-cells = <1>;
5072
#size-cells = <0>;
5173
interrupts = <30>;

0 commit comments

Comments
 (0)