From 65f4a3e028c5063c7fe5d47613f62bd75e14e5cf Mon Sep 17 00:00:00 2001 From: Lin Jianhua Date: Tue, 27 Nov 2018 09:41:34 +0800 Subject: [PATCH] ARM: dts: rockchip: add voice module boards v11 for RK3308 Separate the power supply to arm&logic, arm freq support 1.2G, disable vad and include rk3308k.dtsi Change-Id: I91516773e74fd098117bfdcf8213803e19cf7527 Signed-off-by: Lin Jianhua --- arch/arm/boot/dts/Makefile | 1 + .../rk3308-voice-module-board-v11-aarch32.dts | 32 ++ .../dts/rk3308-voice-module-v11-aarch32.dtsi | 384 ++++++++++++++++++ 3 files changed, 417 insertions(+) create mode 100644 arch/arm/boot/dts/rk3308-voice-module-board-v11-aarch32.dts create mode 100644 arch/arm/boot/dts/rk3308-voice-module-v11-aarch32.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index a47afe038731..c1f807f582d8 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -573,6 +573,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3308-evb-dmic-i2s-v10-aarch32.dtb \ rk3308-evb-dmic-pdm-v11-aarch32.dtb \ rk3308-voice-module-board-v10-aarch32.dtb \ + rk3308-voice-module-board-v11-aarch32.dtb \ rk3308-voice-module-amic-mainboard-v10-aarch32.dtb \ rk3308-voice-module-pdm-mainboard-v10-aarch32.dtb \ rk3308b-evb-amic-v10-aarch32.dtb diff --git a/arch/arm/boot/dts/rk3308-voice-module-board-v11-aarch32.dts b/arch/arm/boot/dts/rk3308-voice-module-board-v11-aarch32.dts new file mode 100644 index 000000000000..7ba3baf4755f --- /dev/null +++ b/arch/arm/boot/dts/rk3308-voice-module-board-v11-aarch32.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd + */ + +/dts-v1/; + +#include "rk3308-voice-module-v11-aarch32.dtsi" + +/ { + model = "Rockchip RK3308 Voice Module Board V11 (AArch32)"; + compatible = "rockchip,rk3308-voice-module-board-v11-aarch32", "rockchip,rk3308"; + + wireless-wlan { + compatible = "wlan-platdata"; + rockchip,grf = <&grf>; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_wake_host>; + wifi_chip_type = "rtl8189fs"; + WIFI,host_wake_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + status = "okay"; + }; +}; + +&acodec { + status = "okay"; + rockchip,no-deep-low-power; + /* ADC5-6 for 2ch capture, loopback to ADC3-4 */ + rockchip,adc-grps-route = <2 1 3 0>; + /* The grp2 (ADC5-6) keeps enabled always for VAD */ + rockchip,en-always-grps = <2>; +}; diff --git a/arch/arm/boot/dts/rk3308-voice-module-v11-aarch32.dtsi b/arch/arm/boot/dts/rk3308-voice-module-v11-aarch32.dtsi new file mode 100644 index 000000000000..96cf85ad7ac9 --- /dev/null +++ b/arch/arm/boot/dts/rk3308-voice-module-v11-aarch32.dtsi @@ -0,0 +1,384 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd + */ + +#include +#include "arm64/rockchip/rk3308k.dtsi" + +/ { + model = "Rockchip RK3308 Voice Module Board V11"; + compatible = "rockchip,rk3308-vmb-v11", "rockchip,rk3308"; + + chosen { + bootargs = "earlycon=uart8250,mmio32,0xff0c0000 swiotlb=1 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rootfstype=squashfs rootwait snd_aloop.index=7"; + }; + + acodec_sound: acodec-sound { + compatible = "rockchip,multicodecs-card"; + rockchip,card-name = "rockchip,rk3308-acodec"; + rockchip,codec-hp-det; + rockchip,mclk-fs = <256>; + rockchip,cpu = <&i2s_8ch_2>; + rockchip,codec = <&acodec>; + status = "okay"; + }; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 1>; + io-channel-names = "buttons"; + poll-interval = <100>; + keyup-threshold-microvolt = <1800000>; + + esc-key { + linux,code = ; + label = "micmute"; + press-threshold-microvolt = <1130000>; + }; + + home-key { + linux,code = ; + label = "mode"; + press-threshold-microvolt = <901000>; + }; + + menu-key { + linux,code = ; + label = "play"; + press-threshold-microvolt = <624000>; + }; + + vol-down-key { + linux,code = ; + label = "volume down"; + press-threshold-microvolt = <300000>; + }; + + vol-up-key { + linux,code = ; + label = "volume up"; + press-threshold-microvolt = <18000>; + }; + }; + + bluetooth_sound: bluetooth-sound { + status = "disabled"; + compatible = "rockchip,multicodecs-card"; + rockchip,card-name = "rockchip,rk3308-pcm"; + rockchip,mclk-fs = <128>; + rockchip,cpu = <&i2s_2ch_0>; + rockchip,codec = <&dummy_codec>; + rockchip,format = "dsp_b"; + rockchip,wait-card-locked = <0>; + }; + + dummy_codec: dummy-codec { + compatible = "rockchip,dummy-codec"; + #sound-dai-cells = <0>; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h>; + + /* + * On the module itself this is one of these (depending + * on the actual card populated): + * - SDIO_RESET_L_WL_REG_ON + * - PDN (power down when low) + */ + reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; + }; + + spdif_rx_sound: spdif-rx-sound { + status = "disabled"; + compatible = "simple-audio-card"; + simple-audio-card,name = "rockchip,spdif-rx-sound"; + simple-audio-card,cpu { + sound-dai = <&spdif_rx>; + }; + simple-audio-card,codec { + sound-dai = <&dummy_codec>; + }; + }; + + spdif_tx_sound: spdif-tx-sound { + status = "disabled"; + compatible = "simple-audio-card"; + simple-audio-card,name = "rockchip,spdif-tx-sound"; + simple-audio-card,cpu { + sound-dai = <&spdif_tx>; + }; + simple-audio-card,codec { + sound-dai = <&dummy_codec>; + }; + }; + + vad-sound { + status = "disabled"; + compatible = "rockchip,multicodecs-card"; + rockchip,card-name = "rockchip,rk3308-vad"; + rockchip,codec-hp-det; + rockchip,cpu = <&i2s_8ch_2>; + rockchip,codec = <&acodec>, <&vad>; + }; + + vdd_core: vdd-core { + compatible = "pwm-regulator"; + pwms = <&pwm0 0 5000 1>; + regulator-name = "vdd_core"; + regulator-min-microvolt = <827000>; + regulator-max-microvolt = <1340000>; + regulator-init-microvolt = <1015000>; + regulator-always-on; + regulator-boot-on; + regulator-settling-time-up-us = <250>; + status = "okay"; + }; + + vdd_log: vdd-log { + compatible = "regulator-fixed"; + regulator-name = "vdd_log"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; + }; + + vdd_1v0: vdd-1v0 { + compatible = "regulator-fixed"; + regulator-name = "vdd_1v0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + }; + + vccio_sdio: vcc_1v8: vcc-1v8 { + compatible = "regulator-fixed"; + regulator-name = "vcc_1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_io>; + }; + + vcc_ddr: vcc-ddr { + compatible = "regulator-fixed"; + regulator-name = "vcc_ddr"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + }; + + vcc_io: vcc-io { + compatible = "regulator-fixed"; + regulator-name = "vcc_io"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vbus_host: vbus-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_drv>; + regulator-name = "vbus_host"; + }; +}; + +&acodec { + status = "disabled"; + + rockchip,no-hp-det; + rockchip,delay-start-play-ms = <200>; + rockchip,loopback-grp = <1>; + spk-ctl-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; +}; + +&cpu0 { + cpu-supply = <&vdd_core>; +}; + +&cpu0_opp_table { + opp-1200000000 { + status = "okay"; + }; +}; + +&dmc { + center-supply = <&vdd_log>; + status = "okay"; +}; + +&fiq_debugger { + status = "okay"; +}; + +&i2s_2ch_0 { + status = "okay"; +}; + +&i2s_8ch_2 { + status = "okay"; +}; + +&io_domains { + status = "okay"; + + vccio0-supply = <&vcc_io>; + vccio1-supply = <&vcc_io>; + vccio2-supply = <&vcc_1v8>; + vccio3-supply = <&vcc_io>; + vccio4-supply = <&vccio_sdio>; + vccio5-supply = <&vcc_io>; +}; + +&nandc { + status = "okay"; +}; + +&pinctrl { + buttons { + pwr_key: pwr-key { + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb { + usb_drv: usb-drv { + rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + sdio-pwrseq { + wifi_enable_h: wifi-enable-h { + rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + wireless-wlan { + wifi_wake_host: wifi-wake-host { + rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&pwm0 { + status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm0_pin_pull_down>; +}; + +&ramoops { + record-size = <0x0 0x00000>; + console-size = <0x0 0x20000>; +}; + +&ramoops_mem { + reg = <0x0 0x30000 0x0 0x20000>; +}; + +&rk_timer_rtc { + status = "okay"; +}; + +&rng { + status = "okay"; +}; + +&rockchip_suspend { + rockchip,pwm-regulator-config = < + (0 + | RKPM_PWM_REGULATOR + ) + >; + + rockchip,wakeup-config = < + (0 + | RKPM_GPIO0_WAKEUP_EN + | RKPM_TIMER_WAKEUP_EN + ) + >; + + status = "okay"; +}; + +&saradc { + status = "okay"; + vref-supply = <&vcc_1v8>; +}; + +&sdio { + max-frequency = <110000000>; + bus-width = <4>; + cap-sd-highspeed; + supports-sdio; + ignore-pm-notify; + keep-power-in-suspend; + non-removable; + mmc-pwrseq = <&sdio_pwrseq>; + sd-uhs-sdr104; + status = "okay"; +}; + +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + supports-sd; + card-detect-delay = <300>; + status = "disabled"; +}; + +&sfc { + u-boot,dm-pre-reloc; + status = "okay"; +}; + +&tsadc { + rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ + status = "okay"; +}; + +&u2phy { + status = "okay"; + + u2phy_host: host-port { + phy-supply = <&vbus_host>; + status = "okay"; + }; + + u2phy_otg: otg-port { + status = "okay"; + }; +}; + +&usb20_otg { + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci{ + status = "okay"; +}; + +&vad { + status = "disabled"; + rockchip,audio-src = <&i2s_8ch_2>; + rockchip,det-channel = <0>; + rockchip,mode = <1>; + rockchip,buffer-time-ms = <500>; + #sound-dai-cells = <0>; +};