Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1368380pxb; Thu, 14 Apr 2022 04:48:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDebMKtMtXyPz1avpxYFj5nkFkV2lWb3q6PveTS0cozRrhr45d9B1uHzOeAQGUa1cuk1Kj X-Received: by 2002:a17:90a:4882:b0:1c5:f4e2:989a with SMTP id b2-20020a17090a488200b001c5f4e2989amr3321865pjh.160.1649936936179; Thu, 14 Apr 2022 04:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649936936; cv=none; d=google.com; s=arc-20160816; b=B3clO0F9CCLJCB1M9dFE6mqVzq39Q8oJxeNHiKECdDvpsivsuLoPNrHJ1yF2Cy7jeQ omNMlqlHTrLvUrQrs+eksyFo8OmCjCzqDB//sEfUokp5uNfA93HAA0vOvdDKrJ+w9Alb b/70StexipboU6OvJoyOSV0/6o1WL6d1jsPJrDZ0CMtzc7i8kNEiMeuSpJMknPz99WIq H0h6vs3eu7YKA3CQ93TPqq3uAYLbfq6DHvEsiZYjup0TjQ8v/m6P9iYjSmJqYyOxQ/qG pfQXz7+Z3vYMTm9dFF3PgweK0PqlFSOfhNIsYm8vSoA1SCCDgsk7CueYLnSwA/7YBuEf pMdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tZYBLnf1WvbjqU84GZINNxkL///8AUQJyyFh7egPwwQ=; b=tFFgnzaL13iwdpIY+tNjqErPAnDpLBuaftP45pVbYNEjPU6pIxeIB2gKDHpEsi4tSk ghS3uhz8LdzPLC+Ugx7G5ct6WdBI6IEa4uOcoEg7+cEV5j6Dck7LpP8WoEyKbOxggrBU 4Byi2/HLTmJSuATuP673xVRkGNpvzCs4c5TliXxsXerEqH/PR1NJ8yHgB3R9tB5rfEyc cckbMOzyTTJKE5lZfJ/pAxV1EIXTvTGmBPUP4wDzZImdQz0J9MkSawwV8AWgrYEsFMgB kWRkxSEHnszzPIAWhdMqyWmOVRF0CPYrhPrDg9Cn0Jl09ojiJnZfQue4fHd96ztD0qlV xYiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BDAAniCH; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a630015000000b0039d76124152si7712620pga.863.2022.04.14.04.48.41; Thu, 14 Apr 2022 04:48:56 -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=@chromium.org header.s=google header.b=BDAAniCH; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237680AbiDMV0V (ORCPT + 99 others); Wed, 13 Apr 2022 17:26:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234532AbiDMV0S (ORCPT ); Wed, 13 Apr 2022 17:26:18 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C2E37E5A9 for ; Wed, 13 Apr 2022 14:23:56 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id 125so2924084pgc.11 for ; Wed, 13 Apr 2022 14:23:56 -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=tZYBLnf1WvbjqU84GZINNxkL///8AUQJyyFh7egPwwQ=; b=BDAAniCHhvMIwNEfFsQCYnUD7lEkEzbHYvYYKqavUmsChSe48h5JdRlA5rGnpaHSs1 eQlv9fluXoOY/S3xRW7Bva4x5+0IcxVBEiOUv/lBDahj0olbbFyoRRgIC6M4PdmB+tkf LN2H2d+YQHOfmYf/8gujChRJzgasYWkQw9d44= 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=tZYBLnf1WvbjqU84GZINNxkL///8AUQJyyFh7egPwwQ=; b=WRz3SUYXdBSADAiWnFd3XmWTLpzGtYZexl1ubFiKmcXk1InAkJ9+aDWEzk2IFM8RRl pYb+zr43e+HBDx2Ymg4cbI5akT6ZK2mVQNuWCvuR/GvA7S1NrKiHhYe9YU+KQyoXEYP4 Lw7I5gCPofSUt6loZaN6FUUN6Ph+8e8hY0CZeOQTd7l8k+Tl5DFZcWzQonYT23HSPjph ApaiBdSWgBLrv0FWX62YxVPA1coxmnah9iYx5ig6qfM+gOj8n0ERuSl2jpMV8E1sFc7C MYYgpjzQtM1fyM9eOGkBCKRXJaF/Xdtq4FqFQbLuHjNIVY6WEeTZd7qqb9jmdYPFf3w6 Js1w== X-Gm-Message-State: AOAM532vUXGi5cWWw9UHkgDjmGKVd1KYwCi6hsz7uuneeazB/8ciAR5l mF+60YhbVUWEJ7dxfYK6htQvgQ== X-Received: by 2002:a63:6e43:0:b0:386:4801:13a6 with SMTP id j64-20020a636e43000000b00386480113a6mr36718914pgc.403.1649885036170; Wed, 13 Apr 2022 14:23:56 -0700 (PDT) Received: from localhost ([2620:15c:202:201:6a4f:9277:743f:c648]) by smtp.gmail.com with UTF8SMTPSA id b80-20020a621b53000000b005059f5d7587sm20536pfb.60.2022.04.13.14.23.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Apr 2022 14:23:55 -0700 (PDT) Date: Wed, 13 Apr 2022 14:23:53 -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_rohkumar@quicinc.com, srinivas.kandagatla@linaro.org, dianders@chromium.org, swboyd@chromium.org, judyhsiao@chromium.org, Venkata Prasad Potturu Subject: Re: [PATCH v7 4/4] arm64: dts: qcom: sc7280: Add dt nodes for sound card Message-ID: References: <1649863277-31615-1-git-send-email-quic_srivasam@quicinc.com> <1649863277-31615-5-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1649863277-31615-5-git-send-email-quic_srivasam@quicinc.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 On Wed, Apr 13, 2022 at 08:51:17PM +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 | 23 ++++++++ > arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 93 ++++++++++++++++++++++++++++++++ > 2 files changed, 116 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd.dts b/arch/arm64/boot/dts/qcom/sc7280-crd.dts > index b944366..1e16854 100644 > --- a/arch/arm64/boot/dts/qcom/sc7280-crd.dts > +++ b/arch/arm64/boot/dts/qcom/sc7280-crd.dts You need to refresh your tree, this file has been renamed to sc7280-crd-r3.dts. That DT is for the CRD <= 2.x, newer versions use sc7280-herobrine-crd.dts. > @@ -90,6 +90,29 @@ ap_ts_pen_1v8: &i2c13 { > us-euro-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>; > }; > > +&sound { > + audio-routing = > + "IN1_HPHL", "HPHL_OUT", > + "IN2_HPHR", "HPHR_OUT", > + "AMIC1", "MIC BIAS1", > + "AMIC2", "MIC BIAS2", > + "VA DMIC0", "MIC BIAS1", > + "VA DMIC1", "MIC BIAS1", > + "VA DMIC2", "MIC BIAS3", > + "VA DMIC3", "MIC BIAS3", > + "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"; > +}; > + > &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 cf62d06..a7c884a 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 = "MAX98360A"; > + reg = ; Dumb question: is this value actually used? A quick glance through qcom_snd_parse_of() suggests it isn't. And the CPU DAI id is already specified in the 'sound-dai' property below. In a quick test I replaced the corresponding 'reg' values in sc7180-trogdor.dtsi with 'random' values and audio playback on my coachz (sc7180-trogdor-coachz-r3.dts) still works ... > + cpu { > + sound-dai = <&lpass_cpu MI2S_SECONDARY>; > + }; > + > + codec { > + sound-dai = <&max98360a>; > + }; > + }; > + > + dai-link@5 { > + link-name = "DisplayPort"; > + reg = ; nit: add an empty line (in all links) to separate the properties from the node > + cpu { > + sound-dai = <&lpass_cpu LPASS_DP_RX>; > + }; > + > + codec { > + sound-dai = <&mdss_dp>; > + }; > + }; > + > + dai-link@6 { > + link-name = "WCD9385 Playback"; > + reg = ; > + cpu { > + sound-dai = <&lpass_cpu LPASS_CDC_DMA_RX0>; > + }; > + > + codec { > + sound-dai = <&wcd938x 0>, <&swr0 0>, <&lpass_rx_macro 0>; > + }; > + }; > + > + dai-link@19 { > + link-name = "WCD9385 Capture"; > + reg = ; > + cpu { > + sound-dai = <&lpass_cpu LPASS_CDC_DMA_TX3>; > + }; > + > + codec { > + sound-dai = <&wcd938x 1>, <&swr1 0>, <&lpass_tx_macro 0>; > + }; > + }; > + > + dai-link@25 { > + link-name = "DMIC"; > + reg = ; > + cpu { > + sound-dai = <&lpass_cpu LPASS_CDC_DMA_VA_TX0>; > + }; > + > + codec { > + sound-dai = <&lpass_va_macro 0>; > + }; > + }; > + }; > }; > > &apps_rsc { > -- > 2.7.4 >