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