xref: /linux/scripts/dtc/include-prefixes/arm64/renesas/ulcb-kf.dtsi (revision fa41d6ee904266fa8739cafa6ec038c3a8e435b7)
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	};
20
21	clksndsel: clksndsel {
22		#clock-cells = <0>;
23		compatible = "gpio-mux-clock";
24		clocks = <&cs2000>, <&audio_clk_a>; /* clk8snd, clksnd */
25		select-gpios = <&gpio_exp_75 13 GPIO_ACTIVE_HIGH>;
26	};
27
28	snd_3p3v: regulator-snd_3p3v {
29		compatible = "regulator-fixed";
30		regulator-name = "snd-3.3v";
31		regulator-min-microvolt = <3300000>;
32		regulator-max-microvolt = <3300000>;
33	};
34
35	snd_vcc5v: regulator-snd_vcc5v {
36		compatible = "regulator-fixed";
37		regulator-name = "snd-vcc5v";
38		regulator-min-microvolt = <5000000>;
39		regulator-max-microvolt = <5000000>;
40	};
41
42	wlan_en: regulator-wlan_en {
43		compatible = "regulator-fixed";
44		regulator-name = "wlan-en-regulator";
45
46		regulator-min-microvolt = <3300000>;
47		regulator-max-microvolt = <3300000>;
48
49		gpio = <&gpio_exp_74 4 GPIO_ACTIVE_HIGH>;
50		startup-delay-us = <70000>;
51		enable-active-high;
52	};
53};
54
55&can0 {
56	pinctrl-0 = <&can0_pins>;
57	pinctrl-names = "default";
58	status = "okay";
59};
60
61&can1 {
62	pinctrl-0 = <&can1_pins>;
63	pinctrl-names = "default";
64	status = "okay";
65};
66
67&ehci0 {
68	dr_mode = "otg";
69	status = "okay";
70};
71
72&hscif0 {
73	pinctrl-0 = <&hscif0_pins>;
74	pinctrl-names = "default";
75	uart-has-rtscts;
76
77	status = "okay";
78};
79
80&hsusb {
81	dr_mode = "otg";
82	status = "okay";
83};
84
85&i2c2 {
86	i2cswitch2: i2c-switch@71 {
87		compatible = "nxp,pca9548";
88		#address-cells = <1>;
89		#size-cells = <0>;
90		reg = <0x71>;
91		reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
92
93		/* Audio_SDA, Audio_SCL */
94		i2c@7 {
95			#address-cells = <1>;
96			#size-cells = <0>;
97			reg = <7>;
98
99			pcm3168a: audio-codec@44 {
100				#sound-dai-cells = <0>;
101				compatible = "ti,pcm3168a";
102				reg = <0x44>;
103				clocks = <&clksndsel>;
104				clock-names = "scki";
105
106				VDD1-supply	= <&snd_3p3v>;
107				VDD2-supply	= <&snd_3p3v>;
108				VCCAD1-supply	= <&snd_vcc5v>;
109				VCCAD2-supply	= <&snd_vcc5v>;
110				VCCDA1-supply	= <&snd_vcc5v>;
111				VCCDA2-supply	= <&snd_vcc5v>;
112
113				ports {
114					#address-cells = <1>;
115					#size-cells = <0>;
116					mclk-fs = <512>;
117					port@0 {
118						reg = <0>;
119						pcm3168a_endpoint_p: endpoint {
120							remote-endpoint = <&rsnd_for_pcm3168a_play>;
121							clocks = <&clksndsel>;
122						};
123					};
124					port@1 {
125						reg = <1>;
126						pcm3168a_endpoint_c: endpoint {
127							remote-endpoint = <&rsnd_for_pcm3168a_capture>;
128							clocks = <&clksndsel>;
129						};
130					};
131				};
132			};
133		};
134	};
135
136	/* U11 */
137	gpio_exp_74: gpio@74 {
138		compatible = "ti,tca9539";
139		reg = <0x74>;
140		gpio-controller;
141		#gpio-cells = <2>;
142		interrupt-controller;
143		interrupt-parent = <&gpio6>;
144		interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
145
146		audio_out_off {
147			gpio-hog;
148			gpios = <0 GPIO_ACTIVE_HIGH>; /* P00 */
149			output-high;
150			line-name = "Audio_Out_OFF";
151		};
152
153		hub_pwen {
154			gpio-hog;
155			gpios = <6 GPIO_ACTIVE_HIGH>;
156			output-high;
157			line-name = "HUB pwen";
158		};
159
160		hub_rst {
161			gpio-hog;
162			gpios = <7 GPIO_ACTIVE_HIGH>;
163			output-high;
164			line-name = "HUB rst";
165		};
166
167		otg_extlpn {
168			gpio-hog;
169			gpios = <9 GPIO_ACTIVE_HIGH>;
170			output-high;
171			line-name = "OTG EXTLPn";
172		};
173
174		otg_offvbusn {
175			gpio-hog;
176			gpios = <8 GPIO_ACTIVE_HIGH>;
177			output-low;
178			line-name = "OTG OFFVBUSn";
179		};
180
181		sd-wifi-mux {
182			gpio-hog;
183			gpios = <5 GPIO_ACTIVE_HIGH>;
184			output-low;	/* Connect WL1837 */
185			line-name = "SD WiFi mux";
186		};
187
188		snd_rst {
189			gpio-hog;
190			gpios = <15 GPIO_ACTIVE_HIGH>; /* P17 */
191			output-high;
192			line-name = "SND_RST";
193		};
194	};
195
196	/* U5 */
197	gpio_exp_75: gpio@75 {
198		compatible = "ti,tca9539";
199		reg = <0x75>;
200		gpio-controller;
201		#gpio-cells = <2>;
202		interrupt-controller;
203		interrupt-parent = <&gpio6>;
204		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
205	};
206};
207
208&i2c4 {
209	i2cswitch4: i2c-switch@71 {
210		compatible = "nxp,pca9548";
211		#address-cells = <1>;
212		#size-cells = <0>;
213		reg = <0x71>;
214		reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
215	};
216
217	gpio_exp_76: gpio@76 {
218		compatible = "ti,tca9539";
219		reg = <0x76>;
220		gpio-controller;
221		#gpio-cells = <2>;
222		interrupt-controller;
223		interrupt-parent = <&gpio7>;
224		interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
225	};
226
227	gpio_exp_77: gpio@77 {
228		compatible = "ti,tca9539";
229		reg = <0x77>;
230		gpio-controller;
231		#gpio-cells = <2>;
232		interrupt-controller;
233		interrupt-parent = <&gpio5>;
234		interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
235	};
236};
237
238&ohci0 {
239	dr_mode = "otg";
240	status = "okay";
241};
242
243&pcie_bus_clk {
244	clock-frequency = <100000000>;
245};
246
247&pciec0 {
248	status = "okay";
249};
250
251&pciec1 {
252	status = "okay";
253};
254
255&pfc {
256	can0_pins: can0 {
257		groups = "can0_data_a";
258		function = "can0";
259	};
260
261	can1_pins: can1 {
262		groups = "can1_data";
263		function = "can1";
264	};
265
266	hscif0_pins: hscif0 {
267		groups = "hscif0_data", "hscif0_ctrl";
268		function = "hscif0";
269	};
270
271	scif1_pins: scif1 {
272		groups = "scif1_data_b", "scif1_ctrl";
273		function = "scif1";
274	};
275
276	sdhi3_pins: sdhi3 {
277		groups = "sdhi3_data4", "sdhi3_ctrl";
278		function = "sdhi3";
279		power-source = <3300>;
280	};
281
282	sound_pcm_pins: sound-pcm {
283		groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
284		function = "ssi";
285	};
286
287	usb0_pins: usb0 {
288		groups = "usb0";
289		function = "usb0";
290	};
291};
292
293&rcar_sound {
294	pinctrl-0 = <&sound_pins
295		     &sound_clk_pins
296		     &sound_pcm_pins>;
297
298	ports {
299		/* rsnd_port0/1 are on salvator-common */
300		rsnd_port2: port@2 {
301			reg = <2>;
302			rsnd_for_pcm3168a_play: endpoint {
303				remote-endpoint = <&pcm3168a_endpoint_p>;
304
305				dai-format = "i2s";
306				bitclock-master = <&rsnd_for_pcm3168a_play>;
307				frame-master = <&rsnd_for_pcm3168a_play>;
308				dai-tdm-slot-num = <8>;
309
310				playback = <&ssi3>;
311			};
312		};
313		rsnd_port3: port@3 {
314			reg = <3>;
315			rsnd_for_pcm3168a_capture: endpoint {
316				remote-endpoint = <&pcm3168a_endpoint_c>;
317
318				dai-format = "i2s";
319				bitclock-master = <&rsnd_for_pcm3168a_capture>;
320				frame-master = <&rsnd_for_pcm3168a_capture>;
321				dai-tdm-slot-num = <6>;
322
323				capture  = <&ssi4>;
324			};
325		};
326	};
327};
328
329&scif1 {
330	pinctrl-0 = <&scif1_pins>;
331	pinctrl-names = "default";
332	uart-has-rtscts;
333
334	status = "okay";
335};
336
337&sdhi3 {
338	pinctrl-0 = <&sdhi3_pins>;
339	pinctrl-names = "default";
340
341	vmmc-supply = <&wlan_en>;
342	vqmmc-supply = <&wlan_en>;
343	bus-width = <4>;
344	no-1-8-v;
345	non-removable;
346	cap-power-off-card;
347	keep-power-in-suspend;
348	max-frequency = <26000000>;
349	status = "okay";
350
351	#address-cells = <1>;
352	#size-cells = <0>;
353	wlcore: wlcore@2 {
354		compatible = "ti,wl1837";
355		reg = <2>;
356		interrupt-parent = <&gpio1>;
357		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
358	};
359};
360
361&sound_card {
362	dais = <&rsnd_port0	/* ak4613 */
363		&rsnd_port1	/* HDMI0  */
364		&rsnd_port2	/* pcm3168a playback */
365		&rsnd_port3	/* pcm3168a capture  */
366		>;
367};
368
369&ssi4 {
370	shared-pin;
371};
372
373&usb2_phy0 {
374	pinctrl-0 = <&usb0_pins>;
375	pinctrl-names = "default";
376
377	status = "okay";
378};
379
380&xhci0 {
381	status = "okay";
382};
383