linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices
@ 2022-07-15 10:21 Lin, Meng-Bo
  2022-07-15 10:24 ` [RESEND PATCH 2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi Lin, Meng-Bo
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Lin, Meng-Bo @ 2022-07-15 10:21 UTC (permalink / raw)
  To: devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

Document the new samsung,e5/e7/grandmax device tree bindings used in their
device trees.

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

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 5c06d1bfc046..b004f42bc277 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -164,6 +164,9 @@ properties:
               - longcheer,l8150
               - samsung,a3u-eur
               - samsung,a5u-eur
+              - samsung,e5
+              - samsung,e7
+              - samsung,grandmax
           - const: qcom,msm8916

       - items:
--
2.30.2



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

* [RESEND PATCH 2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
@ 2022-07-15 10:24 ` Lin, Meng-Bo
  2022-07-15 10:24 ` [RESEND PATCH 3/4] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64 Lin, Meng-Bo
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Lin, Meng-Bo @ 2022-07-15 10:24 UTC (permalink / raw)
  To: devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

Samsung Galaxy E5, E7 and Grand Max are smartphones using the MSM8916 SoC
released in 2015.

e2015 and a2015 are similar, with some differences in accelerometer,
MUIC and Vibrator. The common parts are shared in
msm8916-samsung-a2015-common.dtsi to reduce duplication.

Add a common device tree for with initial support for:

- GPIO keys and vibrator
- Hall sensor (except Grand Max)
- SDHCI (internal and external storage)
- USB Device Mode
- UART (on USB connector via the SM5504 MUIC)
- WCNSS (WiFi/BT)
- Regulators
- S3FWRN5 NFC (except Grand Max)

The three devices (and all other variants of E5/E7/Grand Max released in
2015) are very similar, with some differences in display, touchscreen,
sensors and NFC. The common parts are shared in
msm8916-samsung-e2015-common.dtsi to reduce duplication.

Unfortunately, some E5/E7/Grand Max 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 on those variants 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 those device at some
point. In this case I expect that this device tree can be simply used
as-is.

Co-developed-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 arch/arm64/boot/dts/qcom/Makefile             |  3 ++
 .../qcom/msm8916-samsung-e2015-common.dtsi    | 39 +++++++++++++++++++
 .../boot/dts/qcom/msm8916-samsung-e5.dts      | 24 ++++++++++++
 .../boot/dts/qcom/msm8916-samsung-e7.dts      | 29 ++++++++++++++
 .../dts/qcom/msm8916-samsung-grandmax.dts     | 36 +++++++++++++++++
 5 files changed, 131 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 2f8aec2cc6db..941494553b9e 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -15,6 +15,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-longcheer-l8910.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-mtp.dtb
 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-grandmax.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-j5.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-serranove.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
new file mode 100644
index 000000000000..373154ee2643
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "msm8916-samsung-a2015-common.dtsi"
+
+/ {
+	i2c-muic {
+		/* SM5504 MUIC instead of SM5502 */
+		/delete-node/ extcon@25;
+
+		muic: extcon@14 {
+			compatible = "siliconmitus,sm5504-muic";
+			reg = <0x14>;
+
+			interrupt-parent = <&msmgpio>;
+			interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&muic_int_default>;
+		};
+	};
+
+	vibrator: vibrator {
+		compatible = "gpio-vibrator";
+		enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&motor_en_default>;
+	};
+};
+
+&msmgpio {
+	motor_en_default: motor-en-default {
+		pins = "gpio76";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts
new file mode 100644
index 000000000000..777eb934eb4b
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-e2015-common.dtsi"
+
+/*
+ * NOTE: The original firmware from Samsung can only boot ARM32 kernels on some
+ * variants.
+ * Unfortunately, the firmware is signed and cannot be replaced easily.
+ * There seems to be no way to boot ARM64 kernels on 32-bit devices 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-e5.dts
+ */
+
+/ {
+	model = "Samsung Galaxy E5";
+	compatible = "samsung,e5", "qcom,msm8916";
+	chassis-type = "handset";
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts
new file mode 100644
index 000000000000..b412b61ca258
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-e2015-common.dtsi"
+
+/*
+ * NOTE: The original firmware from Samsung can only boot ARM32 kernels on some
+ * variants.
+ * Unfortunately, the firmware is signed and cannot be replaced easily.
+ * There seems to be no way to boot ARM64 kernels on 32-bit devices 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-e7.dts
+ */
+
+/ {
+	model = "Samsung Galaxy E7";
+	compatible = "samsung,e7", "qcom,msm8916";
+	chassis-type = "handset";
+};
+
+&pm8916_l17 {
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
new file mode 100644
index 000000000000..41aada4bfb80
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-e2015-common.dtsi"
+
+/*
+ * NOTE: The original firmware from Samsung can only boot ARM32 kernels on some
+ * variants.
+ * Unfortunately, the firmware is signed and cannot be replaced easily.
+ * There seems to be no way to boot ARM64 kernels on 32-bit devices 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-grandmax.dts
+ */
+
+/ {
+	model = "Samsung Galaxy Grand Max";
+	compatible = "samsung,grandmax", "qcom,msm8916";
+	chassis-type = "handset";
+
+	/delete-node/ gpio-hall-sensor;
+	/delete-node/ i2c-nfc;
+	/delete-node/ i2c-tkey;
+};
+
+&vibrator {
+	enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>;
+};
+
+&motor_en_default {
+	pins = "gpio72";
+};
--
2.30.2



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

* [RESEND PATCH 3/4] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
  2022-07-15 10:24 ` [RESEND PATCH 2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi Lin, Meng-Bo
@ 2022-07-15 10:24 ` Lin, Meng-Bo
  2022-07-15 10:25 ` [RESEND PATCH 4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Lin, Meng-Bo
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Lin, Meng-Bo @ 2022-07-15 10:24 UTC (permalink / raw)
  To: devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

After adding all necessary support for MSM8916 SMP/cpuidle without PSCI
on ARM32, build the Samsung Galaxy E5/E7/Grand Max 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.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 arch/arm/boot/dts/Makefile                          | 3 +++
 arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts       | 3 +++
 arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts       | 3 +++
 arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts | 3 +++
 4 files changed, 12 insertions(+)
 create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts
 create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts
 create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 5112f493f494..b7a6983ee6fa 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1030,6 +1030,9 @@ dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-ipq8064-rb3011.dtb \
 	qcom-msm8226-samsung-s3ve3g.dtb \
 	qcom-msm8660-surf.dtb \
+	qcom-msm8916-samsung-e5.dtb \
+	qcom-msm8916-samsung-e7.dtb \
+	qcom-msm8916-samsung-grandmax.dtb \
 	qcom-msm8916-samsung-serranove.dtb \
 	qcom-msm8960-cdp.dtb \
 	qcom-msm8974-lge-nexus5-hammerhead.dtb \
diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts
new file mode 100644
index 000000000000..c8d34de8a71e
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "arm64/qcom/msm8916-samsung-e5.dts"
+#include "qcom-msm8916-smp.dtsi"
diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts
new file mode 100644
index 000000000000..85be286c8608
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "arm64/qcom/msm8916-samsung-e7.dts"
+#include "qcom-msm8916-smp.dtsi"
diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts
new file mode 100644
index 000000000000..d3abe0536238
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "arm64/qcom/msm8916-samsung-grandmax.dts"
+#include "qcom-msm8916-smp.dtsi"
--
2.30.2



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

* [RESEND PATCH 4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
  2022-07-15 10:24 ` [RESEND PATCH 2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi Lin, Meng-Bo
  2022-07-15 10:24 ` [RESEND PATCH 3/4] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64 Lin, Meng-Bo
@ 2022-07-15 10:25 ` Lin, Meng-Bo
  2022-07-17 11:01 ` [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Lin, Meng-Bo @ 2022-07-15 10:25 UTC (permalink / raw)
  To: devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

On the Samsung Galaxy E5 and E7 the touch key is supplied by a single
fixed regulator (enabled via GPIO 97) that supplies both MCU and LED.
Add it to the device tree.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 .../qcom/msm8916-samsung-e2015-common.dtsi    | 26 +++++++++++++++++++
 .../dts/qcom/msm8916-samsung-grandmax.dts     |  4 +++
 2 files changed, 30 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
index 373154ee2643..9f3aca17130d 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
@@ -19,6 +19,19 @@ muic: extcon@14 {
 		};
 	};

+	reg_touch_key: regulator-touch-key {
+		compatible = "regulator-fixed";
+		regulator-name = "touch_key";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&msmgpio 97 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tkey_en_default>;
+	};
+
 	vibrator: vibrator {
 		compatible = "gpio-vibrator";
 		enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>;
@@ -28,6 +41,11 @@ vibrator: vibrator {
 	};
 };

+&touchkey {
+	vcc-supply = <&reg_touch_key>;
+	vdd-supply = <&reg_touch_key>;
+};
+
 &msmgpio {
 	motor_en_default: motor-en-default {
 		pins = "gpio76";
@@ -36,4 +54,12 @@ motor_en_default: motor-en-default {
 		drive-strength = <2>;
 		bias-disable;
 	};
+
+	tkey_en_default: tkey-en-default {
+		pins = "gpio97";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
index 41aada4bfb80..f68dd3d69a33 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
@@ -27,6 +27,10 @@ / {
 	/delete-node/ i2c-tkey;
 };

+&reg_touch_key {
+	status = "disabled";
+};
+
 &vibrator {
 	enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>;
 };
--
2.30.2



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

* Re: [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
                   ` (2 preceding siblings ...)
  2022-07-15 10:25 ` [RESEND PATCH 4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Lin, Meng-Bo
@ 2022-07-17 11:01 ` Lin, Meng-Bo
  2022-07-18 13:09 ` Krzysztof Kozlowski
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Lin, Meng-Bo @ 2022-07-17 11:01 UTC (permalink / raw)
  To: krzysztof.kozlowski+dt
  Cc: agross, bjorn.andersson, devicetree, konrad.dybcio,
	linux-arm-msm, linux-kernel, nikita, robh+dt, stephan,
	~postmarketos/upstreaming

On Friday, July 15th, 2022 at 10:00 AM, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> I just received one patch, no cover letter, no threading (I asked for),
> no changelog against v1, no binding updates (I asked for).

I have had them all in a thread in latest resend. The v2 was accident.
There is nothing changed except dt-binding added in new commit.

> Sorry, the process does not work like that.
>
> You receive comments, so either you apply them or you keep discussing
> with reviewer.

Sorry for the confusing and inconvenience. Please have another look at my patch.
Thank you for your patience.

Best regards,
Lin

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

* Re: [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
                   ` (3 preceding siblings ...)
  2022-07-17 11:01 ` [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
@ 2022-07-18 13:09 ` Krzysztof Kozlowski
  2022-07-18 13:09 ` Krzysztof Kozlowski
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-18 13:09 UTC (permalink / raw)
  To: Lin, Meng-Bo, devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

On 15/07/2022 12:21, Lin, Meng-Bo wrote:
> Document the new samsung,e5/e7/grandmax device tree bindings used in their
> device trees.
> 
> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>

Sorry, it's confusing. There was a v1. I asked for changes Then there
was a v2.

...and now is resend of v1, so you decided not to implement changes.

Send v3, with all changes applied or keep discussion going.

Best regards,
Krzysztof

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

* Re: [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
                   ` (4 preceding siblings ...)
  2022-07-18 13:09 ` Krzysztof Kozlowski
@ 2022-07-18 13:09 ` Krzysztof Kozlowski
  2022-07-19 13:01 ` [PATCH v3 0/4] Add Samsung Galaxy E5/E7/Grand Max device trees Lin, Meng-Bo
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-18 13:09 UTC (permalink / raw)
  To: Lin, Meng-Bo, devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

On 15/07/2022 12:21, Lin, Meng-Bo wrote:
> Document the new samsung,e5/e7/grandmax device tree bindings used in their
> device trees.
> 
> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
> ---
>  Documentation/devicetree/bindings/arm/qcom.yaml | 3 +++

If this is resend of v1, why I cannot find this patch in v1?


Best regards,
Krzysztof

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

* [PATCH v3 0/4] Add Samsung Galaxy E5/E7/Grand Max device trees
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
                   ` (5 preceding siblings ...)
  2022-07-18 13:09 ` Krzysztof Kozlowski
@ 2022-07-19 13:01 ` Lin, Meng-Bo
  2022-08-29 23:45   ` (subset) " Bjorn Andersson
  2022-07-19 13:01 ` [PATCH v3 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 14+ messages in thread
From: Lin, Meng-Bo @ 2022-07-19 13:01 UTC (permalink / raw)
  To: devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

v3: Add a cover letter and changelog
v2: Add dt-bindings documentation

Samsung Galaxy E5, E7 and Grand Max are smartphones using the MSM8916 SoC
released in 2015.

e2015 and a2015 are similar, with some differences in accelerometer,
MUIC and Vibrator. The common parts are shared in
msm8916-samsung-a2015-common.dtsi to reduce duplication.

The three devices (and all other variants of E5/E7/Grand Max released in
2015) are very similar, with some differences in display, touchscreen,
sensors and NFC. The common parts are shared in
msm8916-samsung-e2015-common.dtsi to reduce duplication.

Unfortunately, some E5/E7/Grand Max 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 on those variants 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 those device at some
point. In this case I expect that this device tree can be simply used
as-is.


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

* [PATCH v3 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
                   ` (6 preceding siblings ...)
  2022-07-19 13:01 ` [PATCH v3 0/4] Add Samsung Galaxy E5/E7/Grand Max device trees Lin, Meng-Bo
@ 2022-07-19 13:01 ` Lin, Meng-Bo
  2022-07-19 19:09   ` Krzysztof Kozlowski
  2022-07-19 13:01 ` [PATCH v3 2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi Lin, Meng-Bo
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 14+ messages in thread
From: Lin, Meng-Bo @ 2022-07-19 13:01 UTC (permalink / raw)
  To: devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

Document the new samsung,e5/e7/grandmax device tree bindings used in their
device trees.

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

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 5c06d1bfc046..b004f42bc277 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -164,6 +164,9 @@ properties:
               - longcheer,l8150
               - samsung,a3u-eur
               - samsung,a5u-eur
+              - samsung,e5
+              - samsung,e7
+              - samsung,grandmax
           - const: qcom,msm8916

       - items:
--
2.30.2



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

* [PATCH v3 2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
                   ` (7 preceding siblings ...)
  2022-07-19 13:01 ` [PATCH v3 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
@ 2022-07-19 13:01 ` Lin, Meng-Bo
  2022-07-19 13:01 ` [PATCH v3 3/4] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64 Lin, Meng-Bo
  2022-07-19 13:01 ` [PATCH v3 4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Lin, Meng-Bo
  10 siblings, 0 replies; 14+ messages in thread
From: Lin, Meng-Bo @ 2022-07-19 13:01 UTC (permalink / raw)
  To: devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

Samsung Galaxy E5, E7 and Grand Max are smartphones using the MSM8916 SoC
released in 2015.

e2015 and a2015 are similar, with some differences in accelerometer,
MUIC and Vibrator. The common parts are shared in
msm8916-samsung-a2015-common.dtsi to reduce duplication.

Add a common device tree for with initial support for:

- GPIO keys and vibrator
- Hall sensor (except Grand Max)
- SDHCI (internal and external storage)
- USB Device Mode
- UART (on USB connector via the SM5504 MUIC)
- WCNSS (WiFi/BT)
- Regulators
- S3FWRN5 NFC (except Grand Max)

The three devices (and all other variants of E5/E7/Grand Max released in
2015) are very similar, with some differences in display, touchscreen,
sensors and NFC. The common parts are shared in
msm8916-samsung-e2015-common.dtsi to reduce duplication.

Unfortunately, some E5/E7/Grand Max 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 on those variants 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 those device at some
point. In this case I expect that this device tree can be simply used
as-is.

Co-developed-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 arch/arm64/boot/dts/qcom/Makefile             |  3 ++
 .../qcom/msm8916-samsung-e2015-common.dtsi    | 39 +++++++++++++++++++
 .../boot/dts/qcom/msm8916-samsung-e5.dts      | 24 ++++++++++++
 .../boot/dts/qcom/msm8916-samsung-e7.dts      | 29 ++++++++++++++
 .../dts/qcom/msm8916-samsung-grandmax.dts     | 36 +++++++++++++++++
 5 files changed, 131 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 2f8aec2cc6db..941494553b9e 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -15,6 +15,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-longcheer-l8910.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-mtp.dtb
 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-grandmax.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-j5.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-serranove.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
new file mode 100644
index 000000000000..373154ee2643
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "msm8916-samsung-a2015-common.dtsi"
+
+/ {
+	i2c-muic {
+		/* SM5504 MUIC instead of SM5502 */
+		/delete-node/ extcon@25;
+
+		muic: extcon@14 {
+			compatible = "siliconmitus,sm5504-muic";
+			reg = <0x14>;
+
+			interrupt-parent = <&msmgpio>;
+			interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&muic_int_default>;
+		};
+	};
+
+	vibrator: vibrator {
+		compatible = "gpio-vibrator";
+		enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&motor_en_default>;
+	};
+};
+
+&msmgpio {
+	motor_en_default: motor-en-default {
+		pins = "gpio76";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts
new file mode 100644
index 000000000000..777eb934eb4b
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-e2015-common.dtsi"
+
+/*
+ * NOTE: The original firmware from Samsung can only boot ARM32 kernels on some
+ * variants.
+ * Unfortunately, the firmware is signed and cannot be replaced easily.
+ * There seems to be no way to boot ARM64 kernels on 32-bit devices 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-e5.dts
+ */
+
+/ {
+	model = "Samsung Galaxy E5";
+	compatible = "samsung,e5", "qcom,msm8916";
+	chassis-type = "handset";
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts
new file mode 100644
index 000000000000..b412b61ca258
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-e2015-common.dtsi"
+
+/*
+ * NOTE: The original firmware from Samsung can only boot ARM32 kernels on some
+ * variants.
+ * Unfortunately, the firmware is signed and cannot be replaced easily.
+ * There seems to be no way to boot ARM64 kernels on 32-bit devices 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-e7.dts
+ */
+
+/ {
+	model = "Samsung Galaxy E7";
+	compatible = "samsung,e7", "qcom,msm8916";
+	chassis-type = "handset";
+};
+
+&pm8916_l17 {
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
new file mode 100644
index 000000000000..41aada4bfb80
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-samsung-e2015-common.dtsi"
+
+/*
+ * NOTE: The original firmware from Samsung can only boot ARM32 kernels on some
+ * variants.
+ * Unfortunately, the firmware is signed and cannot be replaced easily.
+ * There seems to be no way to boot ARM64 kernels on 32-bit devices 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-grandmax.dts
+ */
+
+/ {
+	model = "Samsung Galaxy Grand Max";
+	compatible = "samsung,grandmax", "qcom,msm8916";
+	chassis-type = "handset";
+
+	/delete-node/ gpio-hall-sensor;
+	/delete-node/ i2c-nfc;
+	/delete-node/ i2c-tkey;
+};
+
+&vibrator {
+	enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>;
+};
+
+&motor_en_default {
+	pins = "gpio72";
+};
--
2.30.2



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

* [PATCH v3 3/4] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
                   ` (8 preceding siblings ...)
  2022-07-19 13:01 ` [PATCH v3 2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi Lin, Meng-Bo
@ 2022-07-19 13:01 ` Lin, Meng-Bo
  2022-07-19 13:01 ` [PATCH v3 4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Lin, Meng-Bo
  10 siblings, 0 replies; 14+ messages in thread
From: Lin, Meng-Bo @ 2022-07-19 13:01 UTC (permalink / raw)
  To: devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

After adding all necessary support for MSM8916 SMP/cpuidle without PSCI
on ARM32, build the Samsung Galaxy E5/E7/Grand Max 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.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 arch/arm/boot/dts/Makefile                          | 3 +++
 arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts       | 3 +++
 arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts       | 3 +++
 arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts | 3 +++
 4 files changed, 12 insertions(+)
 create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts
 create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts
 create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 5112f493f494..b7a6983ee6fa 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1030,6 +1030,9 @@ dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-ipq8064-rb3011.dtb \
 	qcom-msm8226-samsung-s3ve3g.dtb \
 	qcom-msm8660-surf.dtb \
+	qcom-msm8916-samsung-e5.dtb \
+	qcom-msm8916-samsung-e7.dtb \
+	qcom-msm8916-samsung-grandmax.dtb \
 	qcom-msm8916-samsung-serranove.dtb \
 	qcom-msm8960-cdp.dtb \
 	qcom-msm8974-lge-nexus5-hammerhead.dtb \
diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts
new file mode 100644
index 000000000000..c8d34de8a71e
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "arm64/qcom/msm8916-samsung-e5.dts"
+#include "qcom-msm8916-smp.dtsi"
diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts
new file mode 100644
index 000000000000..85be286c8608
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "arm64/qcom/msm8916-samsung-e7.dts"
+#include "qcom-msm8916-smp.dtsi"
diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts
new file mode 100644
index 000000000000..d3abe0536238
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "arm64/qcom/msm8916-samsung-grandmax.dts"
+#include "qcom-msm8916-smp.dtsi"
--
2.30.2



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

* [PATCH v3 4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey
  2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
                   ` (9 preceding siblings ...)
  2022-07-19 13:01 ` [PATCH v3 3/4] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64 Lin, Meng-Bo
@ 2022-07-19 13:01 ` Lin, Meng-Bo
  10 siblings, 0 replies; 14+ messages in thread
From: Lin, Meng-Bo @ 2022-07-19 13:01 UTC (permalink / raw)
  To: devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

On the Samsung Galaxy E5 and E7 the touch key is supplied by a single
fixed regulator (enabled via GPIO 97) that supplies both MCU and LED.
Add it to the device tree.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
 .../qcom/msm8916-samsung-e2015-common.dtsi    | 26 +++++++++++++++++++
 .../dts/qcom/msm8916-samsung-grandmax.dts     |  4 +++
 2 files changed, 30 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
index 373154ee2643..9f3aca17130d 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
@@ -19,6 +19,19 @@ muic: extcon@14 {
 		};
 	};

+	reg_touch_key: regulator-touch-key {
+		compatible = "regulator-fixed";
+		regulator-name = "touch_key";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&msmgpio 97 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tkey_en_default>;
+	};
+
 	vibrator: vibrator {
 		compatible = "gpio-vibrator";
 		enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>;
@@ -28,6 +41,11 @@ vibrator: vibrator {
 	};
 };

+&touchkey {
+	vcc-supply = <&reg_touch_key>;
+	vdd-supply = <&reg_touch_key>;
+};
+
 &msmgpio {
 	motor_en_default: motor-en-default {
 		pins = "gpio76";
@@ -36,4 +54,12 @@ motor_en_default: motor-en-default {
 		drive-strength = <2>;
 		bias-disable;
 	};
+
+	tkey_en_default: tkey-en-default {
+		pins = "gpio97";
+		function = "gpio";
+
+		drive-strength = <2>;
+		bias-disable;
+	};
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
index 41aada4bfb80..f68dd3d69a33 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts
@@ -27,6 +27,10 @@ / {
 	/delete-node/ i2c-tkey;
 };

+&reg_touch_key {
+	status = "disabled";
+};
+
 &vibrator {
 	enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>;
 };
--
2.30.2



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

* Re: [PATCH v3 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices
  2022-07-19 13:01 ` [PATCH v3 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
@ 2022-07-19 19:09   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-19 19:09 UTC (permalink / raw)
  To: Lin, Meng-Bo, devicetree
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	Stephan Gerhold, Nikita Travkin, ~postmarketos/upstreaming

On 19/07/2022 15:01, Lin, Meng-Bo wrote:
> Document the new samsung,e5/e7/grandmax device tree bindings used in their
> device trees.
> 
> Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: (subset) [PATCH v3 0/4] Add Samsung Galaxy E5/E7/Grand Max device trees
  2022-07-19 13:01 ` [PATCH v3 0/4] Add Samsung Galaxy E5/E7/Grand Max device trees Lin, Meng-Bo
@ 2022-08-29 23:45   ` Bjorn Andersson
  0 siblings, 0 replies; 14+ messages in thread
From: Bjorn Andersson @ 2022-08-29 23:45 UTC (permalink / raw)
  To: linmengbo0689, devicetree
  Cc: linux-arm-msm, robh+dt, ~postmarketos/upstreaming, linux-kernel,
	konrad.dybcio, stephan, krzysztof.kozlowski+dt, agross, nikita

On Tue, 19 Jul 2022 13:01:34 +0000, Lin, Meng-Bo wrote:
> v3: Add a cover letter and changelog
> v2: Add dt-bindings documentation
> 
> Samsung Galaxy E5, E7 and Grand Max are smartphones using the MSM8916 SoC
> released in 2015.
> 
> e2015 and a2015 are similar, with some differences in accelerometer,
> MUIC and Vibrator. The common parts are shared in
> msm8916-samsung-a2015-common.dtsi to reduce duplication.
> 
> [...]

Applied, thanks!

[1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices
      commit: dc1b8ce9db8c5181b3345505a66dfe8136b83f21
[2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi
      commit: 995d1ac509fb92f3288a8eab3342a5667183fd2f
[3/4] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64
      commit: 87c1b199e622bc2d9b16da5d870ab6b92db96154
[4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey
      commit: 90ca46731599ea364d2d8b5310341ab766fea637

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2022-08-29 23:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15 10:21 [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
2022-07-15 10:24 ` [RESEND PATCH 2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi Lin, Meng-Bo
2022-07-15 10:24 ` [RESEND PATCH 3/4] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64 Lin, Meng-Bo
2022-07-15 10:25 ` [RESEND PATCH 4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Lin, Meng-Bo
2022-07-17 11:01 ` [RESEND PATCH 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
2022-07-18 13:09 ` Krzysztof Kozlowski
2022-07-18 13:09 ` Krzysztof Kozlowski
2022-07-19 13:01 ` [PATCH v3 0/4] Add Samsung Galaxy E5/E7/Grand Max device trees Lin, Meng-Bo
2022-08-29 23:45   ` (subset) " Bjorn Andersson
2022-07-19 13:01 ` [PATCH v3 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Lin, Meng-Bo
2022-07-19 19:09   ` Krzysztof Kozlowski
2022-07-19 13:01 ` [PATCH v3 2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi Lin, Meng-Bo
2022-07-19 13:01 ` [PATCH v3 3/4] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64 Lin, Meng-Bo
2022-07-19 13:01 ` [PATCH v3 4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Lin, Meng-Bo

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