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