devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: Add basic support for LG H815
@ 2024-04-03 10:43 Alexander Reimelt
  2024-04-03 10:43 ` [PATCH 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Alexander Reimelt @ 2024-04-03 10:43 UTC (permalink / raw)
  To: andersson, pvorel, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel

Hello,

These patches add initial support for the LG H815.
They are enough to boot the device on postmarketOS
and have some basic functionality. Connecting to the
device over USB networking via ssh, buttons, SD-Card,
eMMC and regulators work. The dtb_checker shows some
warnings, but they come from the msm8994.dtsi.

For CPU bring up lk2nd is required. The DMA controller
module fails to load and from time to time the SMD clock
driver fails.

But I hope to prevent duplicate work and make it more accessible.

Best regards
Alex

Alexander Reimelt (2):
  dt-bindings: arm: qcom: Add LG G4 (h815)
  arm64: dts: qcom: Add basic support for LG G4 (H815)

 .../devicetree/bindings/arm/qcom.yaml         |   1 +
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts  | 422 ++++++++++++++++++
 3 files changed, 424 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts

-- 
2.44.0


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

* [PATCH 1/2] dt-bindings: arm: qcom: Add LG G4 (h815)
  2024-04-03 10:43 [PATCH 0/2] arm64: Add basic support for LG H815 Alexander Reimelt
@ 2024-04-03 10:43 ` Alexander Reimelt
  2024-04-03 17:16   ` Rob Herring
  2024-04-03 10:43 ` [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815) Alexander Reimelt
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 18+ messages in thread
From: Alexander Reimelt @ 2024-04-03 10:43 UTC (permalink / raw)
  To: andersson, pvorel, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel

International variant of the LG G4 from 2015.

Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 66beaac60e1d..76aefd4aac67 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -237,6 +237,7 @@ properties:
       - items:
           - enum:
               - lg,bullhead
+              - lg,h815
               - microsoft,talkman
               - xiaomi,libra
           - const: qcom,msm8992
-- 
2.44.0


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

* [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815)
  2024-04-03 10:43 [PATCH 0/2] arm64: Add basic support for LG H815 Alexander Reimelt
  2024-04-03 10:43 ` [PATCH 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
@ 2024-04-03 10:43 ` Alexander Reimelt
  2024-04-03 10:57   ` Dmitry Baryshkov
                     ` (2 more replies)
  2024-04-03 14:15 ` [PATCH 0/2] arm64: Add basic support for LG H815 Rob Herring
  2024-05-30 13:57 ` [PATCH v2 " Alexander Reimelt
  3 siblings, 3 replies; 18+ messages in thread
From: Alexander Reimelt @ 2024-04-03 10:43 UTC (permalink / raw)
  To: andersson, pvorel, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel

To make it easier for downstream projects and avoid duplication of work.
Makes the device bootable and enables all buttons, most regulators, hall sensor, eMMC and SD-Card.

Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
---
 arch/arm64/boot/dts/qcom/Makefile            |   1 +
 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts | 422 +++++++++++++++++++
 2 files changed, 423 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 7d40ec5e7d21..5b7f8741006f 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -62,6 +62,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8956-sony-xperia-loire-kugo.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8956-sony-xperia-loire-suzu.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-10.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-101.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-h815.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-msft-lumia-octagon-talkman.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-xiaomi-libra.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-huawei-angler-rev-101.dtb
diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts b/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
new file mode 100644
index 000000000000..b7fa48337e25
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
@@ -0,0 +1,422 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * MSM8992 LG G4 (h815) device tree.
+ *
+ * Copyright (c) 2024, Alexander Reimelt <alexander.reimelt@posteo.de>
+ */
+
+/dts-v1/;
+
+#include "msm8992.dtsi"
+#include "pm8994.dtsi"
+#include "pmi8994.dtsi"
+#include <dt-bindings/leds/common.h>
+
+/* different mapping */
+/delete-node/ &cont_splash_mem;
+
+/* disabled downstream */
+/delete-node/ &dfps_data_mem;
+
+&CPU0 {
+	enable-method = "spin-table";
+};
+
+&CPU1 {
+	enable-method = "spin-table";
+};
+
+&CPU2 {
+	enable-method = "spin-table";
+};
+
+&CPU3 {
+	enable-method = "spin-table";
+};
+
+&CPU4 {
+	enable-method = "spin-table";
+};
+
+&CPU5 {
+	enable-method = "spin-table";
+};
+
+/ {
+	model = "LG G4 (International)";
+	compatible = "lg,h815", "qcom,msm8992";
+	chassis-type = "handset";
+
+	qcom,msm-id = <251 0>;
+	qcom,pmic-id = <0x10009 0x1000a 0x00 0x00>;
+	qcom,board-id = <0xb64 0>;
+
+	/* psci is broken */
+	/delete-node/ psci;
+
+	chosen {
+		bootargs = "earlycon=tty0 console=tty0";
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		spin-table@6000000 {
+			reg = <0 0x6000000 0 0x1000>;
+			no-map;
+		};
+
+		ramoops@ff00000 {
+			compatible = "ramoops";
+			reg = <0x0 0xff00000 0x0 0x100000>;
+			console-size = <0x20000>;
+			pmsg-size = <0x20000>;
+			record-size = <0x10000>;
+			ecc-size = <0x10>;
+		};
+
+		cont_splash_mem: fb@3400000 {
+			compatible = "framebuffer";
+			reg = <0 0x3400000 0 0xc00000>;
+			no-map;
+		};
+
+		crash_fb_mem: crash_fb@4000000 {
+			reg = <0 0x4000000 0 0xc00000>;
+			no-map;
+		};
+	};
+
+	gpio-hall-sensor {
+		compatible = "gpio-keys";
+
+		pinctrl-0 = <&hall_sensor_default>;
+		pinctrl-names = "default";
+
+		label = "Hall Effect Sensor";
+
+		event-hall-sensor {
+			gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
+			label = "hall effect sensor";
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_LID>;
+			linux,can-disable;
+			wakeup-source;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		key-vol-up {
+			label = "volume up";
+			gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			wakeup-source;
+			debounce-interval = <15>;
+		};
+	};
+};
+
+&pm8994_spmi_regulators {
+	vdd_s8-supply = <&vph_pwr>;
+	vdd_s11-supply = <&vph_pwr>;
+
+	pm8994_s8: s8 {
+		regulator-min-microvolt = <700000>;
+		regulator-max-microvolt = <1180000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
+	pm8994_s11: s11 {
+		regulator-min-microvolt = <700000>;
+		regulator-max-microvolt = <1225000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+};
+
+&rpm_requests {
+	regulators-0 {
+		compatible = "qcom,rpm-pm8994-regulators";
+
+		vdd_s3-supply = <&vph_pwr>;
+		vdd_s4-supply = <&vph_pwr>;
+		vdd_s5-supply = <&vph_pwr>;
+		vdd_s7-supply = <&vph_pwr>;
+		vdd_l1-supply = <&pmi8994_s1>;
+		vdd_l2_26_28-supply = <&pm8994_s3>;
+		vdd_l3_11-supply = <&pm8994_s3>;
+		vdd_l4_27_31-supply = <&pm8994_s3>;
+		vdd_l5_7-supply = <&pm8994_s5>;
+		vdd_l6_12_32-supply = <&pm8994_s5>;
+		vdd_l8_16_30-supply = <&vph_pwr>;
+		vdd_l9_10_18_22-supply = <&pmi8994_bby>;
+		vdd_l13_19_23_24-supply = <&pmi8994_bby>;
+		vdd_l14_15-supply = <&pm8994_s5>;
+		vdd_l17_29-supply = <&pmi8994_bby>;
+		vdd_l20_21-supply = <&pmi8994_bby>;
+		vdd_l25-supply = <&pm8994_s5>;
+		vdd_lvs1_2-supply = <&pm8994_s4>;
+
+		pm8994_s3: s3 {
+			regulator-min-microvolt = <1300000>;
+			regulator-max-microvolt = <1300000>;
+		};
+
+		/* sdhc1 vqmmc and bcm */
+		pm8994_s4: s4 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-system-load = <325000>;
+			regulator-allow-set-load;
+		};
+
+		pm8994_s5: s5 {
+			regulator-min-microvolt = <2150000>;
+			regulator-max-microvolt = <2150000>;
+		};
+
+		pm8994_s7: s7 {
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <1000000>;
+		};
+
+		pm8994_l1: l1 {
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <1000000>;
+		};
+
+		pm8994_l2: l2 {
+			regulator-min-microvolt = <1250000>;
+			regulator-max-microvolt = <1250000>;
+			regulator-system-load = <10000>;
+			regulator-allow-set-load;
+		};
+
+		/* camera */
+		pm8994_l3: l3 {
+			regulator-min-microvolt = <1050000>;
+			regulator-max-microvolt = <1050000>;
+		};
+
+		pm8994_l4: l4 {
+			regulator-min-microvolt = <1225000>;
+			regulator-max-microvolt = <1225000>;
+		};
+
+		/* L5 is inaccessible from RPM */
+
+		pm8994_l6: l6 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		/* L7 is inaccessible from RPM */
+
+		pm8994_l8: l8 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		pm8994_l9: l9 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		/* touch  */
+		pm8994_l10: l10 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		pm8994_l11: l11 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+		};
+
+		pm8994_l12: l12 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-system-load = <10000>;
+			regulator-allow-set-load;
+		};
+
+		/* sdhc2 vqmmc */
+		pm8994_l13: l13 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2950000>;
+			regulator-system-load = <22000>;
+			regulator-allow-set-load;
+		};
+
+		/* camera */
+		pm8994_l14: l14 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-system-load = <10000>;
+			regulator-allow-set-load;
+		};
+
+		pm8994_l15: l15 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		pm8994_l16: l16 {
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <2700000>;
+		};
+
+		/* camera */
+		pm8994_l17: l17 {
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+		};
+
+		pm8994_l18: l18 {
+			regulator-min-microvolt = <2850000>;
+			regulator-max-microvolt = <2850000>;
+		};
+
+		/* LCD */
+		pm8994_l19: l19 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3000000>;
+		};
+
+		/* sdhc1 vmmc */
+		pm8994_l20: l20 {
+			regulator-min-microvolt = <2950000>;
+			regulator-max-microvolt = <2950000>;
+			regulator-system-load = <570000>;
+			regulator-allow-set-load;
+		};
+
+		/* sdhc2 vmmc */
+		pm8994_l21: l21 {
+			regulator-min-microvolt = <2950000>;
+			regulator-max-microvolt = <2950000>;
+			regulator-system-load = <800000>;
+			regulator-allow-set-load;
+		};
+
+		/* touch */
+		pm8994_l22: l22 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3000000>;
+		};
+
+		/* camera */
+		pm8994_l23: l23 {
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+		};
+
+		pm8994_l24: l24 {
+			regulator-min-microvolt = <3075000>;
+			regulator-max-microvolt = <3150000>;
+		};
+
+		/* IRRC */
+		pm8994_l25: l25 {
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <1000000>;
+		};
+
+		pm8994_l26: l26 {
+			regulator-min-microvolt = <987500>;
+			regulator-max-microvolt = <987500>;
+		};
+
+		/* hdmi */
+		pm8994_l27: l27 {
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <1000000>;
+		};
+
+		pm8994_l28: l28 {
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <1000000>;
+			regulator-system-load = <10000>;
+			regulator-allow-set-load;
+		};
+
+		/* camera */
+		pm8994_l29: l29 {
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+		};
+
+		/* camera */
+		pm8994_l30: l30 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		pm8994_l31: l31 {
+			regulator-min-microvolt = <1262500>;
+			regulator-max-microvolt = <1262500>;
+		};
+
+		pm8994_l32: l32 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		pm8994_lvs1: lvs1 {};
+
+		pm8994_lvs2: lvs2 {};
+	};
+
+	regulators-1 {
+		compatible = "qcom,rpm-pmi8994-regulators";
+
+		vdd_s1-supply = <&vph_pwr>;
+		vdd_bst_byp-supply = <&vph_pwr>;
+
+		pmi8994_s1: s1 {
+			regulator-min-microvolt = <1025000>;
+			regulator-max-microvolt = <1025000>;
+		};
+
+		/* S2 & S3 - VDD_GFX */
+
+		pmi8994_bby: boost-bypass {
+			regulator-min-microvolt = <3150000>;
+			regulator-max-microvolt = <3600000>;
+		};
+	};
+};
+
+&pm8994_resin {
+	status = "okay";
+	linux,code = <KEY_VOLUMEDOWN>;
+};
+
+&sdhc1 {
+	status = "okay";
+	mmc-hs400-1_8v;
+	vmmc-supply = <&pm8994_l20>;
+	vqmmc-supply = <&pm8994_s4>;
+	non-removable;
+};
+
+&sdhc2 {
+	status = "okay";
+	vmmc-supply = <&pm8994_l21>;
+	vqmmc-supply = <&pm8994_l13>;
+	cd-gpios = <&pm8994_gpios 8 GPIO_ACTIVE_LOW>;
+};
+
+&tlmm {
+	hall_sensor_default: hall-sensor-default-state {
+		pins = "gpio75";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+};
-- 
2.44.0


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

* Re: [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815)
  2024-04-03 10:43 ` [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815) Alexander Reimelt
@ 2024-04-03 10:57   ` Dmitry Baryshkov
  2024-04-03 17:37   ` Krzysztof Kozlowski
  2024-04-03 18:43   ` Petr Vorel
  2 siblings, 0 replies; 18+ messages in thread
From: Dmitry Baryshkov @ 2024-04-03 10:57 UTC (permalink / raw)
  To: Alexander Reimelt
  Cc: andersson, pvorel, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	conor+dt, linux-arm-msm, devicetree, linux-kernel

On Wed, 3 Apr 2024 at 13:46, Alexander Reimelt
<alexander.reimelt@posteo.de> wrote:
>
> To make it easier for downstream projects and avoid duplication of work.
> Makes the device bootable and enables all buttons, most regulators, hall sensor, eMMC and SD-Card.
>
> Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
> ---
>  arch/arm64/boot/dts/qcom/Makefile            |   1 +
>  arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts | 422 +++++++++++++++++++
>  2 files changed, 423 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
>
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 7d40ec5e7d21..5b7f8741006f 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -62,6 +62,7 @@ dtb-$(CONFIG_ARCH_QCOM)       += msm8956-sony-xperia-loire-kugo.dtb
>  dtb-$(CONFIG_ARCH_QCOM)        += msm8956-sony-xperia-loire-suzu.dtb
>  dtb-$(CONFIG_ARCH_QCOM)        += msm8992-lg-bullhead-rev-10.dtb
>  dtb-$(CONFIG_ARCH_QCOM)        += msm8992-lg-bullhead-rev-101.dtb
> +dtb-$(CONFIG_ARCH_QCOM)        += msm8992-lg-h815.dtb
>  dtb-$(CONFIG_ARCH_QCOM)        += msm8992-msft-lumia-octagon-talkman.dtb
>  dtb-$(CONFIG_ARCH_QCOM)        += msm8992-xiaomi-libra.dtb
>  dtb-$(CONFIG_ARCH_QCOM)        += msm8994-huawei-angler-rev-101.dtb
> diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts b/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
> new file mode 100644
> index 000000000000..b7fa48337e25
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
> @@ -0,0 +1,422 @@
> +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +/*
> + * MSM8992 LG G4 (h815) device tree.
> + *
> + * Copyright (c) 2024, Alexander Reimelt <alexander.reimelt@posteo.de>
> + */
> +
> +/dts-v1/;
> +
> +#include "msm8992.dtsi"
> +#include "pm8994.dtsi"
> +#include "pmi8994.dtsi"
> +#include <dt-bindings/leds/common.h>
> +
> +/* different mapping */
> +/delete-node/ &cont_splash_mem;
> +
> +/* disabled downstream */
> +/delete-node/ &dfps_data_mem;
> +
> +&CPU0 {
> +       enable-method = "spin-table";
> +};
> +
> +&CPU1 {
> +       enable-method = "spin-table";
> +};
> +
> +&CPU2 {
> +       enable-method = "spin-table";
> +};
> +
> +&CPU3 {
> +       enable-method = "spin-table";
> +};
> +
> +&CPU4 {
> +       enable-method = "spin-table";
> +};
> +
> +&CPU5 {
> +       enable-method = "spin-table";
> +};
> +
> +/ {
> +       model = "LG G4 (International)";
> +       compatible = "lg,h815", "qcom,msm8992";
> +       chassis-type = "handset";
> +
> +       qcom,msm-id = <251 0>;
> +       qcom,pmic-id = <0x10009 0x1000a 0x00 0x00>;
> +       qcom,board-id = <0xb64 0>;
> +
> +       /* psci is broken */
> +       /delete-node/ psci;
> +
> +       chosen {
> +               bootargs = "earlycon=tty0 console=tty0";

Could you please drop this?

> +       };
> +
> +       reserved-memory {
> +               #address-cells = <2>;
> +               #size-cells = <2>;
> +               ranges;
> +
> +               spin-table@6000000 {
> +                       reg = <0 0x6000000 0 0x1000>;
> +                       no-map;
> +               };
> +
> +               ramoops@ff00000 {
> +                       compatible = "ramoops";
> +                       reg = <0x0 0xff00000 0x0 0x100000>;
> +                       console-size = <0x20000>;
> +                       pmsg-size = <0x20000>;
> +                       record-size = <0x10000>;
> +                       ecc-size = <0x10>;
> +               };
> +
> +               cont_splash_mem: fb@3400000 {
> +                       compatible = "framebuffer";
> +                       reg = <0 0x3400000 0 0xc00000>;
> +                       no-map;
> +               };
> +
> +               crash_fb_mem: crash_fb@4000000 {
> +                       reg = <0 0x4000000 0 0xc00000>;
> +                       no-map;
> +               };
> +       };
> +
> +       gpio-hall-sensor {
> +               compatible = "gpio-keys";
> +
> +               pinctrl-0 = <&hall_sensor_default>;
> +               pinctrl-names = "default";
> +
> +               label = "Hall Effect Sensor";
> +
> +               event-hall-sensor {
> +                       gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
> +                       label = "hall effect sensor";
> +                       linux,input-type = <EV_SW>;
> +                       linux,code = <SW_LID>;
> +                       linux,can-disable;
> +                       wakeup-source;
> +               };
> +       };
> +
> +       gpio-keys {
> +               compatible = "gpio-keys";
> +
> +               key-vol-up {
> +                       label = "volume up";
> +                       gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
> +                       linux,code = <KEY_VOLUMEUP>;
> +                       wakeup-source;
> +                       debounce-interval = <15>;
> +               };
> +       };
> +};
> +
> +&pm8994_spmi_regulators {
> +       vdd_s8-supply = <&vph_pwr>;
> +       vdd_s11-supply = <&vph_pwr>;
> +
> +       pm8994_s8: s8 {
> +               regulator-min-microvolt = <700000>;
> +               regulator-max-microvolt = <1180000>;
> +               regulator-always-on;
> +               regulator-boot-on;
> +       };
> +
> +       pm8994_s11: s11 {
> +               regulator-min-microvolt = <700000>;
> +               regulator-max-microvolt = <1225000>;
> +               regulator-always-on;
> +               regulator-boot-on;
> +       };
> +};
> +
> +&rpm_requests {
> +       regulators-0 {
> +               compatible = "qcom,rpm-pm8994-regulators";
> +
> +               vdd_s3-supply = <&vph_pwr>;
> +               vdd_s4-supply = <&vph_pwr>;
> +               vdd_s5-supply = <&vph_pwr>;
> +               vdd_s7-supply = <&vph_pwr>;
> +               vdd_l1-supply = <&pmi8994_s1>;
> +               vdd_l2_26_28-supply = <&pm8994_s3>;
> +               vdd_l3_11-supply = <&pm8994_s3>;
> +               vdd_l4_27_31-supply = <&pm8994_s3>;
> +               vdd_l5_7-supply = <&pm8994_s5>;
> +               vdd_l6_12_32-supply = <&pm8994_s5>;
> +               vdd_l8_16_30-supply = <&vph_pwr>;
> +               vdd_l9_10_18_22-supply = <&pmi8994_bby>;
> +               vdd_l13_19_23_24-supply = <&pmi8994_bby>;
> +               vdd_l14_15-supply = <&pm8994_s5>;
> +               vdd_l17_29-supply = <&pmi8994_bby>;
> +               vdd_l20_21-supply = <&pmi8994_bby>;
> +               vdd_l25-supply = <&pm8994_s5>;
> +               vdd_lvs1_2-supply = <&pm8994_s4>;
> +
> +               pm8994_s3: s3 {
> +                       regulator-min-microvolt = <1300000>;
> +                       regulator-max-microvolt = <1300000>;
> +               };
> +
> +               /* sdhc1 vqmmc and bcm */
> +               pm8994_s4: s4 {
> +                       regulator-min-microvolt = <1800000>;
> +                       regulator-max-microvolt = <1800000>;
> +                       regulator-system-load = <325000>;
> +                       regulator-allow-set-load;
> +               };
> +
> +               pm8994_s5: s5 {
> +                       regulator-min-microvolt = <2150000>;
> +                       regulator-max-microvolt = <2150000>;
> +               };
> +
> +               pm8994_s7: s7 {
> +                       regulator-min-microvolt = <1000000>;
> +                       regulator-max-microvolt = <1000000>;
> +               };
> +
> +               pm8994_l1: l1 {
> +                       regulator-min-microvolt = <1000000>;
> +                       regulator-max-microvolt = <1000000>;
> +               };
> +
> +               pm8994_l2: l2 {
> +                       regulator-min-microvolt = <1250000>;
> +                       regulator-max-microvolt = <1250000>;
> +                       regulator-system-load = <10000>;
> +                       regulator-allow-set-load;
> +               };
> +
> +               /* camera */
> +               pm8994_l3: l3 {
> +                       regulator-min-microvolt = <1050000>;
> +                       regulator-max-microvolt = <1050000>;
> +               };
> +
> +               pm8994_l4: l4 {
> +                       regulator-min-microvolt = <1225000>;
> +                       regulator-max-microvolt = <1225000>;
> +               };
> +
> +               /* L5 is inaccessible from RPM */
> +
> +               pm8994_l6: l6 {
> +                       regulator-min-microvolt = <1800000>;
> +                       regulator-max-microvolt = <1800000>;
> +               };
> +
> +               /* L7 is inaccessible from RPM */
> +
> +               pm8994_l8: l8 {
> +                       regulator-min-microvolt = <1800000>;
> +                       regulator-max-microvolt = <1800000>;
> +               };
> +
> +               pm8994_l9: l9 {
> +                       regulator-min-microvolt = <1800000>;
> +                       regulator-max-microvolt = <1800000>;
> +               };
> +
> +               /* touch  */
> +               pm8994_l10: l10 {
> +                       regulator-min-microvolt = <1800000>;
> +                       regulator-max-microvolt = <1800000>;
> +               };
> +
> +               pm8994_l11: l11 {
> +                       regulator-min-microvolt = <1200000>;
> +                       regulator-max-microvolt = <1200000>;
> +               };
> +
> +               pm8994_l12: l12 {
> +                       regulator-min-microvolt = <1800000>;
> +                       regulator-max-microvolt = <1800000>;
> +                       regulator-system-load = <10000>;
> +                       regulator-allow-set-load;
> +               };
> +
> +               /* sdhc2 vqmmc */
> +               pm8994_l13: l13 {
> +                       regulator-min-microvolt = <1800000>;
> +                       regulator-max-microvolt = <2950000>;
> +                       regulator-system-load = <22000>;
> +                       regulator-allow-set-load;
> +               };
> +
> +               /* camera */
> +               pm8994_l14: l14 {
> +                       regulator-min-microvolt = <1200000>;
> +                       regulator-max-microvolt = <1200000>;
> +                       regulator-system-load = <10000>;
> +                       regulator-allow-set-load;
> +               };
> +
> +               pm8994_l15: l15 {
> +                       regulator-min-microvolt = <1800000>;
> +                       regulator-max-microvolt = <1800000>;
> +               };
> +
> +               pm8994_l16: l16 {
> +                       regulator-min-microvolt = <2700000>;
> +                       regulator-max-microvolt = <2700000>;
> +               };
> +
> +               /* camera */
> +               pm8994_l17: l17 {
> +                       regulator-min-microvolt = <2800000>;
> +                       regulator-max-microvolt = <2800000>;
> +               };
> +
> +               pm8994_l18: l18 {
> +                       regulator-min-microvolt = <2850000>;
> +                       regulator-max-microvolt = <2850000>;
> +               };
> +
> +               /* LCD */
> +               pm8994_l19: l19 {
> +                       regulator-min-microvolt = <3000000>;
> +                       regulator-max-microvolt = <3000000>;
> +               };
> +
> +               /* sdhc1 vmmc */
> +               pm8994_l20: l20 {
> +                       regulator-min-microvolt = <2950000>;
> +                       regulator-max-microvolt = <2950000>;
> +                       regulator-system-load = <570000>;
> +                       regulator-allow-set-load;
> +               };
> +
> +               /* sdhc2 vmmc */
> +               pm8994_l21: l21 {
> +                       regulator-min-microvolt = <2950000>;
> +                       regulator-max-microvolt = <2950000>;
> +                       regulator-system-load = <800000>;
> +                       regulator-allow-set-load;
> +               };
> +
> +               /* touch */
> +               pm8994_l22: l22 {
> +                       regulator-min-microvolt = <3000000>;
> +                       regulator-max-microvolt = <3000000>;
> +               };
> +
> +               /* camera */
> +               pm8994_l23: l23 {
> +                       regulator-min-microvolt = <2800000>;
> +                       regulator-max-microvolt = <2800000>;
> +               };
> +
> +               pm8994_l24: l24 {
> +                       regulator-min-microvolt = <3075000>;
> +                       regulator-max-microvolt = <3150000>;
> +               };
> +
> +               /* IRRC */
> +               pm8994_l25: l25 {
> +                       regulator-min-microvolt = <1000000>;
> +                       regulator-max-microvolt = <1000000>;
> +               };
> +
> +               pm8994_l26: l26 {
> +                       regulator-min-microvolt = <987500>;
> +                       regulator-max-microvolt = <987500>;
> +               };
> +
> +               /* hdmi */
> +               pm8994_l27: l27 {
> +                       regulator-min-microvolt = <1000000>;
> +                       regulator-max-microvolt = <1000000>;
> +               };
> +
> +               pm8994_l28: l28 {
> +                       regulator-min-microvolt = <1000000>;
> +                       regulator-max-microvolt = <1000000>;
> +                       regulator-system-load = <10000>;
> +                       regulator-allow-set-load;
> +               };
> +
> +               /* camera */
> +               pm8994_l29: l29 {
> +                       regulator-min-microvolt = <2800000>;
> +                       regulator-max-microvolt = <2800000>;
> +               };
> +
> +               /* camera */
> +               pm8994_l30: l30 {
> +                       regulator-min-microvolt = <1800000>;
> +                       regulator-max-microvolt = <1800000>;
> +               };
> +
> +               pm8994_l31: l31 {
> +                       regulator-min-microvolt = <1262500>;
> +                       regulator-max-microvolt = <1262500>;
> +               };
> +
> +               pm8994_l32: l32 {
> +                       regulator-min-microvolt = <1800000>;
> +                       regulator-max-microvolt = <1800000>;
> +               };
> +
> +               pm8994_lvs1: lvs1 {};
> +
> +               pm8994_lvs2: lvs2 {};
> +       };
> +
> +       regulators-1 {
> +               compatible = "qcom,rpm-pmi8994-regulators";
> +
> +               vdd_s1-supply = <&vph_pwr>;
> +               vdd_bst_byp-supply = <&vph_pwr>;
> +
> +               pmi8994_s1: s1 {
> +                       regulator-min-microvolt = <1025000>;
> +                       regulator-max-microvolt = <1025000>;
> +               };
> +
> +               /* S2 & S3 - VDD_GFX */
> +
> +               pmi8994_bby: boost-bypass {
> +                       regulator-min-microvolt = <3150000>;
> +                       regulator-max-microvolt = <3600000>;
> +               };
> +       };
> +};
> +
> +&pm8994_resin {
> +       status = "okay";

If I remember correctly, status should be the last property (and few
other cases below).

> +       linux,code = <KEY_VOLUMEDOWN>;
> +};
> +
> +&sdhc1 {
> +       status = "okay";
> +       mmc-hs400-1_8v;
> +       vmmc-supply = <&pm8994_l20>;
> +       vqmmc-supply = <&pm8994_s4>;
> +       non-removable;
> +};
> +
> +&sdhc2 {
> +       status = "okay";
> +       vmmc-supply = <&pm8994_l21>;
> +       vqmmc-supply = <&pm8994_l13>;
> +       cd-gpios = <&pm8994_gpios 8 GPIO_ACTIVE_LOW>;
> +};
> +
> +&tlmm {
> +       hall_sensor_default: hall-sensor-default-state {
> +               pins = "gpio75";
> +               function = "gpio";
> +               drive-strength = <2>;
> +               bias-pull-up;
> +       };
> +};
> --
> 2.44.0
>
>


-- 
With best wishes
Dmitry

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

* Re: [PATCH 0/2] arm64: Add basic support for LG H815
  2024-04-03 10:43 [PATCH 0/2] arm64: Add basic support for LG H815 Alexander Reimelt
  2024-04-03 10:43 ` [PATCH 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
  2024-04-03 10:43 ` [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815) Alexander Reimelt
@ 2024-04-03 14:15 ` Rob Herring
  2024-05-30 13:57 ` [PATCH v2 " Alexander Reimelt
  3 siblings, 0 replies; 18+ messages in thread
From: Rob Herring @ 2024-04-03 14:15 UTC (permalink / raw)
  To: Alexander Reimelt
  Cc: conor+dt, krzysztof.kozlowski+dt, devicetree, linux-kernel,
	robh+dt, andersson, pvorel, linux-arm-msm, konrad.dybcio


On Wed, 03 Apr 2024 10:43:28 +0000, Alexander Reimelt wrote:
> Hello,
> 
> These patches add initial support for the LG H815.
> They are enough to boot the device on postmarketOS
> and have some basic functionality. Connecting to the
> device over USB networking via ssh, buttons, SD-Card,
> eMMC and regulators work. The dtb_checker shows some
> warnings, but they come from the msm8994.dtsi.
> 
> For CPU bring up lk2nd is required. The DMA controller
> module fails to load and from time to time the SMD clock
> driver fails.
> 
> But I hope to prevent duplicate work and make it more accessible.
> 
> Best regards
> Alex
> 
> Alexander Reimelt (2):
>   dt-bindings: arm: qcom: Add LG G4 (h815)
>   arm64: dts: qcom: Add basic support for LG G4 (H815)
> 
>  .../devicetree/bindings/arm/qcom.yaml         |   1 +
>  arch/arm64/boot/dts/qcom/Makefile             |   1 +
>  arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts  | 422 ++++++++++++++++++
>  3 files changed, 424 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
> 
> --
> 2.44.0
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y qcom/msm8992-lg-h815.dtb' for 20240403104415.30636-1-alexander.reimelt@posteo.de:

arch/arm64/boot/dts/qcom/msm8992-lg-h815.dtb: usb@f92f8800: 'interrupt-names' is a required property
	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
arch/arm64/boot/dts/qcom/msm8992-lg-h815.dtb: usb@f92f8800: 'oneOf' conditional failed, one must be fixed:
	'interrupts' is a required property
	'interrupts-extended' is a required property
	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#






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

* Re: [PATCH 1/2] dt-bindings: arm: qcom: Add LG G4 (h815)
  2024-04-03 10:43 ` [PATCH 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
@ 2024-04-03 17:16   ` Rob Herring
  2024-04-03 17:55     ` Petr Vorel
  0 siblings, 1 reply; 18+ messages in thread
From: Rob Herring @ 2024-04-03 17:16 UTC (permalink / raw)
  To: Alexander Reimelt
  Cc: konrad.dybcio, devicetree, pvorel, andersson,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, robh+dt,
	linux-kernel


On Wed, 03 Apr 2024 10:43:29 +0000, Alexander Reimelt wrote:
> International variant of the LG G4 from 2015.
> 
> Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
> ---
>  Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

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


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

* Re: [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815)
  2024-04-03 10:43 ` [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815) Alexander Reimelt
  2024-04-03 10:57   ` Dmitry Baryshkov
@ 2024-04-03 17:37   ` Krzysztof Kozlowski
  2024-04-03 17:59     ` Petr Vorel
  2024-04-03 18:43   ` Petr Vorel
  2 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-03 17:37 UTC (permalink / raw)
  To: Alexander Reimelt, andersson, pvorel, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel

On 03/04/2024 12:43, Alexander Reimelt wrote:
> To make it easier for downstream projects and avoid duplication of work.
> Makes the device bootable and enables all buttons, most regulators, hall sensor, eMMC and SD-Card.
> 
> Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
> ---
>  arch/arm64/boot/dts/qcom/Makefile            |   1 +
>  arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts | 422 +++++++++++++++++++
>  2 files changed, 423 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
> 

Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching.

> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 7d40ec5e7d21..5b7f8741006f 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -62,6 +62,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8956-sony-xperia-loire-kugo.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8956-sony-xperia-loire-suzu.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-10.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-101.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-h815.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-msft-lumia-octagon-talkman.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-xiaomi-libra.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-huawei-angler-rev-101.dtb
> diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts b/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
> new file mode 100644
> index 000000000000..b7fa48337e25
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
> @@ -0,0 +1,422 @@
> +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +/*
> + * MSM8992 LG G4 (h815) device tree.
> + *
> + * Copyright (c) 2024, Alexander Reimelt <alexander.reimelt@posteo.de>
> + */
> +
> +/dts-v1/;
> +
> +#include "msm8992.dtsi"
> +#include "pm8994.dtsi"
> +#include "pmi8994.dtsi"
> +#include <dt-bindings/leds/common.h>
> +
> +/* different mapping */
> +/delete-node/ &cont_splash_mem;
> +
> +/* disabled downstream */
> +/delete-node/ &dfps_data_mem;
> +
> +&CPU0 {
> +	enable-method = "spin-table";
> +};
> +
> +&CPU1 {
> +	enable-method = "spin-table";
> +};
> +
> +&CPU2 {
> +	enable-method = "spin-table";
> +};
> +
> +&CPU3 {
> +	enable-method = "spin-table";
> +};
> +
> +&CPU4 {
> +	enable-method = "spin-table";
> +};
> +
> +&CPU5 {
> +	enable-method = "spin-table";
> +};

That's wrong order. Top level nodes goes after node deletions. Please
observe DTS coding style.

> +
> +/ {
> +	model = "LG G4 (International)";
> +	compatible = "lg,h815", "qcom,msm8992";
> +	chassis-type = "handset";
> +
> +	qcom,msm-id = <251 0>;
> +	qcom,pmic-id = <0x10009 0x1000a 0x00 0x00>;
> +	qcom,board-id = <0xb64 0>;
> +
> +	/* psci is broken */
> +	/delete-node/ psci;
> +
> +	chosen {
> +		bootargs = "earlycon=tty0 console=tty0";

Drop

> +	};
> +
> +	reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		spin-table@6000000 {
> +			reg = <0 0x6000000 0 0x1000>;
> +			no-map;
> +		};
> +
> +		ramoops@ff00000 {
> +			compatible = "ramoops";
> +			reg = <0x0 0xff00000 0x0 0x100000>;
> +			console-size = <0x20000>;
> +			pmsg-size = <0x20000>;
> +			record-size = <0x10000>;
> +			ecc-size = <0x10>;
> +		};
> +
> +		cont_splash_mem: fb@3400000 {
> +			compatible = "framebuffer";
> +			reg = <0 0x3400000 0 0xc00000>;
> +			no-map;
> +		};
> +
> +		crash_fb_mem: crash_fb@4000000 {

No undercores in node names. Please open DTS coding style and follow it.

....

> +
> +&pm8994_resin {
> +	status = "okay";

status is the last property.



Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: arm: qcom: Add LG G4 (h815)
  2024-04-03 17:16   ` Rob Herring
@ 2024-04-03 17:55     ` Petr Vorel
  0 siblings, 0 replies; 18+ messages in thread
From: Petr Vorel @ 2024-04-03 17:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Alexander Reimelt, konrad.dybcio, devicetree, andersson,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, robh+dt,
	linux-kernel, Petr Vorel

Hi all,

> On Wed, 03 Apr 2024 10:43:29 +0000, Alexander Reimelt wrote:
> > International variant of the LG G4 from 2015.

> > Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
> > ---
> >  Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
> >  1 file changed, 1 insertion(+)


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

Reviewed-by: Petr Vorel <petr.vorel@gmail.com>

Kind regards,
Petr

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

* Re: [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815)
  2024-04-03 17:37   ` Krzysztof Kozlowski
@ 2024-04-03 17:59     ` Petr Vorel
  0 siblings, 0 replies; 18+ messages in thread
From: Petr Vorel @ 2024-04-03 17:59 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alexander Reimelt, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel

Hi all,

> On 03/04/2024 12:43, Alexander Reimelt wrote:
> > To make it easier for downstream projects and avoid duplication of work.
> > Makes the device bootable and enables all buttons, most regulators, hall sensor, eMMC and SD-Card.

> > Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
> > ---
> >  arch/arm64/boot/dts/qcom/Makefile            |   1 +
> >  arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts | 422 +++++++++++++++++++
> >  2 files changed, 423 insertions(+)
> >  create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts


> Please use subject prefixes matching the subsystem. You can get them for
> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
> your patch is touching.

@Alexander arm: would be for 32bit. Correct subject prefix is:
arm64: dts: qcom: msm8992-lg-h815:

Krzysztof's comments are obviously correct.
Please Cc me on v2 to my gmail private mail. Thanks!

Kind regards,
Petr

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

* Re: [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815)
  2024-04-03 10:43 ` [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815) Alexander Reimelt
  2024-04-03 10:57   ` Dmitry Baryshkov
  2024-04-03 17:37   ` Krzysztof Kozlowski
@ 2024-04-03 18:43   ` Petr Vorel
  2 siblings, 0 replies; 18+ messages in thread
From: Petr Vorel @ 2024-04-03 18:43 UTC (permalink / raw)
  To: Alexander Reimelt
  Cc: andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	conor+dt, linux-arm-msm, devicetree, linux-kernel,
	Dmitry Baryshkov

Hi,

> To make it easier for downstream projects and avoid duplication of work.
> Makes the device bootable and enables all buttons, most regulators, hall sensor, eMMC and SD-Card.

> Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
> ---
>  arch/arm64/boot/dts/qcom/Makefile            |   1 +
>  arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts | 422 +++++++++++++++++++
>  2 files changed, 423 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts

> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 7d40ec5e7d21..5b7f8741006f 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -62,6 +62,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8956-sony-xperia-loire-kugo.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8956-sony-xperia-loire-suzu.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-10.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-101.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-h815.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-msft-lumia-octagon-talkman.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-xiaomi-libra.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-huawei-angler-rev-101.dtb
> diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts b/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
> new file mode 100644
> index 000000000000..b7fa48337e25
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
> @@ -0,0 +1,422 @@
> +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +/*
> + * MSM8992 LG G4 (h815) device tree.
> + *
> + * Copyright (c) 2024, Alexander Reimelt <alexander.reimelt@posteo.de>
> + */
> +
> +/dts-v1/;
> +
> +#include "msm8992.dtsi"
> +#include "pm8994.dtsi"
> +#include "pmi8994.dtsi"
> +#include <dt-bindings/leds/common.h>
> +
> +/* different mapping */
> +/delete-node/ &cont_splash_mem;
> +
> +/* disabled downstream */
> +/delete-node/ &dfps_data_mem;
> +
> +&CPU0 {
> +	enable-method = "spin-table";
> +};
> +
> +&CPU1 {
> +	enable-method = "spin-table";
> +};
> +
> +&CPU2 {
> +	enable-method = "spin-table";
> +};
> +
> +&CPU3 {
> +	enable-method = "spin-table";
> +};
> +
> +&CPU4 {
> +	enable-method = "spin-table";
> +};
> +
> +&CPU5 {
> +	enable-method = "spin-table";
> +};
> +
> +/ {
> +	model = "LG G4 (International)";
I'm not sure if " (International)" shouldn't be dropped.
I guess maintainers will know.

> +	compatible = "lg,h815", "qcom,msm8992";
> +	chassis-type = "handset";
> +
> +	qcom,msm-id = <251 0>;
> +	qcom,pmic-id = <0x10009 0x1000a 0x00 0x00>;
> +	qcom,board-id = <0xb64 0>;
> +
> +	/* psci is broken */
> +	/delete-node/ psci;
> +
> +	chosen {
> +		bootargs = "earlycon=tty0 console=tty0";
> +	};
> +
> +	reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		spin-table@6000000 {
> +			reg = <0 0x6000000 0 0x1000>;
> +			no-map;
> +		};
> +
> +		ramoops@ff00000 {
> +			compatible = "ramoops";
> +			reg = <0x0 0xff00000 0x0 0x100000>;
> +			console-size = <0x20000>;
> +			pmsg-size = <0x20000>;
> +			record-size = <0x10000>;
> +			ecc-size = <0x10>;
> +		};
> +
> +		cont_splash_mem: fb@3400000 {
> +			compatible = "framebuffer";
> +			reg = <0 0x3400000 0 0xc00000>;
> +			no-map;
> +		};
> +
> +		crash_fb_mem: crash_fb@4000000 {
> +			reg = <0 0x4000000 0 0xc00000>;
> +			no-map;
> +		};
> +	};
> +
> +	gpio-hall-sensor {
> +		compatible = "gpio-keys";
> +
> +		pinctrl-0 = <&hall_sensor_default>;
> +		pinctrl-names = "default";
> +
> +		label = "Hall Effect Sensor";
> +
> +		event-hall-sensor {
> +			gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
> +			label = "hall effect sensor";
> +			linux,input-type = <EV_SW>;
> +			linux,code = <SW_LID>;
> +			linux,can-disable;
> +			wakeup-source;
> +		};
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +
> +		key-vol-up {
> +			label = "volume up";
> +			gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
> +			linux,code = <KEY_VOLUMEUP>;
> +			wakeup-source;
> +			debounce-interval = <15>;
> +		};
> +	};
> +};
> +
> +&pm8994_spmi_regulators {
> +	vdd_s8-supply = <&vph_pwr>;
> +	vdd_s11-supply = <&vph_pwr>;
> +
> +	pm8994_s8: s8 {
> +		regulator-min-microvolt = <700000>;
> +		regulator-max-microvolt = <1180000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +
> +	pm8994_s11: s11 {
> +		regulator-min-microvolt = <700000>;
> +		regulator-max-microvolt = <1225000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +};
> +
> +&rpm_requests {
> +	regulators-0 {
> +		compatible = "qcom,rpm-pm8994-regulators";
> +
> +		vdd_s3-supply = <&vph_pwr>;
> +		vdd_s4-supply = <&vph_pwr>;
> +		vdd_s5-supply = <&vph_pwr>;
> +		vdd_s7-supply = <&vph_pwr>;
> +		vdd_l1-supply = <&pmi8994_s1>;
> +		vdd_l2_26_28-supply = <&pm8994_s3>;
> +		vdd_l3_11-supply = <&pm8994_s3>;
> +		vdd_l4_27_31-supply = <&pm8994_s3>;
> +		vdd_l5_7-supply = <&pm8994_s5>;
> +		vdd_l6_12_32-supply = <&pm8994_s5>;
> +		vdd_l8_16_30-supply = <&vph_pwr>;
> +		vdd_l9_10_18_22-supply = <&pmi8994_bby>;
> +		vdd_l13_19_23_24-supply = <&pmi8994_bby>;
> +		vdd_l14_15-supply = <&pm8994_s5>;
> +		vdd_l17_29-supply = <&pmi8994_bby>;
> +		vdd_l20_21-supply = <&pmi8994_bby>;
> +		vdd_l25-supply = <&pm8994_s5>;
> +		vdd_lvs1_2-supply = <&pm8994_s4>;
> +
> +		pm8994_s3: s3 {
> +			regulator-min-microvolt = <1300000>;
> +			regulator-max-microvolt = <1300000>;
> +		};
> +
> +		/* sdhc1 vqmmc and bcm */
> +		pm8994_s4: s4 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +			regulator-system-load = <325000>;
> +			regulator-allow-set-load;
> +		};
> +
> +		pm8994_s5: s5 {
> +			regulator-min-microvolt = <2150000>;
> +			regulator-max-microvolt = <2150000>;
> +		};
> +
> +		pm8994_s7: s7 {
There are several unused regulators.

I remember Bjorn back at the time suggested [1] me to add only regulators which
are actually needed.

Kind regards,
Petr

[1] https://lore.kernel.org/linux-arm-msm/20230407165730.jfupmfiul6qb7yl3@ripper/

> +			regulator-min-microvolt = <1000000>;
> +			regulator-max-microvolt = <1000000>;
> +		};
> +
> +		pm8994_l1: l1 {
> +			regulator-min-microvolt = <1000000>;
> +			regulator-max-microvolt = <1000000>;
> +		};
> +
> +		pm8994_l2: l2 {
> +			regulator-min-microvolt = <1250000>;
> +			regulator-max-microvolt = <1250000>;
> +			regulator-system-load = <10000>;
> +			regulator-allow-set-load;
> +		};
> +
> +		/* camera */
> +		pm8994_l3: l3 {
> +			regulator-min-microvolt = <1050000>;
> +			regulator-max-microvolt = <1050000>;
> +		};
> +
> +		pm8994_l4: l4 {
> +			regulator-min-microvolt = <1225000>;
> +			regulator-max-microvolt = <1225000>;
> +		};
> +
> +		/* L5 is inaccessible from RPM */
> +
> +		pm8994_l6: l6 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		/* L7 is inaccessible from RPM */
> +
> +		pm8994_l8: l8 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		pm8994_l9: l9 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		/* touch  */
> +		pm8994_l10: l10 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		pm8994_l11: l11 {
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1200000>;
> +		};
> +
> +		pm8994_l12: l12 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +			regulator-system-load = <10000>;
> +			regulator-allow-set-load;
> +		};
> +
> +		/* sdhc2 vqmmc */
> +		pm8994_l13: l13 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <2950000>;
> +			regulator-system-load = <22000>;
> +			regulator-allow-set-load;
> +		};
> +
> +		/* camera */
> +		pm8994_l14: l14 {
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1200000>;
> +			regulator-system-load = <10000>;
> +			regulator-allow-set-load;
> +		};
> +
> +		pm8994_l15: l15 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		pm8994_l16: l16 {
> +			regulator-min-microvolt = <2700000>;
> +			regulator-max-microvolt = <2700000>;
> +		};
> +
> +		/* camera */
> +		pm8994_l17: l17 {
> +			regulator-min-microvolt = <2800000>;
> +			regulator-max-microvolt = <2800000>;
> +		};
> +
> +		pm8994_l18: l18 {
> +			regulator-min-microvolt = <2850000>;
> +			regulator-max-microvolt = <2850000>;
> +		};
> +
> +		/* LCD */
> +		pm8994_l19: l19 {
> +			regulator-min-microvolt = <3000000>;
> +			regulator-max-microvolt = <3000000>;
> +		};
> +
> +		/* sdhc1 vmmc */
> +		pm8994_l20: l20 {
> +			regulator-min-microvolt = <2950000>;
> +			regulator-max-microvolt = <2950000>;
> +			regulator-system-load = <570000>;
> +			regulator-allow-set-load;
> +		};
> +
> +		/* sdhc2 vmmc */
> +		pm8994_l21: l21 {
> +			regulator-min-microvolt = <2950000>;
> +			regulator-max-microvolt = <2950000>;
> +			regulator-system-load = <800000>;
> +			regulator-allow-set-load;
> +		};
> +
> +		/* touch */
> +		pm8994_l22: l22 {
> +			regulator-min-microvolt = <3000000>;
> +			regulator-max-microvolt = <3000000>;
> +		};
> +
> +		/* camera */
> +		pm8994_l23: l23 {
> +			regulator-min-microvolt = <2800000>;
> +			regulator-max-microvolt = <2800000>;
> +		};
> +
> +		pm8994_l24: l24 {
> +			regulator-min-microvolt = <3075000>;
> +			regulator-max-microvolt = <3150000>;
> +		};
> +
> +		/* IRRC */
> +		pm8994_l25: l25 {
> +			regulator-min-microvolt = <1000000>;
> +			regulator-max-microvolt = <1000000>;
> +		};
> +
> +		pm8994_l26: l26 {
> +			regulator-min-microvolt = <987500>;
> +			regulator-max-microvolt = <987500>;
> +		};
> +
> +		/* hdmi */
> +		pm8994_l27: l27 {
> +			regulator-min-microvolt = <1000000>;
> +			regulator-max-microvolt = <1000000>;
> +		};
> +
> +		pm8994_l28: l28 {
> +			regulator-min-microvolt = <1000000>;
> +			regulator-max-microvolt = <1000000>;
> +			regulator-system-load = <10000>;
> +			regulator-allow-set-load;
> +		};
> +
> +		/* camera */
> +		pm8994_l29: l29 {
> +			regulator-min-microvolt = <2800000>;
> +			regulator-max-microvolt = <2800000>;
> +		};
> +
> +		/* camera */
> +		pm8994_l30: l30 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		pm8994_l31: l31 {
> +			regulator-min-microvolt = <1262500>;
> +			regulator-max-microvolt = <1262500>;
> +		};
> +
> +		pm8994_l32: l32 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		pm8994_lvs1: lvs1 {};
> +
> +		pm8994_lvs2: lvs2 {};
> +	};
> +
> +	regulators-1 {
> +		compatible = "qcom,rpm-pmi8994-regulators";
> +
> +		vdd_s1-supply = <&vph_pwr>;
> +		vdd_bst_byp-supply = <&vph_pwr>;
> +
> +		pmi8994_s1: s1 {
> +			regulator-min-microvolt = <1025000>;
> +			regulator-max-microvolt = <1025000>;
> +		};
> +
> +		/* S2 & S3 - VDD_GFX */
> +
> +		pmi8994_bby: boost-bypass {
> +			regulator-min-microvolt = <3150000>;
> +			regulator-max-microvolt = <3600000>;
> +		};
> +	};
> +};
> +
> +&pm8994_resin {
> +	status = "okay";
> +	linux,code = <KEY_VOLUMEDOWN>;
> +};
> +
> +&sdhc1 {
> +	status = "okay";
> +	mmc-hs400-1_8v;
> +	vmmc-supply = <&pm8994_l20>;
> +	vqmmc-supply = <&pm8994_s4>;
> +	non-removable;
> +};
> +
> +&sdhc2 {
> +	status = "okay";
> +	vmmc-supply = <&pm8994_l21>;
> +	vqmmc-supply = <&pm8994_l13>;
> +	cd-gpios = <&pm8994_gpios 8 GPIO_ACTIVE_LOW>;
> +};
> +
> +&tlmm {
> +	hall_sensor_default: hall-sensor-default-state {
> +		pins = "gpio75";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-pull-up;
> +	};
> +};

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

* [PATCH v2 0/2] arm64: Add basic support for LG H815
  2024-04-03 10:43 [PATCH 0/2] arm64: Add basic support for LG H815 Alexander Reimelt
                   ` (2 preceding siblings ...)
  2024-04-03 14:15 ` [PATCH 0/2] arm64: Add basic support for LG H815 Rob Herring
@ 2024-05-30 13:57 ` Alexander Reimelt
  2024-05-30 13:57   ` [PATCH v2 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
                     ` (3 more replies)
  3 siblings, 4 replies; 18+ messages in thread
From: Alexander Reimelt @ 2024-05-30 13:57 UTC (permalink / raw)
  To: andersson, petr.vorel, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel

Hello

Thanks for your time reviewing my first revision.
Changes:
- status is now the last property
- corrected the node order
- droped bootargs
- corrected subject prefix
- removed unused regulators

Sorry for the delay, I lost access to my device for a while.

Best regards
Alex

Alexander Reimelt (2):
  dt-bindings: arm: qcom: Add LG G4 (h815)
  arm64: dts: qcom: msm8992-lg-h815: Initial support for LG G4 (H815)

 .../devicetree/bindings/arm/qcom.yaml         |   1 +
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts  | 234 ++++++++++++++++++
 3 files changed, 236 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts

-- 
2.45.1


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

* [PATCH v2 1/2] dt-bindings: arm: qcom: Add LG G4 (h815)
  2024-05-30 13:57 ` [PATCH v2 " Alexander Reimelt
@ 2024-05-30 13:57   ` Alexander Reimelt
  2024-05-30 14:49     ` Petr Vorel
  2024-05-31  8:17     ` Krzysztof Kozlowski
  2024-05-30 13:57   ` [PATCH v2 2/2] arm64: dts: qcom: msm8992-lg-h815: Initial support for LG G4 (H815) Alexander Reimelt
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 18+ messages in thread
From: Alexander Reimelt @ 2024-05-30 13:57 UTC (permalink / raw)
  To: andersson, petr.vorel, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel

International variant of the LG G4 from 2015.

Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 66beaac60e1d..76aefd4aac67 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -237,6 +237,7 @@ properties:
       - items:
           - enum:
               - lg,bullhead
+              - lg,h815
               - microsoft,talkman
               - xiaomi,libra
           - const: qcom,msm8992
-- 
2.45.1


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

* [PATCH v2 2/2] arm64: dts: qcom: msm8992-lg-h815: Initial support for LG G4 (H815)
  2024-05-30 13:57 ` [PATCH v2 " Alexander Reimelt
  2024-05-30 13:57   ` [PATCH v2 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
@ 2024-05-30 13:57   ` Alexander Reimelt
  2024-06-18 13:32     ` Konrad Dybcio
  2024-05-30 16:54   ` [PATCH v2 0/2] arm64: Add basic support for LG H815 Dmitry Baryshkov
  2024-06-04 15:28   ` Rob Herring (Arm)
  3 siblings, 1 reply; 18+ messages in thread
From: Alexander Reimelt @ 2024-05-30 13:57 UTC (permalink / raw)
  To: andersson, petr.vorel, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel

To make it easier for downstream projects and avoid duplication of work.
Makes the device bootable and enables all buttons, hall sensor, eMMC and SD-Card.

Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
---
 arch/arm64/boot/dts/qcom/Makefile            |   1 +
 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts | 234 +++++++++++++++++++
 2 files changed, 235 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 7d40ec5e7d21..5b7f8741006f 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -62,6 +62,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8956-sony-xperia-loire-kugo.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8956-sony-xperia-loire-suzu.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-10.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-101.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-h815.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-msft-lumia-octagon-talkman.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-xiaomi-libra.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-huawei-angler-rev-101.dtb
diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts b/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
new file mode 100644
index 000000000000..5f55abec82aa
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
@@ -0,0 +1,234 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * MSM8992 LG G4 (h815) device tree.
+ *
+ * Copyright (c) 2024, Alexander Reimelt <alexander.reimelt@posteo.de>
+ */
+
+/dts-v1/;
+
+#include "msm8992.dtsi"
+#include "pm8994.dtsi"
+#include "pmi8994.dtsi"
+#include <dt-bindings/leds/common.h>
+
+/* different mapping */
+/delete-node/ &cont_splash_mem;
+
+/* disabled downstream */
+/delete-node/ &dfps_data_mem;
+
+/ {
+	model = "LG G4 (H815)";
+	compatible = "lg,h815", "qcom,msm8992";
+	chassis-type = "handset";
+
+	qcom,msm-id = <251 0>;
+	qcom,pmic-id = <0x10009 0x1000a 0x00 0x00>;
+	qcom,board-id = <0xb64 0>;
+
+	/* psci is broken */
+	/delete-node/ psci;
+
+	chosen {};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		spin-table@6000000 {
+			reg = <0 0x6000000 0 0x1000>;
+			no-map;
+		};
+
+		ramoops@ff00000 {
+			compatible = "ramoops";
+			reg = <0x0 0xff00000 0x0 0x100000>;
+			console-size = <0x20000>;
+			pmsg-size = <0x20000>;
+			record-size = <0x10000>;
+			ecc-size = <0x10>;
+		};
+
+		cont_splash_mem: fb@3400000 {
+			compatible = "framebuffer";
+			reg = <0 0x3400000 0 0xc00000>;
+			no-map;
+		};
+
+		crash_fb_mem: crash-fb@4000000 {
+			reg = <0 0x4000000 0 0xc00000>;
+			no-map;
+		};
+	};
+
+	gpio-hall-sensor {
+		compatible = "gpio-keys";
+
+		pinctrl-0 = <&hall_sensor_default>;
+		pinctrl-names = "default";
+
+		label = "Hall Effect Sensor";
+
+		event-hall-sensor {
+			gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
+			label = "hall effect sensor";
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_LID>;
+			linux,can-disable;
+			wakeup-source;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		key-vol-up {
+			label = "volume up";
+			gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			wakeup-source;
+			debounce-interval = <15>;
+		};
+	};
+};
+
+&CPU0 {
+	enable-method = "spin-table";
+};
+
+&CPU1 {
+	enable-method = "spin-table";
+};
+
+&CPU2 {
+	enable-method = "spin-table";
+};
+
+&CPU3 {
+	enable-method = "spin-table";
+};
+
+&CPU4 {
+	enable-method = "spin-table";
+};
+
+&CPU5 {
+	enable-method = "spin-table";
+};
+
+&pm8994_resin {
+	linux,code = <KEY_VOLUMEDOWN>;
+	status = "okay";
+};
+
+&rpm_requests {
+	regulators-0 {
+		compatible = "qcom,rpm-pm8994-regulators";
+
+		vdd_s3-supply = <&vph_pwr>;
+		vdd_s4-supply = <&vph_pwr>;
+		vdd_s5-supply = <&vph_pwr>;
+		vdd_s7-supply = <&vph_pwr>;
+		vdd_l1-supply = <&pmi8994_s1>;
+		vdd_l2_26_28-supply = <&pm8994_s3>;
+		vdd_l3_11-supply = <&pm8994_s3>;
+		vdd_l4_27_31-supply = <&pm8994_s3>;
+		vdd_l5_7-supply = <&pm8994_s5>;
+		vdd_l6_12_32-supply = <&pm8994_s5>;
+		vdd_l8_16_30-supply = <&vph_pwr>;
+		vdd_l9_10_18_22-supply = <&pmi8994_bby>;
+		vdd_l13_19_23_24-supply = <&pmi8994_bby>;
+		vdd_l14_15-supply = <&pm8994_s5>;
+		vdd_l17_29-supply = <&pmi8994_bby>;
+		vdd_l20_21-supply = <&pmi8994_bby>;
+		vdd_l25-supply = <&pm8994_s5>;
+		vdd_lvs1_2-supply = <&pm8994_s4>;
+
+		pm8994_s3: s3 {
+			regulator-min-microvolt = <1300000>;
+			regulator-max-microvolt = <1300000>;
+		};
+
+		/* sdhc1 vqmmc and bcm */
+		pm8994_s4: s4 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-system-load = <325000>;
+			regulator-allow-set-load;
+		};
+
+		pm8994_s5: s5 {
+			regulator-min-microvolt = <2150000>;
+			regulator-max-microvolt = <2150000>;
+		};
+
+		/* sdhc2 vqmmc */
+		pm8994_l13: l13 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2950000>;
+			regulator-system-load = <22000>;
+			regulator-allow-set-load;
+		};
+
+		/* sdhc1 vmmc */
+		pm8994_l20: l20 {
+			regulator-min-microvolt = <2950000>;
+			regulator-max-microvolt = <2950000>;
+			regulator-system-load = <570000>;
+			regulator-allow-set-load;
+		};
+
+		/* sdhc2 vmmc */
+		pm8994_l21: l21 {
+			regulator-min-microvolt = <2950000>;
+			regulator-max-microvolt = <2950000>;
+			regulator-system-load = <800000>;
+			regulator-allow-set-load;
+		};
+	};
+
+	regulators-1 {
+		compatible = "qcom,rpm-pmi8994-regulators";
+
+		vdd_s1-supply = <&vph_pwr>;
+		vdd_bst_byp-supply = <&vph_pwr>;
+
+		pmi8994_s1: s1 {
+			regulator-min-microvolt = <1025000>;
+			regulator-max-microvolt = <1025000>;
+		};
+
+		/* S2 & S3 - VDD_GFX */
+
+		pmi8994_bby: boost-bypass {
+			regulator-min-microvolt = <3150000>;
+			regulator-max-microvolt = <3600000>;
+		};
+	};
+};
+
+&sdhc1 {
+	mmc-hs400-1_8v;
+	vmmc-supply = <&pm8994_l20>;
+	vqmmc-supply = <&pm8994_s4>;
+	non-removable;
+	status = "okay";
+};
+
+&sdhc2 {
+	vmmc-supply = <&pm8994_l21>;
+	vqmmc-supply = <&pm8994_l13>;
+	cd-gpios = <&pm8994_gpios 8 GPIO_ACTIVE_LOW>;
+	status = "okay";
+};
+
+&tlmm {
+	hall_sensor_default: hall-sensor-default-state {
+		pins = "gpio75";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+};
-- 
2.45.1


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

* Re: [PATCH v2 1/2] dt-bindings: arm: qcom: Add LG G4 (h815)
  2024-05-30 13:57   ` [PATCH v2 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
@ 2024-05-30 14:49     ` Petr Vorel
  2024-05-31  8:17     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 18+ messages in thread
From: Petr Vorel @ 2024-05-30 14:49 UTC (permalink / raw)
  To: Alexander Reimelt
  Cc: andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	conor+dt, linux-arm-msm, devicetree, linux-kernel

Hi all,

> International variant of the LG G4 from 2015.

> Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
> ---
>  Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
>  1 file changed, 1 insertion(+)

> diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
> index 66beaac60e1d..76aefd4aac67 100644
> --- a/Documentation/devicetree/bindings/arm/qcom.yaml
> +++ b/Documentation/devicetree/bindings/arm/qcom.yaml
> @@ -237,6 +237,7 @@ properties:
>        - items:
>            - enum:
>                - lg,bullhead
> +              - lg,h815
>                - microsoft,talkman
>                - xiaomi,libra
>            - const: qcom,msm8992

Reviewed-by: Petr Vorel <petr.vorel@gmail.com>

Kind regards,
Petr

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

* Re: [PATCH v2 0/2] arm64: Add basic support for LG H815
  2024-05-30 13:57 ` [PATCH v2 " Alexander Reimelt
  2024-05-30 13:57   ` [PATCH v2 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
  2024-05-30 13:57   ` [PATCH v2 2/2] arm64: dts: qcom: msm8992-lg-h815: Initial support for LG G4 (H815) Alexander Reimelt
@ 2024-05-30 16:54   ` Dmitry Baryshkov
  2024-06-04 15:28   ` Rob Herring (Arm)
  3 siblings, 0 replies; 18+ messages in thread
From: Dmitry Baryshkov @ 2024-05-30 16:54 UTC (permalink / raw)
  To: Alexander Reimelt
  Cc: andersson, petr.vorel, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel

On Thu, May 30, 2024 at 01:57:40PM +0000, Alexander Reimelt wrote:
> Hello
> 
> Thanks for your time reviewing my first revision.
> Changes:
> - status is now the last property
> - corrected the node order
> - droped bootargs
> - corrected subject prefix
> - removed unused regulators
> 
> Sorry for the delay, I lost access to my device for a while.

Please don't send new versions of the patch as a reply to the previous
iteration. It messes up threading and might result in the patchset being
mishandled or ignored by the tools.

> 
> Best regards
> Alex
> 
> Alexander Reimelt (2):
>   dt-bindings: arm: qcom: Add LG G4 (h815)
>   arm64: dts: qcom: msm8992-lg-h815: Initial support for LG G4 (H815)
> 
>  .../devicetree/bindings/arm/qcom.yaml         |   1 +
>  arch/arm64/boot/dts/qcom/Makefile             |   1 +
>  arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts  | 234 ++++++++++++++++++
>  3 files changed, 236 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
> 
> -- 
> 2.45.1
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 1/2] dt-bindings: arm: qcom: Add LG G4 (h815)
  2024-05-30 13:57   ` [PATCH v2 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
  2024-05-30 14:49     ` Petr Vorel
@ 2024-05-31  8:17     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2024-05-31  8:17 UTC (permalink / raw)
  To: Alexander Reimelt, andersson, petr.vorel, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel

On 30/05/2024 15:57, Alexander Reimelt wrote:
> International variant of the LG G4 from 2015.
> 
> Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
> ---
>  Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
>  1 file changed, 1 insertion(+)

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

Best regards,
Krzysztof


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

* Re: [PATCH v2 0/2] arm64: Add basic support for LG H815
  2024-05-30 13:57 ` [PATCH v2 " Alexander Reimelt
                     ` (2 preceding siblings ...)
  2024-05-30 16:54   ` [PATCH v2 0/2] arm64: Add basic support for LG H815 Dmitry Baryshkov
@ 2024-06-04 15:28   ` Rob Herring (Arm)
  3 siblings, 0 replies; 18+ messages in thread
From: Rob Herring (Arm) @ 2024-06-04 15:28 UTC (permalink / raw)
  To: Alexander Reimelt
  Cc: conor+dt, linux-kernel, petr.vorel, robh+dt, linux-arm-msm,
	konrad.dybcio, krzysztof.kozlowski+dt, andersson, devicetree


On Thu, 30 May 2024 13:57:40 +0000, Alexander Reimelt wrote:
> Hello
> 
> Thanks for your time reviewing my first revision.
> Changes:
> - status is now the last property
> - corrected the node order
> - droped bootargs
> - corrected subject prefix
> - removed unused regulators
> 
> Sorry for the delay, I lost access to my device for a while.
> 
> Best regards
> Alex
> 
> Alexander Reimelt (2):
>   dt-bindings: arm: qcom: Add LG G4 (h815)
>   arm64: dts: qcom: msm8992-lg-h815: Initial support for LG G4 (H815)
> 
>  .../devicetree/bindings/arm/qcom.yaml         |   1 +
>  arch/arm64/boot/dts/qcom/Makefile             |   1 +
>  arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts  | 234 ++++++++++++++++++
>  3 files changed, 236 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/msm8992-lg-h815.dts
> 
> --
> 2.45.1
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y qcom/msm8992-lg-h815.dtb' for 20240530135922.23326-1-alexander.reimelt@posteo.de:

arch/arm64/boot/dts/qcom/msm8992-lg-h815.dtb: usb@f92f8800: 'interrupt-names' is a required property
	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
arch/arm64/boot/dts/qcom/msm8992-lg-h815.dtb: usb@f92f8800: 'oneOf' conditional failed, one must be fixed:
	'interrupts' is a required property
	'interrupts-extended' is a required property
	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#






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

* Re: [PATCH v2 2/2] arm64: dts: qcom: msm8992-lg-h815: Initial support for LG G4 (H815)
  2024-05-30 13:57   ` [PATCH v2 2/2] arm64: dts: qcom: msm8992-lg-h815: Initial support for LG G4 (H815) Alexander Reimelt
@ 2024-06-18 13:32     ` Konrad Dybcio
  0 siblings, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2024-06-18 13:32 UTC (permalink / raw)
  To: Alexander Reimelt, andersson, petr.vorel, robh+dt,
	krzysztof.kozlowski+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel



On 5/30/24 15:57, Alexander Reimelt wrote:
> To make it easier for downstream projects and avoid duplication of work.
> Makes the device bootable and enables all buttons, hall sensor, eMMC and SD-Card.
> 
> Signed-off-by: Alexander Reimelt <alexander.reimelt@posteo.de>
> ---

[...]

> +	chosen {};

There's already one in msm8994.dtsi

> +
> +	reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		spin-table@6000000 {
> +			reg = <0 0x6000000 0 0x1000>;

Please pad the non-zero size part to 8 hex digits and use 0x0 instead
of 0 consistently

> +			no-map;
> +		};
> +
> +		ramoops@ff00000 {
> +			compatible = "ramoops";
> +			reg = <0x0 0xff00000 0x0 0x100000>;
> +			console-size = <0x20000>;
> +			pmsg-size = <0x20000>;
> +			record-size = <0x10000>;
> +			ecc-size = <0x10>;
> +		};
> +
> +		cont_splash_mem: fb@3400000 {
> +			compatible = "framebuffer";

Doesn't seem like a documented compatible, you're probably looking for
"simple-framebuffer", see:

Documentation/devicetree/bindings/display/simple-framebuffer.yaml


The rest looks OK!

Konrad

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

end of thread, other threads:[~2024-06-18 13:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-03 10:43 [PATCH 0/2] arm64: Add basic support for LG H815 Alexander Reimelt
2024-04-03 10:43 ` [PATCH 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
2024-04-03 17:16   ` Rob Herring
2024-04-03 17:55     ` Petr Vorel
2024-04-03 10:43 ` [PATCH 2/2] arm64: dts: qcom: Add basic support for LG G4 (H815) Alexander Reimelt
2024-04-03 10:57   ` Dmitry Baryshkov
2024-04-03 17:37   ` Krzysztof Kozlowski
2024-04-03 17:59     ` Petr Vorel
2024-04-03 18:43   ` Petr Vorel
2024-04-03 14:15 ` [PATCH 0/2] arm64: Add basic support for LG H815 Rob Herring
2024-05-30 13:57 ` [PATCH v2 " Alexander Reimelt
2024-05-30 13:57   ` [PATCH v2 1/2] dt-bindings: arm: qcom: Add LG G4 (h815) Alexander Reimelt
2024-05-30 14:49     ` Petr Vorel
2024-05-31  8:17     ` Krzysztof Kozlowski
2024-05-30 13:57   ` [PATCH v2 2/2] arm64: dts: qcom: msm8992-lg-h815: Initial support for LG G4 (H815) Alexander Reimelt
2024-06-18 13:32     ` Konrad Dybcio
2024-05-30 16:54   ` [PATCH v2 0/2] arm64: Add basic support for LG H815 Dmitry Baryshkov
2024-06-04 15:28   ` Rob Herring (Arm)

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