Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2771224pxf; Sun, 14 Mar 2021 11:14:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD/jA2pWVUQ3dO+jsP7CF5bCdq4Xm77t9nxQXSzQ6ixGpj4YfBoic7gV6/ZuCKFkqgw+9V X-Received: by 2002:a17:907:788e:: with SMTP id ku14mr20008459ejc.17.1615745678607; Sun, 14 Mar 2021 11:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615745678; cv=none; d=google.com; s=arc-20160816; b=AqrMHU71i3OKOVX2/33BR/zILEf5eQucierQlNkRrTpNuhxRqBIyD9KRLWGIPc6bKl PRvPKjXQ7J8z0BAFKR+AE+16p+sicsMqOWlKjm/cBLJ1Mw8YVhTYhSYwsLlDP0mCbvC1 +eHVUmSCHpKKrJ8FVn6IxS+/CaoFyrAwS7U6+isKDpFm1NZAdgLDiBRRmIG8vR5qUeHx PpwgWoAbZnvuoBtsMjSJaaOmWk8eYsKo8YAeMl88cV+z6jsGxQNB0ydtZMlLRwqkpb22 1x6tzdT9mOwz8ZxyLjOmD05ANMoKv/0ngmVGO1DQnCWBaGQkcWnXX+BE+JPSaHAh5/9M cMDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=JiLjT7F7TLvwfttlWWQnjBXTcWSnJNejV4NEk/U2uNU=; b=mLaF43U5ZKfFqwRE0SxDmkb2RG8z9avlim4v5C/GuZnyxcGEUORIHCCGbjYynhw334 i/qnJnVaPFMTEYwq71f7zPnrzaXuJBgRpYJquxGajYtAnsGdK6FsNEhiJBZqLOftDqF0 Bw9Mm30Q7kE9+kZckufIdFF+qI5NR0fbIBooOod6Q2f498k3NdVOqY/wGgM8T4NDJVRL yNS5D/oAIxmN42aWp5v+k/dj05gJpyQ1KpoFWAT2Y4yUWPXwinBVQHSfctPx4SVpHGWZ aWHIHuMLpwlsiW/VPubfOixT/wWpYuZ/B/dxwGcZ7wLRmMs13F22RN8ysu0x+/KLMCvK Q0fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vs3SmhWd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r20si9718296edw.406.2021.03.14.11.14.15; Sun, 14 Mar 2021 11:14:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vs3SmhWd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234014AbhCNSML (ORCPT + 99 others); Sun, 14 Mar 2021 14:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234074AbhCNSME (ORCPT ); Sun, 14 Mar 2021 14:12:04 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D9CFC061762 for ; Sun, 14 Mar 2021 11:12:03 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id u3so30943382ybk.6 for ; Sun, 14 Mar 2021 11:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JiLjT7F7TLvwfttlWWQnjBXTcWSnJNejV4NEk/U2uNU=; b=Vs3SmhWd41w0G49v8KGBNDlaN1RnC6zNyvAS8my3/4CXGn34b4H6i44jK1dR6/LNCw 0hG/4OwXHBerfP3TinAVCyAMcDV/7g3f3IcIhUpgW4Y6hYZ3azWf1ORfl5qKai2RUIIH /HvpBpBh84RsJWtCc1eQIGB3ttf7p2wXenf/MSi5QwyIhBQ9SWODlKO6SXCm0bJDIBE3 u7rStFhPidZq8wB8K9PxTN15m+ul+yN+yn4gTtMKAxzk5s9aqtmh1wrTg/6fETuxwHw/ Wt5kWqnSB9yvc4l7cCz6gJUkgW0btQu4OkyZxFElKPYNQSj/pdFQ711xc7zeL07nV9S+ A80A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JiLjT7F7TLvwfttlWWQnjBXTcWSnJNejV4NEk/U2uNU=; b=ZkTSYi5LEoO/3HqPYe0FCH6FtFvpluMCZbehbFI2+YP4YPbosZSvtcUSV1cN+6BlTW mS7PwxqCtRJOi4yQBpCOgSPK30ZrQ0FiUOlzJ1khapWOAMBJ6DrfL/yZXM1BlNPF7ez6 iqCUdhd90WCpvq47Lot31PFUqI55IDOPyAk9g++CpyHf6dnX6cH3gRtFlzSYjXJFrz/L M3l64XkvbOcq4WrJyqvcya62wihnBn3T0DfbWQQUWohYQSnMuuvsK7HiqFL5rHq+5Y5Y yEbrdmZUuO2MXyxuaQM8+ni6o+C2pc8lQR4kOW5u2nwmw0eD3QOm3QJYSmi2iRYemaoW Dt2A== X-Gm-Message-State: AOAM530BS+m2KH3YGgGLC7JzZgfugOjRGAJb9tS9x7Nz96wXs+ju4zE/ fToqwOo+46mZl3LXA5a55nI0JS6GPtsvcL+/iqd6PKPacNw= X-Received: by 2002:a25:ca42:: with SMTP id a63mr32518347ybg.318.1615745522312; Sun, 14 Mar 2021 11:12:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Pundir Date: Sun, 14 Mar 2021 23:41:26 +0530 Message-ID: Subject: Re: [PATCH] arm64: dts: qcom: sdm845-xiaomi-beryllium: Add audio support To: Joel Selvaraj Cc: Andy Gross , Bjorn Andersson , Rob Herring , Srini Kandagatla , linux-arm-msm , dt , lkml , phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 14 Mar 2021 at 22:32, Joel Selvaraj wrote: > > This patch adds audio support for Xiaomi Poco F1 phone. Phone's primary > Mic and 3.5mm Headphone jack are handled through the SDM845 sound card > and WCD9340 codec. > Tested-by: Amit Pundir > Signed-off-by: Joel Selvaraj > --- > .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 117 ++++++++++++++++++ > 1 file changed, 117 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts > index 86cbae63eaf7..5b5786595cdb 100644 > --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts > +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts > @@ -5,6 +5,8 @@ > #include > #include > #include > +#include > +#include > #include "sdm845.dtsi" > #include "pm8998.dtsi" > #include "pmi8998.dtsi" > @@ -240,6 +242,28 @@ resin { > }; > }; > > +/* QUAT I2S Uses 1 I2S SD Line for audio on TAS2559/60 amplifiers */ > +&q6afedai { > + qi2s@22 { > + reg = <22>; > + qcom,sd-lines = <0>; > + }; > +}; > + > +&q6asmdai { > + dai@0 { > + reg = <0>; > + }; > + > + dai@1 { > + reg = <1>; > + }; > + > + dai@2 { > + reg = <2>; > + }; > +}; > + > &qupv3_id_0 { > status = "okay"; > }; > @@ -257,6 +281,73 @@ &sdhc_2 { > cd-gpios = <&tlmm 126 GPIO_ACTIVE_HIGH>; > }; > > +&sound { > + compatible = "qcom,db845c-sndcard"; > + pinctrl-0 = <&quat_mi2s_active > + &quat_mi2s_sd0_active>; > + pinctrl-names = "default"; > + model = "Xiaomi Poco F1"; > + audio-routing = > + "RX_BIAS", "MCLK", > + "AMIC1", "MIC BIAS1", > + "AMIC2", "MIC BIAS2", > + "AMIC3", "MIC BIAS3", > + "MM_DL1", "MultiMedia1 Playback", > + "MM_DL2", "MultiMedia2 Playback", > + "MultiMedia3 Capture", "MM_UL3"; > + > + mm1-dai-link { > + link-name = "MultiMedia1"; > + cpu { > + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; > + }; > + }; > + > + mm2-dai-link { > + link-name = "MultiMedia2"; > + cpu { > + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>; > + }; > + }; > + > + mm3-dai-link { > + link-name = "MultiMedia3"; > + cpu { > + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; > + }; > + }; > + > + slim-dai-link { > + link-name = "SLIM Playback"; > + cpu { > + sound-dai = <&q6afedai SLIMBUS_0_RX>; > + }; > + > + platform { > + sound-dai = <&q6routing>; > + }; > + > + codec { > + sound-dai = <&wcd9340 0>; > + }; > + }; > + > + slimcap-dai-link { > + link-name = "SLIM Capture"; > + cpu { > + sound-dai = <&q6afedai SLIMBUS_0_TX>; > + }; > + > + platform { > + sound-dai = <&q6routing>; > + }; > + > + codec { > + sound-dai = <&wcd9340 1>; > + }; > + }; > +}; > + > &tlmm { > gpio-reserved-ranges = <0 4>, <81 4>; > > @@ -285,6 +376,15 @@ sdc2_card_det_n: sd-card-det-n { > function = "gpio"; > bias-pull-up; > }; > + > + wcd_intr_default: wcd_intr_default { > + pins = <54>; > + function = "gpio"; > + > + input-enable; > + bias-pull-down; > + drive-strength = <2>; > + }; > }; > > &uart6 { > @@ -345,6 +445,23 @@ &usb_1_qmpphy { > vdda-pll-supply = <&vreg_l1a_0p875>; > }; > > +&wcd9340{ > + pinctrl-0 = <&wcd_intr_default>; > + pinctrl-names = "default"; > + clock-names = "extclk"; > + clocks = <&rpmhcc RPMH_LN_BB_CLK2>; > + reset-gpios = <&tlmm 64 0>; > + vdd-buck-supply = <&vreg_s4a_1p8>; > + vdd-buck-sido-supply = <&vreg_s4a_1p8>; > + vdd-tx-supply = <&vreg_s4a_1p8>; > + vdd-rx-supply = <&vreg_s4a_1p8>; > + vdd-io-supply = <&vreg_s4a_1p8>; > + qcom,micbias1-microvolt = <2700000>; > + qcom,micbias2-microvolt = <1800000>; > + qcom,micbias3-microvolt = <2700000>; > + qcom,micbias4-microvolt = <2700000>; > +}; > + > &wifi { > status = "okay"; > > -- > 2.25.1 >