xref: /freebsd/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf.dtsi (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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	accel_3v3: regulator-acc-3v3 {
36		compatible = "regulator-fixed";
37		regulator-name = "accel-3v3";
38		regulator-min-microvolt = <3300000>;
39		regulator-max-microvolt = <3300000>;
40	};
41
42	hdmi_1v8: regulator-hdmi-1v8 {
43		compatible = "regulator-fixed";
44		regulator-name = "hdmi-1v8";
45		regulator-min-microvolt = <1800000>;
46		regulator-max-microvolt = <1800000>;
47	};
48
49	hdmi_3v3: regulator-hdmi-3v3 {
50		compatible = "regulator-fixed";
51		regulator-name = "hdmi-3v3";
52		regulator-min-microvolt = <3300000>;
53		regulator-max-microvolt = <3300000>;
54	};
55
56	snd_3p3v: regulator-snd_3p3v {
57		compatible = "regulator-fixed";
58		regulator-name = "snd-3.3v";
59		regulator-min-microvolt = <3300000>;
60		regulator-max-microvolt = <3300000>;
61	};
62
63	snd_vcc5v: regulator-snd_vcc5v {
64		compatible = "regulator-fixed";
65		regulator-name = "snd-vcc5v";
66		regulator-min-microvolt = <5000000>;
67		regulator-max-microvolt = <5000000>;
68	};
69
70	wlan_en: regulator-wlan_en {
71		compatible = "regulator-fixed";
72		regulator-name = "wlan-en-regulator";
73
74		regulator-min-microvolt = <3300000>;
75		regulator-max-microvolt = <3300000>;
76
77		gpio = <&gpio_exp_74 4 GPIO_ACTIVE_HIGH>;
78		startup-delay-us = <70000>;
79		enable-active-high;
80	};
81};
82
83&can0 {
84	pinctrl-0 = <&can0_pins>;
85	pinctrl-names = "default";
86	status = "okay";
87};
88
89&can1 {
90	pinctrl-0 = <&can1_pins>;
91	pinctrl-names = "default";
92	status = "okay";
93};
94
95&du {
96	ports {
97		port@0 {
98			du_out_rgb: endpoint {
99				remote-endpoint = <&adv7513_in>;
100			};
101		};
102	};
103};
104
105&ehci0 {
106	dr_mode = "otg";
107	status = "okay";
108};
109
110&hscif0 {
111	pinctrl-0 = <&hscif0_pins>;
112	pinctrl-names = "default";
113	uart-has-rtscts;
114
115	status = "okay";
116};
117
118&hscif1 {
119	pinctrl-0 = <&hscif1_pins>;
120	pinctrl-names = "default";
121	uart-has-rtscts;
122
123	status = "okay";
124};
125
126&hsusb {
127	dr_mode = "otg";
128	status = "okay";
129};
130
131&i2c2 {
132	i2cmux2: i2c-mux@71 {
133		compatible = "nxp,pca9548";
134		#address-cells = <1>;
135		#size-cells = <0>;
136		reg = <0x71>;
137		reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
138
139		/* HDMIoSDA, HDMIoSCL */
140		i2c@4 {
141			#address-cells = <1>;
142			#size-cells = <0>;
143			reg = <4>;
144
145			hdmi@3d {
146				compatible = "adi,adv7513";
147				reg = <0x3d>;
148
149				pinctrl-0 = <&hdmi1_pins>;
150				pinctrl-names = "default";
151
152				interrupt-parent = <&gpio2>;
153				interrupts = <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 = <&hdmi_1v8>;
161				dvdd-supply = <&hdmi_1v8>;
162				pvdd-supply = <&hdmi_1v8>;
163				dvdd-3v-supply = <&hdmi_3v3>;
164				bgvdd-supply = <&hdmi_1v8>;
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 = <&accel_3v3>;
202				vddio-supply = <&accel_3v3>;
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 = <&snd_3p3v>;
213				VDD2-supply = <&snd_3p3v>;
214				VCCAD1-supply = <&snd_vcc5v>;
215				VCCAD2-supply = <&snd_vcc5v>;
216				VCCDA1-supply = <&snd_vcc5v>;
217				VCCDA2-supply = <&snd_vcc5v>;
218			};
219
220			gyroscope@6b {
221				compatible = "st,lsm9ds0-gyro";
222				reg = <0x6b>;
223
224				vdd-supply = <&accel_3v3>;
225				vddio-supply = <&accel_3v3>;
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-parent = <&gpio6>;
238		interrupts = <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-parent = <&gpio6>;
298		interrupts = <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-parent = <&gpio7>;
318		interrupts = <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-parent = <&gpio5>;
328		interrupts = <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
349&pfc {
350	can0_pins: can0 {
351		groups = "can0_data_a";
352		function = "can0";
353	};
354
355	can1_pins: can1 {
356		groups = "can1_data";
357		function = "can1";
358	};
359
360	hdmi1_pins: hdmi1 {
361		adv7513-interrupt {
362			pins = "GP_2_14";
363			bias-pull-up;
364		};
365
366		du {
367			groups = "du_rgb888", "du_sync", "du_clk_out_0",
368				 "du_disp";
369			function = "du";
370		};
371	};
372
373	hscif0_pins: hscif0 {
374		groups = "hscif0_data", "hscif0_ctrl";
375		function = "hscif0";
376	};
377
378	hscif1_pins: hscif1 {
379		groups = "hscif1_data_a", "hscif1_ctrl_a";
380		function = "hscif1";
381	};
382
383	scif1_pins: scif1 {
384		groups = "scif1_data_b";
385		function = "scif1";
386	};
387
388	sdhi3_pins: sdhi3 {
389		groups = "sdhi3_data4", "sdhi3_ctrl";
390		function = "sdhi3";
391		power-source = <3300>;
392	};
393
394	sound_pcm_pins: sound-pcm {
395		groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
396		function = "ssi";
397	};
398
399	usb0_pins: usb0 {
400		groups = "usb0";
401		function = "usb0";
402	};
403};
404
405&rcar_sound {
406	pinctrl-0 = <&sound_pins
407		     &sound_clk_pins
408		     &sound_pcm_pins>;
409};
410
411&scif1 {
412	pinctrl-0 = <&scif1_pins>;
413	pinctrl-names = "default";
414
415	status = "okay";
416};
417
418&sdhi3 {
419	pinctrl-0 = <&sdhi3_pins>;
420	pinctrl-names = "default";
421
422	vmmc-supply = <&wlan_en>;
423	vqmmc-supply = <&wlan_en>;
424	bus-width = <4>;
425	no-1-8-v;
426	non-removable;
427	cap-power-off-card;
428	keep-power-in-suspend;
429	max-frequency = <26000000>;
430	status = "okay";
431
432	#address-cells = <1>;
433	#size-cells = <0>;
434	wlcore: wlcore@2 {
435		compatible = "ti,wl1837";
436		reg = <2>;
437		interrupt-parent = <&gpio1>;
438		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
439	};
440};
441
442&ssi4 {
443	shared-pin;
444};
445
446&usb2_phy0 {
447	pinctrl-0 = <&usb0_pins>;
448	pinctrl-names = "default";
449
450	status = "okay";
451};
452
453&xhci0 {
454	status = "okay";
455};
456
457/*
458 * For sound-test.
459 *
460 * We can switch Audio Card for testing
461 * see also ulcb.dtsi
462 *
463 * #include "ulcb-kf-simple-audio-card.dtsi"
464 * #include "ulcb-kf-simple-audio-card-mix+split.dtsi"
465 * #include "ulcb-kf-audio-graph-card.dtsi"
466 * #include "ulcb-kf-audio-graph-card-mix+split.dtsi"
467 * #include "ulcb-kf-audio-graph-card2-mix+split.dtsi"
468 */
469#include "ulcb-kf-audio-graph-card2.dtsi"
470