blob: 5a5c1efd6b96870c8bcf8a179247ed9bd5104769 [file] [log] [blame]
Michal Simek1e356db2023-09-27 11:53:27 +02001// SPDX-License-Identifier: GPL-2.0
2/*
3 * dts file for KD240 revA Carrier Card
4 *
5 * Copyright (C) 2021 - 2022, Xilinx, Inc.
6 * Copyright (C) 2022 - 2023, Advanced Micro Devices, Inc.
7 *
8 * Michal Simek <michal.simek@amd.com>
9 */
10
11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/phy/phy.h>
13#include <dt-bindings/pinctrl/pinctrl-zynqmp.h>
14
15/dts-v1/;
16/plugin/;
17
18&{/} {
19 compatible = "xlnx,zynqmp-sk-kd240-rev1",
20 "xlnx,zynqmp-sk-kd240-revB",
21 "xlnx,zynqmp-sk-kd240-revA",
22 "xlnx,zynqmp-sk-kd240", "xlnx,zynqmp";
23 model = "ZynqMP KD240 revA/B/1";
24
25 ina260-u3 {
26 compatible = "iio-hwmon";
27 io-channels = <&u3 0>, <&u3 1>, <&u3 2>;
28 };
29
30 clk_26: clock2 { /* u17 - USB */
31 compatible = "fixed-clock";
32 #clock-cells = <0>;
33 clock-frequency = <26000000>;
34 };
35};
36
37&can0 {
38 status = "okay";
39 pinctrl-names = "default";
40 pinctrl-0 = <&pinctrl_can0_default>;
41};
42
43&i2c1 { /* I2C_SCK C26/C27 - MIO from SOM */
44 #address-cells = <1>;
45 #size-cells = <0>;
46 pinctrl-names = "default", "gpio";
47 pinctrl-0 = <&pinctrl_i2c1_default>;
48 pinctrl-1 = <&pinctrl_i2c1_gpio>;
49 scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
50 sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
51
52 u3: ina260@40 { /* u3 */
53 compatible = "ti,ina260";
54 #io-channel-cells = <1>;
55 label = "ina260-u14";
56 reg = <0x40>;
57 };
58
59 slg7xl45106: gpio@11 { /* u13 - reset logic */
60 compatible = "dlg,slg7xl45106";
61 reg = <0x11>;
62 label = "resetchip";
63 gpio-controller;
64 #gpio-cells = <2>;
65 gpio-line-names = "USB0_PHY_RESET_B", "",
66 "SD_RESET_B", "USB0_HUB_RESET_B",
67 "", "PS_GEM0_RESET_B",
68 "", "";
69 };
70
71 /* usb5744@2d */
72};
73
74/* USB 3.0 */
75&psgtr {
76 status = "okay";
77 /* usb */
78 clocks = <&clk_26>;
79 clock-names = "ref2";
80};
81
82&usb0 { /* mio52 - mio63 */
83 status = "okay";
84 pinctrl-names = "default";
85 pinctrl-0 = <&pinctrl_usb0_default>;
86 phy-names = "usb3-phy";
87 phys = <&psgtr 2 PHY_TYPE_USB3 0 2>;
88 reset-gpios = <&slg7xl45106 0 GPIO_ACTIVE_LOW>;
89 assigned-clock-rates = <250000000>, <20000000>;
90
91 usbhub0: usb-hub { /* u36 */
92 i2c-bus = <&i2c1>;
93 compatible = "microchip,usb5744";
94 reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>;
95 };
96
97 usb2244: usb-sd { /* u41 */
98 compatible = "microchip,usb2244";
99 reset-gpios = <&slg7xl45106 2 GPIO_ACTIVE_LOW>;
100 };
101};
102
103&dwc3_0 {
104 status = "okay";
105 dr_mode = "host";
106 snps,usb3_lpm_capable;
107 maximum-speed = "super-speed";
108};
109
110&gem1 { /* mdio mio50/51 */
111 status = "okay";
112 pinctrl-names = "default";
113 pinctrl-0 = <&pinctrl_gem1_default>;
114 assigned-clock-rates = <250000000>;
115
116 phy-handle = <&phy0>;
117 phy-mode = "rgmii-id";
118 mdio: mdio {
119 #address-cells = <1>;
120 #size-cells = <0>;
121 phy0: ethernet-phy@8 { /* Adin u31 */
122 reg = <8>;
123 adi,rx-internal-delay-ps = <2000>;
124 adi,tx-internal-delay-ps = <2000>;
125 adi,fifo-depth-bits = <8>;
126 reset-assert-us = <10>;
127 reset-deassert-us = <5000>;
128 reset-gpios = <&gpio 77 GPIO_ACTIVE_LOW>;
129 };
130 };
131};
132
133/* 2 more ethernet phys u32@2 and u34@3 */
134
135&pinctrl0 { /* required by spec */
136 status = "okay";
137
138 pinctrl_can0_default: can0-default {
139 mux {
140 function = "can0";
141 groups = "can0_16_grp";
142 };
143
144 conf {
145 groups = "can0_16_grp";
146 slew-rate = <SLEW_RATE_SLOW>;
147 power-source = <IO_STANDARD_LVCMOS18>;
148 };
149
150 conf-rx {
151 pins = "MIO66";
152 bias-pull-up;
153 };
154
155 conf-tx {
156 pins = "MIO67";
157 bias-pull-up;
158 drive-strength = <4>;
159 };
160 };
161
162 pinctrl_uart0_default: uart0-default {
163 conf {
164 groups = "uart0_17_grp";
165 slew-rate = <SLEW_RATE_SLOW>;
166 power-source = <IO_STANDARD_LVCMOS18>;
167 drive-strength = <12>;
168 };
169
170 conf-rx {
171 pins = "MIO70";
172 bias-high-impedance;
173 };
174
175 conf-tx {
176 pins = "MIO71";
177 bias-disable;
178 };
179
180 mux {
181 groups = "uart0_17_grp";
182 function = "uart0";
183 };
184 };
185
186 pinctrl_uart1_default: uart1-default {
187 conf {
188 groups = "uart1_9_grp";
189 slew-rate = <SLEW_RATE_SLOW>;
190 power-source = <IO_STANDARD_LVCMOS18>;
191 drive-strength = <12>;
192 };
193
194 conf-rx {
195 pins = "MIO37";
196 bias-high-impedance;
197 };
198
199 conf-tx {
200 pins = "MIO36";
201 bias-disable;
202 output-enable;
203 };
204
205 mux {
206 groups = "uart1_9_grp";
207 function = "uart1";
208 };
209 };
210
211 pinctrl_i2c1_default: i2c1-default {
212 conf {
213 groups = "i2c1_6_grp";
214 bias-pull-up;
215 slew-rate = <SLEW_RATE_SLOW>;
216 power-source = <IO_STANDARD_LVCMOS18>;
217 };
218
219 mux {
220 groups = "i2c1_6_grp";
221 function = "i2c1";
222 };
223 };
224
225 pinctrl_i2c1_gpio: i2c1-gpio {
226 conf {
227 groups = "gpio0_24_grp", "gpio0_25_grp";
228 slew-rate = <SLEW_RATE_SLOW>;
229 power-source = <IO_STANDARD_LVCMOS18>;
230 };
231
232 mux {
233 groups = "gpio0_24_grp", "gpio0_25_grp";
234 function = "gpio0";
235 };
236 };
237
238 pinctrl_gem1_default: gem1-default {
239 conf {
240 groups = "ethernet1_0_grp";
241 slew-rate = <SLEW_RATE_SLOW>;
242 power-source = <IO_STANDARD_LVCMOS18>;
243 };
244
245 conf-rx {
246 pins = "MIO45", "MIO46", "MIO47", "MIO48";
247 bias-disable;
248 low-power-disable;
249 };
250
251 conf-bootstrap {
252 pins = "MIO44", "MIO49";
253 bias-disable;
254 output-enable;
255 low-power-disable;
256 };
257
258 conf-tx {
259 pins = "MIO38", "MIO39", "MIO40",
260 "MIO41", "MIO42", "MIO43";
261 bias-disable;
262 output-enable;
263 low-power-enable;
264 };
265
266 conf-mdio {
267 groups = "mdio1_0_grp";
268 slew-rate = <SLEW_RATE_SLOW>;
269 power-source = <IO_STANDARD_LVCMOS18>;
270 bias-disable;
271 output-enable;
272 };
273
274 mux-mdio {
275 function = "mdio1";
276 groups = "mdio1_0_grp";
277 };
278
279 mux {
280 function = "ethernet1";
281 groups = "ethernet1_0_grp";
282 };
283 };
284
285 pinctrl_usb0_default: usb0-default {
286 conf {
287 groups = "usb0_0_grp";
288 power-source = <IO_STANDARD_LVCMOS18>;
289 };
290
291 conf-rx {
292 pins = "MIO52", "MIO53", "MIO55";
293 bias-high-impedance;
294 drive-strength = <12>;
295 slew-rate = <SLEW_RATE_FAST>;
296 };
297
298 conf-tx {
299 pins = "MIO54", "MIO56", "MIO57", "MIO58", "MIO59",
300 "MIO60", "MIO61", "MIO62", "MIO63";
301 bias-disable;
302 output-enable;
303 drive-strength = <4>;
304 slew-rate = <SLEW_RATE_SLOW>;
305 };
306
307 mux {
308 groups = "usb0_0_grp";
309 function = "usb0";
310 };
311 };
312
313 pinctrl_usb1_default: usb1-default {
314 conf {
315 groups = "usb1_0_grp";
316 power-source = <IO_STANDARD_LVCMOS18>;
317 };
318
319 conf-rx {
320 pins = "MIO64", "MIO65", "MIO67";
321 bias-high-impedance;
322 drive-strength = <12>;
323 slew-rate = <SLEW_RATE_FAST>;
324 };
325
326 conf-tx {
327 pins = "MIO66", "MIO68", "MIO69", "MIO70", "MIO71",
328 "MIO72", "MIO73", "MIO74", "MIO75";
329 bias-disable;
330 output-enable;
331 drive-strength = <4>;
332 slew-rate = <SLEW_RATE_SLOW>;
333 };
334
335 mux {
336 groups = "usb1_0_grp";
337 function = "usb1";
338 };
339 };
340};
341
342&uart0 {
343 status = "okay";
344 pinctrl-names = "default";
345 pinctrl-0 = <&pinctrl_uart0_default>;
346 assigned-clock-rates = <100000000>;
347};
348
349&uart1 {
350 status = "okay";
351 pinctrl-names = "default";
352 pinctrl-0 = <&pinctrl_uart1_default>;
353};