[PATCH v2 4/4] arm64: dts: qcom: qcs9100: Add support for the QCS9100 Ride and Ride Rev3 boards

Tengfei Fan posted 4 patches 1 year, 5 months ago
[PATCH v2 4/4] arm64: dts: qcom: qcs9100: Add support for the QCS9100 Ride and Ride Rev3 boards
Posted by Tengfei Fan 1 year, 5 months ago
Add device tree support for the QCS9100 Ride and Ride Rev3 boards. The
QCS9100 is a variant of the SA8775p, and they are fully compatible with
each other. The QCS9100 Ride/Ride Rev3 board is essentially the same as
the SA8775p Ride/Ride Rev3 board, with the QCS9100 SoC mounted instead
of the SA8775p.

Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
---
 arch/arm64/boot/dts/qcom/Makefile            |  2 ++
 arch/arm64/boot/dts/qcom/qcs9100-ride-r3.dts | 11 +++++++++++
 arch/arm64/boot/dts/qcom/qcs9100-ride.dts    | 11 +++++++++++
 3 files changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index ae002c7cf126..b3c369305731 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -112,6 +112,8 @@ dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs6490-rb3gen2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs8550-aim300-aiot.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= qcs9100-ride.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= qcs9100-ride-r3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qdu1000-idp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qrb2210-rb1.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qrb4210-rb2.dtb
diff --git a/arch/arm64/boot/dts/qcom/qcs9100-ride-r3.dts b/arch/arm64/boot/dts/qcom/qcs9100-ride-r3.dts
new file mode 100644
index 000000000000..759d1ec694b2
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/qcs9100-ride-r3.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+/dts-v1/;
+
+#include "sa8775p-ride-r3.dts"
+/ {
+	model = "Qualcomm QCS9100 Ride Rev3";
+	compatible = "qcom,qcs9100-ride-r3", "qcom,qcs9100", "qcom,sa8775p";
+};
diff --git a/arch/arm64/boot/dts/qcom/qcs9100-ride.dts b/arch/arm64/boot/dts/qcom/qcs9100-ride.dts
new file mode 100644
index 000000000000..979462dfec30
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/qcs9100-ride.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+/dts-v1/;
+
+#include "sa8775p-ride.dts"
+/ {
+	model = "Qualcomm QCS9100 Ride";
+	compatible = "qcom,qcs9100-ride", "qcom,qcs9100", "qcom,sa8775p";
+};

-- 
2.25.1
Re: [PATCH v2 4/4] arm64: dts: qcom: qcs9100: Add support for the QCS9100 Ride and Ride Rev3 boards
Posted by Konrad Dybcio 1 year, 4 months ago
On 11.09.2024 1:10 PM, Tengfei Fan wrote:
> Add device tree support for the QCS9100 Ride and Ride Rev3 boards. The
> QCS9100 is a variant of the SA8775p, and they are fully compatible with
> each other. The QCS9100 Ride/Ride Rev3 board is essentially the same as
> the SA8775p Ride/Ride Rev3 board, with the QCS9100 SoC mounted instead
> of the SA8775p.
> 
> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
> ---

Reviewed-by: Konrad Dybcio <konradybcio@kernel.org>

Konrad
Re: [PATCH v2 4/4] arm64: dts: qcom: qcs9100: Add support for the QCS9100 Ride and Ride Rev3 boards
Posted by Caleb Connolly 1 year, 1 month ago

On 17/09/2024 01:32, Konrad Dybcio wrote:
> On 11.09.2024 1:10 PM, Tengfei Fan wrote:
>> Add device tree support for the QCS9100 Ride and Ride Rev3 boards. The
>> QCS9100 is a variant of the SA8775p, and they are fully compatible with
>> each other. The QCS9100 Ride/Ride Rev3 board is essentially the same as
>> the SA8775p Ride/Ride Rev3 board, with the QCS9100 SoC mounted instead
>> of the SA8775p.
>>
>> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
>> ---
> 
> Reviewed-by: Konrad Dybcio <konradybcio@kernel.org>

I don't understand this, if both boards are identical except for the
name of the SoC then why do we have two devicetree files?

You can surely detect which SoC is in use at runtime if necessary, and
maybe pick a name which doesn't have the SoC in it if you really want to
avoid confusion.

If there are differentiating features which will be added later, then I
think this at least deserves a comment stating as such.

Additionally, the files should be shuffled around to better represent
that there's two very similar boards with just some minor differences,
this is a common case already and there is a standard way to handle it
(see e.g. sdm845-oneplus-common.dtsi and
sdm845-oneplus-enchilada/fajita.dts)

#include'ing a .dts file just seems like a mess here.

Kind regards,

> 
> Konrad

-- 
// Caleb (they/them)