Skip to content

Commit 0b467f5

Browse files
robherringkuba-moo
authored andcommitted
dt-bindings: net: Convert apm,xgene-enet to DT schema
Convert the APM XGene Ethernet binding to DT schema format. Add the missing apm,xgene2-sgenet and apm,xgene2-xgenet compatibles. Drop "reg-names" as required. Add support for up to 16 interrupts. Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Rob Herring (Arm) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent a9d517a commit 0b467f5

File tree

3 files changed

+116
-92
lines changed

3 files changed

+116
-92
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/apm,xgene-enet.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: APM X-Gene SoC Ethernet
8+
9+
maintainers:
10+
- Iyappan Subramanian <[email protected]>
11+
- Keyur Chudgar <[email protected]>
12+
- Quan Nguyen <[email protected]>
13+
14+
allOf:
15+
- $ref: ethernet-controller.yaml#
16+
17+
properties:
18+
compatible:
19+
enum:
20+
- apm,xgene-enet
21+
- apm,xgene1-sgenet
22+
- apm,xgene1-xgenet
23+
- apm,xgene2-sgenet
24+
- apm,xgene2-xgenet
25+
26+
reg:
27+
maxItems: 3
28+
29+
reg-names:
30+
items:
31+
- const: enet_csr
32+
- const: ring_csr
33+
- const: ring_cmd
34+
35+
clocks:
36+
maxItems: 1
37+
38+
dma-coherent: true
39+
40+
interrupts:
41+
description: An rx and tx completion interrupt pair per queue
42+
minItems: 1
43+
maxItems: 16
44+
45+
channel:
46+
description: Ethernet to CPU start channel number
47+
$ref: /schemas/types.yaml#/definitions/uint32
48+
49+
port-id:
50+
description: Port number
51+
$ref: /schemas/types.yaml#/definitions/uint32
52+
maximum: 1
53+
54+
tx-delay:
55+
description: Delay value for RGMII bridge TX clock
56+
$ref: /schemas/types.yaml#/definitions/uint32
57+
maximum: 7
58+
default: 4
59+
60+
rx-delay:
61+
description: Delay value for RGMII bridge RX clock
62+
$ref: /schemas/types.yaml#/definitions/uint32
63+
maximum: 7
64+
default: 2
65+
66+
rxlos-gpios:
67+
description: Input GPIO from SFP+ module indicating incoming signal
68+
maxItems: 1
69+
70+
mdio:
71+
description: MDIO bus subnode
72+
$ref: mdio.yaml#
73+
unevaluatedProperties: false
74+
75+
properties:
76+
compatible:
77+
const: apm,xgene-mdio
78+
79+
required:
80+
- compatible
81+
82+
required:
83+
- compatible
84+
- reg
85+
- interrupts
86+
87+
unevaluatedProperties: false
88+
89+
examples:
90+
- |
91+
ethernet@17020000 {
92+
compatible = "apm,xgene-enet";
93+
reg = <0x17020000 0xd100>,
94+
<0x17030000 0x400>,
95+
<0x10000000 0x200>;
96+
reg-names = "enet_csr", "ring_csr", "ring_cmd";
97+
interrupts = <0x0 0x3c 0x4>;
98+
channel = <0>;
99+
port-id = <0>;
100+
clocks = <&menetclk 0>;
101+
local-mac-address = [00 01 73 00 00 01];
102+
phy-connection-type = "rgmii";
103+
phy-handle = <&menetphy>;
104+
105+
mdio {
106+
compatible = "apm,xgene-mdio";
107+
#address-cells = <1>;
108+
#size-cells = <0>;
109+
110+
menetphy: ethernet-phy@3 {
111+
compatible = "ethernet-phy-id001c.c915";
112+
reg = <3>;
113+
};
114+
};
115+
};

Documentation/devicetree/bindings/net/apm-xgene-enet.txt

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

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1886,7 +1886,7 @@ M: Iyappan Subramanian <[email protected]>
18861886
M: Keyur Chudgar <[email protected]>
18871887
M: Quan Nguyen <[email protected]>
18881888
S: Maintained
1889-
F: Documentation/devicetree/bindings/net/apm-xgene-enet.txt
1889+
F: Documentation/devicetree/bindings/net/apm,xgene-enet.yaml
18901890
F: Documentation/devicetree/bindings/net/apm-xgene-mdio.txt
18911891
F: drivers/net/ethernet/apm/xgene/
18921892
F: drivers/net/mdio/mdio-xgene.c

0 commit comments

Comments
 (0)