Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Nikita Travkin <nikita@trvn.ru>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: "Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	"Adam Słaboń" <asaillen@protonmail.com>
Subject: Re: [PATCH 3/3] arm64: dts: qcom: msm8939-wingtech-wt82918: Add Lenovo Vibe K5 devices
Date: Sat, 13 Jul 2024 15:37:25 +0500	[thread overview]
Message-ID: <28e2dc758c8867693a183d758a9dad6a@trvn.ru> (raw)
In-Reply-To: <f377a55c-4a74-4555-926d-afb7dd813e00@kernel.org>

Krzysztof Kozlowski писал(а) 13.07.2024 15:02:
> On 12/07/2024 18:04, Nikita Travkin wrote:
>> From: Adam Słaboń <asaillen@protonmail.com>
>>
>> This commit introduces multiple hardware variants of Lenovo Vibe K5.
>>
>> - A6020a40 (msm8929-wingtech-wt82918hd)
>> - A6020a46/A6020l36 (msm8939-wingtech-wt82918)
>> - A6020a40 S616 H39 (msm8939-wingtech-wt82918hd)
>>
>> These devices are added with support for many features, notably:
>>
>> - Basic features like USB, mmc/sd storage, wifi, buttons, leds;
>> - Accelerometer;
>> - Touchscreen;
>> - Sound and modem.
>>
>> Note that "HD" variant of K5 is based on msm8929 which is a lower bin
>> of msm8939 SoC. A simple dtsi is added for this soc along with the new
>> devices.
>>
>> Unfortunately, despite the heavy similarities, the combination of minor
>> differences between variants make them incompatible between each other.
>>
>> Signed-off-by: Adam Słaboń <asaillen@protonmail.com>
>> [Nikita: Minor cleanup, commit message]
>> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
>> ---
>>  arch/arm64/boot/dts/qcom/Makefile                  |   3 +
>>  .../boot/dts/qcom/msm8929-wingtech-wt82918hd.dts   |  17 ++
>>  arch/arm64/boot/dts/qcom/msm8929.dtsi              |   5 +
>>  .../boot/dts/qcom/msm8939-wingtech-wt82918.dts     |  16 ++
>>  .../boot/dts/qcom/msm8939-wingtech-wt82918.dtsi    | 254 +++++++++++++++++++++
>>  .../boot/dts/qcom/msm8939-wingtech-wt82918hd.dts   |  16 ++
>>  6 files changed, 311 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
>> index fd4c7c41ddc4..48ec781fa1d8 100644
>> --- a/arch/arm64/boot/dts/qcom/Makefile
>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>> @@ -58,10 +58,13 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt86518.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt86528.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-yiming-uz801v3.dtb
>> +dtb-$(CONFIG_ARCH_QCOM)	+= msm8929-wingtech-wt82918hd.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-huawei-kiwi.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-longcheer-l9100.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-samsung-a7.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-sony-xperia-kanuti-tulip.dtb
>> +dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-wingtech-wt82918.dtb
>> +dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-wingtech-wt82918hd.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8953-motorola-potter.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8953-xiaomi-daisy.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8953-xiaomi-mido.dtb
>> diff --git a/arch/arm64/boot/dts/qcom/msm8929-wingtech-wt82918hd.dts b/arch/arm64/boot/dts/qcom/msm8929-wingtech-wt82918hd.dts
>> new file mode 100644
>> index 000000000000..f9a358e852f8
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/qcom/msm8929-wingtech-wt82918hd.dts
>> @@ -0,0 +1,17 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +
>> +/dts-v1/;
>> +
>> +#include "msm8939-wingtech-wt82918.dtsi"
>> +#include "msm8929.dtsi"
>> +
>> +/ {
>> +	model = "Lenovo Vibe K5 (HD) (Wingtech WT82918)";
>> +	compatible = "wingtech,wt82918hd", "qcom,msm8929";
>> +	chassis-type = "handset";
>> +};
>> +
>> +&touchscreen {
>> +	touchscreen-size-x = <720>;
>> +	touchscreen-size-y = <1280>;
>> +};
>> diff --git a/arch/arm64/boot/dts/qcom/msm8929.dtsi b/arch/arm64/boot/dts/qcom/msm8929.dtsi
>> new file mode 100644
>> index 000000000000..c3d1d1ace2f6
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/qcom/msm8929.dtsi
>> @@ -0,0 +1,5 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +
>> +&opp_table {
>> +	/delete-node/ opp-550000000;
>> +};
> 
> That's a very odd SoC DTSI.
> 
> SoCs DTSIs are not meant to be included as complementary, but rather as
> full DTSI.
> 
> IOW, this is very confusing code and will confuse everyone reading it.
> 

I think Adam wanted to keep the common device dtsi based on msm8939.dtsi to
simplify things a bit. I was also a bit unsure if I should change how it's
done but decided to keep it as it was. I will rework the v2 so:

- msm8929.dtsi includes msm8939.dtsi
- devices .dts include needed soc.dtsi, then include the common.dtsi
- common.dtsi doesn't include any soc.dtsi

Thanks for the review!
Nikita

> 
> Best regards,
> Krzysztof

  reply	other threads:[~2024-07-13 10:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 16:04 [PATCH 0/3] Introduce msm8916/39 based Lenovo devices Nikita Travkin
2024-07-12 16:04 ` [PATCH 1/3] dt-bindings: arm: qcom: Add " Nikita Travkin
2024-07-13 10:00   ` Krzysztof Kozlowski
2024-07-12 16:04 ` [PATCH 2/3] arm64: dts: qcom: msm8916-wingtech-wt865x8: Add Lenovo A6000/A6010 Nikita Travkin
2024-07-12 16:04 ` [PATCH 3/3] arm64: dts: qcom: msm8939-wingtech-wt82918: Add Lenovo Vibe K5 devices Nikita Travkin
2024-07-12 19:53   ` Konrad Dybcio
2024-07-12 19:54     ` Konrad Dybcio
2024-07-13 10:41     ` Nikita Travkin
2024-07-13 10:02   ` Krzysztof Kozlowski
2024-07-13 10:37     ` Nikita Travkin [this message]
2024-07-13 11:07       ` Nikita Travkin
2024-07-13 16:12         ` Dmitry Baryshkov
2024-07-13 16:26           ` Nikita Travkin
2024-07-15 12:12 ` [PATCH 0/3] Introduce msm8916/39 based Lenovo devices Rob Herring (Arm)

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=28e2dc758c8867693a183d758a9dad6a@trvn.ru \
    --to=nikita@trvn.ru \
    --cc=andersson@kernel.org \
    --cc=asaillen@protonmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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