Skip to content

Commit 63b956f

Browse files
miquelraynalPaolo Abeni
authored andcommitted
dt-bindings: net: marvell,dfx-server: Convert to yaml
Even though this description is not used anywhere upstream (no matching driver), while on this file I decided I would try a conversion to yaml in order to clarify the prestera family description. I cannot keep the nodename dfx-server@xxxx so I switched to dfx-bus@xxxx which matches simple-bus.yaml. Otherwise I took the example context from the only user of this compatible: armada-xp-98dx3236.dtsi, which is a rather old and not perfect DT. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 98eb05d commit 63b956f

File tree

2 files changed

+62
-18
lines changed

2 files changed

+62
-18
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/marvell,dfx-server.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Marvell Prestera DFX server
8+
9+
maintainers:
10+
- Miquel Raynal <miquel.raynal@bootlin.com>
11+
12+
select:
13+
properties:
14+
compatible:
15+
contains:
16+
const: marvell,dfx-server
17+
required:
18+
- compatible
19+
20+
properties:
21+
compatible:
22+
items:
23+
- const: marvell,dfx-server
24+
- const: simple-bus
25+
26+
reg:
27+
maxItems: 1
28+
29+
ranges: true
30+
31+
'#address-cells':
32+
const: 1
33+
34+
'#size-cells':
35+
const: 1
36+
37+
required:
38+
- compatible
39+
- reg
40+
- ranges
41+
42+
# The DFX server may expose clocks described as subnodes
43+
additionalProperties:
44+
type: object
45+
46+
examples:
47+
- |
48+
49+
#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
50+
bus@0 {
51+
reg = <0 0>;
52+
#address-cells = <2>;
53+
#size-cells = <1>;
54+
55+
dfx-bus@ac000000 {
56+
compatible = "marvell,dfx-server", "simple-bus";
57+
#address-cells = <1>;
58+
#size-cells = <1>;
59+
ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>;
60+
reg = <MBUS_ID(0x08, 0x00) 0 0x100000>;
61+
};
62+
};

Documentation/devicetree/bindings/net/marvell,prestera.txt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,3 @@ switch {
2727
dfx = <&dfx>;
2828
};
2929
};
30-
31-
DFX Server bindings
32-
-------------------
33-
34-
Required properties:
35-
- compatible: must be "marvell,dfx-server", "simple-bus"
36-
- ranges: describes the address mapping of a memory-mapped bus.
37-
- reg: address and length of the register set for the device.
38-
39-
Example:
40-
41-
dfx-server {
42-
compatible = "marvell,dfx-server", "simple-bus";
43-
#address-cells = <1>;
44-
#size-cells = <1>;
45-
ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>;
46-
reg = <MBUS_ID(0x08, 0x00) 0 0x100000>;
47-
};

0 commit comments

Comments
 (0)