All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@somainline.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Matthias Kaehlcke <mka@chromium.org>,
	Andy Gross <agross@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm64: dts: qcom: sc7280: Add touchscreen to villager
Date: Wed, 25 May 2022 00:41:09 +0200	[thread overview]
Message-ID: <1d602bb6-d3a4-2ec0-e3e7-d9395edec416@somainline.org> (raw)
In-Reply-To: <CAD=FV=WKgPWxEL+mhb9cCGOLObJEPtX_sHLQ1z3rz3usDG1m+Q@mail.gmail.com>


On 25/05/2022 00:14, Doug Anderson wrote:
> Hi,
>
> On Tue, May 24, 2022 at 2:13 PM Konrad Dybcio
> <konrad.dybcio@somainline.org> wrote:
>>
>> On 24/05/2022 22:48, Douglas Anderson wrote:
>>> This adds the touchscreen to the sc7280-herobrine-villager device
>>> tree. Note that the touchscreen on villager actually uses the reset
>>> line and thus we use the more specific "elan,ekth6915" compatible
>>> which allows us to specify the reset.
>>>
>>> The fact that villager's touchscreen uses the reset line can be
>>> contrasted against the touchscreen for CRD/herobrine-r1. On those
>>> boards, even though the touchscreen goes to the display, it's not
>>> hooked up to anything there.
>>>
>>> In order to keep the line parked on herobrine/CRD, we'll move the
>>> pullup from the qcard.dtsi file to the specific boards. This allows us
>>> to disable the pullup in the villager device tree since the pin is an
>>> output.
>>>
>>> Signed-off-by: Douglas Anderson <dianders@chromium.org>
>>> ---
>>> This uses bindings introduced in the patch ("dt-bindings: HID:
>>> i2c-hid: elan: Introduce bindings for Elan eKTH6915") [1].
>>>
>>> [1] https://lore.kernel.org/r/20220523142257.v2.1.Iedc61f9ef220a89af6a031200a7850a27a440134@changeid
>>>
>>>    .../boot/dts/qcom/sc7280-herobrine-crd.dts    | 11 ++++++++
>>>    .../qcom/sc7280-herobrine-herobrine-r1.dts    | 11 ++++++++
>>>    .../dts/qcom/sc7280-herobrine-villager-r0.dts | 25 +++++++++++++++++++
>>>    arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi    |  1 -
>>>    4 files changed, 47 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dts b/arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dts
>>> index a4ac33c4fd59..b79d84d7870a 100644
>>> --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dts
>>> @@ -134,6 +134,17 @@ &sdhc_2 {
>>>        status = "okay";
>>>    };
>>>
>>> +/* PINCTRL - ADDITIONS TO NODES IN PARENT DEVICE TREE FILES */
>> Please drop this line, this isn't msm-3.4. It's immediately obvious that
>> if a pin is referenced by a label and it is not defined in this file
>> (because otherwise it wouldn't be both defined and referenced here..),
>> it comes from a previously included device tree.
> In general these headings specify a change in sort ordering. Without
> them then either we intersperse pinctrl overrides with other stuff,
> which IMO is overall worse or people have no idea why the sort
> ordering changes.

I get what you mean, but at the end of the day, the entire machine DT 
specifies all machine-specific changes and only machine-specific 
changes. They all are a part of a bigger picture, sometimes being 
downstream from the SoC, sometimes downstream from a common board. I 
don't think it brings much benefit if at all to separate them into 
sections like these, if in the end they all correspond to modifications 
present in the hardware. In its current form, the sorting is all over 
the place, and ideally we could have labels sorted alphabetically.

The present solution, in my opinion, causes more disarray as you first 
have to think about what is the change against and then find it in the 
corresponding subsection instead of thinking of it as a complete 
quote-on-quote diff against the parent DTSIs. Plus, most DTs don't split 
it like that.


>
>>> @@ -604,7 +604,6 @@ ts_int_conn: ts-int-conn {
>>>        ts_rst_conn: ts-rst-conn {
>>>                pins = "gpio54";
>>>                function = "gpio";
>>> -             bias-pull-up;
>> If you overwrite it where it should be overwritten, wouldn't it make
>> more sense to leave bias-pull-up here as a default configuration for
>> boards that don't have a peculiar routed-but-NC line?
> Yeah, it'd be nice.  ...but because of the way "bias" is specified in
> the device tree it means an ugly "/delete-property" in places that
> actually route the line. I believe that, style wise, the preference is
> to avoid delete-property and move the bias toward board files in cases
> like this. Bjorn can feel free to override me if he disagrees.

Ok, totally fair, it somehow slipped my mind that you have to delete one 
property to replace it with the other, I retract that comment then.


Konrad

>
> -Doug

  reply	other threads:[~2022-05-24 22:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 20:48 [PATCH] arm64: dts: qcom: sc7280: Add touchscreen to villager Douglas Anderson
2022-05-24 21:13 ` Konrad Dybcio
2022-05-24 22:14   ` Doug Anderson
2022-05-24 22:41     ` Konrad Dybcio [this message]
2022-05-24 22:55       ` Doug Anderson
2022-05-24 23:57         ` Konrad Dybcio
2022-05-24 22:18 ` Matthias Kaehlcke
2022-06-27 20:02 ` (subset) " Bjorn Andersson

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=1d602bb6-d3a4-2ec0-e3e7-d9395edec416@somainline.org \
    --to=konrad.dybcio@somainline.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=robh+dt@kernel.org \
    --cc=swboyd@chromium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.