Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp669739pxf; Thu, 11 Mar 2021 11:55:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7Fz3ir8tXnKqUZdX6sJzzISlOPYSuw0uJMwVuqLk15Vehmzr7GNyiZdg5Uxa3C4cR/YD8 X-Received: by 2002:a05:6402:1d33:: with SMTP id dh19mr10067283edb.362.1615492553213; Thu, 11 Mar 2021 11:55:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615492553; cv=none; d=google.com; s=arc-20160816; b=kH1mSGlAht66iEMVnxYjrl4J9Bh6ltHhchmAQJw6KsNZ+5s2kHtJ44b7H+uw/t5B44 dw6/PNPo6iLLoiPpdH7qhW/b5QXouKa7IGsvry2CubMxLjNXQ48cd0NKlQVHRwo2as3X 4H5zs/5FBouhW8cpuhqhzDPHZgiXN0pK6bgW8WfQb2xFxcf0qL9/422Qk5Yx6LA6lLg3 BjIvPV9UMibnc6eTpEM8Qk5QuNRB9YQbLKhoLkUX09w+4MXTFwvOpWgZGlwJyJbrzFY+ d+q+b1TJY2d6dvXwtHv1CaQYyM+EVdlVkfWwQ85xZ4r4fYcb/RNk8F8B8sSTq8FpsH/C UuCw== 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=3Ixb44A+r7Af2WiHyFvzrq48h1Z1GXE0z0YNA1AAdLY=; b=L2Nl+I26ZAdvlKNGcPPAgbFkWRTnR6Mr2sJu5+7MuspTBaNqt6DwDlS+bpxWGfw77k 6SNeeeHfsEiXuSEg1hH8pYQ+CCJgfwZJITEg26fZa7zsxctWHXJrDC8cuLxZmC7XgMkj hC0FtFo6USM57aDVjiI0yYjRb/oYNC4jkQ4F0YMuY2Eds4moGnB+GXQtuZrCtuRdx+nK Am9yab+4d644lGkFxki/Xy25gVsNAjBw++/VMyQS32nHmsC9xQFhS33iyasdZw0ktowU R+49ZUFti4X3Kc+sCX0/UFs2G1ZhA7sqlfAPDL9/6CVJHaxtCOXrPz+QmPSub7ivsjBA gC7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="l2FSC/db"; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si2414561ejj.88.2021.03.11.11.55.30; Thu, 11 Mar 2021 11:55:53 -0800 (PST) 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=@chromium.org header.s=google header.b="l2FSC/db"; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229555AbhCKTye (ORCPT + 99 others); Thu, 11 Mar 2021 14:54:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230047AbhCKTyS (ORCPT ); Thu, 11 Mar 2021 14:54:18 -0500 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2261C061760 for ; Thu, 11 Mar 2021 11:54:17 -0800 (PST) Received: by mail-qt1-x833.google.com with SMTP id 6so2084990qty.3 for ; Thu, 11 Mar 2021 11:54:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3Ixb44A+r7Af2WiHyFvzrq48h1Z1GXE0z0YNA1AAdLY=; b=l2FSC/dbtya06Ys0xbDxCqwMUK4Wvsl/Ona4y7Gzft7KkQABw/Rc4F7SFMMnlvg6q1 FYzJQ4KPE3CG8lwBmVpIeRQ6/PwJ+kGhpft/i4fuB5BSOLY2EgNA2TYvgMkJnFEHJAPz g7DLdi4TO5fjoioBMfQvm+/wOLxTRRgtFLdno= 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=3Ixb44A+r7Af2WiHyFvzrq48h1Z1GXE0z0YNA1AAdLY=; b=OTBjSjiBy4gMHdFM2laZ2cQG31La5VhXxhbGhR2B8tj2ywTzKOV3rJcbIfDw2jHRkS SPyUcOYqktXjftsKkJGJ3Mwkz8xBns71T0608mUDgvxu7EmiPRsetyJqVTb3qnvtPo2y idlQT4JB+qb2PfDFub1qENJjkHpoi6Zm8YwUEI0mhDx8y2eXE7+EklcAIVDQpIep1zqs xTG0gX51ctggqRWUbCm4mXFT/yElOq85DZtvJrIZFjhvw5J+CyFjAL82rL7j/UoklIDF QcPWHK0QVMFErHixxWAsOKUDpE+9XsEWjrbMXtRH8K40qk+7hScTr6jzg+S9xWapMK3j gZTA== X-Gm-Message-State: AOAM530Au6Edyhg8powZR1t7OLOrPLFKgRJeGUcndnJcNrbN3NUIFZp+ LvbEIuXTyhuCHMqHtRby9sJUZnWGHuwe/Q== X-Received: by 2002:a05:622a:193:: with SMTP id s19mr8921554qtw.366.1615492456383; Thu, 11 Mar 2021 11:54:16 -0800 (PST) Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com. [209.85.219.174]) by smtp.gmail.com with ESMTPSA id d70sm2764078qkg.30.2021.03.11.11.54.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Mar 2021 11:54:15 -0800 (PST) Received: by mail-yb1-f174.google.com with SMTP id l8so22911700ybe.12 for ; Thu, 11 Mar 2021 11:54:15 -0800 (PST) X-Received: by 2002:a25:d3c5:: with SMTP id e188mr13827776ybf.345.1615492455018; Thu, 11 Mar 2021 11:54:15 -0800 (PST) MIME-Version: 1.0 References: <20210311164815.14113-1-srivasam@codeaurora.org> <20210311164815.14113-3-srivasam@codeaurora.org> In-Reply-To: <20210311164815.14113-3-srivasam@codeaurora.org> From: Doug Anderson Date: Thu, 11 Mar 2021 11:54:03 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 2/2] arm64: dts: qcom: Add sound node for sc7180-trogdor-coachz To: Srinivasa Rao Mandadapu Cc: gross@kernel.org, Bjorn Andersson , Rob Herring , linux-arm-msm , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , Rohit kumar , Srinivas Kandagatla , Stephen Boyd , Judy Hsiao Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Mar 11, 2021 at 8:48 AM Srinivasa Rao Mandadapu wrote: > > This is a trgodor variant, required to have sound node variable > for coachz specific platform. > > Signed-off-by: Srinivasa Rao Mandadapu > --- > .../boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi > index 4ad520f00485..7623a30a64c7 100644 > --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi > @@ -238,3 +238,21 @@ &tlmm { > "DP_HOT_PLUG_DET", > "EC_IN_RW_ODL"; > }; > + > +&sound { > + compatible = "google,sc7180-coachz"; You're placing this in the wrong place. Pay attention to the section headings. Your patch is putting this in the section "PINCTRL - board-specific pinctrl". That's not right. > + model = "sc7180-adau7002-max98357a"; > + audio-routing = "PDM_DAT", "DMIC"; > + > + dai-link@0 { > + link-name = "MultiMedia0"; > + reg = <0>; > + cpu { > + sound-dai = <&lpass_cpu 0>; Shouldn't the 0 above be "MI2S_PRIMARY" ? ...and the "reg" as well? > + }; > + > + codec { > + sound-dai = <&adau7002>; > + }; > + }; Some overall notes, though: 1. You don't actually need to duplicate everything that you have above. Whether you realize it or not the way devicetree works is that it _merges_ the node in the "coachz" devicetree with the one from the trogdor one (it doesn't replace it). So in trogdor you have: dai-link@0 { link-name = "MultiMedia0"; reg = ; cpu { sound-dai = <&lpass_cpu MI2S_PRIMARY>; }; codec { sound-dai = <&alc5682 MI2S_PRIMARY>; }; }; ...and in coachz you have: dai-link@0 { link-name = "MultiMedia0"; reg = ; cpu { sound-dai = <&lpass_cpu MI2S_PRIMARY>; }; codec { sound-dai = <&adau7002>; }; }; Almost all of that is duplication. It's best not to duplicate. Thus, one step better than what you have would be to just have this in coachz to override what you need: dai-link@0 { codec { sound-dai = <&adau7002>; }; }; 2. In general it's discouraged (and error prone) to try to replicate hierarchies from your parent. So the best would be to change trogdor's device tree to something like this: dai-link@0 { link-name = "MultiMedia0"; reg = ; cpu { sound-dai = <&lpass_cpu MI2S_PRIMARY>; }; multimedia0_codec: codec { sound-dai = <&alc5682 MI2S_PRIMARY>; }; }; ...and then in coachz you override like: &multimedia0_codec { sound-dai = <&alc5682 MI2S_PRIMARY>; };