diff --git a/Kbuild b/Kbuild index 69722a73..ec9f9945 100644 --- a/Kbuild +++ b/Kbuild @@ -19,11 +19,13 @@ dtbo-y += sun-audio.dtbo \ sun-audio-cdp-nfc.dtbo \ sun-audio-rumi.dtbo \ sun-audio-mtp.dtbo \ + sun-audio-mtp-3.5mm.dtbo \ sun-audio-mtp-nfc.dtbo \ sun-audio-qrd.dtbo \ sun-audio-qrd-sku2.dtbo \ sun-audio-atp.dtbo \ sun-audio-rcm.dtbo \ + sun-audio-hamilton-rcm.dtbo \ sun-audio-hamilton-cdp.dtbo \ sun-audio-hamilton-mtp.dtbo endif diff --git a/sun-audio-cdp.dtsi b/sun-audio-cdp.dtsi index b25f4300..e76cd14a 100644 --- a/sun-audio-cdp.dtsi +++ b/sun-audio-cdp.dtsi @@ -40,9 +40,13 @@ &cdc_sep_mi2s_gpios { status = "disabled"; }; +&swr_haptics { + status = "disabled"; +}; &sun_snd { qcom,model = "sun-cdp-snd-card"; + swr-haptics-unsupported; qcom,audio-routing = "AMIC1", "Analog Mic1", "AMIC1", "MIC BIAS1", diff --git a/sun-audio-hamilton-cdp.dtsi b/sun-audio-hamilton-cdp.dtsi index bbbe89d8..f903de43 100644 --- a/sun-audio-hamilton-cdp.dtsi +++ b/sun-audio-hamilton-cdp.dtsi @@ -1,6 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause /* - * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ /*This is CDP with Hamilton wlan*/ diff --git a/sun-audio-hamilton-rcm.dts b/sun-audio-hamilton-rcm.dts new file mode 100644 index 00000000..c1de3779 --- /dev/null +++ b/sun-audio-hamilton-rcm.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/dts-v1/; +/plugin/; + +#include "sun-audio-hamilton-cdp.dtsi" +/ { + model = "Qualcomm Technologies, Inc. Sun RCM"; + compatible = "qcom,sun-rcm", "qcom,sun", "qcom,sunp-rcm", "qcom,sunp", "qcom,rcm"; + qcom,msm-id = <618 0x10000>, <618 0x20000>, <639 0x10000>, <639 0x20000>; + qcom,board-id = <0x20015 0>, <0x40015 0>; +}; diff --git a/sun-audio-mtp-3.5mm.dts b/sun-audio-mtp-3.5mm.dts new file mode 100644 index 00000000..8148cf7a --- /dev/null +++ b/sun-audio-mtp-3.5mm.dts @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/dts-v1/; +/plugin/; + +/*This is MTP with 3.5mm HS. */ + +#include "sun-audio-mtp.dtsi" + +&sun_snd { + qcom,msm-mbhc-usbc-audio-supported = <0>; + qcom,msm-mbhc-hphl-swh = <1>; + qcom,msm-mbhc-gnd-swh = <1>; +}; + +/ { + model = "Qualcomm Technologies, Inc. Sun MTP with 3.5mm"; + compatible = "qcom,sun-mtp", "qcom,sun", "qcom,sunp-mtp", "qcom,sunp", "qcom,mtp"; + qcom,msm-id = <618 0x10000>, <618 0x20000>, <639 0x10000>, <639 0x20000>; + qcom,board-id = <0x60008 0>; +}; diff --git a/sun-audio-mtp-qmp.dts b/sun-audio-mtp-qmp.dts new file mode 100644 index 00000000..6bd0e533 --- /dev/null +++ b/sun-audio-mtp-qmp.dts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/dts-v1/; +/plugin/; + +#include "sun-audio-mtp-qmp.dtsi" +/ { + model = "Qualcomm Technologies, Inc. Sun MTP QMP1000"; + compatible = "qcom,sun-mtp", "qcom,sun", "qcom,mtp", "qcom,sunp-mtp", "qcom,sunp"; + qcom,msm-id = <618 0x10000>, <618 0x20000>, <639 0x10000>, <639 0x20000>; + qcom,board-id = <0x10108 0>, <0x40108 0>; +}; diff --git a/sun-audio-mtp-qmp.dtsi b/sun-audio-mtp-qmp.dtsi new file mode 100644 index 00000000..1c2894c5 --- /dev/null +++ b/sun-audio-mtp-qmp.dtsi @@ -0,0 +1,146 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include "sun-audio-mtp.dtsi" + +&swr2 { + qmp01: qmp@04170232 { + /* + * reg = ; + compatible = "qcom,qmp-sdca-dmic"; + sound-name-prefix = "QMP_MIC01"; + qcom,codec-name = "qmp-dmic.01"; + qmp-vdd-supply = <&wcd_mb3_reg>; + qcom,swr-tx-port-params = + , , + , , + , , + , ; + }; + + qmp02: qmp@04170236 { + reg = <0x0100 0x04170236>; + compatible = "qcom,qmp-sdca-dmic"; + sound-name-prefix = "QMP_MIC02"; + qcom,codec-name = "qmp-dmic.02"; + qmp-vdd-supply = <&wcd_mb3_reg>; + qcom,swr-tx-port-params = + , , + , , + , , + , ; + }; + + qmp03: qmp@04170230 { + reg = <0x0100 0x04170230>; + compatible = "qcom,qmp-sdca-dmic"; + sound-name-prefix = "QMP_MIC03"; + qcom,codec-name = "qmp-dmic.03"; + qmp-vdd-supply = <&wcd_mb1_reg>; + qcom,swr-tx-port-params = + , , + , , + , , + , ; + }; + + qmp04: qmp@04170239 { + reg = <0x0100 0x04170239>; + compatible = "qcom,qmp-sdca-dmic"; + sound-name-prefix = "QMP_MIC04"; + qcom,codec-name = "qmp-dmic.04"; + qmp-vdd-supply = <&wcd_mb1_reg>; + qcom,swr-tx-port-params = + , , + , , + , , + , ; + }; +}; + +&sun_snd { + qcom,model = "sun-mtp-wsa883x-qmp-snd-card"; + asoc-codec = <&stub_codec>, <&lpass_cdc>, + <&wcd939x_codec>, <&swr_haptics>, + <&wsa883x_0221>, <&wsa883x_0222>, + <&qmp01>, <&qmp02>, + <&qmp03>, <&qmp04>; + asoc-codec-names = "msm-stub-codec.1", "lpass-cdc", + "wcd939x_codec", "swr-haptics", + "wsa-codec1", "wsa-codec2", + "qmp-dmic.01", "qmp-dmic.02", + "qmp-dmic.03", "qmp-dmic.04"; + qcom,qmp-mic = <1>; + qcom,audio-routing = + "AMIC1", "Analog Mic1", + "AMIC1", "MIC BIAS1", + "AMIC2", "Analog Mic2", + "AMIC2", "MIC BIAS2", + "AMIC3", "Analog Mic3", + "AMIC3", "MIC BIAS3", + "AMIC4", "Analog Mic4", + "AMIC4", "MIC BIAS3", + "AMIC5", "Analog Mic5", + "AMIC5", "MIC BIAS4", + "VA AMIC1", "Analog Mic1", + "VA AMIC1", "VA MIC BIAS1", + "VA AMIC2", "Analog Mic2", + "VA AMIC2", "VA MIC BIAS2", + "VA AMIC3", "Analog Mic3", + "VA AMIC3", "VA MIC BIAS3", + "VA AMIC4", "Analog Mic4", + "VA AMIC4", "VA MIC BIAS3", + "VA AMIC5", "Analog Mic5", + "VA AMIC5", "VA MIC BIAS4", + "TX DMIC0", "Digital Mic0", + "TX DMIC0", "MIC BIAS1", + "TX DMIC1", "Digital Mic1", + "TX DMIC1", "MIC BIAS3", + "TX DMIC2", "Digital Mic2", + "TX DMIC2", "MIC BIAS3", + "TX DMIC3", "Digital Mic3", + "TX DMIC3", "MIC BIAS1", + "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "IN3_EAR", "AUX_OUT", + "WSA SRC0_INP", "SRC0", + "WSA_TX DEC0_INP", "TX DEC0 MUX", + "WSA_TX DEC1_INP", "TX DEC1 MUX", + "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", + "SpkrLeft IN", "WSA_SPK1 OUT", + "SpkrRight IN", "WSA_SPK2 OUT", + "TX SWR_INPUT", "WCD_TX_OUTPUT", + "TX SWR_INPUT", "QMP_MIC01 NORMAL_OUTPUT", + "TX SWR_INPUT", "QMP_MIC02 NORMAL_OUTPUT", + "TX SWR_INPUT", "QMP_MIC03 NORMAL_OUTPUT", + "TX SWR_INPUT", "QMP_MIC04 NORMAL_OUTPUT", + "VA SWR_INPUT", "VA_SWR_CLK", + "VA SWR_INPUT", "WCD_TX_OUTPUT", + "VA SWR_INPUT", "QMP_MIC01 LP_OUTPUT", + "VA SWR_INPUT", "QMP_MIC02 LP_OUTPUT", + "VA SWR_INPUT", "QMP_MIC03 LP_OUTPUT", + "VA SWR_INPUT", "QMP_MIC04 LP_OUTPUT", + "VA SWR_INPUT", "QMP_MIC01 NORMAL_OUTPUT", + "VA SWR_INPUT", "QMP_MIC02 NORMAL_OUTPUT", + "VA SWR_INPUT", "QMP_MIC03 NORMAL_OUTPUT", + "VA SWR_INPUT", "QMP_MIC04 NORMAL_OUTPUT", + "VA_AIF1 CAP", "VA_SWR_CLK", + "VA_AIF2 CAP", "VA_SWR_CLK", + "VA_AIF3 CAP", "VA_SWR_CLK", + "VA DMIC0", "Digital Mic0", + "VA DMIC1", "Digital Mic1", + "VA DMIC2", "Digital Mic2", + "VA DMIC3", "Digital Mic3", + "VA DMIC0", "VA MIC BIAS3", + "VA DMIC1", "VA MIC BIAS3", + "VA DMIC2", "VA MIC BIAS1", + "VA DMIC3", "VA MIC BIAS1"; +}; diff --git a/sun-audio-overlay.dtsi b/sun-audio-overlay.dtsi index bb2dc6a5..0f0cc03e 100644 --- a/sun-audio-overlay.dtsi +++ b/sun-audio-overlay.dtsi @@ -360,6 +360,22 @@ "cdc-vdd-mic-bias", "cdc-vdd-px"; qcom,cdc-on-demand-supplies = "cdc-vdd-buck"; + + wcd_mb1_reg: qcom,wcd-mb1-reg { + regulator-name = "wcd-mb1-reg"; + }; + + wcd_mb2_reg: qcom,wcd-mb2-reg { + regulator-name = "wcd-mb2-reg"; + }; + + wcd_mb3_reg: qcom,wcd-mb3-reg { + regulator-name = "wcd-mb3-reg"; + }; + + wcd_mb4_reg: qcom,wcd-mb4-reg { + regulator-name = "wcd-mb4-reg"; + }; }; }; diff --git a/sun-audio-rcm.dts b/sun-audio-rcm.dts index 76412e1b..e7841ce8 100644 --- a/sun-audio-rcm.dts +++ b/sun-audio-rcm.dts @@ -11,5 +11,5 @@ model = "Qualcomm Technologies, Inc. Sun RCM"; compatible = "qcom,sun-rcm", "qcom,sun", "qcom,sunp-rcm", "qcom,sunp", "qcom,rcm"; qcom,msm-id = <618 0x10000>, <618 0x20000>, <639 0x10000>, <639 0x20000>; - qcom,board-id = <0x15 0>; + qcom,board-id = <0x15 0>, <0x30015 0>; }; diff --git a/sun-audio-rumi.dtsi b/sun-audio-rumi.dtsi index b488ac34..474cd810 100644 --- a/sun-audio-rumi.dtsi +++ b/sun-audio-rumi.dtsi @@ -1,10 +1,15 @@ // SPDX-License-Identifier: BSD-3-Clause /* - * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include "sun-audio-overlay.dtsi" +&swr_haptics { + status = "disabled"; +}; + + &sun_snd { compatible = "qcom,sun-asoc-snd-stub"; asoc-codec = <&stub_codec>; diff --git a/sun-audio.dtsi b/sun-audio.dtsi index a96e4b4e..50e77c5b 100644 --- a/sun-audio.dtsi +++ b/sun-audio.dtsi @@ -1,6 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause /* - * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -57,9 +57,15 @@ qcom,smmu-version = <2>; qcom,smmu-enabled; iommus = <&apps_smmu 0x1001 0x0080>, <&apps_smmu 0x1061 0x0>; - qcom,iommu-dma-addr-pool = <0x10000000 0x10000000>; + memory-region = <&audio_cnss_resv_region>; + qcom,iommu-group = <&cnss_audio_iommu_group0>; qcom,smmu-sid-mask = /bits/ 64 <0xf>; dma-coherent; + + audio_cnss_resv_region: audio_cnss_resv_region { + iommu-addresses = <&msm_audio_ion 0x00000000 0x88000000>, + <&msm_audio_ion 0xb0000000 0x50000000>; + }; }; msm_audio_ion_cma: qcom,msm-audio-ion-cma {