Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3706732imw; Thu, 7 Jul 2022 06:25:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uXMQCgdL7+pTnpAKjW9AdeQSZSEyrArF4iaAPEHvuUa7d595D2J2zMJfg+ZHBZq3xQCpLv X-Received: by 2002:a17:907:6e92:b0:726:c846:591c with SMTP id sh18-20020a1709076e9200b00726c846591cmr43993667ejc.428.1657200342792; Thu, 07 Jul 2022 06:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657200342; cv=none; d=google.com; s=arc-20160816; b=O+uX3VSViyV0LWB5yy2MohU36jww5gu10S34ZiZOJYCrTPOhs1r383pJfXiJBlD+b5 UqhTIvnW7mjSsGXFrZN76X5neJXZlgwT00CMii6fzDMaCetT6h/BdRgvI+pcNzPdOsYe sXd5/UlfgjnYY49iVFT+QNx68foIgcCnumprI0rjO6wrT6S6dy6yf1QQ1gJEEblcvKSe YN5YpwnrMUoqDoBqZtzsXYd6X1TvTEVzPqiIS+a9XyFjDbJ61RBjM7T8YAWhnq5Wfuwm eB4CkUSJXIhnUNJXTPuPPIRG/odGERP8kBYwCNpKLkICuegYATwnYAZ0gxhlJmQtDBGR FtSg== 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=TJk3F6V8AHctyPHF88MrRGIPEV1Da4n7wMGSH9dJuLE=; b=mX7x5vtQfSOiDZy3WxhXYH+J/XqHJHoxzX2cvEF8fwlzEHgNJPQHyFyuTIvDu4IB3P aoRJOK4KzLrva1EStwpMk90p6c46eR8H1OKKuPcIkmEgiAQd1Lw8xWB5/osG/lJJG+1A GD0FTKl5jeT8IFyksmqJE3Da91ekf16VZeOvufIg5Q+mkRCLFSnqjjM6U+CDyTJkOpU0 3mtXy6onWErlo/j5N/JfR7ZhTgJnfeb8kukgPs/hyKcCSwKvmNz6F0K14QsgiiJf5qm3 9P8ax60Oc6FuHjITxZ6yXAzY783FU+a1uO/oE0f0uq7vilVj3qm6q4ST5+FE0OKPkekd e9GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=U7W3kcUd; 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 gn21-20020a1709070d1500b007121bfeedb8si15834728ejc.665.2022.07.07.06.25.15; Thu, 07 Jul 2022 06:25:42 -0700 (PDT) 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=U7W3kcUd; 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 S235640AbiGGNXr (ORCPT + 99 others); Thu, 7 Jul 2022 09:23:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235649AbiGGNXn (ORCPT ); Thu, 7 Jul 2022 09:23:43 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BF8C17A97; Thu, 7 Jul 2022 06:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1657200222; x=1688736222; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=TJk3F6V8AHctyPHF88MrRGIPEV1Da4n7wMGSH9dJuLE=; b=U7W3kcUd1+uHzWMqzCt2LpX0RrocSi53dFovc+aXZODH6FJvIGJIYr7D q2vEQveNNYhnxxg92fGoLBxbMO3LsPapnlIn1BgbZNDKGR+BFNqlzoyIC GG+RqduzXaCi0YKVsscuZoegcs9hIYkYgSlqX4t6wpIj4UK7bi8JIxrB0 g=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-02.qualcomm.com with ESMTP; 07 Jul 2022 06:23:42 -0700 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; 07 Jul 2022 06:23:42 -0700 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.986.22; Thu, 7 Jul 2022 06:23:41 -0700 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.986.22; Thu, 7 Jul 2022 06:23:37 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH v14 04/12] arm64: dts: qcom: sc7280: Add wcd9385 codec node for CRD 1.0/2.0 and IDP boards Date: Thu, 7 Jul 2022 18:52:56 +0530 Message-ID: <1657200184-29565-5-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1657200184-29565-1-git-send-email-quic_srivasam@quicinc.com> References: <1657200184-29565-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) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add wcd9385 codec node for audio use case on sc7280 based platforms of revision 3, 4 (aka CRD 1.0 and 2.0) and IDP boards. Add tlmm gpio property for switching CTIA/OMTP Headset. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu Reviewed-by: Matthias Kaehlcke --- arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts | 14 ++++++++++ arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 41 ++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts b/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts index 344338a..9c21207 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts +++ b/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts @@ -87,6 +87,13 @@ ap_ts_pen_1v8: &i2c13 { pins = "gpio51"; }; +&wcd9385 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&wcd_reset_n>, <&us_euro_hs_sel>; + pinctrl-1 = <&wcd_reset_n_sleep>, <&us_euro_hs_sel>; + us-euro-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>; +}; + &tlmm { tp_int_odl: tp-int-odl { pins = "gpio7"; @@ -105,4 +112,11 @@ ap_ts_pen_1v8: &i2c13 { function = "gpio"; bias-disable; }; + + us_euro_hs_sel: us-euro-hs-sel { + pins = "gpio81"; + function = "gpio"; + bias-pull-down; + drive-strength = <2>; + }; }; diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi index 3e87cd4..1fbcb43 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi @@ -20,6 +20,34 @@ serial1 = &uart7; }; + wcd9385: audio-codec-1 { + compatible = "qcom,wcd9385-codec"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&wcd_reset_n>; + pinctrl-1 = <&wcd_reset_n_sleep>; + + reset-gpios = <&tlmm 83 GPIO_ACTIVE_HIGH>; + + qcom,rx-device = <&wcd_rx>; + qcom,tx-device = <&wcd_tx>; + + vdd-rxtx-supply = <&vreg_l18b_1p8>; + vdd-io-supply = <&vreg_l18b_1p8>; + vdd-buck-supply = <&vreg_l17b_1p8>; + vdd-mic-bias-supply = <&vreg_bob>; + + qcom,micbias1-microvolt = <1800000>; + qcom,micbias2-microvolt = <1800000>; + qcom,micbias3-microvolt = <1800000>; + qcom,micbias4-microvolt = <1800000>; + + qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 + 500000 500000 500000>; + qcom,mbhc-headset-vthreshold-microvolt = <1700000>; + qcom,mbhc-headphone-vthreshold-microvolt = <50000>; + #sound-dai-cells = <1>; + }; + gpio-keys { compatible = "gpio-keys"; label = "gpio-keys"; @@ -670,4 +698,17 @@ function = "gpio"; bias-pull-down; }; + + wcd_reset_n: wcd-reset-n { + pins = "gpio83"; + function = "gpio"; + drive-strength = <8>; + }; + + wcd_reset_n_sleep: wcd-reset-n-sleep { + pins = "gpio83"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; }; -- 2.7.4