devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees
@ 2023-08-01 11:20 Lin, Meng-Bo
  2023-08-01 11:22 ` [PATCH v2 1/3] dt-bindings: qcom: Document new msm8916-samsung devices Lin, Meng-Bo
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Lin, Meng-Bo @ 2023-08-01 11:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold,
	Nikita Travkin, linux-arm-msm, devicetree,
	~postmarketos/upstreaming

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/3] dt-bindings: qcom: Document new msm8916-samsung devices
  2023-08-01 11:20 [PATCH v2 0/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Lin, Meng-Bo
@ 2023-08-01 11:22 ` Lin, Meng-Bo
  2023-08-11 19:15   ` Rob Herring
  2023-08-01 11:22 ` [PATCH v2 2/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Lin, Meng-Bo
  2023-08-01 11:22 ` [PATCH v2 3/3] ARM: dts: qcom-msm8916-samsung-fortuna: Include dts from arm64 Lin, Meng-Bo
  2 siblings, 1 reply; 8+ messages in thread
From: Lin, Meng-Bo @ 2023-08-01 11:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold,
	Nikita Travkin, linux-arm-msm, devicetree,
	~postmarketos/upstreaming

Document the new following device tree bindings used in their
device trees:

- samsung,fortuna3g
- samsung,fortunaltezt
- samsung,gprimeltecan
- samsung,grandprimelte
- samsung,heatqlte
- samsung,rossa

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 450f616774e0..7172f657bfa4 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -235,11 +235,17 @@ properties:
               - samsung,a5u-eur
               - samsung,e5
               - samsung,e7
+              - samsung,fortuna3g
+              - samsung,fortunaltezt
+              - samsung,gprimeltecan
               - samsung,grandmax
+              - samsung,grandprimelte
               - samsung,gt510
               - samsung,gt58
+              - samsung,heatqlte
               - samsung,j5
               - samsung,j5x
+              - samsung,rossa
               - samsung,serranove
               - thwc,uf896
               - thwc,ufi001c
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees
  2023-08-01 11:20 [PATCH v2 0/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Lin, Meng-Bo
  2023-08-01 11:22 ` [PATCH v2 1/3] dt-bindings: qcom: Document new msm8916-samsung devices Lin, Meng-Bo
@ 2023-08-01 11:22 ` Lin, Meng-Bo
  2023-08-26 12:01   ` Konrad Dybcio
  2023-09-19 22:51   ` Bjorn Andersson
  2023-08-01 11:22 ` [PATCH v2 3/3] ARM: dts: qcom-msm8916-samsung-fortuna: Include dts from arm64 Lin, Meng-Bo
  2 siblings, 2 replies; 8+ messages in thread
From: Lin, Meng-Bo @ 2023-08-01 11:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold,
	Nikita Travkin, linux-arm-msm, devicetree,
	~postmarketos/upstreaming, Walter Broemeling, Joe Mason,
	Siddharth Manthan, Gareth Peoples

From: Walter Broemeling <wallebroem@gmail.com>

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.

The common parts are shared in
msm8916-samsung-fortuna-common.dtsi and msm8916-samsung-rossa-common.dtsi
to reduce duplication.

Unfortunately, SM-G357FZ and SM-G530Y were released with outdated 32-bit
only firmware and never received any update from Samsung. Since the 32-bit
TrustZone firmware is signed there seems to be no way currently to
actually boot this device tree on arm64 Linux at the moment.

However, it is possible to use this device tree by compiling an ARM32
kernel instead. The device tree can be easily built on ARM32 with
an #include and it works really well there. To avoid confusion for others
it is still better to add this device tree on arm64. Otherwise it's easy
to forget to update this one when making some changes that affect all
MSM8916 devices.

Maybe someone finds a way to boot ARM64 Linux on this device at some
point. In this case I expect that this device tree can be simply used
as-is.

Signed-off-by: Walter Broemeling <wallebroem@gmail.com>
Co-developed-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
[Add fortuna-common.dtsi, buttons, and WiFi]
Co-developed-by: Joe Mason <buddyjojo06@outlook.com>
Signed-off-by: Joe Mason <buddyjojo06@outlook.com>
[Add fortuna3g]
Co-developed-by: Siddharth Manthan <siddharth.manthan@gmail.com>
Signed-off-by: Siddharth Manthan <siddharth.manthan@gmail.com>
[Add heatqlte]
Co-developed-by: Gareth Peoples <mail@gpeopl.es>
Signed-off-by: Gareth Peoples <mail@gpeopl.es>
[Add grandprimelte and fortunaltezt]
[Use msm8916-samsung-rossa-common.dtsi and reword the commit]
Co-developed-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 arch/arm64/boot/dts/qcom/Makefile             |   6 +
 .../dts/qcom/msm8216-samsung-fortuna3g.dts    |  11 ++
 .../qcom/msm8916-samsung-fortuna-common.dtsi  | 156 ++++++++++++++++++
 .../dts/qcom/msm8916-samsung-fortunaltezt.dts |  23 +++
 .../dts/qcom/msm8916-samsung-gprimeltecan.dts |  22 +++
 .../qcom/msm8916-samsung-grandprimelte.dts    |  11 ++
 .../dts/qcom/msm8916-samsung-heatqlte.dts     |  23 +++
 .../qcom/msm8916-samsung-rossa-common.dtsi    |  16 ++
 .../boot/dts/qcom/msm8916-samsung-rossa.dts   |  11 ++
 9 files changed, 279 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 337abc4ceb17..f18db5063eda 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= ipq9574-rdp433.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq9574-rdp449.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq9574-rdp453.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq9574-rdp454.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8216-samsung-fortuna3g.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-acer-a1-724.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-alcatel-idol347.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-asus-z00l.dtb
@@ -29,11 +30,16 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-a3u-eur.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-a5u-eur.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-e5.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-e7.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-fortunaltezt.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-gprimeltecan.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-grandmax.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-grandprimelte.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-gt510.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-gt58.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-heatqlte.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-j5.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-j5x.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-rossa.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-serranove.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-thwc-uf896.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-thwc-ufi001c.dtb
diff --git a/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts b/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts
new file mode 100644
index 000000000000..366914be7d53
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8216-samsung-fortuna3g.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-fortuna-common.dtsi"
+
+/ {
+	model = "Samsung Galaxy Grand Prime (SM-G530H)";
+	compatible = "samsung,fortuna3g", "qcom,msm8916";
+	chassis-type = "handset";
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi
new file mode 100644
index 000000000000..175a1e891c7a
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi
@@ -0,0 +1,156 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "msm8916-pm8916.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+	aliases {
+		mmc0 = &sdhc_1; /* eMMC */
+		mmc1 = &sdhc_2; /* SD card */
+		serial0 = &blsp_uart2;
+	};
+
+	chosen {
+		stdout-path = "serial0";
+	};
+
+	reserved-memory {
+		/* Additional memory used by Samsung firmware modifications */
+		tz-apps@85a00000 {
+			reg = <0x0 0x85a00000 0x0 0x600000>;
+			no-map;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		pinctrl-0 = <&gpio_keys_default>;
+		pinctrl-names = "default";
+
+		label = "GPIO Buttons";
+
+		button-volume-up {
+			label = "Volume Up";
+			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+		};
+
+		button-home {
+			label = "Home";
+			gpios = <&tlmm 109 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_HOMEPAGE>;
+		};
+	};
+
+	haptic {
+		compatible = "regulator-haptic";
+		haptic-supply = <&reg_motor_vdd>;
+		min-microvolt = <3300000>;
+		max-microvolt = <3300000>;
+	};
+
+	reg_motor_vdd: regulator-motor-vdd {
+		compatible = "regulator-fixed";
+		regulator-name = "motor_vdd";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&tlmm 72 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-0 = <&motor_en_default>;
+		pinctrl-names = "default";
+	};
+};
+
+&blsp_i2c1 {
+	status = "okay";
+
+	muic: extcon@25 {
+		compatible = "siliconmitus,sm5502-muic";
+		reg = <0x25>;
+		interrupts-extended = <&tlmm 12 IRQ_TYPE_EDGE_FALLING>;
+		pinctrl-0 = <&muic_int_default>;
+		pinctrl-names = "default";
+	};
+};
+
+&blsp_uart2 {
+	status = "okay";
+};
+
+&pm8916_resin {
+	linux,code = <KEY_VOLUMEDOWN>;
+	status = "okay";
+};
+
+&pm8916_rpm_regulators {
+	pm8916_l17: l17 {
+		regulator-min-microvolt = <2850000>;
+		regulator-max-microvolt = <2850000>;
+	};
+};
+
+&sdhc_1 {
+	status = "okay";
+};
+
+&sdhc_2 {
+	pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
+	pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
+	pinctrl-names = "default", "sleep";
+
+	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+
+	status = "okay";
+};
+
+&usb {
+	extcon = <&muic>, <&muic>;
+	status = "okay";
+};
+
+&usb_hs_phy {
+	extcon = <&muic>;
+};
+
+&wcnss {
+	status = "okay";
+};
+
+&wcnss_iris {
+	compatible = "qcom,wcn3620";
+};
+
+&tlmm {
+	gpio_keys_default: gpio-keys-default-state {
+		pins = "gpio107", "gpio109";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+
+	motor_en_default: motor-en-default-state {
+		pins = "gpio72";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	muic_int_default: muic-int-default-state {
+		pins = "gpio12";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	sdc2_cd_default: sdc2-cd-default-state {
+		pins = "gpio38";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts
new file mode 100644
index 000000000000..f7c4dcb34bb3
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortunaltezt.dts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-fortuna-common.dtsi"
+
+/*
+ * NOTE: The original firmware from Samsung can only boot ARM32 kernels.
+ * Unfortunately, the firmware is signed and cannot be replaced easily.
+ * There seems to be no way to boot ARM64 kernels on this device at the moment,
+ * even though the hardware would support it.
+ *
+ * However, it is possible to use this device tree by compiling an ARM32 kernel
+ * instead. For clarity and build testing this device tree is maintained next
+ * to the other MSM8916 device trees. However, it is actually used through
+ * arch/arm/boot/dts/qcom-msm8916-samsung-fortunaltezt.dts
+ */
+
+/ {
+	model = "Samsung Galaxy Grand Prime (SM-G530Y)";
+	compatible = "samsung,fortunaltezt", "qcom,msm8916";
+	chassis-type = "handset";
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts
new file mode 100644
index 000000000000..883f20554dbe
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-fortuna-common.dtsi"
+
+/ {
+	model = "Samsung Galaxy Grand Prime (SM-G530W)";
+	compatible = "samsung,gprimeltecan", "qcom,msm8916";
+	chassis-type = "handset";
+
+	reserved-memory {
+		/* Firmware for gprimeltecan needs more space */
+		/delete-node/ tz-apps@85a00000;
+
+		/* Additional memory used by Samsung firmware modifications */
+		tz-apps@85500000 {
+			reg = <0x0 0x85500000 0x0 0xb00000>;
+			no-map;
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts
new file mode 100644
index 000000000000..ea8a1e698dd4
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-fortuna-common.dtsi"
+
+/ {
+	model = "Samsung Galaxy Grand Prime (SM-G530FZ)";
+	compatible = "samsung,grandprimelte", "qcom,msm8916";
+	chassis-type = "handset";
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts
new file mode 100644
index 000000000000..fbf065734cbb
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-heatqlte.dts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-rossa-common.dtsi"
+
+/*
+ * NOTE: The original firmware from Samsung can only boot ARM32 kernels.
+ * Unfortunately, the firmware is signed and cannot be replaced easily.
+ * There seems to be no way to boot ARM64 kernels on this device at the moment,
+ * even though the hardware would support it.
+ *
+ * However, it is possible to use this device tree by compiling an ARM32 kernel
+ * instead. For clarity and build testing this device tree is maintained next
+ * to the other MSM8916 device trees. However, it is actually used through
+ * arch/arm/boot/dts/qcom-msm8916-samsung-heatqlte.dts
+ */
+
+/ {
+	model = "Samsung Galaxy Ace 4 (SM-G357FZ)";
+	compatible = "samsung,heatqlte", "qcom,msm8916";
+	chassis-type = "handset";
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi
new file mode 100644
index 000000000000..d66cf1cbd378
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "msm8916-samsung-fortuna-common.dtsi"
+
+&blsp_i2c1 {
+	/* SM5504 MUIC instead of SM5502 */
+	/delete-node/ extcon@25;
+
+	muic: extcon@14 {
+		compatible = "siliconmitus,sm5504-muic";
+		reg = <0x14>;
+		interrupts-extended = <&tlmm 12 IRQ_TYPE_EDGE_FALLING>;
+		pinctrl-0 = <&muic_int_default>;
+		pinctrl-names = "default";
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts
new file mode 100644
index 000000000000..2c6f04ad2cfe
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-rossa-common.dtsi"
+
+/ {
+	model = "Samsung Galaxy Core Prime LTE";
+	compatible = "samsung,rossa", "qcom,msm8916";
+	chassis-type = "handset";
+};
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 3/3] ARM: dts: qcom-msm8916-samsung-fortuna: Include dts from arm64
  2023-08-01 11:20 [PATCH v2 0/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Lin, Meng-Bo
  2023-08-01 11:22 ` [PATCH v2 1/3] dt-bindings: qcom: Document new msm8916-samsung devices Lin, Meng-Bo
  2023-08-01 11:22 ` [PATCH v2 2/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Lin, Meng-Bo
@ 2023-08-01 11:22 ` Lin, Meng-Bo
  2023-08-26 12:03   ` Konrad Dybcio
  2 siblings, 1 reply; 8+ messages in thread
From: Lin, Meng-Bo @ 2023-08-01 11:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold,
	Nikita Travkin, linux-arm-msm, devicetree,
	~postmarketos/upstreaming, Gareth Peoples

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 <stephan@gerhold.net>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
[Add heatqlte]
Co-developed-by: Gareth Peoples <mail@gpeopl.es>
Signed-off-by: Gareth Peoples <mail@gpeopl.es>
Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: qcom: Document new msm8916-samsung devices
  2023-08-01 11:22 ` [PATCH v2 1/3] dt-bindings: qcom: Document new msm8916-samsung devices Lin, Meng-Bo
@ 2023-08-11 19:15   ` Rob Herring
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2023-08-11 19:15 UTC (permalink / raw)
  To: Lin, Meng-Bo
  Cc: Andy Gross, ~postmarketos/upstreaming, linux-kernel,
	Stephan Gerhold, Rob Herring, Nikita Travkin, linux-arm-msm,
	Konrad Dybcio, devicetree, Krzysztof Kozlowski, Bjorn Andersson,
	Conor Dooley


On Tue, 01 Aug 2023 11:22:30 +0000, Lin, Meng-Bo wrote:
> Document the new following device tree bindings used in their
> device trees:
> 
> - samsung,fortuna3g
> - samsung,fortunaltezt
> - samsung,gprimeltecan
> - samsung,grandprimelte
> - samsung,heatqlte
> - samsung,rossa
> 
> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
> ---
>  Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees
  2023-08-01 11:22 ` [PATCH v2 2/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Lin, Meng-Bo
@ 2023-08-26 12:01   ` Konrad Dybcio
  2023-09-19 22:51   ` Bjorn Andersson
  1 sibling, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2023-08-26 12:01 UTC (permalink / raw)
  To: Lin, Meng-Bo, linux-kernel
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Stephan Gerhold, Nikita Travkin, linux-arm-msm,
	devicetree, ~postmarketos/upstreaming, Walter Broemeling,
	Joe Mason, Siddharth Manthan, Gareth Peoples

On 1.08.2023 13:22, Lin, Meng-Bo wrote:
> From: Walter Broemeling <wallebroem@gmail.com>
> 
> 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)
[...]


> +&blsp_i2c1 {
> +	/* SM5504 MUIC instead of SM5502 */
> +	/delete-node/ extcon@25;
use /delete-node/ &label instead

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 3/3] ARM: dts: qcom-msm8916-samsung-fortuna: Include dts from arm64
  2023-08-01 11:22 ` [PATCH v2 3/3] ARM: dts: qcom-msm8916-samsung-fortuna: Include dts from arm64 Lin, Meng-Bo
@ 2023-08-26 12:03   ` Konrad Dybcio
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2023-08-26 12:03 UTC (permalink / raw)
  To: Lin, Meng-Bo, linux-kernel
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Stephan Gerhold, Nikita Travkin, linux-arm-msm,
	devicetree, ~postmarketos/upstreaming, Gareth Peoples

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 <stephan@gerhold.net>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> [Add heatqlte]
> Co-developed-by: Gareth Peoples <mail@gpeopl.es>
> Signed-off-by: Gareth Peoples <mail@gpeopl.es>
> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees
  2023-08-01 11:22 ` [PATCH v2 2/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Lin, Meng-Bo
  2023-08-26 12:01   ` Konrad Dybcio
@ 2023-09-19 22:51   ` Bjorn Andersson
  1 sibling, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2023-09-19 22:51 UTC (permalink / raw)
  To: Lin, Meng-Bo
  Cc: linux-kernel, Andy Gross, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold,
	Nikita Travkin, linux-arm-msm, devicetree,
	~postmarketos/upstreaming, Walter Broemeling, Joe Mason,
	Siddharth Manthan, Gareth Peoples

On Tue, Aug 01, 2023 at 11:22:47AM +0000, Lin, Meng-Bo wrote:
> From: Walter Broemeling <wallebroem@gmail.com>
> 
> 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.
> 
> The common parts are shared in
> msm8916-samsung-fortuna-common.dtsi and msm8916-samsung-rossa-common.dtsi
> to reduce duplication.
> 
> Unfortunately, SM-G357FZ and SM-G530Y were released with outdated 32-bit
> only firmware and never received any update from Samsung. Since the 32-bit
> TrustZone firmware is signed there seems to be no way currently to
> actually boot this device tree on arm64 Linux at the moment.
> 
> However, it is possible to use this device tree by compiling an ARM32
> kernel instead. The device tree can be easily built on ARM32 with
> an #include and it works really well there. To avoid confusion for others
> it is still better to add this device tree on arm64. Otherwise it's easy
> to forget to update this one when making some changes that affect all
> MSM8916 devices.
> 
> Maybe someone finds a way to boot ARM64 Linux on this device at some
> point. In this case I expect that this device tree can be simply used
> as-is.
> 

Can you please help me understand the development flow of this patch?

> Signed-off-by: Walter Broemeling <wallebroem@gmail.com>
> Co-developed-by: Stephan Gerhold <stephan@gerhold.net>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>

Walter and Stephan wrote the initial patch, right?

> [Add fortuna-common.dtsi, buttons, and WiFi]
> Co-developed-by: Joe Mason <buddyjojo06@outlook.com>
> Signed-off-by: Joe Mason <buddyjojo06@outlook.com>

Then Joe added fortuna-common, buttons and Wifi.

If so, then Joe shouldn't be "Co-developed-by", the [note] and
Signed-off-by is sufficient here.

But it is customary to prefix the "changes note" with ones first name,
such as:

[joe: Add fortuna-common.dtsi, buttons, and WiFi]

> [Add fortuna3g]
> Co-developed-by: Siddharth Manthan <siddharth.manthan@gmail.com>
> Signed-off-by: Siddharth Manthan <siddharth.manthan@gmail.com>

Then Siddharth picked it up, ad added fortuna3g. Again, it looks like he
did this step alone, and as such no Co-developed-by, please.

> [Add heatqlte]
> Co-developed-by: Gareth Peoples <mail@gpeopl.es>
> Signed-off-by: Gareth Peoples <mail@gpeopl.es>

Again, no Co-developed-by, and please prefix the change note with
"Gareth:", or "gareth:".

> [Add grandprimelte and fortunaltezt]
> [Use msm8916-samsung-rossa-common.dtsi and reword the commit]

Why two different notes? Is this one note split over two separate
entries? Please just comma-separate them, possible line wrap within the
[].

> Co-developed-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>

You should be alone here.


Alternatively, if y'all all contributed to this one patch through the
entire flow, please drop the change notes and just list out each
contributor with the Co-developed-by and Signed-off-by.


PS. Could you please drop the ',' from your name. When I tried to apply
this everything after the ',' disappeared.

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-19 22:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 11:20 [PATCH v2 0/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Lin, Meng-Bo
2023-08-01 11:22 ` [PATCH v2 1/3] dt-bindings: qcom: Document new msm8916-samsung devices Lin, Meng-Bo
2023-08-11 19:15   ` Rob Herring
2023-08-01 11:22 ` [PATCH v2 2/3] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Lin, Meng-Bo
2023-08-26 12:01   ` Konrad Dybcio
2023-09-19 22:51   ` Bjorn Andersson
2023-08-01 11:22 ` [PATCH v2 3/3] ARM: dts: qcom-msm8916-samsung-fortuna: Include dts from arm64 Lin, Meng-Bo
2023-08-26 12:03   ` Konrad Dybcio

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).