Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2754071pxb; Thu, 3 Feb 2022 13:35:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzG9FKNa7zjK7sIGERwEQpEAlKr03wdqLgmYJTTomj8H+MJ83O5jVRv3BZ713xyN2ovH667 X-Received: by 2002:a17:907:a088:: with SMTP id hu8mr30085268ejc.439.1643924101615; Thu, 03 Feb 2022 13:35:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643924101; cv=none; d=google.com; s=arc-20160816; b=ymuD14oW/tU9pRedROGrFZOt5oBKgsVLVozsAYJALcOjZDm+xf+P5Ri3/SEVPbAuZS fBJyoKxAbaPLDq56TZO285WIVzC695mT56kS3wP8feSh608MU3/QOFynXr1A6aF6QvYQ qQE4ELCQa7gUP1JlZ8oENzCWM5pPqT9NNxyrVbbCHcXlci9zXCo4mdpzWBPL4RllMHFm VGkiWXq7HT2ND0ZK6VHRmTZ+KQ3djURvB09o6tw3AX624GGfy3KFTLPmTupPh6N4JsxN k2Xd/tMzd9m6S/BRk04cS87SCnj7cQf6yIFDd/8t3PDGvVEiITpDUkc7GcVcNqfomXHf U+Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Ykj2I1QmHFt7H0yiULN/tv9UeRPpY12C8pR5NKUpLrw=; b=D1T2rWvVab25i4xlfP5/pCwUIbcqhi3DxI5KSe+UY6V37t73MbxdYD4M+dO7L0n1Sv VuVmOVTD6y7y3U6FytMEAHO7xIq1hvsi+m15yt5XKMjWeUXSJyu3gp2E39zbrRe/TNsO T8B7myflnU52QzViOpwYXaj/unDGxi919qf1B7qkQsJsOmUmM7vmSSubSdNJR3cKrHM5 lDOswpFuwD08mayRn44efKBw8g6xmcUeoD/whM6rnrhhagWaNgNEBk39fw1MxiXmMrQX 1fQOsm+snxBMnyoso1JMyw+pmiarW96nherjrmNn/jB97LXDsXKUSuGQBcvR870Oe9cj 3ZBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=uqYrTmno; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa15si7456571ejc.53.2022.02.03.13.34.21; Thu, 03 Feb 2022 13:35:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=uqYrTmno; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350276AbiBCLdi (ORCPT + 99 others); Thu, 3 Feb 2022 06:33:38 -0500 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:36776 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350274AbiBCLdf (ORCPT ); Thu, 3 Feb 2022 06:33:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1643888015; x=1675424015; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Ykj2I1QmHFt7H0yiULN/tv9UeRPpY12C8pR5NKUpLrw=; b=uqYrTmnoU5iH97PdOSoBI3Yb8OAMJ5iNwb/cXl9fyRHSSaqdHRS5lyrA CA3DGEZmT/8h8kguyBro6xvAbrvAEiOAC4V+QpTjoPvw9EUlhnbg/BpBn NTF173GCNg0nxhLyOM5N9Z+CMlGZrz2fss+NPmud+SRKq3hRFtwMRRkhT I=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-01.qualcomm.com with ESMTP; 03 Feb 2022 03:33:35 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2022 03:33:34 -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, 3 Feb 2022 03:33:34 -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, 3 Feb 2022 03:33:30 -0800 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH v3 3/3] arm64: dts: qcom: sc7280: add sound card support Date: Thu, 3 Feb 2022 17:03:01 +0530 Message-ID: <1643887981-31011-4-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1643887981-31011-1-git-send-email-quic_srivasam@quicinc.com> References: <1643887981-31011-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain 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-kernel@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 ++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd.dts b/arch/arm64/boot/dts/qcom/sc7280-crd.dts index e6fbfc2..30d51fd 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc7280-crd.dts @@ -76,6 +76,14 @@ ap_ts_pen_1v8: &i2c13 { us-euro-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>; }; +&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 a76b2d1..fb89b0d 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi @@ -52,6 +52,99 @@ pinctrl-0 = <&nvme_pwren>; }; + sound: sound-card { + 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@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@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@25 { + link-name = "DMIC Capture"; + reg = ; + cpu { + sound-dai = <&lpass_cpu LPASS_CDC_DMA_VA_TX0>; + }; + + codec { + sound-dai = <&vamacro 0>; + }; + }; + }; + wcd938x: codec { compatible = "qcom,wcd9380-codec"; #sound-dai-cells = <1>; -- 2.7.4