linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rong Zhang <i@rong.moe>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	 Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, Icenowy Zheng <uwu@icenowy.me>
Subject: Re: [PATCH 4/4] ARM: dts: qcom: msm8974: Add device tree for Samsung Galaxy S5 China
Date: Mon, 22 Jan 2024 22:51:35 +0800	[thread overview]
Message-ID: <9b1c28415b5e3a5d94d167612fc0b7e0f9d0a767.camel@rong.moe> (raw)
In-Reply-To: <12e04abf-7720-4c2c-9f1f-0cfee7ba004e@linaro.org>

On Mon, 2024-01-22 at 10:48 +0100, Krzysztof Kozlowski wrote:
> On 21/01/2024 16:39, Rong Zhang wrote:
> > This device has little difference compared to Samsung Galaxy S5 (klte),
> > so the device tree is based on qcom-msm8974pro-samsung-klte.dts. The
> > only difference is the gpio pins of i2c_led_gpio. With pins corrected,
> > the LEDs and WiFi are able to work properly.
> > 
> > Signed-off-by: Rong Zhang <i@rong.moe>
> 
> 
> > diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974pro-samsung-kltechn.dts b/arch/arm/boot/dts/qcom/qcom-msm8974pro-samsung-kltechn.dts
> > new file mode 100644
> > index 000000000000..5a8d59ea4439
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/qcom/qcom-msm8974pro-samsung-kltechn.dts
> > @@ -0,0 +1,16 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +#include "qcom-msm8974pro-samsung-klte.dts"
> > +
> > +/ {
> > +	model = "Samsung Galaxy S5 China";
> > +	compatible = "samsung,kltechn", "samsung,klte", "qcom,msm8974pro", "qcom,msm8974";
> 
> That's not what you said in the binding.
> 
> It does not look like you tested the DTS against bindings. Please run
> `make dtbs_check W=1` (see
> Documentation/devicetree/bindings/writing-schema.rst or
> https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
> for instructions).

Oops, I've forgot to run dtbs_check again after my final decision of
adding "samsung,klte". Thanks for pointing it out.

I added it because I thought the difference between klte and kltechn is
so tiny and I've seen some other dts doing that.

I've glanced similar dts. To solve this, I think we could either:
1. keep the dt-binding in [PATCH 3/4], and delete "samsung,klte" here
2. rewrite dt-binding like crystalfontz,cfa100{36,37,49,55,56,57,58}:

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 2bd29a2399ad..4979ccae2b64 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -223,11 +223,17 @@ properties:
               - fairphone,fp2
               - oneplus,bacon
               - samsung,klte
-              - samsung,kltechn
               - sony,xperia-castor
           - const: qcom,msm8974pro
           - const: qcom,msm8974
 
+      - items:
+          - enum:
+              - samsung,kltechn
+          - const: samsung,klte
+          - const: qcom,msm8974pro
+          - const: qcom,msm8974
+
       - items:
           - const: qcom,msm8916-mtp
           - const: qcom,msm8916-mtp/1

My preference is (2.) since other variants of klte may be added in the
future. I would like to hear your preferences.

Thanks,
Rong


> Best regards,
> Krzysztof
> 


  reply	other threads:[~2024-01-22 14:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-21 15:39 [PATCH 0/4] ARM: dts: qcom: msm8974: Add Samsung Galaxy S5 China support Rong Zhang
2024-01-21 15:39 ` [PATCH 1/4] ARM: dts: qcom: msm8974-samsung-klte: Add label on /i2c-gpio-led Rong Zhang
2024-01-22  9:48   ` Krzysztof Kozlowski
2024-01-22 14:54     ` Rong Zhang
2024-01-21 15:39 ` [PATCH 2/4] ARM: dts: qcom: msm8974-samsung-klte: Pin brcm,board-type in wifi Rong Zhang
2024-01-21 15:39 ` [PATCH 3/4] dt-bindings: arm: qcom: add Samsung Galaxy S5 China (kltechn) Rong Zhang
2024-01-22  9:47   ` Krzysztof Kozlowski
2024-01-21 15:39 ` [PATCH 4/4] ARM: dts: qcom: msm8974: Add device tree for Samsung Galaxy S5 China Rong Zhang
2024-01-22  9:48   ` Krzysztof Kozlowski
2024-01-22 14:51     ` Rong Zhang [this message]
2024-01-22 15:17       ` Krzysztof Kozlowski
2024-01-22 15:27         ` Rong Zhang
2024-01-22 10:50   ` Konrad Dybcio
2024-01-22 14:01     ` Icenowy Zheng
2024-01-22 17:37     ` Rong Zhang

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=9b1c28415b5e3a5d94d167612fc0b7e0f9d0a767.camel@rong.moe \
    --to=i@rong.moe \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=uwu@icenowy.me \
    /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;
as well as URLs for NNTP newsgroup(s).