Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: dsa: b53: Add YAML bindings

Convert the b53 DSA device tree bindings to YAML in order to allow
for automatic checking and such.

Reviewed-by: Rob Herring <robh@kernel.org>
Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>

authored by

Kurt Kanzenbach and committed by
Florian Fainelli
ab7eff24 51e40c25

+250 -150
-149
Documentation/devicetree/bindings/net/dsa/b53.txt
··· 1 - Broadcom BCM53xx Ethernet switches 2 - ================================== 3 - 4 - Required properties: 5 - 6 - - compatible: For external switch chips, compatible string must be exactly one 7 - of: "brcm,bcm5325" 8 - "brcm,bcm53115" 9 - "brcm,bcm53125" 10 - "brcm,bcm53128" 11 - "brcm,bcm5365" 12 - "brcm,bcm5395" 13 - "brcm,bcm5389" 14 - "brcm,bcm5397" 15 - "brcm,bcm5398" 16 - 17 - For the BCM11360 SoC, must be: 18 - "brcm,bcm11360-srab" and the mandatory "brcm,cygnus-srab" string 19 - 20 - For the BCM5310x SoCs with an integrated switch, must be one of: 21 - "brcm,bcm53010-srab" 22 - "brcm,bcm53011-srab" 23 - "brcm,bcm53012-srab" 24 - "brcm,bcm53018-srab" 25 - "brcm,bcm53019-srab" and the mandatory "brcm,bcm5301x-srab" string 26 - 27 - For the BCM5831X/BCM1140x SoCs with an integrated switch, must be one of: 28 - "brcm,bcm11404-srab" 29 - "brcm,bcm11407-srab" 30 - "brcm,bcm11409-srab" 31 - "brcm,bcm58310-srab" 32 - "brcm,bcm58311-srab" 33 - "brcm,bcm58313-srab" and the mandatory "brcm,omega-srab" string 34 - 35 - For the BCM585xx/586XX/88312 SoCs with an integrated switch, must be one of: 36 - "brcm,bcm58522-srab" 37 - "brcm,bcm58523-srab" 38 - "brcm,bcm58525-srab" 39 - "brcm,bcm58622-srab" 40 - "brcm,bcm58623-srab" 41 - "brcm,bcm58625-srab" 42 - "brcm,bcm88312-srab" and the mandatory "brcm,nsp-srab string 43 - 44 - For the BCM63xx/33xx SoCs with an integrated switch, must be one of: 45 - "brcm,bcm3384-switch" 46 - "brcm,bcm6328-switch" 47 - "brcm,bcm6368-switch" and the mandatory "brcm,bcm63xx-switch" 48 - 49 - Required properties for BCM585xx/586xx/88312 SoCs: 50 - 51 - - reg: a total of 3 register base addresses, the first one must be the 52 - Switch Register Access block base, the second is the port 5/4 mux 53 - configuration register and the third one is the SGMII configuration 54 - and status register base address. 55 - 56 - - interrupts: a total of 13 interrupts must be specified, in the following 57 - order: port 0-5, 7-8 link status change, then the integrated PHY interrupt, 58 - then the timestamping interrupt and the sleep timer interrupts for ports 59 - 5,7,8. 60 - 61 - Optional properties for BCM585xx/586xx/88312 SoCs: 62 - 63 - - reg-names: a total of 3 names matching the 3 base register address, must 64 - be in the following order: 65 - "srab" 66 - "mux_config" 67 - "sgmii_config" 68 - 69 - - interrupt-names: a total of 13 names matching the 13 interrupts specified 70 - must be in the following order: 71 - "link_state_p0" 72 - "link_state_p1" 73 - "link_state_p2" 74 - "link_state_p3" 75 - "link_state_p4" 76 - "link_state_p5" 77 - "link_state_p7" 78 - "link_state_p8" 79 - "phy" 80 - "ts" 81 - "imp_sleep_timer_p5" 82 - "imp_sleep_timer_p7" 83 - "imp_sleep_timer_p8" 84 - 85 - See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional 86 - required and optional properties. 87 - 88 - Examples: 89 - 90 - Ethernet switch connected via MDIO to the host, CPU port wired to eth0: 91 - 92 - eth0: ethernet@10001000 { 93 - compatible = "brcm,unimac"; 94 - reg = <0x10001000 0x1000>; 95 - 96 - fixed-link { 97 - speed = <1000>; 98 - full-duplex; 99 - }; 100 - }; 101 - 102 - mdio0: mdio@10000000 { 103 - compatible = "brcm,unimac-mdio"; 104 - #address-cells = <1>; 105 - #size-cells = <0>; 106 - 107 - switch0: ethernet-switch@1e { 108 - compatible = "brcm,bcm53125"; 109 - reg = <30>; 110 - #address-cells = <1>; 111 - #size-cells = <0>; 112 - 113 - ports { 114 - #address-cells = <1>; 115 - #size-cells = <0>; 116 - 117 - port0@0 { 118 - reg = <0>; 119 - label = "lan1"; 120 - }; 121 - 122 - port1@1 { 123 - reg = <1>; 124 - label = "lan2"; 125 - }; 126 - 127 - port5@5 { 128 - reg = <5>; 129 - label = "cable-modem"; 130 - fixed-link { 131 - speed = <1000>; 132 - full-duplex; 133 - }; 134 - phy-mode = "rgmii-txid"; 135 - }; 136 - 137 - port8@8 { 138 - reg = <8>; 139 - label = "cpu"; 140 - fixed-link { 141 - speed = <1000>; 142 - full-duplex; 143 - }; 144 - phy-mode = "rgmii-txid"; 145 - ethernet = <&eth0>; 146 - }; 147 - }; 148 - }; 149 - };
+249
Documentation/devicetree/bindings/net/dsa/brcm,b53.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/dsa/brcm,b53.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Broadcom BCM53xx Ethernet switches 8 + 9 + allOf: 10 + - $ref: dsa.yaml# 11 + 12 + maintainers: 13 + - Florian Fainelli <f.fainelli@gmail.com> 14 + 15 + description: 16 + Broadcom BCM53xx Ethernet switches 17 + 18 + properties: 19 + compatible: 20 + oneOf: 21 + - const: brcm,bcm5325 22 + - const: brcm,bcm53115 23 + - const: brcm,bcm53125 24 + - const: brcm,bcm53128 25 + - const: brcm,bcm5365 26 + - const: brcm,bcm5395 27 + - const: brcm,bcm5389 28 + - const: brcm,bcm5397 29 + - const: brcm,bcm5398 30 + - items: 31 + - const: brcm,bcm11360-srab 32 + - const: brcm,cygnus-srab 33 + - items: 34 + - enum: 35 + - brcm,bcm53010-srab 36 + - brcm,bcm53011-srab 37 + - brcm,bcm53012-srab 38 + - brcm,bcm53018-srab 39 + - brcm,bcm53019-srab 40 + - const: brcm,bcm5301x-srab 41 + - items: 42 + - enum: 43 + - brcm,bcm11404-srab 44 + - brcm,bcm11407-srab 45 + - brcm,bcm11409-srab 46 + - brcm,bcm58310-srab 47 + - brcm,bcm58311-srab 48 + - brcm,bcm58313-srab 49 + - const: brcm,omega-srab 50 + - items: 51 + - enum: 52 + - brcm,bcm58522-srab 53 + - brcm,bcm58523-srab 54 + - brcm,bcm58525-srab 55 + - brcm,bcm58622-srab 56 + - brcm,bcm58623-srab 57 + - brcm,bcm58625-srab 58 + - brcm,bcm88312-srab 59 + - const: brcm,nsp-srab 60 + - items: 61 + - enum: 62 + - brcm,bcm3384-switch 63 + - brcm,bcm6328-switch 64 + - brcm,bcm6368-switch 65 + - const: brcm,bcm63xx-switch 66 + 67 + required: 68 + - compatible 69 + - reg 70 + 71 + # BCM585xx/586xx/88312 SoCs 72 + if: 73 + properties: 74 + compatible: 75 + contains: 76 + enum: 77 + - brcm,bcm58522-srab 78 + - brcm,bcm58523-srab 79 + - brcm,bcm58525-srab 80 + - brcm,bcm58622-srab 81 + - brcm,bcm58623-srab 82 + - brcm,bcm58625-srab 83 + - brcm,bcm88312-srab 84 + then: 85 + properties: 86 + reg: 87 + minItems: 3 88 + maxItems: 3 89 + reg-names: 90 + items: 91 + - const: srab 92 + - const: mux_config 93 + - const: sgmii_config 94 + interrupts: 95 + minItems: 13 96 + maxItems: 13 97 + interrupt-names: 98 + items: 99 + - const: link_state_p0 100 + - const: link_state_p1 101 + - const: link_state_p2 102 + - const: link_state_p3 103 + - const: link_state_p4 104 + - const: link_state_p5 105 + - const: link_state_p7 106 + - const: link_state_p8 107 + - const: phy 108 + - const: ts 109 + - const: imp_sleep_timer_p5 110 + - const: imp_sleep_timer_p7 111 + - const: imp_sleep_timer_p8 112 + required: 113 + - interrupts 114 + else: 115 + properties: 116 + reg: 117 + maxItems: 1 118 + 119 + unevaluatedProperties: false 120 + 121 + examples: 122 + - | 123 + mdio { 124 + #address-cells = <1>; 125 + #size-cells = <0>; 126 + 127 + ethernet-switch@1e { 128 + compatible = "brcm,bcm53125"; 129 + reg = <30>; 130 + 131 + ethernet-ports { 132 + #address-cells = <1>; 133 + #size-cells = <0>; 134 + 135 + port@0 { 136 + reg = <0>; 137 + label = "lan1"; 138 + }; 139 + 140 + port@1 { 141 + reg = <1>; 142 + label = "lan2"; 143 + }; 144 + 145 + port@5 { 146 + reg = <5>; 147 + label = "cable-modem"; 148 + phy-mode = "rgmii-txid"; 149 + fixed-link { 150 + speed = <1000>; 151 + full-duplex; 152 + }; 153 + }; 154 + 155 + port@8 { 156 + reg = <8>; 157 + label = "cpu"; 158 + phy-mode = "rgmii-txid"; 159 + ethernet = <&eth0>; 160 + fixed-link { 161 + speed = <1000>; 162 + full-duplex; 163 + }; 164 + }; 165 + }; 166 + }; 167 + }; 168 + - | 169 + #include <dt-bindings/interrupt-controller/arm-gic.h> 170 + #include <dt-bindings/interrupt-controller/irq.h> 171 + 172 + axi { 173 + #address-cells = <1>; 174 + #size-cells = <1>; 175 + 176 + switch@36000 { 177 + compatible = "brcm,bcm58623-srab", "brcm,nsp-srab"; 178 + reg = <0x36000 0x1000>, 179 + <0x3f308 0x8>, 180 + <0x3f410 0xc>; 181 + reg-names = "srab", "mux_config", "sgmii_config"; 182 + interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, 183 + <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, 184 + <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, 185 + <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, 186 + <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, 187 + <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, 188 + <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, 189 + <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, 190 + <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, 191 + <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, 192 + <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, 193 + <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, 194 + <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>; 195 + interrupt-names = "link_state_p0", 196 + "link_state_p1", 197 + "link_state_p2", 198 + "link_state_p3", 199 + "link_state_p4", 200 + "link_state_p5", 201 + "link_state_p7", 202 + "link_state_p8", 203 + "phy", 204 + "ts", 205 + "imp_sleep_timer_p5", 206 + "imp_sleep_timer_p7", 207 + "imp_sleep_timer_p8"; 208 + 209 + ethernet-ports { 210 + #address-cells = <1>; 211 + #size-cells = <0>; 212 + 213 + port@0 { 214 + label = "port0"; 215 + reg = <0>; 216 + }; 217 + 218 + port@1 { 219 + label = "port1"; 220 + reg = <1>; 221 + }; 222 + 223 + port@2 { 224 + label = "port2"; 225 + reg = <2>; 226 + }; 227 + 228 + port@3 { 229 + label = "port3"; 230 + reg = <3>; 231 + }; 232 + 233 + port@4 { 234 + label = "port4"; 235 + reg = <4>; 236 + }; 237 + 238 + port@8 { 239 + ethernet = <&amac2>; 240 + label = "cpu"; 241 + reg = <8>; 242 + fixed-link { 243 + speed = <1000>; 244 + full-duplex; 245 + }; 246 + }; 247 + }; 248 + }; 249 + };
+1 -1
MAINTAINERS
··· 3380 3380 L: netdev@vger.kernel.org 3381 3381 L: openwrt-devel@lists.openwrt.org (subscribers-only) 3382 3382 S: Supported 3383 - F: Documentation/devicetree/bindings/net/dsa/b53.txt 3383 + F: Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml 3384 3384 F: drivers/net/dsa/b53/* 3385 3385 F: include/linux/platform_data/b53.h 3386 3386