xref: /freebsd-src/sys/contrib/device-tree/src/arm/microchip/lan966x-pcb8309.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * lan966x_pcb8309.dts - Device Tree file for PCB8309
4*f126890aSEmmanuel Vadot */
5*f126890aSEmmanuel Vadot/dts-v1/;
6*f126890aSEmmanuel Vadot#include "lan966x.dtsi"
7*f126890aSEmmanuel Vadot#include "dt-bindings/phy/phy-lan966x-serdes.h"
8*f126890aSEmmanuel Vadot
9*f126890aSEmmanuel Vadot/ {
10*f126890aSEmmanuel Vadot	model = "Microchip EVB - LAN9662";
11*f126890aSEmmanuel Vadot	compatible = "microchip,lan9662-pcb8309", "microchip,lan9662", "microchip,lan966";
12*f126890aSEmmanuel Vadot
13*f126890aSEmmanuel Vadot	aliases {
14*f126890aSEmmanuel Vadot		serial0 = &usart3;
15*f126890aSEmmanuel Vadot		i2c102 = &i2c102;
16*f126890aSEmmanuel Vadot		i2c103 = &i2c103;
17*f126890aSEmmanuel Vadot	};
18*f126890aSEmmanuel Vadot
19*f126890aSEmmanuel Vadot	chosen {
20*f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
21*f126890aSEmmanuel Vadot	};
22*f126890aSEmmanuel Vadot
23*f126890aSEmmanuel Vadot	gpio-restart {
24*f126890aSEmmanuel Vadot		compatible = "gpio-restart";
25*f126890aSEmmanuel Vadot		gpios = <&gpio 56 GPIO_ACTIVE_LOW>;
26*f126890aSEmmanuel Vadot		priority = <200>;
27*f126890aSEmmanuel Vadot	};
28*f126890aSEmmanuel Vadot
29*f126890aSEmmanuel Vadot	i2c-mux {
30*f126890aSEmmanuel Vadot		compatible = "i2c-mux";
31*f126890aSEmmanuel Vadot		#address-cells = <1>;
32*f126890aSEmmanuel Vadot		#size-cells = <0>;
33*f126890aSEmmanuel Vadot		mux-controls = <&mux>;
34*f126890aSEmmanuel Vadot		i2c-parent = <&i2c4>;
35*f126890aSEmmanuel Vadot
36*f126890aSEmmanuel Vadot		i2c102: i2c-sfp@1 {
37*f126890aSEmmanuel Vadot			reg = <1>;
38*f126890aSEmmanuel Vadot		};
39*f126890aSEmmanuel Vadot
40*f126890aSEmmanuel Vadot		i2c103: i2c-sfp@2 {
41*f126890aSEmmanuel Vadot			reg = <2>;
42*f126890aSEmmanuel Vadot		};
43*f126890aSEmmanuel Vadot	};
44*f126890aSEmmanuel Vadot
45*f126890aSEmmanuel Vadot	leds {
46*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
47*f126890aSEmmanuel Vadot
48*f126890aSEmmanuel Vadot		led-s0-green {
49*f126890aSEmmanuel Vadot			label = "s0:green";
50*f126890aSEmmanuel Vadot			gpios = <&sgpio_out 2 0 GPIO_ACTIVE_LOW>;
51*f126890aSEmmanuel Vadot			default-state = "off";
52*f126890aSEmmanuel Vadot		};
53*f126890aSEmmanuel Vadot
54*f126890aSEmmanuel Vadot		led-s0-red {
55*f126890aSEmmanuel Vadot			label = "s0:red";
56*f126890aSEmmanuel Vadot			gpios = <&sgpio_out 2 1 GPIO_ACTIVE_LOW>;
57*f126890aSEmmanuel Vadot			default-state = "off";
58*f126890aSEmmanuel Vadot		};
59*f126890aSEmmanuel Vadot
60*f126890aSEmmanuel Vadot		led-s1-green {
61*f126890aSEmmanuel Vadot			label = "s1:green";
62*f126890aSEmmanuel Vadot			gpios = <&sgpio_out 3 0 GPIO_ACTIVE_LOW>;
63*f126890aSEmmanuel Vadot			default-state = "off";
64*f126890aSEmmanuel Vadot		};
65*f126890aSEmmanuel Vadot
66*f126890aSEmmanuel Vadot		led-s1-red {
67*f126890aSEmmanuel Vadot			label = "s1:red";
68*f126890aSEmmanuel Vadot			gpios = <&sgpio_out 3 1 GPIO_ACTIVE_LOW>;
69*f126890aSEmmanuel Vadot			default-state = "off";
70*f126890aSEmmanuel Vadot		};
71*f126890aSEmmanuel Vadot	};
72*f126890aSEmmanuel Vadot
73*f126890aSEmmanuel Vadot	mux: mux-controller {
74*f126890aSEmmanuel Vadot		compatible = "gpio-mux";
75*f126890aSEmmanuel Vadot		#mux-control-cells = <0>;
76*f126890aSEmmanuel Vadot
77*f126890aSEmmanuel Vadot		mux-gpios = <&sgpio_out 11 0 GPIO_ACTIVE_HIGH>, /* p11b0 */
78*f126890aSEmmanuel Vadot			    <&sgpio_out 11 1 GPIO_ACTIVE_HIGH>; /* p11b1 */
79*f126890aSEmmanuel Vadot	};
80*f126890aSEmmanuel Vadot
81*f126890aSEmmanuel Vadot	sfp2: sfp2 {
82*f126890aSEmmanuel Vadot		compatible = "sff,sfp";
83*f126890aSEmmanuel Vadot		i2c-bus = <&i2c102>;
84*f126890aSEmmanuel Vadot		tx-disable-gpios = <&sgpio_out 10 0 GPIO_ACTIVE_LOW>;
85*f126890aSEmmanuel Vadot		los-gpios = <&sgpio_in  2 0 GPIO_ACTIVE_HIGH>;
86*f126890aSEmmanuel Vadot		mod-def0-gpios = <&sgpio_in  2 1 GPIO_ACTIVE_LOW>;
87*f126890aSEmmanuel Vadot		tx-fault-gpios = <&sgpio_in  1 0 GPIO_ACTIVE_HIGH>;
88*f126890aSEmmanuel Vadot	};
89*f126890aSEmmanuel Vadot
90*f126890aSEmmanuel Vadot	sfp3: sfp3 {
91*f126890aSEmmanuel Vadot		compatible = "sff,sfp";
92*f126890aSEmmanuel Vadot		i2c-bus = <&i2c103>;
93*f126890aSEmmanuel Vadot		tx-disable-gpios = <&sgpio_out 10 1 GPIO_ACTIVE_LOW>;
94*f126890aSEmmanuel Vadot		los-gpios = <&sgpio_in  3 0 GPIO_ACTIVE_HIGH>;
95*f126890aSEmmanuel Vadot		mod-def0-gpios = <&sgpio_in  3 1 GPIO_ACTIVE_LOW>;
96*f126890aSEmmanuel Vadot		tx-fault-gpios = <&sgpio_in  1 1 GPIO_ACTIVE_HIGH>;
97*f126890aSEmmanuel Vadot	};
98*f126890aSEmmanuel Vadot};
99*f126890aSEmmanuel Vadot
100*f126890aSEmmanuel Vadot&aes {
101*f126890aSEmmanuel Vadot	status = "disabled"; /* Reserved by secure OS */
102*f126890aSEmmanuel Vadot};
103*f126890aSEmmanuel Vadot
104*f126890aSEmmanuel Vadot&flx3 {
105*f126890aSEmmanuel Vadot	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
106*f126890aSEmmanuel Vadot	status = "okay";
107*f126890aSEmmanuel Vadot
108*f126890aSEmmanuel Vadot	usart3: serial@200 {
109*f126890aSEmmanuel Vadot		pinctrl-0 = <&fc3_b_pins>;
110*f126890aSEmmanuel Vadot		pinctrl-names = "default";
111*f126890aSEmmanuel Vadot		status = "okay";
112*f126890aSEmmanuel Vadot	};
113*f126890aSEmmanuel Vadot};
114*f126890aSEmmanuel Vadot
115*f126890aSEmmanuel Vadot&flx4 {
116*f126890aSEmmanuel Vadot	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
117*f126890aSEmmanuel Vadot	status = "okay";
118*f126890aSEmmanuel Vadot
119*f126890aSEmmanuel Vadot	i2c4: i2c@600 {
120*f126890aSEmmanuel Vadot		compatible = "microchip,sam9x60-i2c";
121*f126890aSEmmanuel Vadot		reg = <0x600 0x200>;
122*f126890aSEmmanuel Vadot		interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
123*f126890aSEmmanuel Vadot		clocks = <&nic_clk>;
124*f126890aSEmmanuel Vadot		pinctrl-0 = <&fc4_b_pins>;
125*f126890aSEmmanuel Vadot		pinctrl-names = "default";
126*f126890aSEmmanuel Vadot		i2c-analog-filter;
127*f126890aSEmmanuel Vadot		i2c-digital-filter;
128*f126890aSEmmanuel Vadot		i2c-digital-filter-width-ns = <35>;
129*f126890aSEmmanuel Vadot		i2c-sda-hold-time-ns = <1500>;
130*f126890aSEmmanuel Vadot		status = "okay";
131*f126890aSEmmanuel Vadot	};
132*f126890aSEmmanuel Vadot};
133*f126890aSEmmanuel Vadot
134*f126890aSEmmanuel Vadot&gpio {
135*f126890aSEmmanuel Vadot	fc3_b_pins: fc3-b-pins {
136*f126890aSEmmanuel Vadot		/* RXD, TXD */
137*f126890aSEmmanuel Vadot		pins = "GPIO_52", "GPIO_53";
138*f126890aSEmmanuel Vadot		function = "fc3_b";
139*f126890aSEmmanuel Vadot	};
140*f126890aSEmmanuel Vadot
141*f126890aSEmmanuel Vadot	fc4_b_pins: fc4-b-pins {
142*f126890aSEmmanuel Vadot		/* SCL, SDA */
143*f126890aSEmmanuel Vadot		pins = "GPIO_57", "GPIO_58";
144*f126890aSEmmanuel Vadot		function = "fc4_b";
145*f126890aSEmmanuel Vadot	};
146*f126890aSEmmanuel Vadot
147*f126890aSEmmanuel Vadot	pps_out_pins: pps-out-pins {
148*f126890aSEmmanuel Vadot		/* 1pps output */
149*f126890aSEmmanuel Vadot		pins = "GPIO_38";
150*f126890aSEmmanuel Vadot		function = "ptpsync_3";
151*f126890aSEmmanuel Vadot	};
152*f126890aSEmmanuel Vadot
153*f126890aSEmmanuel Vadot	ptp_ext_pins: ptp-ext-pins {
154*f126890aSEmmanuel Vadot		/* 1pps input */
155*f126890aSEmmanuel Vadot		pins = "GPIO_39";
156*f126890aSEmmanuel Vadot		function = "ptpsync_4";
157*f126890aSEmmanuel Vadot	};
158*f126890aSEmmanuel Vadot
159*f126890aSEmmanuel Vadot	sgpio_a_pins: sgpio-a-pins {
160*f126890aSEmmanuel Vadot		/* SCK, D0, D1, LD */
161*f126890aSEmmanuel Vadot		pins = "GPIO_32", "GPIO_33", "GPIO_34", "GPIO_35";
162*f126890aSEmmanuel Vadot		function = "sgpio_a";
163*f126890aSEmmanuel Vadot	};
164*f126890aSEmmanuel Vadot};
165*f126890aSEmmanuel Vadot
166*f126890aSEmmanuel Vadot&mdio1 {
167*f126890aSEmmanuel Vadot	status = "okay";
168*f126890aSEmmanuel Vadot};
169*f126890aSEmmanuel Vadot
170*f126890aSEmmanuel Vadot&phy0 {
171*f126890aSEmmanuel Vadot	status = "okay";
172*f126890aSEmmanuel Vadot};
173*f126890aSEmmanuel Vadot
174*f126890aSEmmanuel Vadot&phy1 {
175*f126890aSEmmanuel Vadot	status = "okay";
176*f126890aSEmmanuel Vadot};
177*f126890aSEmmanuel Vadot
178*f126890aSEmmanuel Vadot&port0 {
179*f126890aSEmmanuel Vadot	phy-handle = <&phy0>;
180*f126890aSEmmanuel Vadot	phy-mode = "gmii";
181*f126890aSEmmanuel Vadot	phys = <&serdes 0 CU(0)>;
182*f126890aSEmmanuel Vadot	status = "okay";
183*f126890aSEmmanuel Vadot};
184*f126890aSEmmanuel Vadot
185*f126890aSEmmanuel Vadot&port1 {
186*f126890aSEmmanuel Vadot	phy-handle = <&phy1>;
187*f126890aSEmmanuel Vadot	phy-mode = "gmii";
188*f126890aSEmmanuel Vadot	phys = <&serdes 1 CU(1)>;
189*f126890aSEmmanuel Vadot	status = "okay";
190*f126890aSEmmanuel Vadot};
191*f126890aSEmmanuel Vadot
192*f126890aSEmmanuel Vadot&port2 {
193*f126890aSEmmanuel Vadot	sfp = <&sfp2>;
194*f126890aSEmmanuel Vadot	managed = "in-band-status";
195*f126890aSEmmanuel Vadot	phy-mode = "sgmii";
196*f126890aSEmmanuel Vadot	phys = <&serdes 2 SERDES6G(0)>;
197*f126890aSEmmanuel Vadot	status = "okay";
198*f126890aSEmmanuel Vadot};
199*f126890aSEmmanuel Vadot
200*f126890aSEmmanuel Vadot&port3 {
201*f126890aSEmmanuel Vadot	sfp = <&sfp3>;
202*f126890aSEmmanuel Vadot	managed = "in-band-status";
203*f126890aSEmmanuel Vadot	phy-mode = "sgmii";
204*f126890aSEmmanuel Vadot	phys = <&serdes 3 SERDES6G(1)>;
205*f126890aSEmmanuel Vadot	status = "okay";
206*f126890aSEmmanuel Vadot};
207*f126890aSEmmanuel Vadot
208*f126890aSEmmanuel Vadot&serdes {
209*f126890aSEmmanuel Vadot	status = "okay";
210*f126890aSEmmanuel Vadot};
211*f126890aSEmmanuel Vadot
212*f126890aSEmmanuel Vadot&sgpio {
213*f126890aSEmmanuel Vadot	pinctrl-0 = <&sgpio_a_pins>;
214*f126890aSEmmanuel Vadot	pinctrl-names = "default";
215*f126890aSEmmanuel Vadot	microchip,sgpio-port-ranges = <0 3>, <8 11>;
216*f126890aSEmmanuel Vadot	status = "okay";
217*f126890aSEmmanuel Vadot
218*f126890aSEmmanuel Vadot	gpio@0 {
219*f126890aSEmmanuel Vadot		ngpios = <64>;
220*f126890aSEmmanuel Vadot	};
221*f126890aSEmmanuel Vadot	gpio@1 {
222*f126890aSEmmanuel Vadot		ngpios = <64>;
223*f126890aSEmmanuel Vadot	};
224*f126890aSEmmanuel Vadot};
225*f126890aSEmmanuel Vadot
226*f126890aSEmmanuel Vadot&switch {
227*f126890aSEmmanuel Vadot	pinctrl-0 = <&pps_out_pins>, <&ptp_ext_pins>;
228*f126890aSEmmanuel Vadot	pinctrl-names = "default";
229*f126890aSEmmanuel Vadot	status = "okay";
230*f126890aSEmmanuel Vadot};
231