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/brcm,b53.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Broadcom BCM53xx Ethernet switches 8 9maintainers: 10 - Florian Fainelli <f.fainelli@gmail.com> 11 12description: 13 Broadcom BCM53xx Ethernet switches 14 15properties: 16 compatible: 17 oneOf: 18 - const: brcm,bcm5325 19 - const: brcm,bcm53101 20 - const: brcm,bcm53115 21 - const: brcm,bcm53125 22 - const: brcm,bcm53128 23 - const: brcm,bcm53134 24 - const: brcm,bcm5365 25 - const: brcm,bcm5395 26 - const: brcm,bcm5389 27 - const: brcm,bcm5397 28 - const: brcm,bcm5398 29 - items: 30 - const: brcm,bcm11360-srab 31 - const: brcm,cygnus-srab 32 - items: 33 - enum: 34 - brcm,bcm53010-srab 35 - brcm,bcm53011-srab 36 - brcm,bcm53012-srab 37 - brcm,bcm53018-srab 38 - brcm,bcm53019-srab 39 - const: brcm,bcm5301x-srab 40 - items: 41 - enum: 42 - brcm,bcm11404-srab 43 - brcm,bcm11407-srab 44 - brcm,bcm11409-srab 45 - brcm,bcm58310-srab 46 - brcm,bcm58311-srab 47 - brcm,bcm58313-srab 48 - const: brcm,omega-srab 49 - items: 50 - enum: 51 - brcm,bcm58522-srab 52 - brcm,bcm58523-srab 53 - brcm,bcm58525-srab 54 - brcm,bcm58622-srab 55 - brcm,bcm58623-srab 56 - brcm,bcm58625-srab 57 - brcm,bcm88312-srab 58 - const: brcm,nsp-srab 59 - items: 60 - enum: 61 - brcm,bcm3384-switch 62 - brcm,bcm6318-switch 63 - brcm,bcm6328-switch 64 - brcm,bcm6362-switch 65 - brcm,bcm6368-switch 66 - brcm,bcm63268-switch 67 - const: brcm,bcm63xx-switch 68 69 brcm,gpio-ctrl: 70 description: 71 A phandle to the syscon node of the bcm63xx gpio controller 72 which contains phy control registers 73 $ref: /schemas/types.yaml#/definitions/phandle 74 75required: 76 - compatible 77 - reg 78 79allOf: 80 - $ref: dsa.yaml#/$defs/ethernet-ports 81 - if: 82 properties: 83 compatible: 84 contains: 85 enum: 86 - brcm,bcm5325 87 - brcm,bcm53101 88 - brcm,bcm53115 89 - brcm,bcm53125 90 - brcm,bcm53128 91 - brcm,bcm5365 92 - brcm,bcm5395 93 - brcm,bcm5397 94 - brcm,bcm5398 95 then: 96 $ref: /schemas/spi/spi-peripheral-props.yaml 97 98 # BCM585xx/586xx/88312 SoCs 99 - if: 100 properties: 101 compatible: 102 contains: 103 enum: 104 - brcm,bcm58522-srab 105 - brcm,bcm58523-srab 106 - brcm,bcm58525-srab 107 - brcm,bcm58622-srab 108 - brcm,bcm58623-srab 109 - brcm,bcm58625-srab 110 - brcm,bcm88312-srab 111 then: 112 properties: 113 reg: 114 minItems: 3 115 maxItems: 3 116 reg-names: 117 items: 118 - const: srab 119 - const: mux_config 120 - const: sgmii_config 121 interrupts: 122 minItems: 13 123 maxItems: 13 124 interrupt-names: 125 items: 126 - const: link_state_p0 127 - const: link_state_p1 128 - const: link_state_p2 129 - const: link_state_p3 130 - const: link_state_p4 131 - const: link_state_p5 132 - const: link_state_p7 133 - const: link_state_p8 134 - const: phy 135 - const: ts 136 - const: imp_sleep_timer_p5 137 - const: imp_sleep_timer_p7 138 - const: imp_sleep_timer_p8 139 required: 140 - interrupts 141 else: 142 properties: 143 reg: 144 maxItems: 1 145 146unevaluatedProperties: false 147 148examples: 149 - | 150 mdio { 151 #address-cells = <1>; 152 #size-cells = <0>; 153 154 ethernet-switch@1e { 155 compatible = "brcm,bcm53125"; 156 reg = <30>; 157 158 ethernet-ports { 159 #address-cells = <1>; 160 #size-cells = <0>; 161 162 port@0 { 163 reg = <0>; 164 label = "lan1"; 165 }; 166 167 port@1 { 168 reg = <1>; 169 label = "lan2"; 170 }; 171 172 port@5 { 173 reg = <5>; 174 label = "cable-modem"; 175 phy-mode = "rgmii-txid"; 176 fixed-link { 177 speed = <1000>; 178 full-duplex; 179 }; 180 }; 181 182 port@8 { 183 reg = <8>; 184 phy-mode = "rgmii-txid"; 185 ethernet = <ð0>; 186 fixed-link { 187 speed = <1000>; 188 full-duplex; 189 }; 190 }; 191 }; 192 }; 193 }; 194 - | 195 #include <dt-bindings/interrupt-controller/arm-gic.h> 196 #include <dt-bindings/interrupt-controller/irq.h> 197 198 axi { 199 #address-cells = <1>; 200 #size-cells = <1>; 201 202 switch@36000 { 203 compatible = "brcm,bcm58623-srab", "brcm,nsp-srab"; 204 reg = <0x36000 0x1000>, 205 <0x3f308 0x8>, 206 <0x3f410 0xc>; 207 reg-names = "srab", "mux_config", "sgmii_config"; 208 interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, 209 <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, 210 <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, 211 <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, 212 <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, 213 <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, 214 <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, 215 <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, 216 <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, 217 <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, 218 <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, 219 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, 220 <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>; 221 interrupt-names = "link_state_p0", 222 "link_state_p1", 223 "link_state_p2", 224 "link_state_p3", 225 "link_state_p4", 226 "link_state_p5", 227 "link_state_p7", 228 "link_state_p8", 229 "phy", 230 "ts", 231 "imp_sleep_timer_p5", 232 "imp_sleep_timer_p7", 233 "imp_sleep_timer_p8"; 234 235 ethernet-ports { 236 #address-cells = <1>; 237 #size-cells = <0>; 238 239 port@0 { 240 label = "port0"; 241 reg = <0>; 242 }; 243 244 port@1 { 245 label = "port1"; 246 reg = <1>; 247 }; 248 249 port@2 { 250 label = "port2"; 251 reg = <2>; 252 }; 253 254 port@3 { 255 label = "port3"; 256 reg = <3>; 257 }; 258 259 port@4 { 260 label = "port4"; 261 reg = <4>; 262 }; 263 264 port@8 { 265 ethernet = <&amac2>; 266 reg = <8>; 267 phy-mode = "internal"; 268 269 fixed-link { 270 speed = <1000>; 271 full-duplex; 272 }; 273 }; 274 }; 275 }; 276 }; 277