2023-08-01 12:34:54

by Lin, Meng-Bo

[permalink] [raw]
Subject: [PATCH v2 0/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees

Samsung Galaxy Core Prime, Grand Prime and Ace 4 are phones based on
MSM8916. They are similar to the other Samsung devices based on MSM8916
with only a few minor differences.

This initial commit adds support for:
- fortuna3g (SM-G530H)
- fortunaltezt (SM-G530Y)
- gprimeltecan (SM-G530W)
- grandprimelte (SM-G530FZ)
- heatqlte (SM-G357FZ)
- rossa (SM-G360G)

The device trees contain initial support with:
- GPIO keys
- Regulator haptic
- SDHCI (internal and external storage)
- USB Device Mode
- UART (on USB connector via the SM5502/SM5504 MUIC)
- WCNSS (WiFi/BT)
- Regulators

There are different variants of Grand Prime, with some differences
in accelerometer, NFC and panel.
Core Prime and Grand Prime are similar, with some differences in MUIC,
panel and touchscreen.
Ace 4 and Core Prime are similar, with some differences in panel and
touchscreen.

---
v2: Use interrupt-extended. Drop fuelgauge, sensors and NFC for now.



2023-08-01 12:40:19

by Lin, Meng-Bo

[permalink] [raw]
Subject: [PATCH v2 3/3] ARM: dts: qcom-msm8916-samsung-fortuna: Include dts from arm64

After adding all necessary support for MSM8916 SMP/cpuidle without PSCI
on ARM32, build fortunaltezt and heatqlte device trees from the arm64
tree together with the ARM32 include to allow booting this device on ARM32.

The approach to include device tree files from other architectures is
inspired from e.g. the Raspberry Pi (bcm2711-rpi-4-b.dts) where this is
used to build the device tree for both ARM32 and ARM64.

[Add workaround to TSENS problem]
Co-developed-by: Stephan Gerhold <[email protected]>
Signed-off-by: Stephan Gerhold <[email protected]>
[Add heatqlte]
Co-developed-by: Gareth Peoples <[email protected]>
Signed-off-by: Gareth Peoples <[email protected]>
Signed-off-by: Lin, Meng-Bo <[email protected]>
---
arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts | 8 ++++++++
arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts | 8 ++++++++
arch/arm/boot/dts/qcom/Makefile | 2 ++
3 files changed, 18 insertions(+)
create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts
create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts

diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts
new file mode 100644
index 000000000000..b9704fea7029
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "arm64/qcom/msm8916-samsung-fortunaltezt.dts"
+#include "qcom-msm8916-smp.dtsi"
+
+&tsens {
+ /* FIXME: The device crashes when accessing the SROT region for some reason */
+ status = "disabled";
+};
diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts
new file mode 100644
index 000000000000..ec3edd4f31c3
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "arm64/qcom/msm8916-samsung-heatqlte.dts"
+#include "qcom-msm8916-smp.dtsi"
+
+&tsens {
+ /* FIXME: The device crashes when accessing the SROT region for some reason */
+ status = "disabled";
+};
diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
index 3dfb1c8cefb8..746d7aa940d9 100644
--- a/arch/arm/boot/dts/qcom/Makefile
+++ b/arch/arm/boot/dts/qcom/Makefile
@@ -27,7 +27,9 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-msm8660-surf.dtb \
qcom-msm8916-samsung-e5.dtb \
qcom-msm8916-samsung-e7.dtb \
+ qcom-msm8916-samsung-fortunaltezt.dtb \
qcom-msm8916-samsung-grandmax.dtb \
+ qcom-msm8916-samsung-heatqlte.dtb \
qcom-msm8916-samsung-serranove.dtb \
qcom-msm8960-cdp.dtb \
qcom-msm8960-samsung-expressatt.dtb \
--
2.39.2



2023-08-26 14:24:22

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] ARM: dts: qcom-msm8916-samsung-fortuna: Include dts from arm64

On 1.08.2023 13:22, Lin, Meng-Bo wrote:
> After adding all necessary support for MSM8916 SMP/cpuidle without PSCI
> on ARM32, build fortunaltezt and heatqlte device trees from the arm64
> tree together with the ARM32 include to allow booting this device on ARM32.
>
> The approach to include device tree files from other architectures is
> inspired from e.g. the Raspberry Pi (bcm2711-rpi-4-b.dts) where this is
> used to build the device tree for both ARM32 and ARM64.
>
> [Add workaround to TSENS problem]
> Co-developed-by: Stephan Gerhold <[email protected]>
> Signed-off-by: Stephan Gerhold <[email protected]>
> [Add heatqlte]
> Co-developed-by: Gareth Peoples <[email protected]>
> Signed-off-by: Gareth Peoples <[email protected]>
> Signed-off-by: Lin, Meng-Bo <[email protected]>
> ---
> arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts | 8 ++++++++
> arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts | 8 ++++++++
> arch/arm/boot/dts/qcom/Makefile | 2 ++
> 3 files changed, 18 insertions(+)
> create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts
> create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts
>
> diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts
> new file mode 100644
> index 000000000000..b9704fea7029
> --- /dev/null
> +++ b/arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts
> @@ -0,0 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +#include "arm64/qcom/msm8916-samsung-fortunaltezt.dts"
> +#include "qcom-msm8916-smp.dtsi"
> +
> +&tsens {
> + /* FIXME: The device crashes when accessing the SROT region for some reason */
> + status = "disabled";
All of SROT, or just e.g. TSENS_EN?

If only the headswitch is inaccessible, you may still reach
the hardware if it's been turned on from bl

Konrad