From patchwork Thu Dec 23 15:43:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivasa Rao Mandadapu X-Patchwork-Id: 527443 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44109C433F5 for ; Thu, 23 Dec 2021 15:44:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234509AbhLWPoW (ORCPT ); Thu, 23 Dec 2021 10:44:22 -0500 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:47857 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349379AbhLWPnd (ORCPT ); Thu, 23 Dec 2021 10:43:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1640274213; x=1671810213; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=gLKto1hI5OmGjoWkpCUF8t/R7PykhlF+MUksnia//Rs=; b=IXUFLFaVqslIdCShrju08w/Amp2YDgNh/vafK2w6K9qTuF5zRfU0UYgX qFftBE/xCSMr/6upVq+68j4sTMrVkw2xr9Uilww17dV/kfijfoCqnsXNk j5sOVZCYVzINuMFlqPEPj2+AY7UpOoXs+0oJ34Z525DfpkZ4WJO4jwoLT o=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 23 Dec 2021 07:43:31 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2021 07:43:31 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 23 Dec 2021 07:43:31 -0800 Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 23 Dec 2021 07:43:27 -0800 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH 1/3] arm64: dts: qcom: sc7280: Add pinmux for I2S speaker and Headset Date: Thu, 23 Dec 2021 21:13:07 +0530 Message-ID: <1640274189-14120-2-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1640274189-14120-1-git-send-email-quic_srivasam@quicinc.com> References: <1640274189-14120-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add AMP enable node and pinmux for primary and secondary I2S for SC7280 based platforms. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu --- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 11 +++++++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 55 ++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi index d623d71..86f182c 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi @@ -491,6 +491,17 @@ }; &tlmm { + amp_en: amp-en { + pinmux { + pins = "gpio63"; + function = "gpio"; + }; + pinconf { + pins = "gpio63"; + bias-pull-down; + }; + }; + nvme_pwren: nvme-pwren { function = "gpio"; }; diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index 937c2e0..b5ebc9ec 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -3461,6 +3461,61 @@ }; }; + pri_mi2s_active: primary_mi2s_active { + sclk { + pins = "gpio97"; + function = "mi2s0_sck"; + drive-strength = <16>; + }; + ws { + pins = "gpio100"; + function = "mi2s0_ws"; + drive-strength = <16>; + }; + data0 { + pins = "gpio98"; + function = "mi2s0_data0"; + drive-strength = <16>; + }; + data1 { + pins = "gpio99"; + function = "mi2s0_data1"; + drive-strength = <16>; + }; + }; + + pri_mi2s_mclk_active: pri-mi2s-mclk-active { + pinmux { + pins = "gpio96"; + function = "pri_mi2s"; + }; + }; + + sec_mi2s_active: sec-mi2s-active { + sclk { + pins = "gpio106"; + function = "mi2s1_sck"; + drive-strength = <16>; + bias-disable; + output-high; + }; + + ws { + pins = "gpio108"; + function = "mi2s1_ws"; + drive-strength = <16>; + output-high; + }; + + data0 { + pins = "gpio107"; + function = "mi2s1_data0"; + drive-strength = <16>; + bias-disable; + output-high; + }; + }; + qup_uart8_cts: qup-uart8-cts { pins = "gpio32"; function = "qup10"; From patchwork Thu Dec 23 15:44:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivasa Rao Mandadapu X-Patchwork-Id: 527441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5ED4EC4332F for ; Thu, 23 Dec 2021 15:45:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240027AbhLWPpO (ORCPT ); Thu, 23 Dec 2021 10:45:14 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:50729 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239960AbhLWPpN (ORCPT ); Thu, 23 Dec 2021 10:45:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1640274313; x=1671810313; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=ofhD/uIRCiSzkugGXI2agPN8d03c46nO5Juuuzs9H6A=; b=qk7fSjBKz59fEbzWSnt49Pyl9eisYnEdRoT1Djg3pZzf3Nf/qWXEWrS1 /kdoBTw7E8QO7CIH57ANt4M22c2QjeulSanEGT+h1Voc85B1pJTioolr3 voDbVelvYNXxe5FX1wwC+bK5SA/dEBsLdw4wXrSUrHvE3V2h734OBPZpV A=; Received: from ironmsg07-lv.qualcomm.com ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 23 Dec 2021 07:45:13 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg07-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2021 07:45:13 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 23 Dec 2021 07:45:12 -0800 Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 23 Dec 2021 07:45:08 -0800 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH 2/3] arm64: dts: qcom: sc7180: Add lpass cpu node Date: Thu, 23 Dec 2021 21:14:47 +0530 Message-ID: <1640274288-14399-3-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1640274288-14399-1-git-send-email-quic_srivasam@quicinc.com> References: <1640274288-14399-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add lpass cpu node for audio on sc7280 based platforms. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu --- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 27 +++++++++++++++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 57 ++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi index edfc8d7..3449d56 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi @@ -689,3 +689,30 @@ }; }; +&lpass_cpu { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&sec_mi2s_active>; + + wcd-rx@6 { + reg = ; + }; + + wcd-tx@19 { + reg = ; + }; + + mi2s-secondary@1 { + reg = ; + qcom,playback-sd-lines = <0>; + }; + + hdmi-primary@5 { + reg = ; + }; + + va-tx@25 { + reg = ; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index b271de9..3f31caf 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -17,6 +17,7 @@ #include #include #include +#include #include / { @@ -1841,6 +1842,62 @@ #size-cells = <0>; }; + lpass_cpu: qcom,lpass@3260000 { + compatible = "qcom,sc7280-lpass-cpu"; + reg = <0 0x3260000 0 0xC000>, + <0 0x3280000 0 0x29000>, + <0 0x3340000 0 0x29000>, + <0 0x336C000 0 0x3000>, + <0 0x3987000 0 0x68000>, + <0 0x3B00000 0 0x29000>; + reg-names = "lpass-rxtx-cdc-dma-lpm", + "lpass-rxtx-lpaif", + "lpass-va-lpaif", + "lpass-va-cdc-dma-lpm", + "lpass-hdmiif", + "lpass-lpaif"; + + iommus = <&apps_smmu 0x1820 0>, + <&apps_smmu 0x1821 0>, + <&apps_smmu 0x1832 0>; + status = "disabled"; + + power-domains = <&rpmhpd SC7280_LCX>; + power-domain-names = "lcx"; + required-opps = <&rpmhpd_opp_nom>; + + clocks = <&lpass_audiocc LPASS_AON_CC_AUDIO_HM_H_CLK>, + <&lpasscc LPASS_CORE_CC_SYSNOC_MPORT_CORE_CLK>, + <&lpass_audiocc LPASS_AUDIO_CC_CODEC_MEM0_CLK>, + <&lpass_audiocc LPASS_AUDIO_CC_CODEC_MEM1_CLK>, + <&lpass_audiocc LPASS_AUDIO_CC_CODEC_MEM2_CLK>, + <&lpasscc LPASS_CORE_CC_EXT_IF0_IBIT_CLK>, + <&lpasscc LPASS_CORE_CC_EXT_IF1_IBIT_CLK>, + <&lpass_aon LPASS_AON_CC_VA_MEM0_CLK>; + clock-names = "aon_cc_audio_hm_h", + "core_cc_sysnoc_mport_core", + "audio_cc_codec_mem0", + "audio_cc_codec_mem1", + "audio_cc_codec_mem2", + "core_cc_ext_if0_ibit", + "core_cc_ext_if1_ibit", + "aon_cc_va_mem0"; + + #sound-dai-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + + interrupts = , + , + , + ; + + interrupt-names = "lpass-irq-lpaif", + "lpass-irq-vaif", + "lpass-irq-rxtxif", + "lpass-irq-hdmi"; + }; + vamacro: codec@3370000 { compatible = "qcom,sc7280-lpass-va-macro"; pinctrl-0 = <&dmic01_active>; From patchwork Thu Dec 23 15:44:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivasa Rao Mandadapu X-Patchwork-Id: 528048 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06D04C433FE for ; Thu, 23 Dec 2021 15:45:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244393AbhLWPpU (ORCPT ); Thu, 23 Dec 2021 10:45:20 -0500 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:10231 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244430AbhLWPpR (ORCPT ); Thu, 23 Dec 2021 10:45:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1640274317; x=1671810317; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=TJqD0w8c950M6E5A+6jYqEPy3400UcO7DUdFbcJ0Op4=; b=r38wmB89deq12qz0EhMMQ1RC3N6Qwitraf5tv4/64RqOKLcyuYcOqJ39 JxCX60fDdmNCfc2GlqiM3a4MruTjTK95wzOxPDpkaQZVKo17qX7Kx2Tdw QDikIvCjztAUkAHqeGfG6yBUWs2IXIDWE9qj8zNe2D0bQwm/DQB7cn23S s=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 23 Dec 2021 07:45:17 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2021 07:45:16 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 23 Dec 2021 07:45:16 -0800 Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 23 Dec 2021 07:45:12 -0800 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH 3/3] arm64: dts: qcom: sc7280: add sound card support Date: Thu, 23 Dec 2021 21:14:48 +0530 Message-ID: <1640274288-14399-4-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1640274288-14399-1-git-send-email-quic_srivasam@quicinc.com> References: <1640274288-14399-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This patch adds sound card support for MTP using WCD938x headset playback, capture, I2S Speaker Playback and DMICs via VA macro. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu --- arch/arm64/boot/dts/qcom/sc7280-crd.dts | 8 +++ arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 93 ++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 ++ 3 files changed, 104 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd.dts b/arch/arm64/boot/dts/qcom/sc7280-crd.dts index cd2755c..535af2e 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc7280-crd.dts @@ -72,6 +72,14 @@ ap_ts_pen_1v8: &i2c13 { pins = "gpio51"; }; +&sound { + audio-routing = + "VA DMIC0", "MIC BIAS1", + "VA DMIC1", "MIC BIAS1", + "VA DMIC2", "MIC BIAS3", + "VA DMIC3", "MIC BIAS3"; +}; + &tlmm { tp_int_odl: tp-int-odl { pins = "gpio7"; diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi index 3449d56..63b1184 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi @@ -637,6 +637,99 @@ }; }; +&sound { + compatible = "google,sc7280-herobrine"; + model = "sc7280-wcd938x-max98360a-1mic"; + status = "okay"; + audio-routing = + "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "AMIC1", "MIC BIAS1", + "AMIC2", "MIC BIAS2", + "VA DMIC0", "MIC BIAS3", + "VA DMIC1", "MIC BIAS3", + "VA DMIC2", "MIC BIAS1", + "VA DMIC3", "MIC BIAS1", + "TX SWR_ADC0", "ADC1_OUTPUT", + "TX SWR_ADC1", "ADC2_OUTPUT", + "TX SWR_ADC2", "ADC3_OUTPUT", + "TX SWR_DMIC0", "DMIC1_OUTPUT", + "TX SWR_DMIC1", "DMIC2_OUTPUT", + "TX SWR_DMIC2", "DMIC3_OUTPUT", + "TX SWR_DMIC3", "DMIC4_OUTPUT", + "TX SWR_DMIC4", "DMIC5_OUTPUT", + "TX SWR_DMIC5", "DMIC6_OUTPUT", + "TX SWR_DMIC6", "DMIC7_OUTPUT", + "TX SWR_DMIC7", "DMIC8_OUTPUT"; + + qcom,msm-mbhc-hphl-swh = <1>; + qcom,msm-mbhc-gnd-swh = <1>; + + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <0>; + + dai-link@6 { + link-name = "WCD Playback"; + reg = ; + cpu { + sound-dai = <&lpass_cpu LPASS_CDC_DMA_RX0>; + }; + + codec { + sound-dai = <&wcd938x 0>, <&swr0 0>, <&rxmacro 0>; + }; + }; + + dai-link@19 { + link-name = "WCD Capture"; + reg = ; + cpu { + sound-dai = <&lpass_cpu LPASS_CDC_DMA_TX3>; + }; + + codec { + sound-dai = <&wcd938x 1>, <&swr1 0>, <&txmacro 0>; + }; + }; + + dai-link@1 { + link-name = "Secondary MI2S Playback"; + reg = ; + cpu { + sound-dai = <&lpass_cpu MI2S_SECONDARY>; + }; + + codec { + sound-dai = <&max98360a>; + }; + }; + + dai-link@5 { + link-name = "DP Playback"; + reg = ; + cpu { + sound-dai = <&lpass_cpu LPASS_DP_RX>; + }; + + codec { + sound-dai = <&msm_dp>; + }; + }; + + dai-link@25 { + link-name = "DMIC Capture"; + reg = ; + cpu { + sound-dai = <&lpass_cpu LPASS_CDC_DMA_VA_TX0>; + }; + + codec { + sound-dai = <&vamacro 0>; + }; + }; +}; + &swr0 { wcd_rx: wcd938x-rx{ compatible = "sdw20217010d00"; diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index 3f31caf..12a05cc 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -2786,6 +2786,9 @@ }; + sound: sound { + }; + usb_1_hsphy: phy@88e3000 { compatible = "qcom,sc7280-usb-hs-phy", "qcom,usb-snps-hs-7nm-phy";