OSDN Git Service

dt-bindings: net: Add missing properties used in examples
[uclinux-h8/linux.git] / Documentation / devicetree / bindings / net / qca,ar71xx.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/net/qca,ar71xx.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: QCA AR71XX MAC
8
9 allOf:
10   - $ref: ethernet-controller.yaml#
11
12 maintainers:
13   - Oleksij Rempel <o.rempel@pengutronix.de>
14
15 properties:
16   compatible:
17     oneOf:
18       - items:
19           - enum:
20               - qca,ar7100-eth   # Atheros AR7100
21               - qca,ar7240-eth   # Atheros AR7240
22               - qca,ar7241-eth   # Atheros AR7241
23               - qca,ar7242-eth   # Atheros AR7242
24               - qca,ar9130-eth   # Atheros AR9130
25               - qca,ar9330-eth   # Atheros AR9330
26               - qca,ar9340-eth   # Atheros AR9340
27               - qca,qca9530-eth  # Qualcomm Atheros QCA9530
28               - qca,qca9550-eth  # Qualcomm Atheros QCA9550
29               - qca,qca9560-eth  # Qualcomm Atheros QCA9560
30
31   reg:
32     maxItems: 1
33
34   interrupts:
35     maxItems: 1
36
37   '#address-cells':
38     description: number of address cells for the MDIO bus
39     const: 1
40
41   '#size-cells':
42     description: number of size cells on the MDIO bus
43     const: 0
44
45   clocks:
46     items:
47       - description: MAC main clock
48       - description: MDIO clock
49
50   clock-names:
51     items:
52       - const: eth
53       - const: mdio
54
55   resets:
56     items:
57       - description: MAC reset
58       - description: MDIO reset
59
60   reset-names:
61     items:
62       - const: mac
63       - const: mdio
64
65 required:
66   - compatible
67   - reg
68   - interrupts
69   - phy-mode
70   - clocks
71   - clock-names
72   - resets
73   - reset-names
74
75 unevaluatedProperties: false
76
77 examples:
78   # Lager board
79   - |
80     eth0: ethernet@19000000 {
81         compatible = "qca,ar9330-eth";
82         reg = <0x19000000 0x200>;
83         interrupts = <4>;
84         resets = <&rst 9>, <&rst 22>;
85         reset-names = "mac", "mdio";
86         clocks = <&pll 1>, <&pll 2>;
87         clock-names = "eth", "mdio";
88         phy-mode = "mii";
89         phy-handle = <&phy_port4>;
90     };
91
92     eth1: ethernet@1a000000 {
93         compatible = "qca,ar9330-eth";
94         reg = <0x1a000000 0x200>;
95         interrupts = <5>;
96         resets = <&rst 13>, <&rst 23>;
97         reset-names = "mac", "mdio";
98         clocks = <&pll 1>, <&pll 2>;
99         clock-names = "eth", "mdio";
100
101         phy-mode = "gmii";
102
103         fixed-link {
104             speed = <1000>;
105             full-duplex;
106         };
107
108         mdio {
109             #address-cells = <1>;
110             #size-cells = <0>;
111
112             switch10: switch@10 {
113                 #address-cells = <1>;
114                 #size-cells = <0>;
115
116                 compatible = "qca,ar9331-switch";
117                 reg = <0x10>;
118                 resets = <&rst 8>;
119                 reset-names = "switch";
120
121                 interrupt-parent = <&miscintc>;
122                 interrupts = <12>;
123
124                 interrupt-controller;
125                 #interrupt-cells = <1>;
126
127                 ports {
128                     #address-cells = <1>;
129                     #size-cells = <0>;
130
131                     switch_port0: port@0 {
132                         reg = <0x0>;
133                         label = "cpu";
134                         ethernet = <&eth1>;
135
136                         phy-mode = "gmii";
137
138                         fixed-link {
139                             speed = <1000>;
140                             full-duplex;
141                         };
142                     };
143
144                     switch_port1: port@1 {
145                         reg = <0x1>;
146                         phy-handle = <&phy_port0>;
147                         phy-mode = "internal";
148                     };
149
150                     switch_port2: port@2 {
151                         reg = <0x2>;
152                         phy-handle = <&phy_port1>;
153                         phy-mode = "internal";
154                     };
155
156                     switch_port3: port@3 {
157                         reg = <0x3>;
158                         phy-handle = <&phy_port2>;
159                         phy-mode = "internal";
160                     };
161
162                     switch_port4: port@4 {
163                         reg = <0x4>;
164                         phy-handle = <&phy_port3>;
165                         phy-mode = "internal";
166                     };
167                 };
168
169                 mdio {
170                     #address-cells = <1>;
171                     #size-cells = <0>;
172
173                     interrupt-parent = <&switch10>;
174
175                     phy_port0: ethernet-phy@0 {
176                         reg = <0x0>;
177                         interrupts = <0>;
178                     };
179
180                     phy_port1: ethernet-phy@1 {
181                         reg = <0x1>;
182                         interrupts = <0>;
183                     };
184
185                     phy_port2: ethernet-phy@2 {
186                         reg = <0x2>;
187                         interrupts = <0>;
188                     };
189
190                     phy_port3: ethernet-phy@3 {
191                         reg = <0x3>;
192                         interrupts = <0>;
193                     };
194
195                     phy_port4: ethernet-phy@4 {
196                         reg = <0x4>;
197                         interrupts = <0>;
198                     };
199                 };
200             };
201         };
202     };