1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Lantiq GSWIP Ethernet switches 8 9allOf: 10 - $ref: dsa.yaml#/$defs/ethernet-ports 11 12maintainers: 13 - Hauke Mehrtens <hauke@hauke-m.de> 14 15properties: 16 compatible: 17 enum: 18 - lantiq,xrx200-gswip 19 - lantiq,xrx300-gswip 20 - lantiq,xrx330-gswip 21 22 reg: 23 minItems: 3 24 maxItems: 3 25 26 reg-names: 27 items: 28 - const: switch 29 - const: mdio 30 - const: mii 31 32 mdio: 33 $ref: /schemas/net/mdio.yaml# 34 unevaluatedProperties: false 35 36 properties: 37 compatible: 38 const: lantiq,xrx200-mdio 39 40 required: 41 - compatible 42 43 gphy-fw: 44 type: object 45 properties: 46 '#address-cells': 47 const: 1 48 49 '#size-cells': 50 const: 0 51 52 compatible: 53 items: 54 - enum: 55 - lantiq,xrx200-gphy-fw 56 - lantiq,xrx300-gphy-fw 57 - lantiq,xrx330-gphy-fw 58 - const: lantiq,gphy-fw 59 60 lantiq,rcu: 61 $ref: /schemas/types.yaml#/definitions/phandle 62 description: phandle to the RCU syscon 63 64 patternProperties: 65 "^gphy@[0-9a-f]{1,2}$": 66 type: object 67 68 additionalProperties: false 69 70 properties: 71 reg: 72 minimum: 0 73 maximum: 255 74 description: 75 Offset of the GPHY firmware register in the RCU register range 76 77 resets: 78 items: 79 - description: GPHY reset line 80 81 reset-names: 82 items: 83 - const: gphy 84 85 required: 86 - reg 87 88 required: 89 - compatible 90 - lantiq,rcu 91 92 additionalProperties: false 93 94required: 95 - compatible 96 - reg 97 98unevaluatedProperties: false 99 100examples: 101 - | 102 switch@e108000 { 103 compatible = "lantiq,xrx200-gswip"; 104 reg = <0xe108000 0x3100>, /* switch */ 105 <0xe10b100 0xd8>, /* mdio */ 106 <0xe10b1d8 0x130>; /* mii */ 107 dsa,member = <0 0>; 108 109 ports { 110 #address-cells = <1>; 111 #size-cells = <0>; 112 113 port@0 { 114 reg = <0>; 115 label = "lan3"; 116 phy-mode = "rgmii"; 117 phy-handle = <&phy0>; 118 }; 119 120 port@1 { 121 reg = <1>; 122 label = "lan4"; 123 phy-mode = "rgmii"; 124 phy-handle = <&phy1>; 125 }; 126 127 port@2 { 128 reg = <2>; 129 label = "lan2"; 130 phy-mode = "internal"; 131 phy-handle = <&phy11>; 132 }; 133 134 port@4 { 135 reg = <4>; 136 label = "lan1"; 137 phy-mode = "internal"; 138 phy-handle = <&phy13>; 139 }; 140 141 port@5 { 142 reg = <5>; 143 label = "wan"; 144 phy-mode = "rgmii"; 145 phy-handle = <&phy5>; 146 }; 147 148 port@6 { 149 reg = <0x6>; 150 phy-mode = "internal"; 151 ethernet = <ð0>; 152 153 fixed-link { 154 speed = <1000>; 155 full-duplex; 156 }; 157 }; 158 }; 159 160 mdio { 161 #address-cells = <1>; 162 #size-cells = <0>; 163 compatible = "lantiq,xrx200-mdio"; 164 165 phy0: ethernet-phy@0 { 166 reg = <0x0>; 167 }; 168 phy1: ethernet-phy@1 { 169 reg = <0x1>; 170 }; 171 phy5: ethernet-phy@5 { 172 reg = <0x5>; 173 }; 174 phy11: ethernet-phy@11 { 175 reg = <0x11>; 176 }; 177 phy13: ethernet-phy@13 { 178 reg = <0x13>; 179 }; 180 }; 181 182 gphy-fw { 183 #address-cells = <1>; 184 #size-cells = <0>; 185 compatible = "lantiq,xrx200-gphy-fw", "lantiq,gphy-fw"; 186 lantiq,rcu = <&rcu0>; 187 188 gphy@20 { 189 reg = <0x20>; 190 191 resets = <&reset0 31 30>; 192 reset-names = "gphy"; 193 }; 194 195 gphy@68 { 196 reg = <0x68>; 197 198 resets = <&reset0 29 28>; 199 reset-names = "gphy"; 200 }; 201 }; 202 }; 203