10e8011faSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 20e8011faSEmmanuel Vadot%YAML 1.2 30e8011faSEmmanuel Vadot--- 40e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/vitesse,vsc73xx.yaml# 50e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 60e8011faSEmmanuel Vadot 70e8011faSEmmanuel Vadottitle: Vitesse VSC73xx DSA Switches 80e8011faSEmmanuel Vadot 90e8011faSEmmanuel Vadotmaintainers: 100e8011faSEmmanuel Vadot - Linus Walleij <linus.walleij@linaro.org> 110e8011faSEmmanuel Vadot 120e8011faSEmmanuel Vadotdescription: 130e8011faSEmmanuel Vadot The Vitesse DSA Switches were produced in the early-to-mid 2000s. 140e8011faSEmmanuel Vadot 150e8011faSEmmanuel Vadot The Vitesse company has been acquired by Microsemi and Microsemi has 160e8011faSEmmanuel Vadot been acquired Microchip but the new owner retains this vendor branding. 170e8011faSEmmanuel Vadot 180e8011faSEmmanuel Vadot The currently supported switch chips are 190e8011faSEmmanuel Vadot Vitesse VSC7385 SparX-G5 5+1-port Integrated Gigabit Ethernet Switch 200e8011faSEmmanuel Vadot Vitesse VSC7388 SparX-G8 8-port Integrated Gigabit Ethernet Switch 210e8011faSEmmanuel Vadot Vitesse VSC7395 SparX-G5e 5+1-port Integrated Gigabit Ethernet Switch 220e8011faSEmmanuel Vadot Vitesse VSC7398 SparX-G8e 8-port Integrated Gigabit Ethernet Switch 230e8011faSEmmanuel Vadot 240e8011faSEmmanuel Vadot This switch can use one of two different management interfaces. 250e8011faSEmmanuel Vadot 260e8011faSEmmanuel Vadot If SPI interface is used, the device tree node is an SPI device so it must 270e8011faSEmmanuel Vadot reside inside a SPI bus device tree node, see spi/spi-bus.txt 280e8011faSEmmanuel Vadot 290e8011faSEmmanuel Vadot When the chip is connected to a parallel memory bus and work in memory-mapped 300e8011faSEmmanuel Vadot I/O mode, a platform device is used to represent the vsc73xx. In this case it 310e8011faSEmmanuel Vadot must reside inside a platform bus device tree node. 320e8011faSEmmanuel Vadot 330e8011faSEmmanuel Vadotproperties: 340e8011faSEmmanuel Vadot compatible: 350e8011faSEmmanuel Vadot enum: 360e8011faSEmmanuel Vadot - vitesse,vsc7385 370e8011faSEmmanuel Vadot - vitesse,vsc7388 380e8011faSEmmanuel Vadot - vitesse,vsc7395 390e8011faSEmmanuel Vadot - vitesse,vsc7398 400e8011faSEmmanuel Vadot 410e8011faSEmmanuel Vadot reg: 420e8011faSEmmanuel Vadot maxItems: 1 430e8011faSEmmanuel Vadot 440e8011faSEmmanuel Vadot gpio-controller: true 450e8011faSEmmanuel Vadot "#gpio-cells": 460e8011faSEmmanuel Vadot const: 2 470e8011faSEmmanuel Vadot 480e8011faSEmmanuel Vadot reset-gpios: 490e8011faSEmmanuel Vadot description: GPIO to be used to reset the whole device 500e8011faSEmmanuel Vadot maxItems: 1 510e8011faSEmmanuel Vadot 520e8011faSEmmanuel VadotallOf: 530e8011faSEmmanuel Vadot - $ref: dsa.yaml#/$defs/ethernet-ports 540e8011faSEmmanuel Vadot 55*b2d2a78aSEmmanuel VadotpatternProperties: 56*b2d2a78aSEmmanuel Vadot "^(ethernet-)?ports$": 57*b2d2a78aSEmmanuel Vadot additionalProperties: true 58*b2d2a78aSEmmanuel Vadot patternProperties: 59*b2d2a78aSEmmanuel Vadot "^(ethernet-)?port@6$": 60*b2d2a78aSEmmanuel Vadot allOf: 61*b2d2a78aSEmmanuel Vadot - if: 62*b2d2a78aSEmmanuel Vadot properties: 63*b2d2a78aSEmmanuel Vadot phy-mode: 64*b2d2a78aSEmmanuel Vadot contains: 65*b2d2a78aSEmmanuel Vadot enum: 66*b2d2a78aSEmmanuel Vadot - rgmii 67*b2d2a78aSEmmanuel Vadot then: 68*b2d2a78aSEmmanuel Vadot properties: 69*b2d2a78aSEmmanuel Vadot rx-internal-delay-ps: 70*b2d2a78aSEmmanuel Vadot $ref: "#/$defs/internal-delay-ps" 71*b2d2a78aSEmmanuel Vadot tx-internal-delay-ps: 72*b2d2a78aSEmmanuel Vadot $ref: "#/$defs/internal-delay-ps" 73*b2d2a78aSEmmanuel Vadot 740e8011faSEmmanuel Vadot# This checks if reg is a chipselect so the device is on an SPI 750e8011faSEmmanuel Vadot# bus, the if-clause will fail if reg is a tuple such as for a 760e8011faSEmmanuel Vadot# platform device. 770e8011faSEmmanuel Vadotif: 780e8011faSEmmanuel Vadot properties: 790e8011faSEmmanuel Vadot reg: 800e8011faSEmmanuel Vadot minimum: 0 810e8011faSEmmanuel Vadot maximum: 256 820e8011faSEmmanuel Vadotthen: 830e8011faSEmmanuel Vadot $ref: /schemas/spi/spi-peripheral-props.yaml# 840e8011faSEmmanuel Vadot 850e8011faSEmmanuel Vadotrequired: 860e8011faSEmmanuel Vadot - compatible 870e8011faSEmmanuel Vadot - reg 880e8011faSEmmanuel Vadot 89*b2d2a78aSEmmanuel Vadot$defs: 90*b2d2a78aSEmmanuel Vadot internal-delay-ps: 91*b2d2a78aSEmmanuel Vadot description: 92*b2d2a78aSEmmanuel Vadot Disable tunable delay lines using 0 ps, or enable them and select 93*b2d2a78aSEmmanuel Vadot the phase between 1400 ps and 2000 ps in increments of 300 ps. 94*b2d2a78aSEmmanuel Vadot default: 2000 95*b2d2a78aSEmmanuel Vadot enum: 96*b2d2a78aSEmmanuel Vadot [0, 1400, 1700, 2000] 97*b2d2a78aSEmmanuel Vadot 980e8011faSEmmanuel VadotunevaluatedProperties: false 990e8011faSEmmanuel Vadot 1000e8011faSEmmanuel Vadotexamples: 1010e8011faSEmmanuel Vadot - | 1020e8011faSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 1030e8011faSEmmanuel Vadot 1040e8011faSEmmanuel Vadot spi { 1050e8011faSEmmanuel Vadot #address-cells = <1>; 1060e8011faSEmmanuel Vadot #size-cells = <0>; 1070e8011faSEmmanuel Vadot 1080e8011faSEmmanuel Vadot ethernet-switch@0 { 1090e8011faSEmmanuel Vadot compatible = "vitesse,vsc7395"; 1100e8011faSEmmanuel Vadot reg = <0>; 1110e8011faSEmmanuel Vadot spi-max-frequency = <2500000>; 1120e8011faSEmmanuel Vadot gpio-controller; 1130e8011faSEmmanuel Vadot #gpio-cells = <2>; 1140e8011faSEmmanuel Vadot 1150e8011faSEmmanuel Vadot ethernet-ports { 1160e8011faSEmmanuel Vadot #address-cells = <1>; 1170e8011faSEmmanuel Vadot #size-cells = <0>; 1180e8011faSEmmanuel Vadot 1190e8011faSEmmanuel Vadot ethernet-port@0 { 1200e8011faSEmmanuel Vadot reg = <0>; 1210e8011faSEmmanuel Vadot label = "lan1"; 1220e8011faSEmmanuel Vadot }; 1230e8011faSEmmanuel Vadot ethernet-port@1 { 1240e8011faSEmmanuel Vadot reg = <1>; 1250e8011faSEmmanuel Vadot label = "lan2"; 1260e8011faSEmmanuel Vadot }; 1270e8011faSEmmanuel Vadot ethernet-port@2 { 1280e8011faSEmmanuel Vadot reg = <2>; 1290e8011faSEmmanuel Vadot label = "lan3"; 1300e8011faSEmmanuel Vadot }; 1310e8011faSEmmanuel Vadot ethernet-port@3 { 1320e8011faSEmmanuel Vadot reg = <3>; 1330e8011faSEmmanuel Vadot label = "lan4"; 1340e8011faSEmmanuel Vadot }; 1350e8011faSEmmanuel Vadot ethernet-port@6 { 1360e8011faSEmmanuel Vadot reg = <6>; 1370e8011faSEmmanuel Vadot ethernet = <&gmac1>; 1380e8011faSEmmanuel Vadot phy-mode = "rgmii"; 139*b2d2a78aSEmmanuel Vadot rx-internal-delay-ps = <0>; 140*b2d2a78aSEmmanuel Vadot tx-internal-delay-ps = <0>; 1410e8011faSEmmanuel Vadot fixed-link { 1420e8011faSEmmanuel Vadot speed = <1000>; 1430e8011faSEmmanuel Vadot full-duplex; 1440e8011faSEmmanuel Vadot pause; 1450e8011faSEmmanuel Vadot }; 1460e8011faSEmmanuel Vadot }; 1470e8011faSEmmanuel Vadot }; 1480e8011faSEmmanuel Vadot }; 1490e8011faSEmmanuel Vadot }; 1500e8011faSEmmanuel Vadot 1510e8011faSEmmanuel Vadot bus { 1520e8011faSEmmanuel Vadot #address-cells = <1>; 1530e8011faSEmmanuel Vadot #size-cells = <1>; 1540e8011faSEmmanuel Vadot 1550e8011faSEmmanuel Vadot ethernet-switch@10000000 { 1560e8011faSEmmanuel Vadot compatible = "vitesse,vsc7385"; 1570e8011faSEmmanuel Vadot reg = <0x10000000 0x20000>; 1580e8011faSEmmanuel Vadot reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; 1590e8011faSEmmanuel Vadot 1600e8011faSEmmanuel Vadot ethernet-ports { 1610e8011faSEmmanuel Vadot #address-cells = <1>; 1620e8011faSEmmanuel Vadot #size-cells = <0>; 1630e8011faSEmmanuel Vadot 1640e8011faSEmmanuel Vadot ethernet-port@0 { 1650e8011faSEmmanuel Vadot reg = <0>; 1660e8011faSEmmanuel Vadot label = "lan1"; 1670e8011faSEmmanuel Vadot }; 1680e8011faSEmmanuel Vadot ethernet-port@1 { 1690e8011faSEmmanuel Vadot reg = <1>; 1700e8011faSEmmanuel Vadot label = "lan2"; 1710e8011faSEmmanuel Vadot }; 1720e8011faSEmmanuel Vadot ethernet-port@2 { 1730e8011faSEmmanuel Vadot reg = <2>; 1740e8011faSEmmanuel Vadot label = "lan3"; 1750e8011faSEmmanuel Vadot }; 1760e8011faSEmmanuel Vadot ethernet-port@3 { 1770e8011faSEmmanuel Vadot reg = <3>; 1780e8011faSEmmanuel Vadot label = "lan4"; 1790e8011faSEmmanuel Vadot }; 1800e8011faSEmmanuel Vadot ethernet-port@6 { 1810e8011faSEmmanuel Vadot reg = <6>; 1820e8011faSEmmanuel Vadot ethernet = <&enet0>; 183*b2d2a78aSEmmanuel Vadot rx-internal-delay-ps = <0>; 184*b2d2a78aSEmmanuel Vadot tx-internal-delay-ps = <0>; 1850e8011faSEmmanuel Vadot phy-mode = "rgmii"; 1860e8011faSEmmanuel Vadot fixed-link { 1870e8011faSEmmanuel Vadot speed = <1000>; 1880e8011faSEmmanuel Vadot full-duplex; 1890e8011faSEmmanuel Vadot pause; 1900e8011faSEmmanuel Vadot }; 1910e8011faSEmmanuel Vadot }; 1920e8011faSEmmanuel Vadot }; 1930e8011faSEmmanuel Vadot }; 1940e8011faSEmmanuel Vadot }; 195