Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp383252iol; Thu, 9 Jun 2022 05:55:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU9/aRi2eTA3Y4Z+/pqBWJlw7WWYBYTlWNJtkXjfiCps7PH8JqoDAL0xRrhWA1El+LXa2A X-Received: by 2002:a17:902:d58c:b0:168:af49:4a7f with SMTP id k12-20020a170902d58c00b00168af494a7fmr1544789plh.15.1654779304542; Thu, 09 Jun 2022 05:55:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654779304; cv=none; d=google.com; s=arc-20160816; b=bY+4/nw3N72V/ohxwMtoXBUG02/onmG3yUU09H1Hzsk1A+Hlqdh/X/iJOH9ZrCMw0H Iuxh1NVuLfXZNcSfJBWALHzgiVotzF2FS5tpAULAT1jDrY3T2N8mTULEA9ZhK27HuRwp iVNx54IkOY5kKBMWQizHkQ+CNciYcY1PUDMJGBD0qIXl/NG02kZcm1bFG1WNtO1xQ+xo TCq3/WhW1BgR0o1f3fspFmUayCi8TJmYpfb54kqOfKbbGc0WhiQ8kKfNh1dc7DjFqynX POVbrcFgxXlxLEu9+RjzG6Kqr4EhrqfnmrJX0WWrMjnpcO8vgYYb3WPtVHjeZglgrdPu krtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=UzOEe2X6Pcp5CwSwzOY2ybmrXssFZ5RmjZdx4tT+M50=; b=C2dv+hEH5SDoOjdtaFxj41GptP+Bl0uwB8vsfHnGOM+c5I2PoUvM8zHJBCPmbVcTmv jztXVx0vdTYrFduC+rVtFqhyqBoN8FXhzQVoDwij2NN9j8DW82IXItGQr8PUpBEeXiGW 1B02FR50ulpiuRuXAkbr3amJqLwndfb37ptnQ2QsDnJQWjyCAJb0v03gJ8k/KQvuTFky 46R71fVmuQevV2v5/Z2IItuyFYBb+tUXzJPRwhsv24PVU3Wp+gPBwe6EFeF4qap5+p3O hv8UAaMGQc/2Box1V1xx2zXFcYNEn+t6oyXf2cIMU3/ksm2F7MnCEYqHrkbwRGUat19+ Ad+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="G/WxesYG"; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020a170902ce0b00b0015f13887fe4si29965418plg.200.2022.06.09.05.54.46; Thu, 09 Jun 2022 05:55:04 -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=@linaro.org header.s=google header.b="G/WxesYG"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237776AbiFIMO4 (ORCPT + 99 others); Thu, 9 Jun 2022 08:14:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237898AbiFIMOw (ORCPT ); Thu, 9 Jun 2022 08:14:52 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA97A15AB1B for ; Thu, 9 Jun 2022 05:14:49 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id w27so30879683edl.7 for ; Thu, 09 Jun 2022 05:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=UzOEe2X6Pcp5CwSwzOY2ybmrXssFZ5RmjZdx4tT+M50=; b=G/WxesYGBG8H3t/Zi6No32EukuRuEvudUPMMa+c7U9VFoVDPbMbL8Y2lsrAuwDziIY I2NgS4zkfLl1TdG5I4Xh53kQv56f3EVw7gWAmcKA19s86ApyHcAebK42vYEETip87382 5dAoJ/dh7Gnjr9pXIfbgJynGn2hzi7vAVmgkvIh638E7pyGy6c/6t3d4Aogsf1R1MuuZ XZ6eOAXQdjXBjF9gyk8Ggi8fvtWyni6uFwiohsvNjOShK2a/Yh+RqkRz43pjBC3WSVkm b9tJVs00exkAScc1g4B3wy9bMSGPMVZa9737bLWsJjbbtWwxmZLWEapE5Z5QAauGD6vv olnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=UzOEe2X6Pcp5CwSwzOY2ybmrXssFZ5RmjZdx4tT+M50=; b=C67QFtysckNilu2xUQmMuhUhJc4eivEEiY5yVbgK9d2halcp24TAZJhMrQnV4JoYie jQmS7DdBkpvfBouBjgR2PEVa+8ZIK96Ox7NoMMSTAxCkOgIBPfPFpD/p8T2oKoC74W5Q 5PHSbAkcJf4/zfH27pwouXFMJ6u5sLMK+uVc9kiYon8dV2pYfsJtfk2PPQFPdMSPt85R MvlpwEs2lvNHifrjINEuDlPXXOht6T2vx5RY4Ha74FxTKZh7CirZQZarBVkgAMRscb53 FID8v8nR9+thJraexBN0AtfnI+CXQDEIYXDPvig0kfY5in9KNSoMUznsFEGTpPWUxwS4 CsIA== X-Gm-Message-State: AOAM530yx03e+PqZh2qyHdD4Bu9Iav8KNP8nq6ZvSoXeZK13iB6eilGe JEAmifgYSzwGLBpFink/BBH+iQ== X-Received: by 2002:a05:6402:378b:b0:42a:ad8c:628f with SMTP id et11-20020a056402378b00b0042aad8c628fmr44794604edb.90.1654776888389; Thu, 09 Jun 2022 05:14:48 -0700 (PDT) Received: from [192.168.0.197] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id i2-20020a056402054200b004315050d7dfsm8255608edx.81.2022.06.09.05.14.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Jun 2022 05:14:47 -0700 (PDT) Message-ID: <89afe584-58d6-537a-b30e-84153c228225@linaro.org> Date: Thu, 9 Jun 2022 14:14:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 2/2] arm64: dts: qcom/sdm845-shift-axolotl: Add audio support Content-Language: en-US To: Alexander Martinz , ~postmarketos/upstreaming@lists.sr.ht Cc: phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dylan Van Assche References: <20220609095412.211060-1-amartinz@shiftphones.com> <20220609095412.211060-2-amartinz@shiftphones.com> From: Krzysztof Kozlowski In-Reply-To: <20220609095412.211060-2-amartinz@shiftphones.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 On 09/06/2022 11:54, Alexander Martinz wrote: > This patch adds audio support for the SHIFT6mq phone. > > The primary microphone and headphone jack are handled by the > SDM845 sound card and WCD9340 codec. > > The primary speaker needs to go through the TFA9890 speaker > amplifier. Thank you for your patch. There is something to discuss/improve. > > Signed-off-by: Alexander Martinz > Tested-by: Dylan Van Assche Same problem. > --- > .../boot/dts/qcom/sdm845-shift-axolotl.dts | 141 ++++++++++++++++++ > 1 file changed, 141 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts > index fa72f23ef0c2..8c4967d6d0e3 100644 > --- a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts > +++ b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts > @@ -8,6 +8,8 @@ > > #include > #include > +#include > +#include > #include "sdm845.dtsi" > #include "pm8998.dtsi" > #include "pmi8998.dtsi" > @@ -492,6 +494,19 @@ touchscreen@38 { > }; > }; > > +&i2c11 { > + status = "okay"; > + clock-frequency = <400000>; > + > + tfa9890_codec: tfa9890@34 { Generic node names please, so I guess it is: codec or audio-codec > + compatible = "nxp,tfa9890"; > + reg = <0x34>; > + vddd-supply = <&vreg_s4a_1p8>; > + reset-gpio = <&tlmm 7 0>; > + #sound-dai-cells = <1>; > + }; > +}; > + > &ipa { > status = "okay"; > > @@ -530,6 +545,27 @@ volume_down_resin: resin { > }; > }; > > +&q6afedai { > + qi2s@22 { > + reg = <22>; > + qcom,sd-lines = <0>; > + }; > +}; > + > +&q6asmdai { > + dai@0 { > + reg = <0>; > + }; > + > + dai@1 { > + reg = <1>; > + }; > + > + dai@2 { > + reg = <2>; > + }; > +}; > + > /* > * Prevent garbage data on bluetooth UART lines > */ > @@ -578,6 +614,84 @@ &qupv3_id_1 { > status = "okay"; > }; > > +&sound { > + model = "SHIFT6mq"; > + compatible = "qcom,sdm845-sndcard"; > + pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active>; > + pinctrl-names = "default"; > + > + audio-routing = "RX_BIAS", "MCLK", > + "AMIC1", "MIC BIAS1", > + "AMIC2", "MIC BIAS2", > + "AMIC3", "MIC BIAS3"; > + > + 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>; > + }; > + }; > + > + speaker-dai-link { > + link-name = "Speaker Playback"; > + codec { > + sound-dai = <&tfa9890_codec 0>; > + }; > + > + cpu { > + sound-dai = <&q6afedai QUATERNARY_MI2S_RX>; > + }; > + > + platform { > + sound-dai = <&q6routing>; > + }; > + }; > + > + slim-dai-link { > + link-name = "SLIM Playback"; > + codec { > + sound-dai = <&wcd9340 0>; > + }; > + > + cpu { > + sound-dai = <&q6afedai SLIMBUS_0_RX>; > + }; > + > + platform { > + sound-dai = <&q6routing>; > + }; > + }; > + > + slimcap-dai-link { > + link-name = "SLIM Capture"; > + codec { > + sound-dai = <&wcd9340 1>; > + }; > + > + cpu { > + sound-dai = <&q6afedai SLIMBUS_0_TX>; > + }; > + > + platform { > + sound-dai = <&q6routing>; > + }; > + }; > +}; > + > &tlmm { > gpio-reserved-ranges = <0 4>, <81 4>; > > @@ -686,6 +800,15 @@ config { > bias-pull-down; > }; > }; > + > + wcd_intr_default: wcd_intr_default { No underscores in node names. Instead hyphens. > + pins = <54>; > + function = "gpio"; > + > + input-enable; > + bias-pull-down; > + drive-strength = <2>; > + }; > }; Best regards, Krzysztof