blob: 6f5856017bf39fdde54e767ae5ab84ea8bb86efd [file] [log] [blame]
Michal Simek68b6dba2023-09-27 11:53:32 +02001// SPDX-License-Identifier: GPL-2.0
2/*
3 * dts file for Xilinx ZynqMP Generic System Controller
4 *
5 * (C) Copyright 2021 - 2022, Xilinx, Inc.
Saeed Nowshadi433df512024-10-24 12:42:33 +02006 * (C) Copyright 2022 - 2024, Advanced Micro Devices, Inc.
Michal Simek68b6dba2023-09-27 11:53:32 +02007 *
8 * Michal Simek <michal.simek@amd.com>
9 */
10/dts-v1/;
11
12#include "zynqmp.dtsi"
13#include "zynqmp-clk-ccf.dtsi"
14#include <dt-bindings/input/input.h>
15#include <dt-bindings/gpio/gpio.h>
16#include <dt-bindings/net/ti-dp83867.h>
17#include <dt-bindings/pinctrl/pinctrl-zynqmp.h>
18#include <dt-bindings/phy/phy.h>
19
20/ {
21 model = "ZynqMP Generic System Controller";
22 compatible = "xlnx,zynqmp-sc-revB", "xlnx,zynqmp-sc", "xlnx,zynqmp";
23
24 aliases {
25 i2c0 = &i2c0;
26 i2c1 = &i2c1;
27 mmc0 = &sdhci0;
28 mmc1 = &sdhci1;
29 nvmem0 = &eeprom;
30 rtc0 = &rtc;
31 serial0 = &uart0;
32 serial1 = &uart1;
33 serial2 = &dcc;
34 spi0 = &qspi;
35 spi1 = &spi0;
36 spi2 = &spi1;
37 };
38
39 chosen {
40 bootargs = "earlycon";
41 stdout-path = "serial1:115200n8";
42 };
43
44 memory@0 {
45 device_type = "memory";
46 reg = <0x0 0x0 0x0 0x80000000>;
47 };
48
49 gpio-keys {
50 compatible = "gpio-keys";
51 autorepeat;
Michal Simek518d1662024-03-08 09:40:52 +010052 key-fwuen {
Michal Simek68b6dba2023-09-27 11:53:32 +020053 label = "sw16";
54 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
55 linux,code = <BTN_MISC>;
56 wakeup-source;
57 autorepeat;
58 };
59 };
60
61 leds {
62 compatible = "gpio-leds";
63 ds40-led {
64 label = "heartbeat";
65 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
66 linux,default-trigger = "heartbeat";
67 };
68 ds44-led {
69 label = "status";
70 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
71 };
72 };
73
Michal Simeke3157622024-01-08 10:24:45 +010074 si5332_2: si5332-2 { /* u42 */
Michal Simek68b6dba2023-09-27 11:53:32 +020075 compatible = "fixed-clock";
76 #clock-cells = <0>;
77 clock-frequency = <26000000>;
78 };
79
80 pwm-fan {
81 compatible = "pwm-fan";
82 status = "okay";
Saeed Nowshadi433df512024-10-24 12:42:33 +020083 pwms = <&ttc0 2 40000 0>;
Michal Simek68b6dba2023-09-27 11:53:32 +020084 };
85};
86
87&gpio {
88 status = "okay";
89 gpio-line-names = "QSPI_CLK", "QSPI_DQ1", "QSPI_DQ2", "QSPI_DQ3", "QSPI_DQ0", /* 0 - 4 */
90 "QSPI_CS_B", "", "LED1", "LED2", "", /* 5 - 9 */
91 "", "ZU4_TRIGGER", "FWUEN", "EMMC_DAT0", "EMMC_DAT1", /* 10 - 14 */
92 "EMMC_DAT2", "EMMC_DAT3", "EMMC_DAT4", "EMMC_DAT5", "EMMC_DAT6", /* 15 - 19 */
93 "EMMC_DAT7", "EMMC_CMD", "EMMC_CLK", "EMMC_RST_B", "I2C1_SCL", /* 20 - 24 */
94 "I2C1_SDA", "UART0_RXD", "UART0_TXD", "", "", /* 25 - 29 */
95 "", "", "", "", "I2C0_SCL", /* 30 - 34 */
96 "I2C0_SDA", "UART1_TXD", "UART1_RXD", "GEM_TX_CLK", "GEM_TX_D0", /* 35 - 39 */
97 "GEM_TX_D1", "GEM_TX_D2", "GEM_TX_D3", "GEM_TX_CTL", "GEM_RX_CLK", /* 40 - 44 */
98 "GEM_RX_D0", "GEM_RX_D1", "GEM_RX_D2", "GEM_RX_D3", "GEM_RX_CTL", /* 45 - 49 */
99 "GEM_MDC", "GEM_MDIO", "USB0_CLK", "USB0_DIR", "USB0_DATA2", /* 50 - 54 */
100 "USB0_NXT", "USB0_DATA0", "USB0_DATA1", "USB0_STP", "USB0_DATA3", /* 55 - 59 */
101 "USB0_DATA4", "USB0_DATA5", "USB0_DATA6", "USB0_DATA7", "", /* 60 - 64 */
102 "", "", "", "", "", /* 65 - 69 */
103 "", "", "", "", "", /* 70 - 74 */
104 "", "", "ETH_RESET_B", /* 75 - 77, MIO end and EMIO start */
105 "", "", /* 78 - 79 */
106 "", "", "", "", "", /* 80 - 84 */
Michal Simeka8c5ce42024-09-13 11:28:46 +0200107 "", "", "", "", "", /* 85 - 89 */
Michal Simek68b6dba2023-09-27 11:53:32 +0200108 "", "", "", "", "", /* 90 - 94 */
109 "", "", "", "", "", /* 95 - 99 */
110 "", "", "", "", "", /* 100 - 104 */
111 "", "", "", "", "", /* 105 - 109 */
112 "", "", "", "", "", /* 110 - 114 */
113 "", "", "", "", "", /* 115 - 119 */
114 "", "", "", "", "", /* 120 - 124 */
115 "", "", "", "", "", /* 125 - 129 */
116 "", "", "", "", "", /* 130 - 134 */
117 "", "", "", "", "", /* 135 - 139 */
118 "", "", "", "", "", /* 140 - 144 */
119 "", "", "", "", "", /* 145 - 149 */
120 "", "", "", "", "", /* 150 - 154 */
121 "", "", "", "", "", /* 155 - 159 */
122 "", "", "", "", "", /* 160 - 164 */
123 "", "", "", "", "", /* 165 - 169 */
124 "", "", "", ""; /* 170 - 173 */
125};
126
127&gem1 { /* gem1 MIO38-49, MDIO MIO50/51 */
128 status = "okay";
129 phy-mode = "rgmii-id";
130 phy-handle = <&phy0>;
131 pinctrl-names = "default";
132 pinctrl-0 = <&pinctrl_gem1_default>;
133
134 mdio: mdio {
135 #address-cells = <1>;
136 #size-cells = <0>;
137
138 phy0: ethernet-phy@1 {
139 #phy-cells = <1>;
140 compatible = "ethernet-phy-id2000.a231";
141 reg = <1>;
142 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
143 ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
144 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
145 ti,dp83867-rxctrl-strap-quirk;
146 reset-gpios = <&gpio 77 GPIO_ACTIVE_LOW>;
147 reset-assert-us = <100>;
148 reset-deassert-us = <280>;
149 };
150 };
151};
152
153&i2c0 {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 status = "okay";
157 clock-frequency = <100000>;
158 pinctrl-names = "default", "gpio";
159 pinctrl-0 = <&pinctrl_i2c0_default>;
160 pinctrl-1 = <&pinctrl_i2c0_gpio>;
161 scl-gpios = <&gpio 34 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
162 sda-gpios = <&gpio 35 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
163};
164
165&i2c1 { /* i2c1 MIO 24-25 */
166 status = "okay";
167 bootph-all;
168 clock-frequency = <100000>;
169 pinctrl-names = "default", "gpio";
170 pinctrl-0 = <&pinctrl_i2c1_default>;
171 pinctrl-1 = <&pinctrl_i2c1_gpio>;
172 scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
173 sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
174
175 /* Use for storing information about SC board */
176 eeprom: eeprom@54 { /* u34 - m24128 16kB */
177 compatible = "st,24c128", "atmel,24c128";
Jonathan Stroud6670a262025-01-06 09:42:48 +0100178 label = "eeprom_cc";
Michal Simek68b6dba2023-09-27 11:53:32 +0200179 reg = <0x54>; /* & 0x5c */
180 bootph-all;
181 };
182};
183
184/* USB 3.0 only */
185&psgtr {
186 status = "okay";
187 /* nc, nc, usb3 */
188 clocks = <&si5332_2>;
189 clock-names = "ref2";
190};
191
192&qspi { /* MIO 0-5 */
193 status = "okay";
194 /* QSPI should also have PINCTRL setup */
195 flash@0 {
Michal Simekae245072024-03-08 09:41:23 +0100196 compatible = "m25p80", "jedec,spi-nor"; /* mt25qu512abb8e12 512Mib */
Michal Simek68b6dba2023-09-27 11:53:32 +0200197 #address-cells = <1>;
198 #size-cells = <1>;
199 reg = <0>;
200 spi-tx-bus-width = <4>;
201 spi-rx-bus-width = <4>;
202 spi-max-frequency = <40000000>; /* 40MHz */
203 partition@0 {
204 label = "Image Selector";
205 reg = <0x0 0x80000>; /* 512KB */
206 read-only;
207 lock;
208 };
209 partition@80000 {
210 label = "Image Selector Golden";
211 reg = <0x80000 0x80000>; /* 512KB */
212 read-only;
213 lock;
214 };
215 partition@100000 {
216 label = "Persistent Register";
217 reg = <0x100000 0x20000>; /* 128KB */
218 };
219 partition@120000 {
220 label = "Persistent Register Backup";
221 reg = <0x120000 0x20000>; /* 128KB */
222 };
223 partition@140000 {
224 label = "Open_1";
225 reg = <0x140000 0xC0000>; /* 768KB */
226 };
227 partition@200000 {
228 label = "Image A (FSBL, PMU, ATF, U-Boot)";
229 reg = <0x200000 0xD00000>; /* 13MB */
230 };
231 partition@f00000 {
232 label = "ImgSel Image A Catch";
233 reg = <0xF00000 0x80000>; /* 512KB */
234 read-only;
235 lock;
236 };
237 partition@f80000 {
238 label = "Image B (FSBL, PMU, ATF, U-Boot)";
239 reg = <0xF80000 0xD00000>; /* 13MB */
240 };
241 partition@1c80000 {
242 label = "ImgSel Image B Catch";
243 reg = <0x1C80000 0x80000>; /* 512KB */
244 read-only;
245 lock;
246 };
247 partition@1d00000 {
248 label = "Open_2";
249 reg = <0x1D00000 0x100000>; /* 1MB */
250 };
251 partition@1e00000 {
252 label = "Recovery Image";
253 reg = <0x1E00000 0x200000>; /* 2MB */
254 read-only;
255 lock;
256 };
257 partition@2000000 {
258 label = "Recovery Image Backup";
259 reg = <0x2000000 0x200000>; /* 2MB */
260 read-only;
261 lock;
262 };
263 partition@2200000 {
264 label = "U-Boot storage variables";
265 reg = <0x2200000 0x20000>; /* 128KB */
266 };
267 partition@2220000 {
268 label = "U-Boot storage variables backup";
269 reg = <0x2220000 0x20000>; /* 128KB */
270 };
271 partition@2240000 {
272 label = "SHA256";
273 reg = <0x2240000 0x40000>; /* 256B but 256KB sector */
274 read-only;
275 lock;
276 };
277 partition@2280000 {
278 label = "Secure OS Storage";
279 reg = <0x2280000 0x20000>; /* 128KB */
280 };
281 partition@22A0000 {
282 label = "User";
283 reg = <0x22A0000 0x1d60000>; /* 29.375 MB */
284 };
285 };
286};
287
288&sdhci0 { /* emmc MIO 13-23 - with some settings MTFC16GAPALBH 16GB */
289 status = "okay";
290 non-removable;
291 disable-wp;
Paul Alvina1398f02024-09-25 09:03:13 +0200292 no-sd;
293 no-sdio;
294 cap-mmc-hw-reset;
Michal Simek68b6dba2023-09-27 11:53:32 +0200295 bus-width = <8>;
296 xlnx,mio-bank = <0>;
297};
298
299&ttc0 {
300 status = "okay";
301 #pwm-cells = <3>;
302};
303
304&uart1 { /* uart0 MIO36-37 */
305 status = "okay";
306 pinctrl-names = "default";
307 pinctrl-0 = <&pinctrl_uart1_default>;
308};
309
310&pinctrl0 { /* required by spec */
311 status = "okay";
312
313 pinctrl_uart1_default: uart1-default {
314 conf {
315 groups = "uart1_9_grp";
316 slew-rate = <SLEW_RATE_SLOW>;
317 power-source = <IO_STANDARD_LVCMOS18>;
318 drive-strength = <12>;
319 };
320
321 conf-rx {
322 pins = "MIO37";
323 bias-high-impedance;
324 };
325
326 conf-tx {
327 pins = "MIO36";
328 bias-disable;
329 };
330
331 mux {
332 groups = "uart1_9_grp";
333 function = "uart1";
334 };
335 };
336
337 pinctrl_i2c0_default: i2c0-default {
338 mux {
339 groups = "i2c0_8_grp";
340 function = "i2c0";
341 };
342
343 conf {
344 groups = "i2c0_8_grp";
345 bias-pull-up;
346 slew-rate = <SLEW_RATE_SLOW>;
347 power-source = <IO_STANDARD_LVCMOS18>;
348 };
349 };
350
Michal Simekcf3cd802023-12-19 17:16:50 +0100351 pinctrl_i2c0_gpio: i2c0-gpio-grp {
Michal Simek68b6dba2023-09-27 11:53:32 +0200352 mux {
353 groups = "gpio0_34_grp", "gpio0_35_grp";
354 function = "gpio0";
355 };
356
357 conf {
358 groups = "gpio0_34_grp", "gpio0_35_grp";
359 slew-rate = <SLEW_RATE_SLOW>;
360 power-source = <IO_STANDARD_LVCMOS18>;
361 };
362 };
363
364 pinctrl_i2c1_default: i2c1-default {
365 conf {
366 groups = "i2c1_6_grp";
367 bias-pull-up;
368 slew-rate = <SLEW_RATE_SLOW>;
369 power-source = <IO_STANDARD_LVCMOS18>;
370 };
371
372 mux {
373 groups = "i2c1_6_grp";
374 function = "i2c1";
375 };
376 };
377
Michal Simekcf3cd802023-12-19 17:16:50 +0100378 pinctrl_i2c1_gpio: i2c1-gpio-grp {
Michal Simek68b6dba2023-09-27 11:53:32 +0200379 conf {
380 groups = "gpio0_24_grp", "gpio0_25_grp";
381 slew-rate = <SLEW_RATE_SLOW>;
382 power-source = <IO_STANDARD_LVCMOS18>;
383 };
384
385 mux {
386 groups = "gpio0_24_grp", "gpio0_25_grp";
387 function = "gpio0";
388 };
389 };
390
391 pinctrl_gem1_default: gem1-default {
392 conf {
393 groups = "ethernet1_0_grp";
394 slew-rate = <SLEW_RATE_SLOW>;
395 power-source = <IO_STANDARD_LVCMOS18>;
396 };
397
398 conf-rx {
399 pins = "MIO44", "MIO46", "MIO48";
400 bias-high-impedance;
401 low-power-disable;
402 };
403
404 conf-bootstrap {
405 pins = "MIO45", "MIO47", "MIO49";
406 bias-disable;
407 low-power-disable;
408 };
409
410 conf-tx {
411 pins = "MIO38", "MIO39", "MIO40",
412 "MIO41", "MIO42", "MIO43";
413 bias-disable;
414 low-power-enable;
415 };
416
417 conf-mdio {
418 groups = "mdio1_0_grp";
419 slew-rate = <SLEW_RATE_SLOW>;
420 power-source = <IO_STANDARD_LVCMOS18>;
421 bias-disable;
422 };
423
424 mux-mdio {
425 function = "mdio1";
426 groups = "mdio1_0_grp";
427 };
428
429 mux {
430 function = "ethernet1";
431 groups = "ethernet1_0_grp";
432 };
433 };
434};