1 From c7f75954212b5e64f6b1f2375215b02fd79758ce Mon Sep 17 00:00:00 2001
2 From: Martin Schiller <ms@dev.tdt.de>
3 Date: Tue, 11 Jun 2024 15:54:23 +0200
4 Subject: dt-bindings: net: dsa: lantiq,gswip: convert to YAML schema
6 Convert the lantiq,gswip bindings to YAML format.
8 Also add this new file to the MAINTAINERS file.
10 Furthermore, the CPU port has to specify a phy-mode and either a phy or
11 a fixed-link. Since GSWIP is connected using a SoC internal protocol
12 there's no PHY involved. Add phy-mode = "internal" and a fixed-link to
13 the example code to describe the communication between the PMAC
14 (Ethernet controller) and GSWIP switch.
16 Signed-off-by: Martin Schiller <ms@dev.tdt.de>
17 Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
18 Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
19 Link: https://lore.kernel.org/r/20240611135434.3180973-2-ms@dev.tdt.de
20 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
22 .../devicetree/bindings/net/dsa/lantiq,gswip.yaml | 202 +++++++++++++++++++++
23 .../devicetree/bindings/net/dsa/lantiq-gswip.txt | 146 ---------------
25 3 files changed, 203 insertions(+), 146 deletions(-)
26 create mode 100644 Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
27 delete mode 100644 Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
30 +++ b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
32 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
35 +$id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
36 +$schema: http://devicetree.org/meta-schemas/core.yaml#
38 +title: Lantiq GSWIP Ethernet switches
41 + - $ref: dsa.yaml#/$defs/ethernet-ports
44 + - Hauke Mehrtens <hauke@hauke-m.de>
49 + - lantiq,xrx200-gswip
50 + - lantiq,xrx300-gswip
51 + - lantiq,xrx330-gswip
64 + $ref: /schemas/net/mdio.yaml#
65 + unevaluatedProperties: false
69 + const: lantiq,xrx200-mdio
86 + - lantiq,xrx200-gphy-fw
87 + - lantiq,xrx300-gphy-fw
88 + - lantiq,xrx330-gphy-fw
89 + - const: lantiq,gphy-fw
92 + $ref: /schemas/types.yaml#/definitions/phandle
93 + description: phandle to the RCU syscon
96 + "^gphy@[0-9a-f]{1,2}$":
99 + additionalProperties: false
106 + Offset of the GPHY firmware register in the RCU register range
110 + - description: GPHY reset line
123 + additionalProperties: false
129 +unevaluatedProperties: false
134 + compatible = "lantiq,xrx200-gswip";
135 + reg = <0xe108000 0x3100>, /* switch */
136 + <0xe10b100 0xd8>, /* mdio */
137 + <0xe10b1d8 0x130>; /* mii */
138 + dsa,member = <0 0>;
141 + #address-cells = <1>;
147 + phy-mode = "rgmii";
148 + phy-handle = <&phy0>;
154 + phy-mode = "rgmii";
155 + phy-handle = <&phy1>;
161 + phy-mode = "internal";
162 + phy-handle = <&phy11>;
168 + phy-mode = "internal";
169 + phy-handle = <&phy13>;
175 + phy-mode = "rgmii";
176 + phy-handle = <&phy5>;
181 + phy-mode = "internal";
182 + ethernet = <ð0>;
192 + #address-cells = <1>;
194 + compatible = "lantiq,xrx200-mdio";
196 + phy0: ethernet-phy@0 {
199 + phy1: ethernet-phy@1 {
202 + phy5: ethernet-phy@5 {
205 + phy11: ethernet-phy@11 {
208 + phy13: ethernet-phy@13 {
214 + #address-cells = <1>;
216 + compatible = "lantiq,xrx200-gphy-fw", "lantiq,gphy-fw";
217 + lantiq,rcu = <&rcu0>;
222 + resets = <&reset0 31 30>;
223 + reset-names = "gphy";
229 + resets = <&reset0 29 28>;
230 + reset-names = "gphy";
234 --- a/Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
237 -Lantiq GSWIP Ethernet switches
238 -==================================
240 -Required properties for GSWIP core:
242 -- compatible : "lantiq,xrx200-gswip" for the embedded GSWIP in the
244 - "lantiq,xrx300-gswip" for the embedded GSWIP in the
246 - "lantiq,xrx330-gswip" for the embedded GSWIP in the
248 -- reg : memory range of the GSWIP core registers
249 - : memory range of the GSWIP MDIO registers
250 - : memory range of the GSWIP MII registers
252 -See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of
253 -additional required and optional properties.
256 -Required properties for MDIO bus:
257 -- compatible : "lantiq,xrx200-mdio" for the MDIO bus inside the GSWIP
258 - core of the xRX200 SoC and the PHYs connected to it.
260 -See Documentation/devicetree/bindings/net/mdio.txt for a list of additional
261 -required and optional properties.
264 -Required properties for GPHY firmware loading:
265 -- compatible : "lantiq,xrx200-gphy-fw", "lantiq,gphy-fw"
266 - "lantiq,xrx300-gphy-fw", "lantiq,gphy-fw"
267 - "lantiq,xrx330-gphy-fw", "lantiq,gphy-fw"
268 - for the loading of the firmware into the embedded
269 - GPHY core of the SoC.
270 -- lantiq,rcu : reference to the rcu syscon
272 -The GPHY firmware loader has a list of GPHY entries, one for each
275 -- reg : Offset of the GPHY firmware register in the RCU
277 -- resets : list of resets of the embedded GPHY
278 -- reset-names : list of names of the resets
282 -Ethernet switch on the VRX200 SoC:
285 - #address-cells = <1>;
287 - compatible = "lantiq,xrx200-gswip";
288 - reg = < 0xe108000 0x3100 /* switch */
289 - 0xe10b100 0xd8 /* mdio */
290 - 0xe10b1d8 0x130 /* mii */
292 - dsa,member = <0 0>;
295 - #address-cells = <1>;
301 - phy-mode = "rgmii";
302 - phy-handle = <&phy0>;
308 - phy-mode = "rgmii";
309 - phy-handle = <&phy1>;
315 - phy-mode = "internal";
316 - phy-handle = <&phy11>;
322 - phy-mode = "internal";
323 - phy-handle = <&phy13>;
329 - phy-mode = "rgmii";
330 - phy-handle = <&phy5>;
335 - ethernet = <ð0>;
340 - #address-cells = <1>;
342 - compatible = "lantiq,xrx200-mdio";
345 - phy0: ethernet-phy@0 {
348 - phy1: ethernet-phy@1 {
351 - phy5: ethernet-phy@5 {
354 - phy11: ethernet-phy@11 {
357 - phy13: ethernet-phy@13 {
363 - compatible = "lantiq,xrx200-gphy-fw", "lantiq,gphy-fw";
364 - lantiq,rcu = <&rcu0>;
365 - #address-cells = <1>;
371 - resets = <&reset0 31 30>;
372 - reset-names = "gphy";
378 - resets = <&reset0 29 28>;
379 - reset-names = "gphy";
385 @@ -11863,6 +11863,7 @@ LANTIQ / INTEL Ethernet drivers
386 M: Hauke Mehrtens <hauke@hauke-m.de>
387 L: netdev@vger.kernel.org
389 +F: Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
390 F: drivers/net/dsa/lantiq_gswip.c
391 F: drivers/net/dsa/lantiq_pce.h
392 F: drivers/net/ethernet/lantiq_xrx200.c