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