xref: /linux/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi (revision 79d2e1919a2728ef49d938eb20ebd5903c14dfb0)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the Kingfisher (ULCB extension) board
4 *
5 * Copyright (C) 2017 Renesas Electronics Corp.
6 * Copyright (C) 2017 Cogent Embedded, Inc.
7 */
8
9/ {
10	aliases {
11		serial1 = &hscif0;
12		serial2 = &scif1;
13		serial3 = &hscif1;
14		mmc2 = &sdhi3;
15	};
16
17	clksndsel: clksndsel {
18		#clock-cells = <0>;
19		compatible = "gpio-mux-clock";
20		clocks = <&cs2000>, <&audio_clk_a>; /* clk8snd, clksnd */
21		select-gpios = <&gpio_exp_75 13 GPIO_ACTIVE_HIGH>;
22	};
23
24	hdmi1-out {
25		compatible = "hdmi-connector";
26		type = "a";
27
28		port {
29			hdmi1_con: endpoint {
30				remote-endpoint = <&adv7513_out>;
31			};
32		};
33	};
34
35	reg_t1p8v: regulator-t1p8v {
36		compatible = "regulator-fixed";
37		regulator-name = "T1.8V";
38		regulator-min-microvolt = <1800000>;
39		regulator-max-microvolt = <1800000>;
40		regulator-boot-on;
41		regulator-always-on;
42	};
43
44	pcie_1v5: regulator-pcie-1v5 {
45		compatible = "regulator-fixed";
46		regulator-name = "pcie-1v5";
47		regulator-min-microvolt = <1500000>;
48		regulator-max-microvolt = <1500000>;
49		gpio = <&gpio_exp_77 15 GPIO_ACTIVE_HIGH>;
50		enable-active-high;
51	};
52
53	pcie_3v3: regulator-pcie-3v3 {
54		compatible = "regulator-fixed";
55		regulator-name = "pcie-3v3";
56		regulator-min-microvolt = <3300000>;
57		regulator-max-microvolt = <3300000>;
58		gpio = <&gpio_exp_77 14 GPIO_ACTIVE_HIGH>;
59		enable-active-high;
60	};
61
62	reg_5v: regulator-5v {
63		compatible = "regulator-fixed";
64		regulator-name = "fixed-5V";
65		regulator-min-microvolt = <5000000>;
66		regulator-max-microvolt = <5000000>;
67		regulator-boot-on;
68		regulator-always-on;
69	};
70
71	wlan_en: regulator-wlan_en {
72		compatible = "regulator-fixed";
73		regulator-name = "wlan-en-regulator";
74
75		regulator-min-microvolt = <3300000>;
76		regulator-max-microvolt = <3300000>;
77
78		gpio = <&gpio_exp_74 4 GPIO_ACTIVE_HIGH>;
79		startup-delay-us = <70000>;
80		enable-active-high;
81	};
82};
83
84&can0 {
85	pinctrl-0 = <&can0_pins>;
86	pinctrl-names = "default";
87	status = "okay";
88};
89
90&can1 {
91	pinctrl-0 = <&can1_pins>;
92	pinctrl-names = "default";
93	status = "okay";
94};
95
96&du {
97	ports {
98		port@0 {
99			du_out_rgb: endpoint {
100				remote-endpoint = <&adv7513_in>;
101			};
102		};
103	};
104};
105
106&ehci0 {
107	dr_mode = "otg";
108	status = "okay";
109};
110
111&hscif0 {
112	pinctrl-0 = <&hscif0_pins>;
113	pinctrl-names = "default";
114	uart-has-rtscts;
115
116	status = "okay";
117};
118
119&hscif1 {
120	pinctrl-0 = <&hscif1_pins>;
121	pinctrl-names = "default";
122	uart-has-rtscts;
123
124	status = "okay";
125};
126
127&hsusb {
128	dr_mode = "otg";
129	status = "okay";
130};
131
132&i2c2 {
133	i2cmux2: i2c-mux@71 {
134		compatible = "nxp,pca9548";
135		#address-cells = <1>;
136		#size-cells = <0>;
137		reg = <0x71>;
138		reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
139
140		/* HDMIoSDA, HDMIoSCL */
141		i2c@4 {
142			#address-cells = <1>;
143			#size-cells = <0>;
144			reg = <4>;
145
146			hdmi@3d {
147				compatible = "adi,adv7513";
148				reg = <0x3d>;
149
150				pinctrl-0 = <&hdmi1_pins>;
151				pinctrl-names = "default";
152
153				interrupts-extended = <&gpio2 14 IRQ_TYPE_LEVEL_LOW>;
154
155				clocks = <&cs2000>;
156				clock-names = "cec";
157
158				pd-gpios = <&gpio_exp_75 5 GPIO_ACTIVE_LOW>;
159
160				avdd-supply = <&reg_t1p8v>;
161				dvdd-supply = <&reg_t1p8v>;
162				pvdd-supply = <&reg_t1p8v>;
163				dvdd-3v-supply = <&reg_3p3v>;
164				bgvdd-supply = <&reg_t1p8v>;
165
166				adi,input-depth = <8>;
167				adi,input-colorspace = "rgb";
168				adi,input-clock = "1x";
169
170				ports {
171					#address-cells = <1>;
172					#size-cells = <0>;
173
174					port@0 {
175						reg = <0>;
176						adv7513_in: endpoint {
177							remote-endpoint = <&du_out_rgb>;
178						};
179					};
180
181					port@1 {
182						reg = <1>;
183						adv7513_out: endpoint {
184							remote-endpoint = <&hdmi1_con>;
185						};
186					};
187				};
188			};
189		};
190
191		/* Audio_SDA, Audio_SCL */
192		i2c@7 {
193			#address-cells = <1>;
194			#size-cells = <0>;
195			reg = <7>;
196
197			accelerometer@1d {
198				compatible = "st,lsm9ds0-imu";
199				reg = <0x1d>;
200
201				vdd-supply = <&reg_3p3v>;
202				vddio-supply = <&reg_3p3v>;
203			};
204
205			pcm3168a: audio-codec@44 {
206				#sound-dai-cells = <0>;
207				compatible = "ti,pcm3168a";
208				reg = <0x44>;
209				clocks = <&clksndsel>;
210				clock-names = "scki";
211
212				VDD1-supply = <&reg_3p3v>;
213				VDD2-supply = <&reg_3p3v>;
214				VCCAD1-supply = <&reg_5v>;
215				VCCAD2-supply = <&reg_5v>;
216				VCCDA1-supply = <&reg_5v>;
217				VCCDA2-supply = <&reg_5v>;
218			};
219
220			gyroscope@6b {
221				compatible = "st,lsm9ds0-gyro";
222				reg = <0x6b>;
223
224				vdd-supply = <&reg_3p3v>;
225				vddio-supply = <&reg_3p3v>;
226			};
227		};
228	};
229
230	/* U11 */
231	gpio_exp_74: gpio@74 {
232		compatible = "ti,tca9539";
233		reg = <0x74>;
234		gpio-controller;
235		#gpio-cells = <2>;
236		interrupt-controller;
237		#interrupt-cells = <2>;
238		interrupts-extended = <&gpio6 8 IRQ_TYPE_EDGE_FALLING>;
239
240		audio-out-off-hog {
241			gpio-hog;
242			gpios = <0 GPIO_ACTIVE_HIGH>; /* P00 */
243			output-high;
244			line-name = "Audio_Out_OFF";
245		};
246
247		hub-pwen-hog {
248			gpio-hog;
249			gpios = <6 GPIO_ACTIVE_HIGH>;
250			output-high;
251			line-name = "HUB pwen";
252		};
253
254		hub-rst-hog {
255			gpio-hog;
256			gpios = <7 GPIO_ACTIVE_HIGH>;
257			output-high;
258			line-name = "HUB rst";
259		};
260
261		otg-extlpn-hog {
262			gpio-hog;
263			gpios = <9 GPIO_ACTIVE_HIGH>;
264			output-high;
265			line-name = "OTG EXTLPn";
266		};
267
268		otg-offvbusn-hog {
269			gpio-hog;
270			gpios = <8 GPIO_ACTIVE_HIGH>;
271			output-low;
272			line-name = "OTG OFFVBUSn";
273		};
274
275		sd-wifi-mux-hog {
276			gpio-hog;
277			gpios = <5 GPIO_ACTIVE_HIGH>;
278			output-low;	/* Connect WL1837 */
279			line-name = "SD WiFi mux";
280		};
281
282		snd-rst-hog {
283			gpio-hog;
284			gpios = <15 GPIO_ACTIVE_HIGH>; /* P17 */
285			output-high;
286			line-name = "SND_RST";
287		};
288	};
289
290	/* U5 */
291	gpio_exp_75: gpio@75 {
292		compatible = "ti,tca9539";
293		reg = <0x75>;
294		gpio-controller;
295		#gpio-cells = <2>;
296		interrupt-controller;
297		#interrupt-cells = <2>;
298		interrupts-extended = <&gpio6 4 IRQ_TYPE_EDGE_FALLING>;
299	};
300};
301
302&i2c4 {
303	i2cmux4: i2c-mux@71 {
304		compatible = "nxp,pca9548";
305		#address-cells = <1>;
306		#size-cells = <0>;
307		reg = <0x71>;
308		reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
309	};
310
311	gpio_exp_76: gpio@76 {
312		compatible = "ti,tca9539";
313		reg = <0x76>;
314		gpio-controller;
315		#gpio-cells = <2>;
316		interrupt-controller;
317		#interrupt-cells = <2>;
318		interrupts-extended = <&gpio7 3 IRQ_TYPE_EDGE_FALLING>;
319	};
320
321	gpio_exp_77: gpio@77 {
322		compatible = "ti,tca9539";
323		reg = <0x77>;
324		gpio-controller;
325		#gpio-cells = <2>;
326		interrupt-controller;
327		#interrupt-cells = <2>;
328		interrupts-extended = <&gpio5 9 IRQ_TYPE_EDGE_FALLING>;
329	};
330};
331
332&ohci0 {
333	dr_mode = "otg";
334	status = "okay";
335};
336
337&pcie_bus_clk {
338	clock-frequency = <100000000>;
339};
340
341&pciec0 {
342	status = "okay";
343};
344
345&pciec1 {
346	status = "okay";
347
348	vpcie1v5-supply = <&pcie_1v5>;
349	vpcie3v3-supply = <&pcie_3v3>;
350};
351
352&pfc {
353	can0_pins: can0 {
354		groups = "can0_data_a";
355		function = "can0";
356	};
357
358	can1_pins: can1 {
359		groups = "can1_data";
360		function = "can1";
361	};
362
363	hdmi1_pins: hdmi1 {
364		adv7513-interrupt {
365			pins = "GP_2_14";
366			bias-pull-up;
367		};
368
369		du {
370			groups = "du_rgb888", "du_sync", "du_clk_out_0",
371				 "du_disp";
372			function = "du";
373		};
374	};
375
376	hscif0_pins: hscif0 {
377		groups = "hscif0_data", "hscif0_ctrl";
378		function = "hscif0";
379	};
380
381	hscif1_pins: hscif1 {
382		groups = "hscif1_data_a", "hscif1_ctrl_a";
383		function = "hscif1";
384	};
385
386	scif1_pins: scif1 {
387		groups = "scif1_data_b";
388		function = "scif1";
389	};
390
391	sdhi3_pins: sdhi3 {
392		groups = "sdhi3_data4", "sdhi3_ctrl";
393		function = "sdhi3";
394		power-source = <3300>;
395	};
396
397	sound_pcm_pins: sound-pcm {
398		groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
399		function = "ssi";
400	};
401
402	usb0_pins: usb0 {
403		groups = "usb0";
404		function = "usb0";
405	};
406};
407
408&rcar_sound {
409	pinctrl-0 = <&sound_pins
410		     &sound_clk_pins
411		     &sound_pcm_pins>;
412};
413
414&scif1 {
415	pinctrl-0 = <&scif1_pins>;
416	pinctrl-names = "default";
417
418	status = "okay";
419
420	gnss {
421		compatible = "u-blox,neo-m8";
422		reset-gpios = <&gpio_exp_75 6 GPIO_ACTIVE_LOW>;
423		vcc-supply = <&reg_3p3v>;
424		current-speed = <9600>;
425	};
426};
427
428&sdhi3 {
429	pinctrl-0 = <&sdhi3_pins>;
430	pinctrl-names = "default";
431
432	vmmc-supply = <&wlan_en>;
433	vqmmc-supply = <&wlan_en>;
434	bus-width = <4>;
435	no-1-8-v;
436	non-removable;
437	cap-power-off-card;
438	keep-power-in-suspend;
439	max-frequency = <26000000>;
440	status = "okay";
441
442	#address-cells = <1>;
443	#size-cells = <0>;
444	wlcore: wlcore@2 {
445		compatible = "ti,wl1837";
446		reg = <2>;
447		interrupts-extended = <&gpio1 25 IRQ_TYPE_EDGE_FALLING>;
448	};
449};
450
451&ssi4 {
452	shared-pin;
453};
454
455&usb2_phy0 {
456	pinctrl-0 = <&usb0_pins>;
457	pinctrl-names = "default";
458
459	status = "okay";
460};
461
462&xhci0 {
463	status = "okay";
464};
465
466/*
467 * For sound-test.
468 *
469 * We can switch Audio Card for testing
470 * see also ulcb.dtsi
471 *
472 * #include "ulcb-kf-simple-audio-card.dtsi"
473 * #include "ulcb-kf-simple-audio-card-mix+split.dtsi"
474 * #include "ulcb-kf-audio-graph-card.dtsi"
475 * #include "ulcb-kf-audio-graph-card-mix+split.dtsi"
476 * #include "ulcb-kf-audio-graph-card2-mix+split.dtsi"
477 */
478#include "ulcb-kf-audio-graph-card2.dtsi"
479