xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/vitesse,vsc73xx.txt (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1*c66ec88fSEmmanuel VadotVitesse VSC73xx Switches
2*c66ec88fSEmmanuel Vadot========================
3*c66ec88fSEmmanuel Vadot
4*c66ec88fSEmmanuel VadotThis defines device tree bindings for the Vitesse VSC73xx switch chips.
5*c66ec88fSEmmanuel VadotThe Vitesse company has been acquired by Microsemi and Microsemi has
6*c66ec88fSEmmanuel Vadotbeen acquired Microchip but retains this vendor branding.
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel VadotThe currently supported switch chips are:
9*c66ec88fSEmmanuel VadotVitesse VSC7385 SparX-G5 5+1-port Integrated Gigabit Ethernet Switch
10*c66ec88fSEmmanuel VadotVitesse VSC7388 SparX-G8 8-port Integrated Gigabit Ethernet Switch
11*c66ec88fSEmmanuel VadotVitesse VSC7395 SparX-G5e 5+1-port Integrated Gigabit Ethernet Switch
12*c66ec88fSEmmanuel VadotVitesse VSC7398 SparX-G8e 8-port Integrated Gigabit Ethernet Switch
13*c66ec88fSEmmanuel Vadot
14*c66ec88fSEmmanuel VadotThis switch could have two different management interface.
15*c66ec88fSEmmanuel Vadot
16*c66ec88fSEmmanuel VadotIf SPI interface is used, the device tree node is an SPI device so it must
17*c66ec88fSEmmanuel Vadotreside inside a SPI bus device tree node, see spi/spi-bus.txt
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel VadotWhen the chip is connected to a parallel memory bus and work in memory-mapped
20*c66ec88fSEmmanuel VadotI/O mode, a platform device is used to represent the vsc73xx. In this case it
21*c66ec88fSEmmanuel Vadotmust reside inside a platform bus device tree node.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel VadotRequired properties:
24*c66ec88fSEmmanuel Vadot
25*c66ec88fSEmmanuel Vadot- compatible: must be exactly one of:
26*c66ec88fSEmmanuel Vadot	"vitesse,vsc7385"
27*c66ec88fSEmmanuel Vadot	"vitesse,vsc7388"
28*c66ec88fSEmmanuel Vadot	"vitesse,vsc7395"
29*c66ec88fSEmmanuel Vadot	"vitesse,vsc7398"
30*c66ec88fSEmmanuel Vadot- gpio-controller: indicates that this switch is also a GPIO controller,
31*c66ec88fSEmmanuel Vadot  see gpio/gpio.txt
32*c66ec88fSEmmanuel Vadot- #gpio-cells: this must be set to <2> and indicates that we are a twocell
33*c66ec88fSEmmanuel Vadot  GPIO controller, see gpio/gpio.txt
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel VadotOptional properties:
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel Vadot- reset-gpios: a handle to a GPIO line that can issue reset of the chip.
38*c66ec88fSEmmanuel Vadot  It should be tagged as active low.
39*c66ec88fSEmmanuel Vadot
40*c66ec88fSEmmanuel VadotRequired subnodes:
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel VadotSee net/dsa/dsa.txt for a list of additional required and optional properties
43*c66ec88fSEmmanuel Vadotand subnodes of DSA switches.
44*c66ec88fSEmmanuel Vadot
45*c66ec88fSEmmanuel VadotExamples:
46*c66ec88fSEmmanuel Vadot
47*c66ec88fSEmmanuel VadotSPI:
48*c66ec88fSEmmanuel Vadotswitch@0 {
49*c66ec88fSEmmanuel Vadot	compatible = "vitesse,vsc7395";
50*c66ec88fSEmmanuel Vadot	reg = <0>;
51*c66ec88fSEmmanuel Vadot	/* Specified for 2.5 MHz or below */
52*c66ec88fSEmmanuel Vadot	spi-max-frequency = <2500000>;
53*c66ec88fSEmmanuel Vadot	gpio-controller;
54*c66ec88fSEmmanuel Vadot	#gpio-cells = <2>;
55*c66ec88fSEmmanuel Vadot
56*c66ec88fSEmmanuel Vadot	ports {
57*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
58*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
59*c66ec88fSEmmanuel Vadot
60*c66ec88fSEmmanuel Vadot		port@0 {
61*c66ec88fSEmmanuel Vadot			reg = <0>;
62*c66ec88fSEmmanuel Vadot			label = "lan1";
63*c66ec88fSEmmanuel Vadot		};
64*c66ec88fSEmmanuel Vadot		port@1 {
65*c66ec88fSEmmanuel Vadot			reg = <1>;
66*c66ec88fSEmmanuel Vadot			label = "lan2";
67*c66ec88fSEmmanuel Vadot		};
68*c66ec88fSEmmanuel Vadot		port@2 {
69*c66ec88fSEmmanuel Vadot			reg = <2>;
70*c66ec88fSEmmanuel Vadot			label = "lan3";
71*c66ec88fSEmmanuel Vadot		};
72*c66ec88fSEmmanuel Vadot		port@3 {
73*c66ec88fSEmmanuel Vadot			reg = <3>;
74*c66ec88fSEmmanuel Vadot			label = "lan4";
75*c66ec88fSEmmanuel Vadot		};
76*c66ec88fSEmmanuel Vadot		vsc: port@6 {
77*c66ec88fSEmmanuel Vadot			reg = <6>;
78*c66ec88fSEmmanuel Vadot			ethernet = <&gmac1>;
79*c66ec88fSEmmanuel Vadot			phy-mode = "rgmii";
80*c66ec88fSEmmanuel Vadot			fixed-link {
81*c66ec88fSEmmanuel Vadot				speed = <1000>;
82*c66ec88fSEmmanuel Vadot				full-duplex;
83*c66ec88fSEmmanuel Vadot				pause;
84*c66ec88fSEmmanuel Vadot			};
85*c66ec88fSEmmanuel Vadot		};
86*c66ec88fSEmmanuel Vadot	};
87*c66ec88fSEmmanuel Vadot};
88*c66ec88fSEmmanuel Vadot
89*c66ec88fSEmmanuel VadotPlatform:
90*c66ec88fSEmmanuel Vadotswitch@2,0 {
91*c66ec88fSEmmanuel Vadot	#address-cells = <1>;
92*c66ec88fSEmmanuel Vadot	#size-cells = <1>;
93*c66ec88fSEmmanuel Vadot	compatible = "vitesse,vsc7385";
94*c66ec88fSEmmanuel Vadot	reg = <0x2 0x0 0x20000>;
95*c66ec88fSEmmanuel Vadot	reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
96*c66ec88fSEmmanuel Vadot
97*c66ec88fSEmmanuel Vadot	ports {
98*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
99*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
100*c66ec88fSEmmanuel Vadot
101*c66ec88fSEmmanuel Vadot		port@0 {
102*c66ec88fSEmmanuel Vadot			reg = <0>;
103*c66ec88fSEmmanuel Vadot			label = "lan1";
104*c66ec88fSEmmanuel Vadot		};
105*c66ec88fSEmmanuel Vadot		port@1 {
106*c66ec88fSEmmanuel Vadot			reg = <1>;
107*c66ec88fSEmmanuel Vadot			label = "lan2";
108*c66ec88fSEmmanuel Vadot		};
109*c66ec88fSEmmanuel Vadot		port@2 {
110*c66ec88fSEmmanuel Vadot			reg = <2>;
111*c66ec88fSEmmanuel Vadot			label = "lan3";
112*c66ec88fSEmmanuel Vadot		};
113*c66ec88fSEmmanuel Vadot		port@3 {
114*c66ec88fSEmmanuel Vadot			reg = <3>;
115*c66ec88fSEmmanuel Vadot			label = "lan4";
116*c66ec88fSEmmanuel Vadot		};
117*c66ec88fSEmmanuel Vadot		vsc: port@6 {
118*c66ec88fSEmmanuel Vadot			reg = <6>;
119*c66ec88fSEmmanuel Vadot			ethernet = <&enet0>;
120*c66ec88fSEmmanuel Vadot			phy-mode = "rgmii";
121*c66ec88fSEmmanuel Vadot			fixed-link {
122*c66ec88fSEmmanuel Vadot				speed = <1000>;
123*c66ec88fSEmmanuel Vadot				full-duplex;
124*c66ec88fSEmmanuel Vadot				pause;
125*c66ec88fSEmmanuel Vadot			};
126*c66ec88fSEmmanuel Vadot		};
127*c66ec88fSEmmanuel Vadot	};
128*c66ec88fSEmmanuel Vadot
129*c66ec88fSEmmanuel Vadot};
130