From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>,
LKML <linux-kernel@vger.kernel.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
cros-qcom-dts-watchers@chromium.org, devicetree@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2 3/3] arm64: dts: qcom: sc7180: Add board id for lazor/limozeen
Date: Tue, 15 Aug 2023 23:22:29 +0200 [thread overview]
Message-ID: <eb082e10-efc2-0f5f-95e1-4d2707c87c59@linaro.org> (raw)
In-Reply-To: <CAD=FV=UfKXBQ6R0+5yY6WaNFS49=jmg2NTXrUPcyD3MBZA7A5A@mail.gmail.com>
On 15/08/2023 23:10, Doug Anderson wrote:
> Hi,
>
> On Sun, Aug 6, 2023 at 11:34 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 04/08/2023 11:58, Sheng-Liang Pan wrote:
>>> add BRD_ID(0, Z, 0) = 10 for new board with ALC5682i-VS
>>>
>>> Signed-off-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
>>> ---
>>>
>>> Changes in v2:
>>> - correct newly create dts files
>>>
>>
>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10.dts
>>> new file mode 100644
>>> index 000000000000..5a58e94c228e
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10.dts
>>> @@ -0,0 +1,30 @@
>>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>> +/*
>>> + * Google Lazor board device tree source
>>> + *
>>> + * Copyright 2023 Google LLC.
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include "sc7180-trogdor.dtsi"
>>> +#include "sc7180-trogdor-parade-ps8640.dtsi"
>>> +#include "sc7180-trogdor-lazor.dtsi"
>>> +#include "sc7180-lite.dtsi"
>>> +
>>> +/ {
>>> + model = "Google Lazor (rev10+)";
>>> + compatible = "google,lazor", "qcom,sc7180";
>>> +};
>>> +
>>> +&alc5682 {
>>> + compatible = "realtek,rt5682s";
>>> + /delete-property/ VBAT-supply;
>>
>> No, don't delete properties. First of all, why you do not have this
>> supply here? I doubt it... Especially that this DTS has vbat-supply
>> regulator!
>>
>> Second, define the properties where applicable instead.
>
> It looks like v3 is out, but responding here since it looks like
> Sheng-Liang didn't make any changes in v3 but also didn't respond and
> explain why he didn't make any changes. Sheng-Liang: for future
> reference you should make sure to address comments folks have on the
> list. If your new version takes their feedback into account then
> there's no reason to just respond with "Done", but if (like in this
> case) you ignored feedback you need to say why.
>
> In this case the extra "/delete-property/" is needed to pass bindings
> checks. Specifically this revision of the board replaces the "rt5682i"
> with the newer "rt5682s". This new codec is _almost_ a drop-in
> replacement for the old codec with just a few tiny changes. One such
> change is that the new codec doesn't need a "VBAT-supply".
>
> Since most trogdor devices have the older "rt5682i" codec, the default
> in "sc7180-trogdor.dtsi" specifies the properties for that codec. Only
> the handful of boards that have been spun to use the new codec have an
> override like this. You can see that the override done here matches
> the one done in a few other trogdor boards. A good grep is:
>
> git grep -A4 realtek,rt5682s -- arch/arm64/boot/dts/qcom/sc7180-*
>
> Ironically, that grep finds that "sc7180-trogdor-pazquel360.dtsi" is
> missing the "/delete-property/" which I'm fairly certain means that
> it's giving a validation warning today.
>
> I'm happy to have a bikeshed discussion about doing this better. In a
> previous reply [1] I suggested that it's probably time to move the
> "realtek,rt5682s" snippet to something like
> "sc7180-trogdor-rt5682s-sku.dtsi". Then we could include it in the
> devices and avoid duplicating this bit of dts. I didn't insist on it,
> but if you feel strongly then maybe Sheng-Liang could add that to his
> series? Once done, we could have further bikeshed discussions about
> whether we should continue to use the "/delete-property/" solution or
> if we have to also create a "sc7180-trogdor-rt5682i-sku.dtsi" and
> force all older SKUs to include that. Personally I don't hate this
> "/delete-property/" but I don't care a whole lot either way.
Thanks for explanation. I vote against /delete-property/ because it is
error-prone and a bit confusing. The same with overriding compatibles -
if possible, should be avoided. sc7180-trogdor-pazquel360.dtsi is doing
both, but that's not the pattern I find easy to read.
I accept overriding supplies or pins, because these differ per board.
But if common DTSI defines compatible, then it is common for everyone or
it is not really part of common DTSI.
IOW, the common DTSI should be more like a SoC DTSI - have only parts
present there. I simplify here, because obviously SoC is a real thing
piece of hardware and common board DTSI is not. It's just an
abstraction... but anyway if different boards use different codecs, then
I would say it is not part of common platform.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-08-15 21:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 9:58 [PATCH v2 0/3] Add no-esim sku for sc7180-lazor family and new board version Sheng-Liang Pan
2023-08-04 9:58 ` [PATCH v2 1/3] dt-bindings: arm: qcom: add sc7180-lazor board bindings Sheng-Liang Pan
2023-08-04 16:30 ` Doug Anderson
2023-08-07 13:37 ` Konrad Dybcio
2023-08-07 6:32 ` Krzysztof Kozlowski
2023-08-15 20:41 ` Doug Anderson
2023-08-15 20:46 ` Krzysztof Kozlowski
2023-08-04 9:58 ` [PATCH v2 2/3] arm64: dts: qcom: sc7180: Add sku_id for lazor/limozeen Sheng-Liang Pan
2023-08-07 6:35 ` Krzysztof Kozlowski
2023-08-04 9:58 ` [PATCH v2 3/3] arm64: dts: qcom: sc7180: Add board id " Sheng-Liang Pan
2023-08-04 16:30 ` Doug Anderson
2023-08-07 6:34 ` Krzysztof Kozlowski
2023-08-15 21:10 ` Doug Anderson
2023-08-15 21:22 ` Krzysztof Kozlowski [this message]
[not found] ` <eb082e10-efc2-0f5f-95e1-4d2707c87c59@linaro.org/>
[not found] ` <20230816095910.41305-1-sheng-liang.pan@quanta.corp-partner.google.com>
2023-08-16 18:31 ` Doug Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb082e10-efc2-0f5f-95e1-4d2707c87c59@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=cros-qcom-dts-watchers@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sheng-liang.pan@quanta.corp-partner.google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®