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

dt-bindings: net: mscc,vsc7514-switch: add dsa binding for the vsc7512

The VSC7511, VSC7512, VSC7513 and VSC7514 all have the ability to be
controlled either internally by a memory-mapped CPU, or externally via
interfaces like SPI and PCIe. The internal CPU of the VSC7511 and 7512
don't have the resources to run Linux, so must be controlled via these
external interfaces in a DSA configuration.

Add mscc,vsc7512-switch compatible string to indicate that the chips are
being controlled externally in a DSA configuration.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Colin Foster and committed by
Jakub Kicinski
dd43f5e7 fde0b6ce

+90 -23
+90 -23
Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
··· 18 18 packets using CPU. Additionally, PTP is supported as well as FDMA for faster 19 19 packet extraction/injection. 20 20 21 - $ref: ethernet-switch.yaml# 21 + allOf: 22 + - if: 23 + properties: 24 + compatible: 25 + const: mscc,vsc7514-switch 26 + then: 27 + $ref: ethernet-switch.yaml# 28 + required: 29 + - interrupts 30 + - interrupt-names 31 + properties: 32 + reg: 33 + minItems: 21 34 + reg-names: 35 + minItems: 21 36 + ethernet-ports: 37 + patternProperties: 38 + "^port@[0-9a-f]+$": 39 + $ref: ethernet-switch-port.yaml# 40 + unevaluatedProperties: false 41 + 42 + - if: 43 + properties: 44 + compatible: 45 + const: mscc,vsc7512-switch 46 + then: 47 + $ref: /schemas/net/dsa/dsa.yaml# 48 + properties: 49 + reg: 50 + maxItems: 20 51 + reg-names: 52 + maxItems: 20 53 + ethernet-ports: 54 + patternProperties: 55 + "^port@[0-9a-f]+$": 56 + $ref: /schemas/net/dsa/dsa-port.yaml# 57 + unevaluatedProperties: false 22 58 23 59 properties: 24 60 compatible: 25 - const: mscc,vsc7514-switch 61 + enum: 62 + - mscc,vsc7512-switch 63 + - mscc,vsc7514-switch 26 64 27 65 reg: 66 + minItems: 20 28 67 items: 29 68 - description: system target 30 69 - description: rewriter target ··· 88 49 - description: fdma target 89 50 90 51 reg-names: 52 + minItems: 20 91 53 items: 92 54 - const: sys 93 55 - const: rew ··· 126 86 - const: xtr 127 87 - const: fdma 128 88 129 - ethernet-ports: 130 - type: object 131 - 132 - properties: 133 - '#address-cells': 134 - const: 1 135 - '#size-cells': 136 - const: 0 137 - 138 - additionalProperties: false 139 - 140 - patternProperties: 141 - "^port@[0-9a-f]+$": 142 - 143 - $ref: ethernet-switch-port.yaml# 144 - 145 - unevaluatedProperties: false 146 - 147 89 required: 148 90 - compatible 149 91 - reg 150 92 - reg-names 151 - - interrupts 152 - - interrupt-names 153 93 - ethernet-ports 154 94 155 - additionalProperties: false 95 + unevaluatedProperties: false 156 96 157 97 examples: 98 + # VSC7514 (Switchdev) 158 99 - | 159 100 switch@1010000 { 160 101 compatible = "mscc,vsc7514-switch"; ··· 183 162 }; 184 163 }; 185 164 }; 165 + # VSC7512 (DSA) 166 + - | 167 + ethernet-switch@1{ 168 + compatible = "mscc,vsc7512-switch"; 169 + reg = <0x71010000 0x10000>, 170 + <0x71030000 0x10000>, 171 + <0x71080000 0x100>, 172 + <0x710e0000 0x10000>, 173 + <0x711e0000 0x100>, 174 + <0x711f0000 0x100>, 175 + <0x71200000 0x100>, 176 + <0x71210000 0x100>, 177 + <0x71220000 0x100>, 178 + <0x71230000 0x100>, 179 + <0x71240000 0x100>, 180 + <0x71250000 0x100>, 181 + <0x71260000 0x100>, 182 + <0x71270000 0x100>, 183 + <0x71280000 0x100>, 184 + <0x71800000 0x80000>, 185 + <0x71880000 0x10000>, 186 + <0x71040000 0x10000>, 187 + <0x71050000 0x10000>, 188 + <0x71060000 0x10000>; 189 + reg-names = "sys", "rew", "qs", "ptp", "port0", "port1", 190 + "port2", "port3", "port4", "port5", "port6", 191 + "port7", "port8", "port9", "port10", "qsys", 192 + "ana", "s0", "s1", "s2"; 193 + 194 + ethernet-ports { 195 + #address-cells = <1>; 196 + #size-cells = <0>; 197 + 198 + port@0 { 199 + reg = <0>; 200 + ethernet = <&mac_sw>; 201 + phy-handle = <&phy0>; 202 + phy-mode = "internal"; 203 + }; 204 + port@1 { 205 + reg = <1>; 206 + phy-handle = <&phy1>; 207 + phy-mode = "internal"; 208 + }; 209 + }; 210 + }; 186 211 187 212 ...