From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 921E1C4363F for ; Mon, 12 Apr 2021 09:52:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 805736121D for ; Mon, 12 Apr 2021 09:52:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244076AbhDLJvV (ORCPT ); Mon, 12 Apr 2021 05:51:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241923AbhDLJjt (ORCPT ); Mon, 12 Apr 2021 05:39:49 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EEB7C0612AF for ; Mon, 12 Apr 2021 02:32:58 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id bx20so13072484edb.12 for ; Mon, 12 Apr 2021 02:32:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=a2eVpz0vjK4XR17egg1D+T/D/U3eg9YU3caPcVjxZf4=; b=gDE80X5NAJ3E+WygRXt24KdONCDPXRZt9gIaQdVxpOaQH2TisomM1l6xn6VH3pM71Y /sIwVK1nu/zs2KRlsoND0IIe8txz4VROHOW4OnByVPcQSVOPeTO31apdnXYXdM6zD3vj rxwkivf9cLRoPFPTcN8JmUkUor8NSvYMT84q+eFgANmbQUJy1ZfCJ55JOqRlNN3H9B64 5zhBkiXUAdpeUfxzW38jSPUHJ5YY6LyISOG8bnepdSySeAyySdRUF2ZmDkYBIPrgcAVD C08ZlhoLEqJEve5i4P4xavMZvET3t3dgGGxRSlWkUUPZNRuIgy5hrFT2YgzdFCv+fu8q ypbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=a2eVpz0vjK4XR17egg1D+T/D/U3eg9YU3caPcVjxZf4=; b=aSRkPHegK10LxvsTthPvrapA15NdcpkyX1U9deX6CAw6tAsAGK8jP2BRpCdF0RH7Uj 9c4R/EXBdQsXhyzaC8WDXjZkx+9u7XgxV/nxcvBRUmpRu1GZu6bz+6eUfvtwOo85TGyT xTiFrPFVantkylx8zrS6+6HY4FX0hL18KiBOHPdPgm6foYDiDJCAxb7I7xss1MxKn+ns uCz2gdxr9m2RyM6xyulUNTCZRuwg5/ZWvAoRBIATFWxeLSHoMz4rK93hjWf1KQwU7kAc y9eyX6n/avOtQXf4eIUqkZAZpuzUJrzOB1KajgMkpwXX2WpJMVpO3Cz4X2P5mm+fozV4 LbXg== X-Gm-Message-State: AOAM532+xPQhYRUbuQgYLArJ8JlDuBa/711PnjBZgIB3Y/05y1Q3BfEE u3oUzZSnAA/IYJ/H/5heBJ7/3w== X-Google-Smtp-Source: ABdhPJwcYA2zZ2a6dFtjkBxJp30ztXAiefsS5u0Qnom4Qk8dO+lP9CjXznHhJ5kIYjxGroHLFeMOaA== X-Received: by 2002:a05:6402:31a9:: with SMTP id dj9mr28868997edb.343.1618219976855; Mon, 12 Apr 2021 02:32:56 -0700 (PDT) Received: from [192.168.86.34] (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.googlemail.com with ESMTPSA id h13sm6208559edz.71.2021.04.12.02.32.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Apr 2021 02:32:56 -0700 (PDT) Subject: Re: [RESEND PATCH] arm64: dts: qcom: sdm845-xiaomi-beryllium: Add audio support To: Joel Selvaraj , Andy Gross , Bjorn Andersson , Rob Herring Cc: linux-arm-msm , dt , lkml , phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Amit Pundir References: From: Srinivas Kandagatla Message-ID: Date: Mon, 12 Apr 2021 10:32:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/04/2021 21:07, 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"; Overall the patch LGTM, As Stephan Gerhold said these three lines are redundant. Once removed, you could add Reviewed-by: Srinivas Kandagatla --srini > + > + 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"; > >