1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the HiHope RZ/G2H Rev.4.0 and
4 * HiHope RZ/G2[MN] Rev.[2.0/3.0/4.0] main board common parts
5 *
6 * Copyright (C) 2019 Renesas Electronics Corp.
7 */
8
9#include <dt-bindings/gpio/gpio.h>
10
11/ {
12	aliases {
13		serial0 = &scif2;
14		serial1 = &hscif0;
15	};
16
17	chosen {
18		bootargs = "ignore_loglevel";
19		stdout-path = "serial0:115200n8";
20	};
21
22	hdmi0-out {
23		compatible = "hdmi-connector";
24		type = "a";
25
26		port {
27			hdmi0_con: endpoint {
28				remote-endpoint = <&rcar_dw_hdmi0_out>;
29			};
30		};
31	};
32
33	leds {
34		compatible = "gpio-leds";
35
36		led1 {
37			gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
38		};
39
40		led2 {
41			gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>;
42		};
43
44		led3 {
45			gpios = <&gpio0  0 GPIO_ACTIVE_HIGH>;
46		};
47
48		led4 {
49			gpios = <&gpio6 11 GPIO_ACTIVE_HIGH>;
50		};
51	};
52
53	reg_1p8v: regulator0 {
54		compatible = "regulator-fixed";
55		regulator-name = "fixed-1.8V";
56		regulator-min-microvolt = <1800000>;
57		regulator-max-microvolt = <1800000>;
58		regulator-boot-on;
59		regulator-always-on;
60	};
61
62	reg_3p3v: regulator1 {
63		compatible = "regulator-fixed";
64		regulator-name = "fixed-3.3V";
65		regulator-min-microvolt = <3300000>;
66		regulator-max-microvolt = <3300000>;
67		regulator-boot-on;
68		regulator-always-on;
69	};
70
71	sound_card: sound {
72		compatible = "audio-graph-card";
73
74		label = "rcar-sound";
75
76		dais = <&rsnd_port>;
77	};
78
79	vbus0_usb2: regulator-vbus0-usb2 {
80		compatible = "regulator-fixed";
81
82		regulator-name = "USB20_VBUS0";
83		regulator-min-microvolt = <5000000>;
84		regulator-max-microvolt = <5000000>;
85
86		gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>;
87		enable-active-high;
88	};
89
90	vccq_sdhi0: regulator-vccq-sdhi0 {
91		compatible = "regulator-gpio";
92
93		regulator-name = "SDHI0 VccQ";
94		regulator-min-microvolt = <1800000>;
95		regulator-max-microvolt = <3300000>;
96
97		gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
98		gpios-states = <1>;
99		states = <3300000 1>, <1800000 0>;
100	};
101
102	x302_clk: x302-clock {
103		compatible = "fixed-clock";
104		#clock-cells = <0>;
105		clock-frequency = <33000000>;
106	};
107
108	x304_clk: x304-clock {
109		compatible = "fixed-clock";
110		#clock-cells = <0>;
111		clock-frequency = <25000000>;
112	};
113};
114
115&audio_clk_a {
116	clock-frequency = <22579200>;
117};
118
119&du {
120	status = "okay";
121};
122
123&ehci0 {
124	status = "okay";
125};
126
127&ehci1 {
128	status = "okay";
129};
130
131&extal_clk {
132	clock-frequency = <16666666>;
133};
134
135&extalr_clk {
136	clock-frequency = <32768>;
137};
138
139&gpio6 {
140	usb1-reset {
141		gpio-hog;
142		gpios = <10 GPIO_ACTIVE_LOW>;
143		output-low;
144		line-name = "usb1-reset";
145	};
146};
147
148&hdmi0 {
149	status = "okay";
150
151	ports {
152		port@1 {
153			reg = <1>;
154			rcar_dw_hdmi0_out: endpoint {
155				remote-endpoint = <&hdmi0_con>;
156			};
157		};
158		port@2 {
159			reg = <2>;
160			dw_hdmi0_snd_in: endpoint {
161				remote-endpoint = <&rsnd_endpoint>;
162			};
163		};
164	};
165};
166
167&hscif0 {
168	pinctrl-0 = <&hscif0_pins>;
169	pinctrl-names = "default";
170
171	uart-has-rtscts;
172	status = "okay";
173};
174
175&hsusb {
176	dr_mode = "otg";
177	status = "okay";
178};
179
180&i2c4 {
181	clock-frequency = <400000>;
182	status = "okay";
183
184	versaclock5: clock-generator@6a {
185		compatible = "idt,5p49v5923";
186		reg = <0x6a>;
187		#clock-cells = <1>;
188		clocks = <&x304_clk>;
189		clock-names = "xin";
190	};
191};
192
193&ohci0 {
194	status = "okay";
195};
196
197&ohci1 {
198	status = "okay";
199};
200
201&pcie_bus_clk {
202	clock-frequency = <100000000>;
203};
204
205&pfc {
206	pinctrl-0 = <&scif_clk_pins>;
207	pinctrl-names = "default";
208
209	hscif0_pins: hscif0 {
210		groups = "hscif0_data", "hscif0_ctrl";
211		function = "hscif0";
212	};
213
214	scif2_pins: scif2 {
215		groups = "scif2_data_a";
216		function = "scif2";
217	};
218
219	scif_clk_pins: scif_clk {
220		groups = "scif_clk_a";
221		function = "scif_clk";
222	};
223
224	sdhi0_pins: sd0 {
225		groups = "sdhi0_data4", "sdhi0_ctrl";
226		function = "sdhi0";
227		power-source = <3300>;
228	};
229
230	sdhi0_pins_uhs: sd0_uhs {
231		groups = "sdhi0_data4", "sdhi0_ctrl";
232		function = "sdhi0";
233		power-source = <1800>;
234	};
235
236	sdhi2_pins: sd2 {
237		groups = "sdhi2_data4", "sdhi2_ctrl";
238		function = "sdhi2";
239		power-source = <1800>;
240	};
241
242	sdhi3_pins: sd3 {
243		groups = "sdhi3_data8", "sdhi3_ctrl", "sdhi3_ds";
244		function = "sdhi3";
245		power-source = <1800>;
246	};
247
248	usb0_pins: usb0 {
249		groups = "usb0";
250		function = "usb0";
251	};
252
253	usb1_pins: usb1 {
254		mux {
255			groups = "usb1";
256			function = "usb1";
257		};
258
259		ovc {
260			pins = "GP_6_27";
261			bias-pull-up;
262		};
263	};
264
265	usb30_pins: usb30 {
266		groups = "usb30";
267		function = "usb30";
268	};
269};
270
271&rwdt {
272	timeout-sec = <60>;
273	status = "okay";
274};
275
276&scif2 {
277	pinctrl-0 = <&scif2_pins>;
278	pinctrl-names = "default";
279
280	status = "okay";
281};
282
283&scif_clk {
284	clock-frequency = <14745600>;
285};
286
287&sdhi0 {
288	pinctrl-0 = <&sdhi0_pins>;
289	pinctrl-1 = <&sdhi0_pins_uhs>;
290	pinctrl-names = "default", "state_uhs";
291
292	vmmc-supply = <&reg_3p3v>;
293	vqmmc-supply = <&vccq_sdhi0>;
294	cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
295	bus-width = <4>;
296	sd-uhs-sdr50;
297	sd-uhs-sdr104;
298	status = "okay";
299};
300
301&sdhi2 {
302	status = "okay";
303	pinctrl-0 = <&sdhi2_pins>;
304	pinctrl-names = "default";
305
306	vmmc-supply = <&wlan_en_reg>;
307	bus-width = <4>;
308	non-removable;
309	cap-power-off-card;
310	keep-power-in-suspend;
311
312	#address-cells = <1>;
313	#size-cells = <0>;
314	wlcore: wlcore@2 {
315		compatible = "ti,wl1837";
316		reg = <2>;
317		interrupt-parent = <&gpio2>;
318		interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
319	};
320};
321
322&sdhi3 {
323	pinctrl-0 = <&sdhi3_pins>;
324	pinctrl-1 = <&sdhi3_pins>;
325	pinctrl-names = "default", "state_uhs";
326
327	vmmc-supply = <&reg_3p3v>;
328	vqmmc-supply = <&reg_1p8v>;
329	bus-width = <8>;
330	mmc-hs200-1_8v;
331	no-sd;
332	no-sdio;
333	non-removable;
334	fixed-emmc-driver-type = <1>;
335	status = "okay";
336};
337
338&usb_extal_clk {
339	clock-frequency = <50000000>;
340};
341
342&usb2_phy0 {
343	pinctrl-0 = <&usb0_pins>;
344	pinctrl-names = "default";
345
346	vbus-supply = <&vbus0_usb2>;
347	status = "okay";
348};
349
350&usb2_phy1 {
351	pinctrl-0 = <&usb1_pins>;
352	pinctrl-names = "default";
353
354	status = "okay";
355};
356
357&usb3_peri0 {
358	phys = <&usb3_phy0>;
359	phy-names = "usb";
360
361	companion = <&xhci0>;
362
363	status = "okay";
364};
365
366&usb3_phy0 {
367	status = "okay";
368};
369
370&usb3s0_clk {
371	clock-frequency = <100000000>;
372};
373
374&xhci0 {
375	pinctrl-0 = <&usb30_pins>;
376	pinctrl-names = "default";
377
378	status = "okay";
379};
380