Skip to content

Commit 2382aed

Browse files
committed
dt-bindings: net: Convert Marvell Armada NETA and BM to DT schema
Convert Marvell Armada NETA Ethernet Controller and Buffer Manager bindings to schema. It is a straight forward conversion. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 828e501 commit 2382aed

File tree

5 files changed

+140
-97
lines changed

5 files changed

+140
-97
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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,armada-370-neta.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Marvell Armada 370/XP/3700/AC5 Ethernet Controller (NETA)
8+
9+
maintainers:
10+
- Marcin Wojtas <[email protected]>
11+
12+
allOf:
13+
- $ref: /schemas/net/ethernet-controller.yaml#
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- marvell,armada-370-neta
19+
- marvell,armada-xp-neta
20+
- marvell,armada-3700-neta
21+
- marvell,armada-ac5-neta
22+
23+
reg:
24+
maxItems: 1
25+
26+
interrupts:
27+
maxItems: 1
28+
29+
clocks:
30+
minItems: 1
31+
maxItems: 2
32+
33+
clock-names:
34+
minItems: 1
35+
items:
36+
- const: core
37+
- const: bus
38+
39+
phys:
40+
maxItems: 1
41+
42+
tx-csum-limit:
43+
description: Maximum MTU in bytes for Tx checksum offload; default is 1600 for
44+
armada-370-neta and 9800 for others.
45+
$ref: /schemas/types.yaml#/definitions/uint32
46+
47+
buffer-manager:
48+
description: Phandle to hardware buffer manager.
49+
$ref: /schemas/types.yaml#/definitions/phandle
50+
51+
bm,pool-long:
52+
description: Pool ID for packets larger than the short threshold.
53+
$ref: /schemas/types.yaml#/definitions/uint32
54+
55+
bm,pool-short:
56+
description: Pool ID for packets smaller than the long threshold.
57+
$ref: /schemas/types.yaml#/definitions/uint32
58+
59+
required:
60+
- compatible
61+
- reg
62+
- clocks
63+
64+
unevaluatedProperties: false
65+
66+
examples:
67+
- |
68+
ethernet@70000 {
69+
compatible = "marvell,armada-370-neta";
70+
reg = <0x70000 0x2500>;
71+
interrupts = <8>;
72+
clocks = <&gate_clk 4>;
73+
tx-csum-limit = <9800>;
74+
phy = <&phy0>;
75+
phy-mode = "rgmii-id";
76+
buffer-manager = <&bm>;
77+
bm,pool-long = <0>;
78+
bm,pool-short = <1>;
79+
};
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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,armada-380-neta-bm.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Marvell Armada 380/XP Buffer Manager (BM)
8+
9+
maintainers:
10+
- Marcin Wojtas <[email protected]>
11+
12+
description:
13+
In order to see how to hook the BM to a given ethernet port, please refer to
14+
Documentation/devicetree/bindings/net/marvell,armada-370-neta.yaml.
15+
16+
properties:
17+
compatible:
18+
const: marvell,armada-380-neta-bm
19+
20+
reg:
21+
maxItems: 1
22+
23+
clocks:
24+
maxItems: 1
25+
26+
internal-mem:
27+
description: Phandle to internal SRAM region
28+
$ref: /schemas/types.yaml#/definitions/phandle
29+
30+
patternProperties:
31+
"^pool[0-3],capacity$":
32+
description:
33+
size of external buffer pointers' ring maintained in DRAM for pool 0-3
34+
$ref: /schemas/types.yaml#/definitions/uint32
35+
minimum: 128
36+
maximum: 16352
37+
38+
"^pool[0-3],pkt-size$":
39+
description:
40+
maximum packet size for a short buffer pool entry (pool 0-3)
41+
$ref: /schemas/types.yaml#/definitions/uint32
42+
43+
required:
44+
- compatible
45+
- reg
46+
- clocks
47+
- internal-mem
48+
49+
additionalProperties: false
50+
51+
examples:
52+
- |
53+
bm@c8000 {
54+
compatible = "marvell,armada-380-neta-bm";
55+
reg = <0xc8000 0xac>;
56+
clocks = <&gateclk 13>;
57+
internal-mem = <&bm_bppi>;
58+
pool2,capacity = <4096>;
59+
pool1,pkt-size = <512>;
60+
};

Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt

Lines changed: 0 additions & 50 deletions
This file was deleted.

Documentation/devicetree/bindings/net/marvell-neta-bm.txt

Lines changed: 0 additions & 47 deletions
This file was deleted.

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ patternProperties:
2121
"^(pciclass|pinctrl-single|#pinctrl-single|PowerPC),.*": true
2222
"^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*": true
2323
"^(simple-audio-card|st-plgpio|st-spics|ts),.*": true
24+
"^pool[0-3],.*": true
2425

2526
# Keep list in alphabetical order.
2627
"^100ask,.*":

0 commit comments

Comments
 (0)