xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rk3308-voice-module-v11-aarch32.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6#include <dt-bindings/input/input.h>
7#include "arm64/rockchip/rk3308k.dtsi"
8
9/ {
10	model = "Rockchip RK3308 Voice Module Board V11";
11	compatible = "rockchip,rk3308-vmb-v11", "rockchip,rk3308";
12
13	chosen {
14		bootargs = "earlycon=uart8250,mmio32,0xff0c0000 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rootfstype=squashfs rootwait snd_aloop.index=7";
15	};
16
17	acodec_sound: acodec-sound {
18		compatible = "rockchip,multicodecs-card";
19		rockchip,card-name = "rockchip,rk3308-acodec";
20		rockchip,codec-hp-det;
21		rockchip,mclk-fs = <256>;
22		rockchip,cpu = <&i2s_8ch_2>;
23		rockchip,codec = <&acodec>;
24		status = "okay";
25	};
26
27	adc-keys {
28		compatible = "adc-keys";
29		io-channels = <&saradc 1>;
30		io-channel-names = "buttons";
31		poll-interval = <100>;
32		keyup-threshold-microvolt = <1800000>;
33
34		esc-key {
35			linux,code = <KEY_MICMUTE>;
36			label = "micmute";
37			press-threshold-microvolt = <1130000>;
38		};
39
40		home-key {
41			linux,code = <KEY_MODE>;
42			label = "mode";
43			press-threshold-microvolt = <901000>;
44		};
45
46		menu-key {
47			linux,code = <KEY_PLAY>;
48			label = "play";
49			press-threshold-microvolt = <624000>;
50		};
51
52		vol-down-key {
53			linux,code = <KEY_VOLUMEDOWN>;
54			label = "volume down";
55			press-threshold-microvolt = <300000>;
56		};
57
58		vol-up-key {
59			linux,code = <KEY_VOLUMEUP>;
60			label = "volume up";
61			press-threshold-microvolt = <18000>;
62		};
63	};
64
65	bluetooth_sound: bluetooth-sound {
66		status = "disabled";
67		compatible = "rockchip,multicodecs-card";
68		rockchip,card-name = "rockchip,rk3308-pcm";
69		rockchip,mclk-fs = <128>;
70		rockchip,cpu = <&i2s_2ch_0>;
71		rockchip,codec = <&dummy_codec>;
72		rockchip,format = "dsp_b";
73		rockchip,wait-card-locked = <0>;
74	};
75
76	dummy_codec: dummy-codec {
77		compatible = "rockchip,dummy-codec";
78		#sound-dai-cells = <0>;
79	};
80
81	sdio_pwrseq: sdio-pwrseq {
82		compatible = "mmc-pwrseq-simple";
83		pinctrl-names = "default";
84		pinctrl-0 = <&wifi_enable_h>;
85
86		/*
87		 * On the module itself this is one of these (depending
88		 * on the actual card populated):
89		 * - SDIO_RESET_L_WL_REG_ON
90		 * - PDN (power down when low)
91		 */
92		reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
93	};
94
95	spdif_rx_sound: spdif-rx-sound {
96		status = "disabled";
97		compatible = "simple-audio-card";
98		simple-audio-card,name = "rockchip,spdif-rx-sound";
99		simple-audio-card,cpu {
100			sound-dai = <&spdif_rx>;
101		};
102		simple-audio-card,codec {
103			sound-dai = <&dummy_codec>;
104		};
105	};
106
107	spdif_tx_sound: spdif-tx-sound {
108		status = "disabled";
109		compatible = "simple-audio-card";
110		simple-audio-card,name = "rockchip,spdif-tx-sound";
111		simple-audio-card,mclk-fs = <128>;
112		simple-audio-card,cpu {
113			sound-dai = <&spdif_tx>;
114		};
115		simple-audio-card,codec {
116			sound-dai = <&dummy_codec>;
117		};
118	};
119
120	vad-sound {
121		status = "disabled";
122		compatible = "rockchip,multicodecs-card";
123		rockchip,card-name = "rockchip,rk3308-vad";
124		rockchip,codec-hp-det;
125		rockchip,cpu = <&i2s_8ch_2>;
126		rockchip,codec = <&acodec>, <&vad>;
127	};
128
129	vdd_core: vdd-core {
130		compatible = "pwm-regulator";
131		pwms = <&pwm0 0 5000 1>;
132		regulator-name = "vdd_core";
133		regulator-min-microvolt = <827000>;
134		regulator-max-microvolt = <1340000>;
135		regulator-init-microvolt = <1015000>;
136		regulator-always-on;
137		regulator-boot-on;
138		regulator-settling-time-up-us = <250>;
139		status = "okay";
140	};
141
142	vdd_log: vdd-log {
143		compatible = "regulator-fixed";
144		regulator-name = "vdd_log";
145		regulator-always-on;
146		regulator-boot-on;
147		regulator-min-microvolt = <1050000>;
148		regulator-max-microvolt = <1050000>;
149	};
150
151	vdd_1v0: vdd-1v0 {
152		compatible = "regulator-fixed";
153		regulator-name = "vdd_1v0";
154		regulator-always-on;
155		regulator-boot-on;
156		regulator-min-microvolt = <1000000>;
157		regulator-max-microvolt = <1000000>;
158	};
159
160	vcc_io: vcc-io {
161		compatible = "regulator-fixed";
162		regulator-name = "vcc_io";
163		regulator-always-on;
164		regulator-boot-on;
165		regulator-min-microvolt = <3300000>;
166		regulator-max-microvolt = <3300000>;
167	};
168
169	vccio_sdio: vcc_1v8: vcc-1v8 {
170		compatible = "regulator-fixed";
171		regulator-name = "vcc_1v8";
172		regulator-always-on;
173		regulator-boot-on;
174		regulator-min-microvolt = <1800000>;
175		regulator-max-microvolt = <1800000>;
176		vin-supply = <&vcc_io>;
177	};
178
179	vcc_ddr: vcc-ddr {
180		compatible = "regulator-fixed";
181		regulator-name = "vcc_ddr";
182		regulator-always-on;
183		regulator-boot-on;
184		regulator-min-microvolt = <1500000>;
185		regulator-max-microvolt = <1500000>;
186	};
187
188	vbus_host: vbus-host-regulator {
189		compatible = "regulator-fixed";
190		enable-active-high;
191		gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
192		pinctrl-names = "default";
193		pinctrl-0 = <&usb_drv>;
194		regulator-name = "vbus_host";
195	};
196};
197
198&acodec {
199	status = "disabled";
200
201	rockchip,no-hp-det;
202	rockchip,delay-start-play-ms = <200>;
203	rockchip,loopback-grp = <1>;
204	spk-ctl-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
205};
206
207&cpu0 {
208	cpu-supply = <&vdd_core>;
209};
210
211&cpu0_opp_table {
212	opp-1200000000 {
213		status = "okay";
214	};
215};
216
217&dmc {
218	center-supply = <&vdd_log>;
219	status = "okay";
220};
221
222&fiq_debugger {
223	status = "okay";
224};
225
226&i2s_2ch_0 {
227	status = "okay";
228};
229
230&i2s_8ch_2 {
231	status = "okay";
232};
233
234&io_domains {
235	status = "okay";
236
237	vccio0-supply = <&vcc_io>;
238	vccio1-supply = <&vcc_io>;
239	vccio2-supply = <&vcc_1v8>;
240	vccio3-supply = <&vcc_io>;
241	vccio4-supply = <&vccio_sdio>;
242	vccio5-supply = <&vcc_io>;
243};
244
245&nandc {
246	status = "okay";
247};
248
249&pinctrl {
250	buttons {
251		pwr_key: pwr-key {
252			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
253		};
254	};
255
256	usb {
257		usb_drv: usb-drv {
258			rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
259		};
260	};
261
262	sdio-pwrseq {
263		wifi_enable_h: wifi-enable-h {
264			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
265		};
266	};
267
268	wireless-wlan {
269		wifi_wake_host: wifi-wake-host {
270			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
271		};
272	};
273};
274
275&pwm0 {
276	status = "okay";
277	pinctrl-names = "active";
278	pinctrl-0 = <&pwm0_pin_pull_down>;
279};
280
281&ramoops {
282	reg = <0x0 0x30000 0x0 0x20000>;
283	record-size = <0x00000>;
284	console-size = <0x20000>;
285};
286
287&rk_timer_rtc {
288	status = "okay";
289};
290
291&rng {
292	status = "okay";
293};
294
295&rockchip_suspend {
296	rockchip,pwm-regulator-config = <
297		(0
298		| RKPM_PWM_REGULATOR
299		)
300	>;
301
302	rockchip,wakeup-config = <
303		(0
304		| RKPM_GPIO0_WAKEUP_EN
305		| RKPM_TIMER_WAKEUP_EN
306		)
307	>;
308
309	status = "okay";
310};
311
312&saradc {
313	status = "okay";
314	vref-supply = <&vcc_1v8>;
315};
316
317&sdio {
318	max-frequency = <110000000>;
319	bus-width = <4>;
320	cap-sd-highspeed;
321	no-sd;
322	no-mmc;
323	ignore-pm-notify;
324	keep-power-in-suspend;
325	non-removable;
326	mmc-pwrseq = <&sdio_pwrseq>;
327	sd-uhs-sdr104;
328	status = "okay";
329};
330
331&sdmmc {
332	bus-width = <4>;
333	cap-mmc-highspeed;
334	cap-sd-highspeed;
335	no-sdio;
336	no-mmc;
337	card-detect-delay = <300>;
338	status = "disabled";
339};
340
341&sfc {
342	u-boot,dm-pre-reloc;
343	status = "okay";
344};
345
346&tsadc {
347	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
348	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
349	status = "okay";
350};
351
352&u2phy {
353	status = "okay";
354
355	u2phy_host: host-port {
356		phy-supply = <&vbus_host>;
357		status = "okay";
358	};
359
360	u2phy_otg: otg-port {
361		status = "okay";
362	};
363};
364
365&usb20_otg {
366	status = "okay";
367};
368
369&usb_host0_ehci {
370	status = "okay";
371};
372
373&usb_host0_ohci{
374	status = "okay";
375};
376
377&vad {
378	status = "disabled";
379	rockchip,audio-src = <&i2s_8ch_2>;
380	rockchip,det-channel = <0>;
381	rockchip,mode = <1>;
382	rockchip,buffer-time-ms = <500>;
383	#sound-dai-cells = <0>;
384};
385