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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAD96C433F5 for ; Wed, 6 Apr 2022 21:33:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231824AbiDFVe4 (ORCPT ); Wed, 6 Apr 2022 17:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236068AbiDFVdh (ORCPT ); Wed, 6 Apr 2022 17:33:37 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 655EC24972 for ; Wed, 6 Apr 2022 13:45:22 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id l4-20020a17090a49c400b001c6840df4a3so4058630pjm.0 for ; Wed, 06 Apr 2022 13:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jzM7G0Ll+2P5HH8PRGJaqO5+fn3hB56LAuMy1DOx49M=; b=N9PnCSfGUwGKms0Qcz+BGacD3rwbxS/4UjxVlDhBhxjbk7OL5JsXFr4vn99VqZiT5r jp3JSm7lUz5Awdj8MZ4U5QQ//19MB7nOINDcsQFPG/LNhn7VtHwTc3d3mDJN7VlO/244 rXgn7TCfpctNkvRqd0D6b3voDcOqfCcKLg3SI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jzM7G0Ll+2P5HH8PRGJaqO5+fn3hB56LAuMy1DOx49M=; b=stJL6W7toKqwgV4V7PUamPeZIBo93dJC3ZNPu63wMQTlHWbcGTPTAuE/6zrDnuwLrM cPlTAt6nzhp21TB7q9pm7g2smnddNUT/KQZ3VBwpLmaCjbMh3HznN8W0pEBFZpgYizj5 m5rvmBATl2ECMiIIIIxldV0nZTQ/kw3VelwuY16SYUQrsEPyw5Bv9Qa2nNoZkPbWXcr4 /gk00JZOutOxJK/hZyNUX18QuOWNOnityzaPnA+9N2/lAB7TYfbPKhv8KY+UWApCjwPv mtZzVb4NrVppa1QGi0/J2Ovck9U45Tstb/BnjI2T3bEt994Gsrf+0YeNnt2Ov2N7bJNm kMzQ== X-Gm-Message-State: AOAM532Tyh/mxXwhBzyRVpjcakB5cQ72NURBCNtfyxylrOK95NQSiiBd m9CeQFJ3H3i+UBYlc981GKbHtQ== X-Google-Smtp-Source: ABdhPJyqvt2FhsTBMqhPGXX7hehPRTDHvClHKhMdYn3odThFMPD3wQEsm03ZhDDhgk5dynFD6f9Ovg== X-Received: by 2002:a17:902:d4c8:b0:154:2416:2185 with SMTP id o8-20020a170902d4c800b0015424162185mr10319296plg.25.1649277921882; Wed, 06 Apr 2022 13:45:21 -0700 (PDT) Received: from localhost ([2620:15c:202:201:dddf:7cc7:1261:9584]) by smtp.gmail.com with UTF8SMTPSA id a16-20020a17090a6d9000b001c9c3e2a177sm6414208pjk.27.2022.04.06.13.45.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Apr 2022 13:45:21 -0700 (PDT) Date: Wed, 6 Apr 2022 13:45:19 -0700 From: Matthias Kaehlcke To: Srinivasa Rao Mandadapu Cc: agross@kernel.org, bjorn.andersson@linaro.org, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quic_rohitkr@quicinc.com, srinivas.kandagatla@linaro.org, dianders@chromium.org, swboyd@chromium.org, judyhsiao@chromium.org, Venkata Prasad Potturu Subject: Re: [PATCH v6 3/3] arm64: dts: qcom: sc7280: Add dt nodes for sound card Message-ID: References: <1649157220-29304-1-git-send-email-quic_srivasam@quicinc.com> <1649157220-29304-4-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1649157220-29304-4-git-send-email-quic_srivasam@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue, Apr 05, 2022 at 04:43:40PM +0530, Srinivasa Rao Mandadapu wrote: > Add dt nodes for sound card support, which is using WCD938x headset > playback, capture, I2S speaker playback and DMICs via VA macro. > > Signed-off-by: Srinivasa Rao Mandadapu > Co-developed-by: Venkata Prasad Potturu > Signed-off-by: Venkata Prasad Potturu > --- > arch/arm64/boot/dts/qcom/sc7280-crd.dts | 8 +++ > arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 93 ++++++++++++++++++++++++++++++++ > 2 files changed, 101 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd.dts b/arch/arm64/boot/dts/qcom/sc7280-crd.dts > index 224a82d..b1b968a 100644 > --- a/arch/arm64/boot/dts/qcom/sc7280-crd.dts > +++ b/arch/arm64/boot/dts/qcom/sc7280-crd.dts > @@ -90,6 +90,14 @@ ap_ts_pen_1v8: &i2c13 { > us-euro-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>; > }; > > +&sound { > + audio-routing = > + "VA DMIC0", "MIC BIAS1", > + "VA DMIC1", "MIC BIAS1", > + "VA DMIC2", "MIC BIAS3", > + "VA DMIC3", "MIC BIAS3"; > +}; > + > &tlmm { > tp_int_odl: tp-int-odl { > pins = "gpio7"; > diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi > index e3d8cbf..45e1d82 100644 > --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi > @@ -84,6 +84,99 @@ > pinctrl-names = "default"; > pinctrl-0 = <&nvme_pwren>; > }; > + > + sound: sound { > + compatible = "google,sc7280-herobrine"; > + model = "sc7280-wcd938x-max98360a-1mic"; > + > + audio-routing = > + "IN1_HPHL", "HPHL_OUT", > + "IN2_HPHR", "HPHR_OUT", > + "AMIC1", "MIC BIAS1", > + "AMIC2", "MIC BIAS2", > + "VA DMIC0", "MIC BIAS3", > + "VA DMIC1", "MIC BIAS3", > + "VA DMIC2", "MIC BIAS1", > + "VA DMIC3", "MIC BIAS1", > + "TX SWR_ADC0", "ADC1_OUTPUT", > + "TX SWR_ADC1", "ADC2_OUTPUT", > + "TX SWR_ADC2", "ADC3_OUTPUT", > + "TX SWR_DMIC0", "DMIC1_OUTPUT", > + "TX SWR_DMIC1", "DMIC2_OUTPUT", > + "TX SWR_DMIC2", "DMIC3_OUTPUT", > + "TX SWR_DMIC3", "DMIC4_OUTPUT", > + "TX SWR_DMIC4", "DMIC5_OUTPUT", > + "TX SWR_DMIC5", "DMIC6_OUTPUT", > + "TX SWR_DMIC6", "DMIC7_OUTPUT", > + "TX SWR_DMIC7", "DMIC8_OUTPUT"; > + > + qcom,msm-mbhc-hphl-swh = <1>; > + qcom,msm-mbhc-gnd-swh = <1>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + #sound-dai-cells = <0>; > + > + dai-link@1 { > + link-name = "Secondary MI2S Playback"; The other link names provide information about the other end of the link (DP, WCD, DMIC), while this one describes the SoC side. Shouldn't this be "MAX98360A"? Not sure about the 'Playback' part, it seems 'link-name' is used as stream name, judging from a few samples of peeking into '/proc/asound/pcm' on different devices it seems that 'Playback' or 'Capture' is ususally not part of the stream name. > + reg = ; > + cpu { > + sound-dai = <&lpass_cpu MI2S_SECONDARY>; > + }; > + > + codec { > + sound-dai = <&max98360a>; > + }; > + }; > + > + dai-link@5 { > + link-name = "DP Playback"; See comment above about 'Playback'. Just 'DP' is maybe a bit short, how about 'DisplayPort'? > + reg = ; > + cpu { > + sound-dai = <&lpass_cpu LPASS_DP_RX>; > + }; > + > + codec { > + sound-dai = <&mdss_dp>; > + }; > + }; > + > + dai-link@6 { > + link-name = "WCD Playback"; Most instances I found spell out the codec name. It seems here we need the 'Playback'/'Capture' info (or something else) to not end up with duplicate link names. So my suggestion here would be "WCD9385 Playback". > + reg = ; > + cpu { > + sound-dai = <&lpass_cpu LPASS_CDC_DMA_RX0>; > + }; > + > + codec { > + sound-dai = <&wcd938x 0>, <&swr0 0>, <&rxmacro 0>; > + }; > + }; > + > + dai-link@19 { > + link-name = "WCD Capture"; "WCD9385 Capture"? > + reg = ; > + cpu { > + sound-dai = <&lpass_cpu LPASS_CDC_DMA_TX3>; > + }; > + > + codec { > + sound-dai = <&wcd938x 1>, <&swr1 0>, <&txmacro 0>; > + }; > + }; > + > + dai-link@25 { > + link-name = "DMIC Capture"; just "DMIC"?