1// SPDX-License-Identifier: GPL-2.0
2/*
3 *  Copyright (C) 2011 - 2014 Xilinx
4 *  Copyright (C) 2012 National Instruments Corp.
5 */
6/dts-v1/;
7#include "zynq-7000.dtsi"
8#include <dt-bindings/gpio/gpio.h>
9
10/ {
11	model = "Xilinx ZC702 board";
12	compatible = "xlnx,zynq-zc702", "xlnx,zynq-7000";
13
14	aliases {
15		ethernet0 = &gem0;
16		i2c0 = &i2c0;
17		serial0 = &uart1;
18		spi0 = &qspi;
19		mmc0 = &sdhci0;
20		nvmem0 = &eeprom;
21		rtc0 = &rtc;
22	};
23
24	memory@0 {
25		device_type = "memory";
26		reg = <0x0 0x40000000>;
27	};
28
29	chosen {
30		bootargs = "";
31		stdout-path = "serial0:115200n8";
32	};
33
34	gpio-keys {
35		compatible = "gpio-keys";
36		autorepeat;
37		switch-14 {
38			label = "sw14";
39			gpios = <&gpio0 12 0>;
40			linux,code = <108>; /* down */
41			wakeup-source;
42			autorepeat;
43		};
44		switch-13 {
45			label = "sw13";
46			gpios = <&gpio0 14 0>;
47			linux,code = <103>; /* up */
48			wakeup-source;
49			autorepeat;
50		};
51	};
52
53	leds {
54		compatible = "gpio-leds";
55
56		led-ds23 {
57			label = "ds23";
58			gpios = <&gpio0 10 0>;
59			linux,default-trigger = "heartbeat";
60		};
61	};
62
63	usb_phy0: phy0 {
64		compatible = "usb-nop-xceiv";
65		#phy-cells = <0>;
66	};
67};
68
69&can0 {
70	status = "okay";
71	pinctrl-names = "default";
72	pinctrl-0 = <&pinctrl_can0_default>;
73};
74
75&clkc {
76	ps-clk-frequency = <33333333>;
77};
78
79&gem0 {
80	status = "okay";
81	phy-mode = "rgmii-id";
82	phy-handle = <&ethernet_phy>;
83	pinctrl-names = "default";
84	pinctrl-0 = <&pinctrl_gem0_default>;
85
86	ethernet_phy: ethernet-phy@7 {
87		reg = <7>;
88	};
89};
90
91&gpio0 {
92	pinctrl-names = "default";
93	pinctrl-0 = <&pinctrl_gpio0_default>;
94};
95
96&i2c0 {
97	status = "okay";
98	clock-frequency = <400000>;
99	pinctrl-names = "default", "gpio";
100	pinctrl-0 = <&pinctrl_i2c0_default>;
101	pinctrl-1 = <&pinctrl_i2c0_gpio>;
102	scl-gpios = <&gpio0 50 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
103	sda-gpios = <&gpio0 51 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
104
105	i2c-mux@74 {
106		compatible = "nxp,pca9548";
107		#address-cells = <1>;
108		#size-cells = <0>;
109		reg = <0x74>;
110
111		i2c@0 {
112			#address-cells = <1>;
113			#size-cells = <0>;
114			reg = <0>;
115			si570: clock-generator@5d {
116				#clock-cells = <0>;
117				compatible = "silabs,si570";
118				temperature-stability = <50>;
119				reg = <0x5d>;
120				factory-fout = <156250000>;
121				clock-frequency = <148500000>;
122			};
123		};
124
125		i2c@1 {
126			#address-cells = <1>;
127			#size-cells = <0>;
128			reg = <1>;
129			adv7511: hdmi-tx@39 {
130				compatible = "adi,adv7511";
131				reg = <0x39>;
132				adi,input-depth = <8>;
133				adi,input-colorspace = "yuv422";
134				adi,input-clock = "1x";
135				adi,input-style = <3>;
136				adi,input-justification = "right";
137			};
138		};
139
140		i2c@2 {
141			#address-cells = <1>;
142			#size-cells = <0>;
143			reg = <2>;
144			eeprom: eeprom@54 {
145				compatible = "atmel,24c08";
146				reg = <0x54>;
147			};
148		};
149
150		i2c@3 {
151			#address-cells = <1>;
152			#size-cells = <0>;
153			reg = <3>;
154			gpio@21 {
155				compatible = "ti,tca6416";
156				reg = <0x21>;
157				gpio-controller;
158				#gpio-cells = <2>;
159			};
160		};
161
162		i2c@4 {
163			#address-cells = <1>;
164			#size-cells = <0>;
165			reg = <4>;
166			rtc: rtc@51 {
167				compatible = "nxp,pcf8563";
168				reg = <0x51>;
169			};
170		};
171
172		i2c@7 {
173			#address-cells = <1>;
174			#size-cells = <0>;
175			reg = <7>;
176			hwmon@34 {
177				compatible = "ti,ucd9248";
178				reg = <0x34>;
179			};
180			hwmon@35 {
181				compatible = "ti,ucd9248";
182				reg = <0x35>;
183			};
184			hwmon@36 {
185				compatible = "ti,ucd9248";
186				reg = <0x36>;
187			};
188		};
189	};
190};
191
192&pinctrl0 {
193	pinctrl_can0_default: can0-default {
194		mux {
195			function = "can0";
196			groups = "can0_9_grp";
197		};
198
199		conf {
200			groups = "can0_9_grp";
201			slew-rate = <0>;
202			power-source = <1>;
203		};
204
205		conf-rx {
206			pins = "MIO46";
207			bias-high-impedance;
208		};
209
210		conf-tx {
211			pins = "MIO47";
212			bias-disable;
213		};
214	};
215
216	pinctrl_gem0_default: gem0-default {
217		mux {
218			function = "ethernet0";
219			groups = "ethernet0_0_grp";
220		};
221
222		conf {
223			groups = "ethernet0_0_grp";
224			slew-rate = <0>;
225			power-source = <4>;
226		};
227
228		conf-rx {
229			pins = "MIO22", "MIO23", "MIO24", "MIO25", "MIO26", "MIO27";
230			bias-high-impedance;
231			low-power-disable;
232		};
233
234		conf-tx {
235			pins = "MIO16", "MIO17", "MIO18", "MIO19", "MIO20", "MIO21";
236			bias-disable;
237			low-power-enable;
238		};
239
240		mux-mdio {
241			function = "mdio0";
242			groups = "mdio0_0_grp";
243		};
244
245		conf-mdio {
246			groups = "mdio0_0_grp";
247			slew-rate = <0>;
248			power-source = <1>;
249			bias-disable;
250		};
251	};
252
253	pinctrl_gpio0_default: gpio0-default {
254		mux {
255			function = "gpio0";
256			groups = "gpio0_7_grp", "gpio0_8_grp", "gpio0_9_grp",
257				 "gpio0_10_grp", "gpio0_11_grp", "gpio0_12_grp",
258				 "gpio0_13_grp", "gpio0_14_grp";
259		};
260
261		conf {
262			groups = "gpio0_7_grp", "gpio0_8_grp", "gpio0_9_grp",
263				 "gpio0_10_grp", "gpio0_11_grp", "gpio0_12_grp",
264				 "gpio0_13_grp", "gpio0_14_grp";
265			slew-rate = <0>;
266			power-source = <1>;
267		};
268
269		conf-pull-up {
270			pins = "MIO9", "MIO10", "MIO11", "MIO12", "MIO13", "MIO14";
271			bias-pull-up;
272		};
273
274		conf-pull-none {
275			pins = "MIO7", "MIO8";
276			bias-disable;
277		};
278	};
279
280	pinctrl_i2c0_default: i2c0-default {
281		mux {
282			groups = "i2c0_10_grp";
283			function = "i2c0";
284		};
285
286		conf {
287			groups = "i2c0_10_grp";
288			bias-pull-up;
289			slew-rate = <0>;
290			power-source = <1>;
291		};
292	};
293
294	pinctrl_i2c0_gpio: i2c0-gpio-grp {
295		mux {
296			groups = "gpio0_50_grp", "gpio0_51_grp";
297			function = "gpio0";
298		};
299
300		conf {
301			groups = "gpio0_50_grp", "gpio0_51_grp";
302			slew-rate = <0>;
303			power-source = <1>;
304		};
305	};
306
307	pinctrl_sdhci0_default: sdhci0-default {
308		mux {
309			groups = "sdio0_2_grp";
310			function = "sdio0";
311		};
312
313		conf {
314			groups = "sdio0_2_grp";
315			slew-rate = <0>;
316			power-source = <1>;
317			bias-disable;
318		};
319
320		mux-cd {
321			groups = "gpio0_0_grp";
322			function = "sdio0_cd";
323		};
324
325		conf-cd {
326			groups = "gpio0_0_grp";
327			bias-high-impedance;
328			bias-pull-up;
329			slew-rate = <0>;
330			power-source = <1>;
331		};
332
333		mux-wp {
334			groups = "gpio0_15_grp";
335			function = "sdio0_wp";
336		};
337
338		conf-wp {
339			groups = "gpio0_15_grp";
340			bias-high-impedance;
341			bias-pull-up;
342			slew-rate = <0>;
343			power-source = <1>;
344		};
345	};
346
347	pinctrl_uart1_default: uart1-default {
348		mux {
349			groups = "uart1_10_grp";
350			function = "uart1";
351		};
352
353		conf {
354			groups = "uart1_10_grp";
355			slew-rate = <0>;
356			power-source = <1>;
357		};
358
359		conf-rx {
360			pins = "MIO49";
361			bias-high-impedance;
362		};
363
364		conf-tx {
365			pins = "MIO48";
366			bias-disable;
367		};
368	};
369
370	pinctrl_usb0_default: usb0-default {
371		mux {
372			groups = "usb0_0_grp";
373			function = "usb0";
374		};
375
376		conf {
377			groups = "usb0_0_grp";
378			slew-rate = <0>;
379			power-source = <1>;
380		};
381
382		conf-rx {
383			pins = "MIO29", "MIO31", "MIO36";
384			bias-high-impedance;
385		};
386
387		conf-tx {
388			pins = "MIO28", "MIO30", "MIO32", "MIO33", "MIO34",
389			       "MIO35", "MIO37", "MIO38", "MIO39";
390			bias-disable;
391		};
392	};
393};
394
395&qspi {
396	bootph-all;
397	status = "okay";
398	num-cs = <1>;
399	flash@0 {
400		compatible = "jedec,spi-nor";
401		reg = <0x0>;
402		spi-tx-bus-width = <1>;
403		spi-rx-bus-width = <4>;
404		spi-max-frequency = <50000000>;
405		partitions {
406			compatible = "fixed-partitions";
407			#address-cells = <1>;
408			#size-cells = <1>;
409			partition@0 {
410				label = "qspi-fsbl-uboot";
411				reg = <0x0 0x100000>;
412			};
413			partition@100000 {
414				label = "qspi-linux";
415				reg = <0x100000 0x500000>;
416			};
417			partition@600000 {
418				label = "qspi-device-tree";
419				reg = <0x600000 0x20000>;
420			};
421			partition@620000 {
422				label = "qspi-rootfs";
423				reg = <0x620000 0x5e0000>;
424			};
425			partition@c00000 {
426				label = "qspi-bitstream";
427				reg = <0xc00000 0x400000>;
428			};
429		};
430	};
431};
432
433&sdhci0 {
434	bootph-all;
435	status = "okay";
436	pinctrl-names = "default";
437	pinctrl-0 = <&pinctrl_sdhci0_default>;
438};
439
440&uart1 {
441	bootph-all;
442	status = "okay";
443	pinctrl-names = "default";
444	pinctrl-0 = <&pinctrl_uart1_default>;
445};
446
447&usb0 {
448	status = "okay";
449	dr_mode = "host";
450	usb-phy = <&usb_phy0>;
451	pinctrl-names = "default";
452	pinctrl-0 = <&pinctrl_usb0_default>;
453};
454