1 # SPDX-License-Identifier: (GPL-2.0-only OR BS 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 %YAML 1.2 2 %YAML 1.2 3 --- 3 --- 4 $id: http://devicetree.org/schemas/net/dsa/vit 4 $id: http://devicetree.org/schemas/net/dsa/vitesse,vsc73xx.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: Vitesse VSC73xx DSA Switches 7 title: Vitesse VSC73xx DSA Switches 8 8 9 maintainers: 9 maintainers: 10 - Linus Walleij <linus.walleij@linaro.org> 10 - Linus Walleij <linus.walleij@linaro.org> 11 11 12 description: 12 description: 13 The Vitesse DSA Switches were produced in th 13 The Vitesse DSA Switches were produced in the early-to-mid 2000s. 14 14 15 The Vitesse company has been acquired by Mic 15 The Vitesse company has been acquired by Microsemi and Microsemi has 16 been acquired Microchip but the new owner re 16 been acquired Microchip but the new owner retains this vendor branding. 17 17 18 The currently supported switch chips are 18 The currently supported switch chips are 19 Vitesse VSC7385 SparX-G5 5+1-port Integrated 19 Vitesse VSC7385 SparX-G5 5+1-port Integrated Gigabit Ethernet Switch 20 Vitesse VSC7388 SparX-G8 8-port Integrated G 20 Vitesse VSC7388 SparX-G8 8-port Integrated Gigabit Ethernet Switch 21 Vitesse VSC7395 SparX-G5e 5+1-port Integrate 21 Vitesse VSC7395 SparX-G5e 5+1-port Integrated Gigabit Ethernet Switch 22 Vitesse VSC7398 SparX-G8e 8-port Integrated 22 Vitesse VSC7398 SparX-G8e 8-port Integrated Gigabit Ethernet Switch 23 23 24 This switch can use one of two different man 24 This switch can use one of two different management interfaces. 25 25 26 If SPI interface is used, the device tree no 26 If SPI interface is used, the device tree node is an SPI device so it must 27 reside inside a SPI bus device tree node, se 27 reside inside a SPI bus device tree node, see spi/spi-bus.txt 28 28 29 When the chip is connected to a parallel mem 29 When the chip is connected to a parallel memory bus and work in memory-mapped 30 I/O mode, a platform device is used to repre 30 I/O mode, a platform device is used to represent the vsc73xx. In this case it 31 must reside inside a platform bus device tre 31 must reside inside a platform bus device tree node. 32 32 33 properties: 33 properties: 34 compatible: 34 compatible: 35 enum: 35 enum: 36 - vitesse,vsc7385 36 - vitesse,vsc7385 37 - vitesse,vsc7388 37 - vitesse,vsc7388 38 - vitesse,vsc7395 38 - vitesse,vsc7395 39 - vitesse,vsc7398 39 - vitesse,vsc7398 40 40 41 reg: 41 reg: 42 maxItems: 1 42 maxItems: 1 43 43 44 gpio-controller: true 44 gpio-controller: true 45 "#gpio-cells": 45 "#gpio-cells": 46 const: 2 46 const: 2 47 47 48 reset-gpios: 48 reset-gpios: 49 description: GPIO to be used to reset the 49 description: GPIO to be used to reset the whole device 50 maxItems: 1 50 maxItems: 1 51 51 52 allOf: 52 allOf: 53 - $ref: dsa.yaml#/$defs/ethernet-ports 53 - $ref: dsa.yaml#/$defs/ethernet-ports 54 54 55 patternProperties: 55 patternProperties: 56 "^(ethernet-)?ports$": 56 "^(ethernet-)?ports$": 57 additionalProperties: true 57 additionalProperties: true 58 patternProperties: 58 patternProperties: 59 "^(ethernet-)?port@6$": 59 "^(ethernet-)?port@6$": 60 allOf: 60 allOf: 61 - if: 61 - if: 62 properties: 62 properties: 63 phy-mode: 63 phy-mode: 64 contains: 64 contains: 65 enum: 65 enum: 66 - rgmii 66 - rgmii 67 then: 67 then: 68 properties: 68 properties: 69 rx-internal-delay-ps: 69 rx-internal-delay-ps: 70 $ref: "#/$defs/internal-dela 70 $ref: "#/$defs/internal-delay-ps" 71 tx-internal-delay-ps: 71 tx-internal-delay-ps: 72 $ref: "#/$defs/internal-dela 72 $ref: "#/$defs/internal-delay-ps" 73 73 74 # This checks if reg is a chipselect so the de 74 # This checks if reg is a chipselect so the device is on an SPI 75 # bus, the if-clause will fail if reg is a tup 75 # bus, the if-clause will fail if reg is a tuple such as for a 76 # platform device. 76 # platform device. 77 if: 77 if: 78 properties: 78 properties: 79 reg: 79 reg: 80 minimum: 0 80 minimum: 0 81 maximum: 256 81 maximum: 256 82 then: 82 then: 83 $ref: /schemas/spi/spi-peripheral-props.yaml 83 $ref: /schemas/spi/spi-peripheral-props.yaml# 84 84 85 required: 85 required: 86 - compatible 86 - compatible 87 - reg 87 - reg 88 88 89 $defs: 89 $defs: 90 internal-delay-ps: 90 internal-delay-ps: 91 description: 91 description: 92 Disable tunable delay lines using 0 ps, 92 Disable tunable delay lines using 0 ps, or enable them and select 93 the phase between 1400 ps and 2000 ps in 93 the phase between 1400 ps and 2000 ps in increments of 300 ps. 94 default: 2000 94 default: 2000 95 enum: 95 enum: 96 [0, 1400, 1700, 2000] 96 [0, 1400, 1700, 2000] 97 97 98 unevaluatedProperties: false 98 unevaluatedProperties: false 99 99 100 examples: 100 examples: 101 - | 101 - | 102 #include <dt-bindings/gpio/gpio.h> 102 #include <dt-bindings/gpio/gpio.h> 103 103 104 spi { 104 spi { 105 #address-cells = <1>; 105 #address-cells = <1>; 106 #size-cells = <0>; 106 #size-cells = <0>; 107 107 108 ethernet-switch@0 { 108 ethernet-switch@0 { 109 compatible = "vitesse,vsc7395"; 109 compatible = "vitesse,vsc7395"; 110 reg = <0>; 110 reg = <0>; 111 spi-max-frequency = <2500000>; 111 spi-max-frequency = <2500000>; 112 gpio-controller; 112 gpio-controller; 113 #gpio-cells = <2>; 113 #gpio-cells = <2>; 114 114 115 ethernet-ports { 115 ethernet-ports { 116 #address-cells = <1>; 116 #address-cells = <1>; 117 #size-cells = <0>; 117 #size-cells = <0>; 118 118 119 ethernet-port@0 { 119 ethernet-port@0 { 120 reg = <0>; 120 reg = <0>; 121 label = "lan1"; 121 label = "lan1"; 122 }; 122 }; 123 ethernet-port@1 { 123 ethernet-port@1 { 124 reg = <1>; 124 reg = <1>; 125 label = "lan2"; 125 label = "lan2"; 126 }; 126 }; 127 ethernet-port@2 { 127 ethernet-port@2 { 128 reg = <2>; 128 reg = <2>; 129 label = "lan3"; 129 label = "lan3"; 130 }; 130 }; 131 ethernet-port@3 { 131 ethernet-port@3 { 132 reg = <3>; 132 reg = <3>; 133 label = "lan4"; 133 label = "lan4"; 134 }; 134 }; 135 ethernet-port@6 { 135 ethernet-port@6 { 136 reg = <6>; 136 reg = <6>; 137 ethernet = <&gmac1>; 137 ethernet = <&gmac1>; 138 phy-mode = "rgmii"; 138 phy-mode = "rgmii"; 139 rx-internal-delay-ps = <0>; 139 rx-internal-delay-ps = <0>; 140 tx-internal-delay-ps = <0>; 140 tx-internal-delay-ps = <0>; 141 fixed-link { 141 fixed-link { 142 speed = <1000>; 142 speed = <1000>; 143 full-duplex; 143 full-duplex; 144 pause; 144 pause; 145 }; 145 }; 146 }; 146 }; 147 }; 147 }; 148 }; 148 }; 149 }; 149 }; 150 150 151 bus { 151 bus { 152 #address-cells = <1>; 152 #address-cells = <1>; 153 #size-cells = <1>; 153 #size-cells = <1>; 154 154 155 ethernet-switch@10000000 { 155 ethernet-switch@10000000 { 156 compatible = "vitesse,vsc7385"; 156 compatible = "vitesse,vsc7385"; 157 reg = <0x10000000 0x20000>; 157 reg = <0x10000000 0x20000>; 158 reset-gpios = <&gpio0 12 GPIO_ACTIVE_L 158 reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; 159 159 160 ethernet-ports { 160 ethernet-ports { 161 #address-cells = <1>; 161 #address-cells = <1>; 162 #size-cells = <0>; 162 #size-cells = <0>; 163 163 164 ethernet-port@0 { 164 ethernet-port@0 { 165 reg = <0>; 165 reg = <0>; 166 label = "lan1"; 166 label = "lan1"; 167 }; 167 }; 168 ethernet-port@1 { 168 ethernet-port@1 { 169 reg = <1>; 169 reg = <1>; 170 label = "lan2"; 170 label = "lan2"; 171 }; 171 }; 172 ethernet-port@2 { 172 ethernet-port@2 { 173 reg = <2>; 173 reg = <2>; 174 label = "lan3"; 174 label = "lan3"; 175 }; 175 }; 176 ethernet-port@3 { 176 ethernet-port@3 { 177 reg = <3>; 177 reg = <3>; 178 label = "lan4"; 178 label = "lan4"; 179 }; 179 }; 180 ethernet-port@6 { 180 ethernet-port@6 { 181 reg = <6>; 181 reg = <6>; 182 ethernet = <&enet0>; 182 ethernet = <&enet0>; 183 rx-internal-delay-ps = <0>; 183 rx-internal-delay-ps = <0>; 184 tx-internal-delay-ps = <0>; 184 tx-internal-delay-ps = <0>; 185 phy-mode = "rgmii"; 185 phy-mode = "rgmii"; 186 fixed-link { 186 fixed-link { 187 speed = <1000>; 187 speed = <1000>; 188 full-duplex; 188 full-duplex; 189 pause; 189 pause; 190 }; 190 }; 191 }; 191 }; 192 }; 192 }; 193 }; 193 }; 194 }; 194 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.