diff --git a/qcom/Makefile b/qcom/Makefile index d2737fab463f..d3e745ea43d0 100644 --- a/qcom/Makefile +++ b/qcom/Makefile @@ -6,14 +6,17 @@ endif # Motorola Device Trees dtbo-$(CONFIG_GUAM_DTB) += \ - bengal-guam-evt-overlay.dtbo + bengal-guam-evt-overlay.dtbo \ + bengal-guam-dvt-overlay.dtbo bengal-guam-evt-overlay.dtbo-base := bengal-moto-base.dtb dtbo-$(CONFIG_GUAMP_DTB) += \ - bengal-guamp-evt-overlay.dtbo + bengal-guamp-evt-overlay.dtbo \ + bengal-guamp-dvt-overlay.dtbo bengal-guamp-evt-overlay.dtbo-base := bengal-moto-base.dtb +bengal-guamp-dvt-overlay.dtbo-base := bengal-moto-base.dtb else ifeq ($(CONFIG_BUILD_ARM64_DT_OVERLAY),y) dtbo-$(CONFIG_ARCH_KONA) += \ diff --git a/qcom/bengal-guam-audio-overlay.dtsi b/qcom/bengal-guam-audio-overlay.dtsi index f8eb07e1124d..18a369567fbd 100644 --- a/qcom/bengal-guam-audio-overlay.dtsi +++ b/qcom/bengal-guam-audio-overlay.dtsi @@ -52,7 +52,8 @@ &bengal_snd { - qcom,model = "bengal-idp-snd-card"; + qcom,model = "bengal-fs-snd-card"; + fs,have-16xx = <1>; qcom,mi2s-audio-intf = <1>; qcom,pri-mi2s-gpios = <&cdc_pri_mi2s_gpios>; diff --git a/qcom/bengal-guam-awinic-audio-overlay.dtsi b/qcom/bengal-guam-awinic-audio-overlay.dtsi new file mode 100644 index 000000000000..5409666b7338 --- /dev/null +++ b/qcom/bengal-guam-awinic-audio-overlay.dtsi @@ -0,0 +1,70 @@ +/* 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 + +&qupv3_se1_i2c { + status = "ok"; + + /* AWINIC AW882XX mono Smart PA */ + aw882xx_smartpa@34 { + compatible = "awinic,aw882xx_smartpa"; + reg = <0x34>; + reset-gpio = <&tlmm 97 0>; + /*irq-gpio = <&tlmm 136 0x2008>; */ + monitor-flag = <1>; + monitor-timer-val = <3000>; + aw-cali-mode = "aw_misc"; + status = "okay"; + }; + /* AWINIC AW882XX mono Smart PA End */ +}; + +/* Add pinctrl for MI2S0 */ +&soc { + 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>; + }; +}; + +/* 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,mi2s-audio-intf = <1>; + qcom,pri-mi2s-gpios = <&cdc_pri_mi2s_gpios>; + /delete-property/ qcom,cdc-dmic01-gpios; + /delete-property/ qcom,cdc-dmic23-gpios; + + qcom,wsa-max-devs = <0>; + qcom,wsa-devs = <0>; +}; diff --git a/qcom/bengal-guam-common-overlay.dtsi b/qcom/bengal-guam-common-overlay.dtsi index 7bd637b0290e..0ff24791e7cf 100644 --- a/qcom/bengal-guam-common-overlay.dtsi +++ b/qcom/bengal-guam-common-overlay.dtsi @@ -14,7 +14,6 @@ #include "bengal-moto-common-overlay.dtsi" #include "bengal-guam-display.dtsi" #include "bengal-audio-overlay.dtsi" -#include "bengal-guam-audio-overlay.dtsi" #include "bengal-guam-touchscreen-overlay.dtsi" #include "camera/bengal-camera-sensor-mot-guam-overlay.dtsi" #include "bengal-guam-fps.dtsi" diff --git a/qcom/bengal-guam-dvt-overlay.dts b/qcom/bengal-guam-dvt-overlay.dts new file mode 100644 index 000000000000..fa9e87a5c088 --- /dev/null +++ b/qcom/bengal-guam-dvt-overlay.dts @@ -0,0 +1,28 @@ +/* Copyright (c) 2020, 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. + */ + +/dts-v1/; +/plugin/; + +#include "bengal-guam-common-overlay.dtsi" +#include "bengal-guam-awinic-audio-overlay.dtsi" + +/ { + model = "guam"; + compatible = "qcom,bengal-guam", "qcom,bengal-moto", "qcom,bengal"; + qcom,msm-id = <417 0x10000>; + qcom,board-id = <0 0xB000>; +}; + +/* + * Guam HW rev specific changes go here + */ diff --git a/qcom/bengal-guam-evt-overlay.dts b/qcom/bengal-guam-evt-overlay.dts index 96467d200939..6c6746ec906c 100644 --- a/qcom/bengal-guam-evt-overlay.dts +++ b/qcom/bengal-guam-evt-overlay.dts @@ -14,6 +14,7 @@ /plugin/; #include "bengal-guam-common-overlay.dtsi" +#include "bengal-guam-audio-overlay.dtsi" / { model = "guam"; diff --git a/qcom/bengal-guamp-common-overlay.dtsi b/qcom/bengal-guamp-common-overlay.dtsi index 1b87cde78a39..7abb95b6790d 100644 --- a/qcom/bengal-guamp-common-overlay.dtsi +++ b/qcom/bengal-guamp-common-overlay.dtsi @@ -14,7 +14,6 @@ #include "bengal-moto-common-overlay.dtsi" #include "bengal-guam-display.dtsi" #include "bengal-audio-overlay.dtsi" -#include "bengal-guam-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-guamp-dvt-overlay.dts b/qcom/bengal-guamp-dvt-overlay.dts new file mode 100644 index 000000000000..1fa6bf52de36 --- /dev/null +++ b/qcom/bengal-guamp-dvt-overlay.dts @@ -0,0 +1,28 @@ +/* Copyright (c) 2020, 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. + */ + +/dts-v1/; +/plugin/; + +#include "bengal-guamp-common-overlay.dtsi" +#include "bengal-guam-awinic-audio-overlay.dtsi" + +/ { + model = "guamp"; + compatible = "qcom,bengal-guamp", "qcom,bengal-moto", "qcom,bengal"; + qcom,msm-id = <444 0x10000>; + qcom,board-id = <0 0xB000>; +}; + +/* + * Guam HW rev specific changes go here + */ diff --git a/qcom/bengal-guamp-evt-overlay.dts b/qcom/bengal-guamp-evt-overlay.dts index 35dfffd2477f..4b1021f04083 100644 --- a/qcom/bengal-guamp-evt-overlay.dts +++ b/qcom/bengal-guamp-evt-overlay.dts @@ -14,6 +14,7 @@ /plugin/; #include "bengal-guamp-common-overlay.dtsi" +#include "bengal-guam-audio-overlay.dtsi" / { model = "guamp";