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