Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3706816imw; Thu, 7 Jul 2022 06:25:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vWIbitBh4SNyZS8Jko1ZGLZKDKhcRrIjR84O0pleVHmdR7pGbOEifMqmEkLq4uD2QzP6c2 X-Received: by 2002:a17:907:d90:b0:726:42bb:c8a0 with SMTP id go16-20020a1709070d9000b0072642bbc8a0mr42341157ejc.575.1657200347980; Thu, 07 Jul 2022 06:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657200347; cv=none; d=google.com; s=arc-20160816; b=DN8V5wap/+IQaXo4bSA7nAXrnsncuCIshgtXmICLR9iQwNzNwSUSb4pssB8YGrv32n cQOiDYCpSrsx9fCPzltqNvqGxiOMvP1JvU3fqCYY5V7Xb9OXho7oerkpDX+cMp2tl8A0 kGS4qIGc4Ekhw12frBR26RnRjfpy9g7CtwpvXfAvdMzcP/1cn46jOf5AG5eRdZZYom5C MUMOySjjpNXdYgbrH5PFfulFP9N7coBx9d24nH1kbZJ+PuSTqjjShjzR/357jGSp63ZQ tElbL6Pb95aIm6H542nrXovEEsB8oKYvXx0f6L+b40vSwpWqXOIl4Ws7h+dbg5ZHpegF JN5w== 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=ki97iBFR+rIDM5vrU1wAIlvRxss800lUvWoxK7myevI=; b=tW/FLgWyJ7y3MV18VQ0VYUacIf5MWwuqYZPs3LHgU8Citpn3zpYowXsWpWkLPL3mK/ R4M6Q8dI43J+gPWM/wtZz+VVpl43/X//qOL54YJsFiG2OInme7FxEz5KlRE7Xn4u1O8V 0ddDhsJmOTC/v+0Imgp/mPQc3cPsdbrwQrZDdL+GqODOUNZTFs4ars8bHjJaSF6Voso1 MqLvaCglhR/7xoXSkjhRRCcwO21EB4wmKMd12EudAdoX4hWaH0sIQb+ydTsU4HDn3SY4 0R/yH2Lg+BomYJEeGUx3ISe4omeAFL3sU2utgC7QMnk9mYRd9J8xSxo5e7FFOajIdNMe fgZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=hcOo0lkE; 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 g2-20020a056402320200b0043a8d70cd58si6033284eda.192.2022.07.07.06.25.22; Thu, 07 Jul 2022 06:25:47 -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=hcOo0lkE; 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 S235783AbiGGNX7 (ORCPT + 99 others); Thu, 7 Jul 2022 09:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235719AbiGGNXz (ORCPT ); Thu, 7 Jul 2022 09:23:55 -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 53F2811822; Thu, 7 Jul 2022 06:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1657200227; x=1688736227; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=ki97iBFR+rIDM5vrU1wAIlvRxss800lUvWoxK7myevI=; b=hcOo0lkE96c+jALYjYaDUYkzRhTAOa9pJXEAR1vjCNwi5VguV9B4Ecug DV7Wi4LbCJictXf5wPpLz55eElSTRdvnIzXJSuYUCCpYxrunAzFg8noU1 w909/BXVcFWQyRnMI0Pk/oq6PBOJ/5KFouhpcDBwvGNrd7Vgikw42kJTt I=; 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:47 -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:46 -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:46 -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:41 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH v14 05/12] arm64: dts: qcom: sc7280: Add wcd9385 codec node for CRD 3.0/3.1 Date: Thu, 7 Jul 2022 18:52:57 +0530 Message-ID: <1657200184-29565-6-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 CRD rev5+ (aka CRD 3.0/3.1) 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 --- .../dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi | 4 ++ arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi | 51 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi index 1c0bb7c..6dfd497 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-wcd9385.dtsi @@ -27,6 +27,10 @@ status = "okay"; }; +&wcd9385 { + status = "okay"; +}; + /* PINCTRL */ &lpass_dmic01_clk { diff --git a/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi b/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi index ee7d52a..7af8133 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi @@ -30,6 +30,37 @@ serial1 = &uart7; }; + wcd9385: audio-codec-1 { + compatible = "qcom,wcd9385-codec"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&wcd_reset_n>, <&us_euro_hs_sel>; + pinctrl-1 = <&wcd_reset_n_sleep>, <&us_euro_hs_sel>; + + reset-gpios = <&tlmm 83 GPIO_ACTIVE_HIGH>; + us-euro-gpios = <&tlmm 81 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>; + + status = "disabled"; + }; + pm8350c_pwm_backlight: backlight { compatible = "pwm-backlight"; status = "disabled"; @@ -634,4 +665,24 @@ mos_bt_uart: &uart7 { function = "gpio"; drive-strength = <2>; }; + + us_euro_hs_sel: us-euro-hs-sel { + pins = "gpio81"; + function = "gpio"; + bias-pull-down; + drive-strength = <2>; + }; + + 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