1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * dts file for Xilinx ZynqMP ZCU100 revC
4 *
5 * (C) Copyright 2016 - 2019, Xilinx, Inc.
6 *
7 * Michal Simek <michal.simek@xilinx.com>
8 * Nathalie Chan King Choy
9 */
10
11/dts-v1/;
12
13#include "zynqmp.dtsi"
14#include "zynqmp-clk-ccf.dtsi"
15#include <dt-bindings/input/input.h>
16#include <dt-bindings/interrupt-controller/irq.h>
17#include <dt-bindings/gpio/gpio.h>
18#include <dt-bindings/phy/phy.h>
19
20/ {
21	model = "ZynqMP ZCU100 RevC";
22	compatible = "xlnx,zynqmp-zcu100-revC", "xlnx,zynqmp-zcu100", "xlnx,zynqmp";
23
24	aliases {
25		i2c0 = &i2c1;
26		rtc0 = &rtc;
27		serial0 = &uart1;
28		serial1 = &uart0;
29		serial2 = &dcc;
30		spi0 = &spi0;
31		spi1 = &spi1;
32		mmc0 = &sdhci0;
33		mmc1 = &sdhci1;
34	};
35
36	chosen {
37		bootargs = "earlycon";
38		stdout-path = "serial0:115200n8";
39	};
40
41	memory@0 {
42		device_type = "memory";
43		reg = <0x0 0x0 0x0 0x80000000>;
44	};
45
46	gpio-keys {
47		compatible = "gpio-keys";
48		autorepeat;
49		sw4 {
50			label = "sw4";
51			gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
52			linux,code = <KEY_POWER>;
53			wakeup-source;
54			autorepeat;
55		};
56	};
57
58	leds {
59		compatible = "gpio-leds";
60		led-ds2 {
61			label = "ds2";
62			gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
63			linux,default-trigger = "heartbeat";
64		};
65
66		led-ds3 {
67			label = "ds3";
68			gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
69			linux,default-trigger = "phy0tx"; /* WLAN tx */
70			default-state = "off";
71		};
72
73		led-ds4 {
74			label = "ds4";
75			gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
76			linux,default-trigger = "phy0rx"; /* WLAN rx */
77			default-state = "off";
78		};
79
80		led-ds5 {
81			label = "ds5";
82			gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
83			linux,default-trigger = "bluetooth-power";
84		};
85
86		vbus-det { /* U5 USB5744 VBUS detection via MIO25 */
87			label = "vbus_det";
88			gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
89			default-state = "on";
90		};
91	};
92
93	wmmcsdio_fixed: fixedregulator-mmcsdio {
94		compatible = "regulator-fixed";
95		regulator-name = "wmmcsdio_fixed";
96		regulator-min-microvolt = <3300000>;
97		regulator-max-microvolt = <3300000>;
98		regulator-always-on;
99		regulator-boot-on;
100	};
101
102	sdio_pwrseq: sdio-pwrseq {
103		compatible = "mmc-pwrseq-simple";
104		reset-gpios = <&gpio 7 GPIO_ACTIVE_LOW>; /* WIFI_EN */
105		post-power-on-delay-ms = <10>;
106	};
107
108	ina226 {
109		compatible = "iio-hwmon";
110		io-channels = <&u35 0>, <&u35 1>, <&u35 2>, <&u35 3>;
111	};
112
113	si5335a_0: clk26 {
114		compatible = "fixed-clock";
115		#clock-cells = <0>;
116		clock-frequency = <26000000>;
117	};
118
119	si5335a_1: clk27 {
120		compatible = "fixed-clock";
121		#clock-cells = <0>;
122		clock-frequency = <27000000>;
123	};
124};
125
126&dcc {
127	status = "okay";
128};
129
130&gpio {
131	status = "okay";
132	gpio-line-names = "UART1_TX", "UART1_RX", "UART0_RX", "UART0_TX", "I2C1_SCL",
133			  "I2C1_SDA", "SPI1_SCLK", "WLAN_EN", "BT_EN", "SPI1_CS",
134			  "SPI1_MISO", "SPI1_MOSI", "I2C_MUX_RESET", "SD0_DAT0", "SD0_DAT1",
135			  "SD0_DAT2", "SD0_DAT3", "PS_LED3", "PS_LED2", "PS_LED1",
136			  "PS_LED0", "SD0_CMD", "SD0_CLK", "GPIO_PB", "SD0_DETECT",
137			  "VBUS_DET", "POWER_INT", "DP_AUX", "DP_HPD", "DP_OE",
138			  "DP_AUX_IN", "INA226_ALERT", "PS_FP_PWR_EN", "PL_PWR_EN", "POWER_KILL",
139			  "", "GPIO-A", "GPIO-B", "SPI0_SCLK", "GPIO-C",
140			  "GPIO-D", "SPI0_CS", "SPI0_MISO", "SPI_MOSI", "GPIO-E",
141			  "GPIO-F", "SD1_D0", "SD1_D1", "SD1_D2", "SD1_D3",
142			  "SD1_CMD", "SD1_CLK", "USB0_CLK", "USB0_DIR", "USB0_DATA2",
143			  "USB0_NXT", "USB0_DATA0", "USB0_DATA1", "USB0_STP", "USB0_DATA3",
144			  "USB0_DATA4", "USB0_DATA5", "USB0_DATA6", "USB0_DATA7", "USB1_CLK",
145			  "USB1_DIR", "USB1_DATA2", "USB1_NXT", "USB1_DATA0", "USB1_DATA1",
146			  "USB1_STP", "USB1_DATA3", "USB1_DATA4", "USB1_DATA5", "USB1_DATA6",
147			  "USB_DATA7", "WLAN_IRQ", "PMIC_IRQ", /* MIO end and EMIO start */
148			  "", "",
149			  "", "", "", "", "", "", "", "", "", "",
150			  "", "", "", "", "", "", "", "", "", "",
151			  "", "", "", "", "", "", "", "", "", "",
152			  "", "", "", "", "", "", "", "", "", "",
153			  "", "", "", "", "", "", "", "", "", "",
154			  "", "", "", "", "", "", "", "", "", "",
155			  "", "", "", "", "", "", "", "", "", "",
156			  "", "", "", "", "", "", "", "", "", "",
157			  "", "", "", "", "", "", "", "", "", "",
158			  "", "", "", "";
159};
160
161&i2c1 {
162	status = "okay";
163	clock-frequency = <100000>;
164	i2c-mux@75 { /* u11 */
165		compatible = "nxp,pca9548";
166		#address-cells = <1>;
167		#size-cells = <0>;
168		reg = <0x75>;
169		i2csw_0: i2c@0 {
170			#address-cells = <1>;
171			#size-cells = <0>;
172			reg = <0>;
173			label = "LS-I2C0";
174		};
175		i2csw_1: i2c@1 {
176			#address-cells = <1>;
177			#size-cells = <0>;
178			reg = <1>;
179			label = "LS-I2C1";
180		};
181		i2csw_2: i2c@2 {
182			#address-cells = <1>;
183			#size-cells = <0>;
184			reg = <2>;
185			label = "HS-I2C2";
186		};
187		i2csw_3: i2c@3 {
188			#address-cells = <1>;
189			#size-cells = <0>;
190			reg = <3>;
191			label = "HS-I2C3";
192		};
193		i2csw_4: i2c@4 {
194			#address-cells = <1>;
195			#size-cells = <0>;
196			reg = <0x4>;
197
198			pmic: pmic@5e { /* Custom TI PMIC u33 */
199				compatible = "ti,tps65086";
200				reg = <0x5e>;
201				interrupt-parent = <&gpio>;
202				interrupts = <77 IRQ_TYPE_LEVEL_LOW>;
203				#gpio-cells = <2>;
204				gpio-controller;
205			};
206		};
207		i2csw_5: i2c@5 {
208			#address-cells = <1>;
209			#size-cells = <0>;
210			reg = <5>;
211			/* PS_PMBUS */
212			u35: ina226@40 { /* u35 */
213				compatible = "ti,ina226";
214				#io-channel-cells = <1>;
215				reg = <0x40>;
216				shunt-resistor = <10000>;
217				/* MIO31 is alert which should be routed to PMUFW */
218			};
219		};
220		i2csw_6: i2c@6 {
221			#address-cells = <1>;
222			#size-cells = <0>;
223			reg = <6>;
224			/*
225			 * Not Connected
226			 */
227		};
228		i2csw_7: i2c@7 {
229			#address-cells = <1>;
230			#size-cells = <0>;
231			reg = <7>;
232			/*
233			 * usb5744 (DNP) - U5
234			 * 100kHz - this is default freq for us
235			 */
236		};
237	};
238};
239
240&psgtr {
241	status = "okay";
242	/* usb3, dps */
243	clocks = <&si5335a_0>, <&si5335a_1>;
244	clock-names = "ref0", "ref1";
245};
246
247&rtc {
248	status = "okay";
249};
250
251/* SD0 only supports 3.3V, no level shifter */
252&sdhci0 {
253	status = "okay";
254	no-1-8-v;
255	disable-wp;
256	xlnx,mio-bank = <0>;
257};
258
259&sdhci1 {
260	status = "okay";
261	bus-width = <0x4>;
262	xlnx,mio-bank = <0>;
263	non-removable;
264	disable-wp;
265	cap-power-off-card;
266	mmc-pwrseq = <&sdio_pwrseq>;
267	vqmmc-supply = <&wmmcsdio_fixed>;
268	#address-cells = <1>;
269	#size-cells = <0>;
270	wlcore: wifi@2 {
271		compatible = "ti,wl1831";
272		reg = <2>;
273		interrupt-parent = <&gpio>;
274		interrupts = <76 IRQ_TYPE_EDGE_RISING>; /* MIO76 WLAN_IRQ 1V8 */
275	};
276};
277
278&spi0 { /* Low Speed connector */
279	status = "okay";
280	label = "LS-SPI0";
281	num-cs = <1>;
282};
283
284&spi1 { /* High Speed connector */
285	status = "okay";
286	label = "HS-SPI1";
287	num-cs = <1>;
288};
289
290&uart0 {
291	status = "okay";
292	bluetooth {
293		compatible = "ti,wl1831-st";
294		enable-gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
295	};
296};
297
298&uart1 {
299	status = "okay";
300
301};
302
303/* ULPI SMSC USB3320 */
304&usb0 {
305	status = "okay";
306	dr_mode = "peripheral";
307};
308
309/* ULPI SMSC USB3320 */
310&usb1 {
311	status = "okay";
312	dr_mode = "host";
313};
314
315&watchdog0 {
316	status = "okay";
317};
318
319&zynqmp_dpdma {
320	status = "okay";
321};
322
323&zynqmp_dpsub {
324	status = "okay";
325	phy-names = "dp-phy0", "dp-phy1";
326	phys = <&psgtr 1 PHY_TYPE_DP 0 1>,
327	       <&psgtr 0 PHY_TYPE_DP 1 1>;
328};
329