From 1b73fb8c1fe440ef3df61b82d72189e0e5eb7f5b Mon Sep 17 00:00:00 2001 From: guoyf2 Date: Mon, 22 Jun 2020 15:02:07 +0800 Subject: [PATCH] arm/dts: Cebu audio configuration Add Cebu audio overlay Move Cebu audio overlay to Cebu common overlay Remove Guam audio overlay Change-Id: I6d2386e4b26fd49f146e25020da82689bde83554 Signed-off-by: guoyf2 Reviewed-on: https://gerrit.mot.com/1635877 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Reviewed-by: Yunfei Guo Submit-Approved: Jira Key --- qcom/bengal-cebu-awinic-audio-overlay.dtsi | 133 +++++++++++++++++++++ qcom/bengal-cebu-common-overlay.dtsi | 1 + qcom/bengal-cebu-evt-overlay.dts | 1 - 3 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 qcom/bengal-cebu-awinic-audio-overlay.dtsi diff --git a/qcom/bengal-cebu-awinic-audio-overlay.dtsi b/qcom/bengal-cebu-awinic-audio-overlay.dtsi new file mode 100644 index 000000000000..9b5d52dbb13d --- /dev/null +++ b/qcom/bengal-cebu-awinic-audio-overlay.dtsi @@ -0,0 +1,133 @@ +/* Copyright (c) 2019, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include + +&wsa881x_i2c_e { + status = "disabled"; +}; + +&wsa881x_i2c_44 { + status = "disabled"; +}; + +&wsa881x_analog_clk_gpio { + status = "disabled"; +}; + +&wsa881x_analog_reset_gpio { + status = "disabled"; +}; + +&wsa881x_analog_clk { + status = "disabled"; +}; + +&cdc_dmic01_gpios { + status = "disabled"; +}; + +&cdc_dmic23_gpios { + status = "disabled"; +}; + +&fsa4480 { + status = "disabled"; +}; + +&qupv3_se1_i2c { + status = "ok"; + aw882xx_smartpa@34 { + compatible = "awinic,aw882xx_smartpa"; + reg = <0x34>; + reset-gpio = <&tlmm 97 0>; + irq-gpio = <&tlmm 112 0x2008>; + monitor-flag = <1>; + monitor-timer-val = <3000>; + status = "okay"; + }; +}; + +&q6core { + cdc_pri_mi2s_gpios: msm_cdc_pinctrl_pri { + compatible = "qcom,msm-cdc-pinctrl"; + pinctrl-names = "aud_active", "aud_sleep"; + pinctrl-0 = <&lpi_i2s1_sck_active &lpi_i2s1_ws_active + &lpi_i2s1_sd0_active &lpi_i2s1_sd1_active>; + pinctrl-1 = <&lpi_i2s1_sck_sleep &lpi_i2s1_ws_sleep + &lpi_i2s1_sd0_sleep &lpi_i2s1_sd1_sleep>; + qcom,lpi-gpios; + }; +}; + +/* Configure MI2S0 SD0&SD1 */ +&dai_mi2s0 { + /* SD0 line for playback */ + qcom,msm-mi2s-rx-lines = <1>; + /* SD1 line for recording(SmartPA EC) */ + qcom,msm-mi2s-tx-lines = <2>; +}; + +/* Modify btfmslim_codec's compatible */ +&btfmslim_codec { + compatible = "btfmslim_slave"; + status = "ok"; +}; + + +&bengal_snd { + qcom,model = "bengal-awinic-snd-card"; + aw,have-882xx = <1>; + + qcom,audio-routing = + "AMIC1", "MIC BIAS1", + "MIC BIAS1", "Analog Mic1", + "AMIC2", "MIC BIAS2", + "MIC BIAS2", "Analog Mic2", + "AMIC3", "MIC BIAS3", + "MIC BIAS3", "Analog Mic3", + "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "IN3_AUX", "AUX_OUT", + "TX SWR_MIC0", "ADC1_OUTPUT", + "TX SWR_MIC4", "ADC2_OUTPUT", + "TX SWR_MIC0", "VA_TX_SWR_CLK", + "TX SWR_MIC1", "VA_TX_SWR_CLK", + "TX SWR_MIC2", "VA_TX_SWR_CLK", + "TX SWR_MIC3", "VA_TX_SWR_CLK", + "TX SWR_MIC4", "VA_TX_SWR_CLK", + "RX_TX DEC0_INP", "TX DEC0 MUX", + "RX_TX DEC1_INP", "TX DEC1 MUX", + "RX_TX DEC2_INP", "TX DEC2 MUX", + "RX_TX DEC3_INP", "TX DEC3 MUX", + "TX_AIF1 CAP", "VA_TX_SWR_CLK", + "TX_AIF2 CAP", "VA_TX_SWR_CLK", + "TX_AIF3 CAP", "VA_TX_SWR_CLK", + "VA SWR_MIC0", "ADC1_OUTPUT", + "VA SWR_MIC4", "ADC2_OUTPUT"; + + qcom,mi2s-audio-intf = <1>; + qcom,pri-mi2s-gpios = <&cdc_pri_mi2s_gpios>; + + qcom,wsa-devs = <0>; + qcom,wsa-max-devs = <0>; + + /delete-property/ qcom,cdc-dmic01-gpios; + /delete-property/ qcom,cdc-dmic23-gpios; + /delete-property/ qcom,wsa-devs; + /delete-property/ qcom,wsa-aux-dev-prefix; +}; + +/* Modify headset's BIAS voltage to 2.6V */ +&wcd937x_codec { + qcom,cdc-micbias2-mv = <2600>; +}; diff --git a/qcom/bengal-cebu-common-overlay.dtsi b/qcom/bengal-cebu-common-overlay.dtsi index 99e499f31e89..a6d7934cfae7 100644 --- a/qcom/bengal-cebu-common-overlay.dtsi +++ b/qcom/bengal-cebu-common-overlay.dtsi @@ -14,6 +14,7 @@ #include "bengal-moto-common-overlay.dtsi" #include "bengal-guam-display.dtsi" #include "bengal-audio-overlay.dtsi" +#include "bengal-cebu-awinic-audio-overlay.dtsi" #include "bengal-guam-touchscreen-overlay.dtsi" #include "camera/bengal-camera-sensor-mot-guamp-overlay.dtsi" #include "bengal-guam-fps.dtsi" diff --git a/qcom/bengal-cebu-evt-overlay.dts b/qcom/bengal-cebu-evt-overlay.dts index 3eec0f229020..5e2a0f82bd7d 100644 --- a/qcom/bengal-cebu-evt-overlay.dts +++ b/qcom/bengal-cebu-evt-overlay.dts @@ -14,7 +14,6 @@ /plugin/; #include "bengal-cebu-common-overlay.dtsi" -#include "bengal-guam-audio-overlay.dtsi" / { model = "cebu";