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/vitesse,vsc73xx.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Vitesse VSC73xx DSA Switches 8 9maintainers: 10 - Linus Walleij <linus.walleij@linaro.org> 11 12description: 13 The Vitesse DSA Switches were produced in the early-to-mid 2000s. 14 15 The Vitesse company has been acquired by Microsemi and Microsemi has 16 been acquired Microchip but the new owner retains this vendor branding. 17 18 The currently supported switch chips are 19 Vitesse VSC7385 SparX-G5 5+1-port Integrated Gigabit Ethernet Switch 20 Vitesse VSC7388 SparX-G8 8-port Integrated Gigabit Ethernet Switch 21 Vitesse VSC7395 SparX-G5e 5+1-port Integrated Gigabit Ethernet Switch 22 Vitesse VSC7398 SparX-G8e 8-port Integrated Gigabit Ethernet Switch 23 24 This switch can use one of two different management interfaces. 25 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, see spi/spi-bus.txt 28 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 represent the vsc73xx. In this case it 31 must reside inside a platform bus device tree node. 32 33properties: 34 compatible: 35 enum: 36 - vitesse,vsc7385 37 - vitesse,vsc7388 38 - vitesse,vsc7395 39 - vitesse,vsc7398 40 41 reg: 42 maxItems: 1 43 44 gpio-controller: true 45 "#gpio-cells": 46 const: 2 47 48 reset-gpios: 49 description: GPIO to be used to reset the whole device 50 maxItems: 1 51 52allOf: 53 - $ref: dsa.yaml#/$defs/ethernet-ports 54 55# This checks if reg is a chipselect so the device is on an SPI 56# bus, the if-clause will fail if reg is a tuple such as for a 57# platform device. 58if: 59 properties: 60 reg: 61 minimum: 0 62 maximum: 256 63then: 64 $ref: /schemas/spi/spi-peripheral-props.yaml# 65 66required: 67 - compatible 68 - reg 69 70unevaluatedProperties: false 71 72examples: 73 - | 74 #include <dt-bindings/gpio/gpio.h> 75 76 spi { 77 #address-cells = <1>; 78 #size-cells = <0>; 79 80 ethernet-switch@0 { 81 compatible = "vitesse,vsc7395"; 82 reg = <0>; 83 spi-max-frequency = <2500000>; 84 gpio-controller; 85 #gpio-cells = <2>; 86 87 ethernet-ports { 88 #address-cells = <1>; 89 #size-cells = <0>; 90 91 ethernet-port@0 { 92 reg = <0>; 93 label = "lan1"; 94 }; 95 ethernet-port@1 { 96 reg = <1>; 97 label = "lan2"; 98 }; 99 ethernet-port@2 { 100 reg = <2>; 101 label = "lan3"; 102 }; 103 ethernet-port@3 { 104 reg = <3>; 105 label = "lan4"; 106 }; 107 ethernet-port@6 { 108 reg = <6>; 109 ethernet = <&gmac1>; 110 phy-mode = "rgmii"; 111 fixed-link { 112 speed = <1000>; 113 full-duplex; 114 pause; 115 }; 116 }; 117 }; 118 }; 119 }; 120 121 bus { 122 #address-cells = <1>; 123 #size-cells = <1>; 124 125 ethernet-switch@10000000 { 126 compatible = "vitesse,vsc7385"; 127 reg = <0x10000000 0x20000>; 128 reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; 129 130 ethernet-ports { 131 #address-cells = <1>; 132 #size-cells = <0>; 133 134 ethernet-port@0 { 135 reg = <0>; 136 label = "lan1"; 137 }; 138 ethernet-port@1 { 139 reg = <1>; 140 label = "lan2"; 141 }; 142 ethernet-port@2 { 143 reg = <2>; 144 label = "lan3"; 145 }; 146 ethernet-port@3 { 147 reg = <3>; 148 label = "lan4"; 149 }; 150 ethernet-port@6 { 151 reg = <6>; 152 ethernet = <&enet0>; 153 phy-mode = "rgmii"; 154 fixed-link { 155 speed = <1000>; 156 full-duplex; 157 pause; 158 }; 159 }; 160 }; 161 }; 162 }; 163