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