devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals
@ 2025-09-20  1:46 Eric Gonçalves
  2025-09-20  1:46 ` [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys Eric Gonçalves
                   ` (5 more replies)
  0 siblings, 6 replies; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-20  1:46 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

This patchset adds support for multiple devices found on the Galaxy S22,
side buttons, touchscreen, max77705 charger/fuelgauge, RTC and UFS. It
depends on "Input: add support for the STM FTS2BA61Y touchscreen" for
TS to be enabled.

Thanks!

Eric Gonçalves (5):
  arm64: dts: qcom: r0q: add gpio keys
  arm64: dts: qcom: r0q: add touchscreen support
  arm64: dts: qcom: r0q: enable max77705 PMIC
  arm64: dts: qcom: r0q: enable hardware clocks
  arm64: dts: qcom: r0q: enable ufs storage

 .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 308 +++++++++++++++++-
 1 file changed, 299 insertions(+), 9 deletions(-)

-- 
2.51.0


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

* [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys
  2025-09-20  1:46 [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals Eric Gonçalves
@ 2025-09-20  1:46 ` Eric Gonçalves
  2025-09-20 15:45   ` Dmitry Baryshkov
  2025-09-20  1:46 ` [PATCH 2/5] arm64: dts: qcom: r0q: add touchscreen support Eric Gonçalves
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-20  1:46 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

Add GPIO keys support to Samsung Galaxy S22 (r0q).

Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
---
 .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 53 +++++++++++++++----
 1 file changed, 44 insertions(+), 9 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
index 880d74ae6032..70e953824996 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
@@ -2,11 +2,12 @@
 
 /dts-v1/;
 
+#include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
-
 #include "sm8450.dtsi"
 #include "pm8350.dtsi"
 #include "pm8350c.dtsi"
+#include "pmk8350.dtsi"
 
 / {
 	model = "Samsung Galaxy S22 5G";
@@ -28,13 +29,19 @@ framebuffer: framebuffer@b8000000 {
 		};
 	};
 
-	vph_pwr: regulator-vph-pwr {
-		compatible = "regulator-fixed";
-		regulator-name = "vph_pwr";
-		regulator-min-microvolt = <3700000>;
-		regulator-max-microvolt = <3700000>;
-		regulator-always-on;
-		regulator-boot-on;
+	gpio-keys {
+		compatible = "gpio-keys";
+		autorepeat;
+
+		pinctrl-0 = <&vol_up_n>;
+		pinctrl-names = "default";
+
+		key-vol-up {
+			label = "Volume Up";
+			linux,code = <KEY_VOLUMEUP>;
+			gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>;
+			debounce-interval = <15>;
+		};
 	};
 
 	reserved-memory {
@@ -47,6 +54,15 @@ splash-region@b8000000 {
 			no-map;
 		};
 	};
+
+	vph_pwr: regulator-vph-pwr {
+		compatible = "regulator-fixed";
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &apps_rsc {
@@ -119,8 +135,27 @@ vreg_l1c_1p8: ldo1 {
 	};
 };
 
+&pm8350_gpios {
+	vol_up_n: vol-up-n-state {
+		pins = "gpio6";
+		function = "normal";
+		power-source = <1>;
+		input-enable;
+	};
+};
+
+&pon_pwrkey {
+	status = "okay";
+};
+
+&pon_resin {
+	linux,code = <KEY_VOLUMEDOWN>;
+
+	status = "okay";
+};
+
 &tlmm {
-	gpio-reserved-ranges = <36 4>; /* SPI (not linked to anything) */
+	gpio-reserved-ranges = <36 4>; /* SPI (Unused) */
 };
 
 &usb_1 {
-- 
2.51.0


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

* [PATCH 2/5] arm64: dts: qcom: r0q: add touchscreen support
  2025-09-20  1:46 [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals Eric Gonçalves
  2025-09-20  1:46 ` [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys Eric Gonçalves
@ 2025-09-20  1:46 ` Eric Gonçalves
  2025-09-20 15:46   ` Dmitry Baryshkov
  2025-09-25 13:08   ` Konrad Dybcio
  2025-09-20  1:46 ` [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC Eric Gonçalves
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-20  1:46 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

Enable the ST-Microelectronics FTS2BA61Y touchscreen. This patch
depends on "Input: add support for the STM FTS2BA61Y touchscreen".

The device has an issue where SPI 8 (the bus which the touchscreen is
connected to) is not working properly right now, so
spi-gpio is used instead.

Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
---
 .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 167 ++++++++++++++++++
 1 file changed, 167 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
index 70e953824996..7bf56564dfc6 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
@@ -55,6 +55,45 @@ splash-region@b8000000 {
 		};
 	};
 
+	spi_gpio: spi-gpio@0 {
+		compatible = "spi-gpio";
+		pinctrl-names = "default", "sleep";
+		pinctrl-0 = <&spi_clk_tsp_active &spi_mosi_tsp_active &spi_miso_tsp_active>;
+		pinctrl-1 = <&spi_clk_tsp_sleep &spi_mosi_tsp_sleep &spi_miso_tsp_sleep>;
+
+		status = "okay";
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		sck-gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
+		mosi-gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
+		miso-gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
+
+		num-chipselects = <1>;
+
+		spi-max-frequency = <5000000>;
+
+		touchscreen@0 {
+			compatible = "st,fts2ba61y";
+			reg = <0>;
+			spi-max-frequency = <5000000>;
+
+			vdd-supply = <&vreg_l8c_1p8>;
+			avdd-supply = <&vreg_l11c_3p0>;
+
+			interrupt-parent = <&tlmm>;
+			interrupts = <46 IRQ_TYPE_LEVEL_LOW>;
+
+			pinctrl-names = "default", "sleep";
+			pinctrl-0 = <&tsp_int_active>;
+			pinctrl-1 = <&tsp_int_sleep>;
+
+			status = "okay";
+		};
+	};
+
 	vph_pwr: regulator-vph-pwr {
 		compatible = "regulator-fixed";
 		regulator-name = "vph_pwr";
@@ -132,6 +171,18 @@ vreg_l1c_1p8: ldo1 {
 			regulator-max-microvolt = <1800000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
+
+		vreg_l8c_1p8: ldo8 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l11c_3p0: ldo11 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
 	};
 };
 
@@ -156,6 +207,122 @@ &pon_resin {
 
 &tlmm {
 	gpio-reserved-ranges = <36 4>; /* SPI (Unused) */
+
+	spi_clk_tsp_active: spi_clk_tsp_active {
+		mux {
+			pins = "gpio30";
+			function = "gpio";
+		};
+		config {
+			pins = "gpio30";
+			drive-strength = <6>;
+			bias-disable;
+		};
+	};
+
+	spi_clk_tsp_sleep: spi_clk_tsp_sleep {
+		mux {
+			pins = "gpio30";
+			function = "gpio";
+		};
+		config {
+			pins = "gpio30";
+			drive-strength = <6>;
+			input-enable;
+			bias-pull-down;
+		};
+	};
+
+	spi_cs_tsp_active: spi_cs_tsp_active {
+		mux {
+			pins = "gpio31";
+			function = "gpio";
+		};
+		config {
+			pins = "gpio31";
+			drive-strength = <6>;
+			bias-disable;
+		};
+	};
+
+	spi_cs_tsp_sleep: spi_cs_tsp_sleep {
+		mux {
+			pins = "gpio31";
+			function = "gpio";
+		};
+		config {
+			pins = "gpio31";
+			drive-strength = <6>;
+			input-enable;
+			bias-pull-down;
+		};
+	};
+
+	spi_miso_tsp_active: spi_miso_tsp_active {
+		mux {
+			pins = "gpio28";
+			function = "gpio";
+		};
+		config {
+			pins = "gpio28";
+			drive-strength = <6>;
+			bias-disable;
+		};
+	};
+
+	spi_miso_tsp_sleep: spi_miso_tsp_sleep {
+		mux {
+			pins = "gpio28";
+			function = "gpio";
+		};
+		config {
+			pins = "gpio28";
+			drive-strength = <6>;
+			input-enable;
+			bias-pull-down;
+		};
+	};
+
+	spi_mosi_tsp_active: spi_mosi_tsp_active {
+		mux {
+			pins = "gpio29";
+			function = "gpio";
+		};
+		config {
+			pins = "gpio29";
+			drive-strength = <6>;
+			bias-disable;
+		};
+	};
+
+	spi_mosi_tsp_sleep: spi_mosi_tsp_sleep {
+		mux {
+			pins = "gpio29";
+			function = "gpio";
+		};
+		config {
+			pins = "gpio29";
+			drive-strength = <6>;
+			input-enable;
+			bias-pull-down;
+		};
+	};
+
+	tsp_int_active: tsp_int_active {
+		pins = "gpio46";
+		function = "gpio";
+		drive-strength = <2>;
+		input-enable;
+		bias-disable;
+	};
+
+	tsp_int_sleep: tsp_int_sleep_state {
+		pins = "gpio46";
+		function = "gpio";
+		drive-strength = <2>;
+		input-enable;
+		bias-disable;
+	};
 };
 
 &usb_1 {
-- 
2.51.0


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

* [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC
  2025-09-20  1:46 [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals Eric Gonçalves
  2025-09-20  1:46 ` [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys Eric Gonçalves
  2025-09-20  1:46 ` [PATCH 2/5] arm64: dts: qcom: r0q: add touchscreen support Eric Gonçalves
@ 2025-09-20  1:46 ` Eric Gonçalves
  2025-09-20 15:48   ` Dmitry Baryshkov
  2025-09-25 13:06   ` Konrad Dybcio
  2025-09-20  1:46 ` [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks Eric Gonçalves
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-20  1:46 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
PMIC, enable the fuelgauge and charger for now.

Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
---
 .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
index 7bf56564dfc6..c1b0b21c0ec5 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
@@ -14,6 +14,16 @@ / {
 	compatible = "samsung,r0q", "qcom,sm8450";
 	chassis-type = "handset";
 
+	battery: battery {
+		compatible = "simple-battery";
+
+		constant-charge-current-max-microamp = <2150000>;
+		charge-full-design-microamp-hours = <3700000>;
+		over-voltage-threshold-microvolt = <4500000>;
+		voltage-min-design-microvolt = <3400000>;
+		voltage-max-design-microvolt = <4350000>;
+	};
+
 	chosen {
 		#address-cells = <2>;
 		#size-cells = <2>;
@@ -186,6 +196,26 @@ vreg_l11c_3p0: ldo11 {
 	};
 };
 
+&i2c5 {
+	status = "okay";
+
+	max77705_charger: charger@69 {
+	    compatible = "maxim,max77705-charger";
+	    reg = <0x69>;
+	    monitored-battery = <&battery>;
+	    interrupt-parent = <&tlmm>;
+	    interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+	};
+
+	fuel-gauge@36 {
+		reg = <0x36>;
+		compatible = "maxim,max77705-battery";
+		power-supplies = <&max77705_charger>;
+		interrupt-parent = <&tlmm>;
+		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
+
 &pm8350_gpios {
 	vol_up_n: vol-up-n-state {
 		pins = "gpio6";
@@ -345,3 +375,7 @@ &usb_1_hsphy {
 
 	status = "okay";
 };
+
+&qupv3_id_0 {
+	status = "okay";
+};
-- 
2.51.0


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

* [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks
  2025-09-20  1:46 [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals Eric Gonçalves
                   ` (2 preceding siblings ...)
  2025-09-20  1:46 ` [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC Eric Gonçalves
@ 2025-09-20  1:46 ` Eric Gonçalves
  2025-09-25 13:09   ` Konrad Dybcio
  2025-09-20  1:46 ` [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage Eric Gonçalves
  2025-09-22 17:27 ` [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals Rob Herring (Arm)
  5 siblings, 1 reply; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-20  1:46 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

Enable the real-time clocks found in R0Q board.

Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
---
 arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
index c1b0b21c0ec5..c088f1acf6ea 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
@@ -225,6 +225,21 @@ vol_up_n: vol-up-n-state {
 	};
 };
 
+&pmk8350_rtc {
+	nvmem-cells = <&rtc_offset>;
+	nvmem-cell-names = "offset";
+
+	status = "okay";
+};
+
+&pmk8350_sdam_2 {
+	status = "okay";
+
+	rtc_offset: rtc-offset@bc {
+		reg = <0xbc 0x4>;
+	};
+};
+
 &pon_pwrkey {
 	status = "okay";
 };
-- 
2.51.0


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

* [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage
  2025-09-20  1:46 [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals Eric Gonçalves
                   ` (3 preceding siblings ...)
  2025-09-20  1:46 ` [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks Eric Gonçalves
@ 2025-09-20  1:46 ` Eric Gonçalves
  2025-09-20 20:16   ` Dmitry Baryshkov
  2025-09-25 13:07   ` Konrad Dybcio
  2025-09-22 17:27 ` [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals Rob Herring (Arm)
  5 siblings, 2 replies; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-20  1:46 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

Enable UFS internal storage of the Samsung Galaxy S22.

Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
---
 .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
index c088f1acf6ea..0a55ce952f93 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
@@ -146,6 +146,24 @@ vreg_l5b_0p88: ldo5 {
 			regulator-max-microvolt = <888000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
+
+		vreg_l6b_1p2: ldo6 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l7b_2p5: ldo7 {
+			regulator-min-microvolt = <2504000>;
+			regulator-max-microvolt = <2504000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l9b_1p2: ldo9 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
 	};
 
 	regulators-1 {
@@ -370,6 +388,27 @@ tsp_int_sleep: tsp_int_sleep_state {
 	};
 };
 
+&ufs_mem_hc {
+	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
+
+	vcc-supply = <&vreg_l7b_2p5>;
+	vcc-max-microamp = <1100000>;
+	vccq-supply = <&vreg_l9b_1p2>;
+	vccq-max-microamp = <1200000>;
+	vccq2-supply = <&vreg_l9b_1p2>;
+	vccq2-max-microamp = <1200000>;
+	vdd-hba-supply = <&vreg_l9b_1p2>;
+
+	status = "okay";
+};
+
+&ufs_mem_phy {
+	vdda-phy-supply = <&vreg_l5b_0p88>;
+	vdda-pll-supply = <&vreg_l6b_1p2>;
+
+	status = "okay";
+};
+
 &usb_1 {
 	/* Keep USB 2.0 only for now */
 	qcom,select-utmi-as-pipe-clk;
-- 
2.51.0


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

* Re: [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys
  2025-09-20  1:46 ` [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys Eric Gonçalves
@ 2025-09-20 15:45   ` Dmitry Baryshkov
  2025-09-20 18:02     ` Eric Gonçalves
  0 siblings, 1 reply; 33+ messages in thread
From: Dmitry Baryshkov @ 2025-09-20 15:45 UTC (permalink / raw)
  To: Eric Gonçalves
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-arm-msm, linux-kernel

On Sat, Sep 20, 2025 at 01:46:33AM +0000, Eric Gonçalves wrote:
> Add GPIO keys support to Samsung Galaxy S22 (r0q).
> 
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---
>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 53 +++++++++++++++----
>  1 file changed, 44 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> index 880d74ae6032..70e953824996 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> @@ -2,11 +2,12 @@
>  
>  /dts-v1/;
>  
> +#include <dt-bindings/input/linux-event-codes.h>
>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> -
>  #include "sm8450.dtsi"
>  #include "pm8350.dtsi"
>  #include "pm8350c.dtsi"
> +#include "pmk8350.dtsi"
>  
>  / {
>  	model = "Samsung Galaxy S22 5G";
> @@ -28,13 +29,19 @@ framebuffer: framebuffer@b8000000 {
>  		};
>  	};
>  
> -	vph_pwr: regulator-vph-pwr {
> -		compatible = "regulator-fixed";
> -		regulator-name = "vph_pwr";
> -		regulator-min-microvolt = <3700000>;
> -		regulator-max-microvolt = <3700000>;
> -		regulator-always-on;
> -		regulator-boot-on;

Please don't mix up refactorings and new features. Split this patch into
several.

> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		autorepeat;
> +
> +		pinctrl-0 = <&vol_up_n>;
> +		pinctrl-names = "default";
> +
> +		key-vol-up {
> +			label = "Volume Up";
> +			linux,code = <KEY_VOLUMEUP>;
> +			gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>;
> +			debounce-interval = <15>;
> +		};
>  	};
>  
>  	reserved-memory {
> @@ -47,6 +54,15 @@ splash-region@b8000000 {
>  			no-map;
>  		};
>  	};
> +
> +	vph_pwr: regulator-vph-pwr {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vph_pwr";
> +		regulator-min-microvolt = <3700000>;
> +		regulator-max-microvolt = <3700000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
>  };
>  
>  &apps_rsc {
> @@ -119,8 +135,27 @@ vreg_l1c_1p8: ldo1 {
>  	};
>  };
>  
> +&pm8350_gpios {
> +	vol_up_n: vol-up-n-state {
> +		pins = "gpio6";
> +		function = "normal";
> +		power-source = <1>;
> +		input-enable;
> +	};
> +};
> +
> +&pon_pwrkey {
> +	status = "okay";
> +};
> +
> +&pon_resin {
> +	linux,code = <KEY_VOLUMEDOWN>;
> +
> +	status = "okay";
> +};
> +
>  &tlmm {
> -	gpio-reserved-ranges = <36 4>; /* SPI (not linked to anything) */
> +	gpio-reserved-ranges = <36 4>; /* SPI (Unused) */
>  };
>  
>  &usb_1 {
> -- 
> 2.51.0
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH 2/5] arm64: dts: qcom: r0q: add touchscreen support
  2025-09-20  1:46 ` [PATCH 2/5] arm64: dts: qcom: r0q: add touchscreen support Eric Gonçalves
@ 2025-09-20 15:46   ` Dmitry Baryshkov
  2025-09-25 13:08   ` Konrad Dybcio
  1 sibling, 0 replies; 33+ messages in thread
From: Dmitry Baryshkov @ 2025-09-20 15:46 UTC (permalink / raw)
  To: Eric Gonçalves
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-arm-msm, linux-kernel

On Sat, Sep 20, 2025 at 01:46:34AM +0000, Eric Gonçalves wrote:
> Enable the ST-Microelectronics FTS2BA61Y touchscreen. This patch
> depends on "Input: add support for the STM FTS2BA61Y touchscreen".
> 
> The device has an issue where SPI 8 (the bus which the touchscreen is
> connected to) is not working properly right now, so
> spi-gpio is used instead.
> 
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---
>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 167 ++++++++++++++++++
>  1 file changed, 167 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> index 70e953824996..7bf56564dfc6 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> @@ -55,6 +55,45 @@ splash-region@b8000000 {
>  		};
>  	};
>  

Please add a comment that you have to use spi-gpio and ideally a brief
description of the issue.

With that fixed:


> +	spi_gpio: spi-gpio@0 {
> +		compatible = "spi-gpio";
> +		pinctrl-names = "default", "sleep";
> +		pinctrl-0 = <&spi_clk_tsp_active &spi_mosi_tsp_active &spi_miso_tsp_active>;
> +		pinctrl-1 = <&spi_clk_tsp_sleep &spi_mosi_tsp_sleep &spi_miso_tsp_sleep>;
> +
> +		status = "okay";

status isn't necessary for new devices. It's a default value.

> +
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		sck-gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
> +		mosi-gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
> +		miso-gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
> +		cs-gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
> +
> +		num-chipselects = <1>;
> +
> +		spi-max-frequency = <5000000>;
> +
> +		touchscreen@0 {
> +			compatible = "st,fts2ba61y";
> +			reg = <0>;
> +			spi-max-frequency = <5000000>;
> +
> +			vdd-supply = <&vreg_l8c_1p8>;
> +			avdd-supply = <&vreg_l11c_3p0>;
> +
> +			interrupt-parent = <&tlmm>;
> +			interrupts = <46 IRQ_TYPE_LEVEL_LOW>;
> +
> +			pinctrl-names = "default", "sleep";
> +			pinctrl-0 = <&tsp_int_active>;
> +			pinctrl-1 = <&tsp_int_sleep>;
> +
> +			status = "okay";
> +		};
> +	};
> +
>  	vph_pwr: regulator-vph-pwr {
>  		compatible = "regulator-fixed";
>  		regulator-name = "vph_pwr";
> @@ -132,6 +171,18 @@ vreg_l1c_1p8: ldo1 {
>  			regulator-max-microvolt = <1800000>;
>  			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>  		};
> +
> +		vreg_l8c_1p8: ldo8 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l11c_3p0: ldo11 {
> +			regulator-min-microvolt = <3000000>;
> +			regulator-max-microvolt = <3000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
>  	};
>  };
>  
> @@ -156,6 +207,122 @@ &pon_resin {
>  
>  &tlmm {
>  	gpio-reserved-ranges = <36 4>; /* SPI (Unused) */
> +
> +	spi_clk_tsp_active: spi_clk_tsp_active {
> +		mux {
> +			pins = "gpio30";
> +			function = "gpio";
> +		};
> +		config {
> +			pins = "gpio30";
> +			drive-strength = <6>;
> +			bias-disable;
> +		};
> +	};
> +
> +	spi_clk_tsp_sleep: spi_clk_tsp_sleep {
> +		mux {
> +			pins = "gpio30";
> +			function = "gpio";
> +		};
> +		config {
> +			pins = "gpio30";
> +			drive-strength = <6>;
> +			input-enable;
> +			bias-pull-down;
> +		};
> +	};
> +
> +	spi_cs_tsp_active: spi_cs_tsp_active {
> +		mux {
> +			pins = "gpio31";
> +			function = "gpio";
> +		};
> +		config {
> +			pins = "gpio31";
> +			drive-strength = <6>;
> +			bias-disable;
> +		};
> +	};
> +
> +	spi_cs_tsp_sleep: spi_cs_tsp_sleep {
> +		mux {
> +			pins = "gpio31";
> +			function = "gpio";
> +		};
> +		config {
> +			pins = "gpio31";
> +			drive-strength = <6>;
> +			input-enable;
> +			bias-pull-down;
> +		};
> +	};
> +
> +	spi_miso_tsp_active: spi_miso_tsp_active {
> +		mux {
> +			pins = "gpio28";
> +			function = "gpio";
> +		};
> +		config {
> +			pins = "gpio28";
> +			drive-strength = <6>;
> +			bias-disable;
> +		};
> +	};
> +
> +	spi_miso_tsp_sleep: spi_miso_tsp_sleep {
> +		mux {
> +			pins = "gpio28";
> +			function = "gpio";
> +		};
> +		config {
> +			pins = "gpio28";
> +			drive-strength = <6>;
> +			input-enable;
> +			bias-pull-down;
> +		};
> +	};
> +
> +	spi_mosi_tsp_active: spi_mosi_tsp_active {
> +		mux {
> +			pins = "gpio29";
> +			function = "gpio";
> +		};
> +		config {
> +			pins = "gpio29";
> +			drive-strength = <6>;
> +			bias-disable;
> +		};
> +	};
> +
> +	spi_mosi_tsp_sleep: spi_mosi_tsp_sleep {
> +		mux {
> +			pins = "gpio29";
> +			function = "gpio";
> +		};
> +		config {
> +			pins = "gpio29";
> +			drive-strength = <6>;
> +			input-enable;
> +			bias-pull-down;
> +		};
> +	};
> +
> +	tsp_int_active: tsp_int_active {
> +		pins = "gpio46";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		input-enable;
> +		bias-disable;
> +	};
> +
> +	tsp_int_sleep: tsp_int_sleep_state {
> +		pins = "gpio46";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		input-enable;
> +		bias-disable;
> +	};
>  };
>  
>  &usb_1 {
> -- 
> 2.51.0
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC
  2025-09-20  1:46 ` [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC Eric Gonçalves
@ 2025-09-20 15:48   ` Dmitry Baryshkov
  2025-09-20 18:04     ` Eric Gonçalves
  2025-09-25 13:06   ` Konrad Dybcio
  1 sibling, 1 reply; 33+ messages in thread
From: Dmitry Baryshkov @ 2025-09-20 15:48 UTC (permalink / raw)
  To: Eric Gonçalves
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-arm-msm, linux-kernel

On Sat, Sep 20, 2025 at 01:46:35AM +0000, Eric Gonçalves wrote:
> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
> PMIC, enable the fuelgauge and charger for now.
> 
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---
>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 34 +++++++++++++++++++
>  1 file changed, 34 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> index 7bf56564dfc6..c1b0b21c0ec5 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> @@ -14,6 +14,16 @@ / {
>  	compatible = "samsung,r0q", "qcom,sm8450";
>  	chassis-type = "handset";
>  
> +	battery: battery {
> +		compatible = "simple-battery";
> +
> +		constant-charge-current-max-microamp = <2150000>;
> +		charge-full-design-microamp-hours = <3700000>;
> +		over-voltage-threshold-microvolt = <4500000>;
> +		voltage-min-design-microvolt = <3400000>;
> +		voltage-max-design-microvolt = <4350000>;
> +	};
> +
>  	chosen {
>  		#address-cells = <2>;
>  		#size-cells = <2>;
> @@ -186,6 +196,26 @@ vreg_l11c_3p0: ldo11 {
>  	};
>  };
>  
> +&i2c5 {
> +	status = "okay";

Could you please also add 'clock-frequency' for this bus?

LGTM otherwise.

> +
> +	max77705_charger: charger@69 {
> +	    compatible = "maxim,max77705-charger";
> +	    reg = <0x69>;
> +	    monitored-battery = <&battery>;
> +	    interrupt-parent = <&tlmm>;
> +	    interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
> +	};
> +
> +	fuel-gauge@36 {
> +		reg = <0x36>;
> +		compatible = "maxim,max77705-battery";
> +		power-supplies = <&max77705_charger>;
> +		interrupt-parent = <&tlmm>;
> +		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
> +	};
> +};
> +
>  &pm8350_gpios {
>  	vol_up_n: vol-up-n-state {
>  		pins = "gpio6";
> @@ -345,3 +375,7 @@ &usb_1_hsphy {
>  
>  	status = "okay";
>  };
> +
> +&qupv3_id_0 {
> +	status = "okay";
> +};
> -- 
> 2.51.0
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys
  2025-09-20 15:45   ` Dmitry Baryshkov
@ 2025-09-20 18:02     ` Eric Gonçalves
  2025-09-20 20:15       ` Dmitry Baryshkov
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-20 18:02 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-arm-msm, linux-kernel



On September 20, 2025 12:45:27 PM GMT-03:00, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> wrote:
>On Sat, Sep 20, 2025 at 01:46:33AM +0000, Eric Gonçalves wrote:
>> Add GPIO keys support to Samsung Galaxy S22 (r0q).
>> 
>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>> ---
>>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 53 +++++++++++++++----
>>  1 file changed, 44 insertions(+), 9 deletions(-)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> index 880d74ae6032..70e953824996 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> @@ -2,11 +2,12 @@
>>  
>>  /dts-v1/;
>>  
>> +#include <dt-bindings/input/linux-event-codes.h>
>>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>> -
>>  #include "sm8450.dtsi"
>>  #include "pm8350.dtsi"
>>  #include "pm8350c.dtsi"
>> +#include "pmk8350.dtsi"
>>  
>>  / {
>>  	model = "Samsung Galaxy S22 5G";
>> @@ -28,13 +29,19 @@ framebuffer: framebuffer@b8000000 {
>>  		};
>>  	};
>>  
>> -	vph_pwr: regulator-vph-pwr {
>> -		compatible = "regulator-fixed";
>> -		regulator-name = "vph_pwr";
>> -		regulator-min-microvolt = <3700000>;
>> -		regulator-max-microvolt = <3700000>;
>> -		regulator-always-on;
>> -		regulator-boot-on;
>
>Please don't mix up refactorings and new features. Split this patch into
>several.
The patch only added gpio-keys node and pon_resin,
pon_pwrkey. Do you mean I have to split each button
into separate patches?
>
>> +	gpio-keys {
>> +		compatible = "gpio-keys";
>> +		autorepeat;
>> +
>> +		pinctrl-0 = <&vol_up_n>;
>> +		pinctrl-names = "default";
>> +
>> +		key-vol-up {
>> +			label = "Volume Up";
>> +			linux,code = <KEY_VOLUMEUP>;
>> +			gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>;
>> +			debounce-interval = <15>;
>> +		};
>>  	};
>>  
>>  	reserved-memory {
>> @@ -47,6 +54,15 @@ splash-region@b8000000 {
>>  			no-map;
>>  		};
>>  	};
>> +
>> +	vph_pwr: regulator-vph-pwr {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vph_pwr";
>> +		regulator-min-microvolt = <3700000>;
>> +		regulator-max-microvolt = <3700000>;
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +	};
>>  };
>>  
>>  &apps_rsc {
>> @@ -119,8 +135,27 @@ vreg_l1c_1p8: ldo1 {
>>  	};
>>  };
>>  
>> +&pm8350_gpios {
>> +	vol_up_n: vol-up-n-state {
>> +		pins = "gpio6";
>> +		function = "normal";
>> +		power-source = <1>;
>> +		input-enable;
>> +	};
>> +};
>> +
>> +&pon_pwrkey {
>> +	status = "okay";
>> +};
>> +
>> +&pon_resin {
>> +	linux,code = <KEY_VOLUMEDOWN>;
>> +
>> +	status = "okay";
>> +};
>> +
>>  &tlmm {
>> -	gpio-reserved-ranges = <36 4>; /* SPI (not linked to anything) */
>> +	gpio-reserved-ranges = <36 4>; /* SPI (Unused) */
>>  };
>>  
>>  &usb_1 {
>> -- 
>> 2.51.0
>> 
>
Resend because I forgot to CC the mailing lists

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

* Re: [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC
  2025-09-20 15:48   ` Dmitry Baryshkov
@ 2025-09-20 18:04     ` Eric Gonçalves
  0 siblings, 0 replies; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-20 18:04 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-arm-msm, linux-kernel



On September 20, 2025 12:48:55 PM GMT-03:00, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> wrote:
>On Sat, Sep 20, 2025 at 01:46:35AM +0000, Eric Gonçalves wrote:
>> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
>> PMIC, enable the fuelgauge and charger for now.
>> 
>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>> ---
>>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 34 +++++++++++++++++++
>>  1 file changed, 34 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> index 7bf56564dfc6..c1b0b21c0ec5 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> @@ -14,6 +14,16 @@ / {
>>  	compatible = "samsung,r0q", "qcom,sm8450";
>>  	chassis-type = "handset";
>>  
>> +	battery: battery {
>> +		compatible = "simple-battery";
>> +
>> +		constant-charge-current-max-microamp = <2150000>;
>> +		charge-full-design-microamp-hours = <3700000>;
>> +		over-voltage-threshold-microvolt = <4500000>;
>> +		voltage-min-design-microvolt = <3400000>;
>> +		voltage-max-design-microvolt = <4350000>;
>> +	};
>> +
>>  	chosen {
>>  		#address-cells = <2>;
>>  		#size-cells = <2>;
>> @@ -186,6 +196,26 @@ vreg_l11c_3p0: ldo11 {
>>  	};
>>  };
>>  
>> +&i2c5 {
>> +	status = "okay";
>
>Could you please also add 'clock-frequency' for this bus?
Will do, thanks
>
>LGTM otherwise.
>
>> +
>> +	max77705_charger: charger@69 {
>> +	    compatible = "maxim,max77705-charger";
>> +	    reg = <0x69>;
>> +	    monitored-battery = <&battery>;
>> +	    interrupt-parent = <&tlmm>;
>> +	    interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>> +	};
>> +
>> +	fuel-gauge@36 {
>> +		reg = <0x36>;
>> +		compatible = "maxim,max77705-battery";
>> +		power-supplies = <&max77705_charger>;
>> +		interrupt-parent = <&tlmm>;
>> +		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>> +	};
>> +};
>> +
>>  &pm8350_gpios {
>>  	vol_up_n: vol-up-n-state {
>>  		pins = "gpio6";
>> @@ -345,3 +375,7 @@ &usb_1_hsphy {
>>  
>>  	status = "okay";
>>  };
>> +
>> +&qupv3_id_0 {
>> +	status = "okay";
>> +};
>> -- 
>> 2.51.0
>> 
>

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

* Re: [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys
  2025-09-20 18:02     ` Eric Gonçalves
@ 2025-09-20 20:15       ` Dmitry Baryshkov
  2025-09-20 20:22         ` Eric Gonçalves
  0 siblings, 1 reply; 33+ messages in thread
From: Dmitry Baryshkov @ 2025-09-20 20:15 UTC (permalink / raw)
  To: Eric Gonçalves
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-arm-msm, linux-kernel

On Sat, Sep 20, 2025 at 03:02:42PM -0300, Eric Gonçalves wrote:
> 
> 
> On September 20, 2025 12:45:27 PM GMT-03:00, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> wrote:
> >On Sat, Sep 20, 2025 at 01:46:33AM +0000, Eric Gonçalves wrote:
> >> Add GPIO keys support to Samsung Galaxy S22 (r0q).
> >> 
> >> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> >> ---
> >>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 53 +++++++++++++++----
> >>  1 file changed, 44 insertions(+), 9 deletions(-)
> >> 
> >> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> >> index 880d74ae6032..70e953824996 100644
> >> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> >> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> >> @@ -2,11 +2,12 @@
> >>  
> >>  /dts-v1/;
> >>  
> >> +#include <dt-bindings/input/linux-event-codes.h>
> >>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> >> -
> >>  #include "sm8450.dtsi"
> >>  #include "pm8350.dtsi"
> >>  #include "pm8350c.dtsi"
> >> +#include "pmk8350.dtsi"
> >>  
> >>  / {
> >>  	model = "Samsung Galaxy S22 5G";
> >> @@ -28,13 +29,19 @@ framebuffer: framebuffer@b8000000 {
> >>  		};
> >>  	};
> >>  
> >> -	vph_pwr: regulator-vph-pwr {
> >> -		compatible = "regulator-fixed";
> >> -		regulator-name = "vph_pwr";
> >> -		regulator-min-microvolt = <3700000>;
> >> -		regulator-max-microvolt = <3700000>;
> >> -		regulator-always-on;
> >> -		regulator-boot-on;
> >
> >Please don't mix up refactorings and new features. Split this patch into
> >several.
> The patch only added gpio-keys node and pon_resin,
> pon_pwrkey. Do you mean I have to split each button
> into separate patches?

No. The patch also moves regulator-vph-pwr and changes the comment in
the TLMM node.

> >
> >> +	gpio-keys {
> >> +		compatible = "gpio-keys";
> >> +		autorepeat;
> >> +
> >> +		pinctrl-0 = <&vol_up_n>;
> >> +		pinctrl-names = "default";
> >> +
> >> +		key-vol-up {
> >> +			label = "Volume Up";
> >> +			linux,code = <KEY_VOLUMEUP>;
> >> +			gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>;
> >> +			debounce-interval = <15>;
> >> +		};
> >>  	};
> >>  
> >>  	reserved-memory {
> >> @@ -47,6 +54,15 @@ splash-region@b8000000 {
> >>  			no-map;
> >>  		};
> >>  	};
> >> +
> >> +	vph_pwr: regulator-vph-pwr {
> >> +		compatible = "regulator-fixed";
> >> +		regulator-name = "vph_pwr";
> >> +		regulator-min-microvolt = <3700000>;
> >> +		regulator-max-microvolt = <3700000>;
> >> +		regulator-always-on;
> >> +		regulator-boot-on;
> >> +	};
> >>  };
> >>  
> >>  &apps_rsc {
> >> @@ -119,8 +135,27 @@ vreg_l1c_1p8: ldo1 {
> >>  	};
> >>  };
> >>  
> >> +&pm8350_gpios {
> >> +	vol_up_n: vol-up-n-state {
> >> +		pins = "gpio6";
> >> +		function = "normal";
> >> +		power-source = <1>;
> >> +		input-enable;
> >> +	};
> >> +};
> >> +
> >> +&pon_pwrkey {
> >> +	status = "okay";
> >> +};
> >> +
> >> +&pon_resin {
> >> +	linux,code = <KEY_VOLUMEDOWN>;
> >> +
> >> +	status = "okay";
> >> +};
> >> +
> >>  &tlmm {
> >> -	gpio-reserved-ranges = <36 4>; /* SPI (not linked to anything) */
> >> +	gpio-reserved-ranges = <36 4>; /* SPI (Unused) */
> >>  };
> >>  
> >>  &usb_1 {
> >> -- 
> >> 2.51.0
> >> 
> >
> Resend because I forgot to CC the mailing lists

-- 
With best wishes
Dmitry

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

* Re: [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage
  2025-09-20  1:46 ` [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage Eric Gonçalves
@ 2025-09-20 20:16   ` Dmitry Baryshkov
  2025-09-25 13:07   ` Konrad Dybcio
  1 sibling, 0 replies; 33+ messages in thread
From: Dmitry Baryshkov @ 2025-09-20 20:16 UTC (permalink / raw)
  To: Eric Gonçalves
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-arm-msm, linux-kernel

On Sat, Sep 20, 2025 at 01:46:37AM +0000, Eric Gonçalves wrote:
> Enable UFS internal storage of the Samsung Galaxy S22.
> 
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---
>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys
  2025-09-20 20:15       ` Dmitry Baryshkov
@ 2025-09-20 20:22         ` Eric Gonçalves
  2025-09-20 23:21           ` Dmitry Baryshkov
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-20 20:22 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-arm-msm, linux-kernel



On September 20, 2025 5:15:41 PM GMT-03:00, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> wrote:
>On Sat, Sep 20, 2025 at 03:02:42PM -0300, Eric Gonçalves wrote:
>> 
>> 
>> On September 20, 2025 12:45:27 PM GMT-03:00, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> wrote:
>> >On Sat, Sep 20, 2025 at 01:46:33AM +0000, Eric Gonçalves wrote:
>> >> Add GPIO keys support to Samsung Galaxy S22 (r0q).
>> >> 
>> >> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>> >> ---
>> >>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 53 +++++++++++++++----
>> >>  1 file changed, 44 insertions(+), 9 deletions(-)
>> >> 
>> >> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> >> index 880d74ae6032..70e953824996 100644
>> >> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> >> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> >> @@ -2,11 +2,12 @@
>> >>  
>> >>  /dts-v1/;
>> >>  
>> >> +#include <dt-bindings/input/linux-event-codes.h>
>> >>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>> >> -
>> >>  #include "sm8450.dtsi"
>> >>  #include "pm8350.dtsi"
>> >>  #include "pm8350c.dtsi"
>> >> +#include "pmk8350.dtsi"
>> >>  
>> >>  / {
>> >>  	model = "Samsung Galaxy S22 5G";
>> >> @@ -28,13 +29,19 @@ framebuffer: framebuffer@b8000000 {
>> >>  		};
>> >>  	};
>> >>  
>> >> -	vph_pwr: regulator-vph-pwr {
>> >> -		compatible = "regulator-fixed";
>> >> -		regulator-name = "vph_pwr";
>> >> -		regulator-min-microvolt = <3700000>;
>> >> -		regulator-max-microvolt = <3700000>;
>> >> -		regulator-always-on;
>> >> -		regulator-boot-on;
>> >
>> >Please don't mix up refactorings and new features. Split this patch into
>> >several.
>> The patch only added gpio-keys node and pon_resin,
>> pon_pwrkey. Do you mean I have to split each button
>> into separate patches?
>
>No. The patch also moves regulator-vph-pwr and changes the comment in
>the TLMM node.
>
I thought they would be too small to be
patches on their own. Is it okay if I split
them into 2: arm64: dts: qcom: r0q: small refactor
and arm64: dts: qcom: r0q: add gpio keys?
>> >
>> >> +	gpio-keys {
>> >> +		compatible = "gpio-keys";
>> >> +		autorepeat;
>> >> +
>> >> +		pinctrl-0 = <&vol_up_n>;
>> >> +		pinctrl-names = "default";
>> >> +
>> >> +		key-vol-up {
>> >> +			label = "Volume Up";
>> >> +			linux,code = <KEY_VOLUMEUP>;
>> >> +			gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>;
>> >> +			debounce-interval = <15>;
>> >> +		};
>> >>  	};
>> >>  
>> >>  	reserved-memory {
>> >> @@ -47,6 +54,15 @@ splash-region@b8000000 {
>> >>  			no-map;
>> >>  		};
>> >>  	};
>> >> +
>> >> +	vph_pwr: regulator-vph-pwr {
>> >> +		compatible = "regulator-fixed";
>> >> +		regulator-name = "vph_pwr";
>> >> +		regulator-min-microvolt = <3700000>;
>> >> +		regulator-max-microvolt = <3700000>;
>> >> +		regulator-always-on;
>> >> +		regulator-boot-on;
>> >> +	};
>> >>  };
>> >>  
>> >>  &apps_rsc {
>> >> @@ -119,8 +135,27 @@ vreg_l1c_1p8: ldo1 {
>> >>  	};
>> >>  };
>> >>  
>> >> +&pm8350_gpios {
>> >> +	vol_up_n: vol-up-n-state {
>> >> +		pins = "gpio6";
>> >> +		function = "normal";
>> >> +		power-source = <1>;
>> >> +		input-enable;
>> >> +	};
>> >> +};
>> >> +
>> >> +&pon_pwrkey {
>> >> +	status = "okay";
>> >> +};
>> >> +
>> >> +&pon_resin {
>> >> +	linux,code = <KEY_VOLUMEDOWN>;
>> >> +
>> >> +	status = "okay";
>> >> +};
>> >> +
>> >>  &tlmm {
>> >> -	gpio-reserved-ranges = <36 4>; /* SPI (not linked to anything) */
>> >> +	gpio-reserved-ranges = <36 4>; /* SPI (Unused) */
>> >>  };
>> >>  
>> >>  &usb_1 {
>> >> -- 
>> >> 2.51.0
>> >> 
>> >
>> Resend because I forgot to CC the mailing lists
>

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

* Re: [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys
  2025-09-20 20:22         ` Eric Gonçalves
@ 2025-09-20 23:21           ` Dmitry Baryshkov
  0 siblings, 0 replies; 33+ messages in thread
From: Dmitry Baryshkov @ 2025-09-20 23:21 UTC (permalink / raw)
  To: Eric Gonçalves
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-arm-msm, linux-kernel

On Sat, Sep 20, 2025 at 05:22:28PM -0300, Eric Gonçalves wrote:
> 
> 
> On September 20, 2025 5:15:41 PM GMT-03:00, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> wrote:
> >On Sat, Sep 20, 2025 at 03:02:42PM -0300, Eric Gonçalves wrote:
> >> 
> >> 
> >> On September 20, 2025 12:45:27 PM GMT-03:00, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> wrote:
> >> >On Sat, Sep 20, 2025 at 01:46:33AM +0000, Eric Gonçalves wrote:
> >> >> Add GPIO keys support to Samsung Galaxy S22 (r0q).
> >> >> 
> >> >> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> >> >> ---
> >> >>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 53 +++++++++++++++----
> >> >>  1 file changed, 44 insertions(+), 9 deletions(-)
> >> >> 
> >> >> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> >> >> index 880d74ae6032..70e953824996 100644
> >> >> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> >> >> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> >> >> @@ -2,11 +2,12 @@
> >> >>  
> >> >>  /dts-v1/;
> >> >>  
> >> >> +#include <dt-bindings/input/linux-event-codes.h>
> >> >>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> >> >> -
> >> >>  #include "sm8450.dtsi"
> >> >>  #include "pm8350.dtsi"
> >> >>  #include "pm8350c.dtsi"
> >> >> +#include "pmk8350.dtsi"
> >> >>  
> >> >>  / {
> >> >>  	model = "Samsung Galaxy S22 5G";
> >> >> @@ -28,13 +29,19 @@ framebuffer: framebuffer@b8000000 {
> >> >>  		};
> >> >>  	};
> >> >>  
> >> >> -	vph_pwr: regulator-vph-pwr {
> >> >> -		compatible = "regulator-fixed";
> >> >> -		regulator-name = "vph_pwr";
> >> >> -		regulator-min-microvolt = <3700000>;
> >> >> -		regulator-max-microvolt = <3700000>;
> >> >> -		regulator-always-on;
> >> >> -		regulator-boot-on;
> >> >
> >> >Please don't mix up refactorings and new features. Split this patch into
> >> >several.
> >> The patch only added gpio-keys node and pon_resin,
> >> pon_pwrkey. Do you mean I have to split each button
> >> into separate patches?
> >
> >No. The patch also moves regulator-vph-pwr and changes the comment in
> >the TLMM node.
> >
> I thought they would be too small to be
> patches on their own. Is it okay if I split
> them into 2: arm64: dts: qcom: r0q: small refactor
> and arm64: dts: qcom: r0q: add gpio keys?

SGTM.

> >> >
> >> >> +	gpio-keys {
> >> >> +		compatible = "gpio-keys";
> >> >> +		autorepeat;
> >> >> +
> >> >> +		pinctrl-0 = <&vol_up_n>;
> >> >> +		pinctrl-names = "default";
> >> >> +
> >> >> +		key-vol-up {
> >> >> +			label = "Volume Up";
> >> >> +			linux,code = <KEY_VOLUMEUP>;
> >> >> +			gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>;
> >> >> +			debounce-interval = <15>;
> >> >> +		};
> >> >>  	};
> >> >>  
> >> >>  	reserved-memory {
> >> >> @@ -47,6 +54,15 @@ splash-region@b8000000 {
> >> >>  			no-map;
> >> >>  		};
> >> >>  	};
> >> >> +
> >> >> +	vph_pwr: regulator-vph-pwr {
> >> >> +		compatible = "regulator-fixed";
> >> >> +		regulator-name = "vph_pwr";
> >> >> +		regulator-min-microvolt = <3700000>;
> >> >> +		regulator-max-microvolt = <3700000>;
> >> >> +		regulator-always-on;
> >> >> +		regulator-boot-on;
> >> >> +	};
> >> >>  };
> >> >>  
> >> >>  &apps_rsc {
> >> >> @@ -119,8 +135,27 @@ vreg_l1c_1p8: ldo1 {
> >> >>  	};
> >> >>  };
> >> >>  
> >> >> +&pm8350_gpios {
> >> >> +	vol_up_n: vol-up-n-state {
> >> >> +		pins = "gpio6";
> >> >> +		function = "normal";
> >> >> +		power-source = <1>;
> >> >> +		input-enable;
> >> >> +	};
> >> >> +};
> >> >> +
> >> >> +&pon_pwrkey {
> >> >> +	status = "okay";
> >> >> +};
> >> >> +
> >> >> +&pon_resin {
> >> >> +	linux,code = <KEY_VOLUMEDOWN>;
> >> >> +
> >> >> +	status = "okay";
> >> >> +};
> >> >> +
> >> >>  &tlmm {
> >> >> -	gpio-reserved-ranges = <36 4>; /* SPI (not linked to anything) */
> >> >> +	gpio-reserved-ranges = <36 4>; /* SPI (Unused) */
> >> >>  };
> >> >>  
> >> >>  &usb_1 {
> >> >> -- 
> >> >> 2.51.0
> >> >> 
> >> >
> >> Resend because I forgot to CC the mailing lists
> >

-- 
With best wishes
Dmitry

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

* Re: [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals
  2025-09-20  1:46 [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals Eric Gonçalves
                   ` (4 preceding siblings ...)
  2025-09-20  1:46 ` [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage Eric Gonçalves
@ 2025-09-22 17:27 ` Rob Herring (Arm)
  5 siblings, 0 replies; 33+ messages in thread
From: Rob Herring (Arm) @ 2025-09-22 17:27 UTC (permalink / raw)
  To: Eric Gonçalves
  Cc: Conor Dooley, Krzysztof Kozlowski, linux-kernel, devicetree,
	Konrad Dybcio, linux-arm-msm, Bjorn Andersson


On Sat, 20 Sep 2025 01:46:32 +0000, Eric Gonçalves wrote:
> This patchset adds support for multiple devices found on the Galaxy S22,
> side buttons, touchscreen, max77705 charger/fuelgauge, RTC and UFS. It
> depends on "Input: add support for the STM FTS2BA61Y touchscreen" for
> TS to be enabled.
> 
> Thanks!
> 
> Eric Gonçalves (5):
>   arm64: dts: qcom: r0q: add gpio keys
>   arm64: dts: qcom: r0q: add touchscreen support
>   arm64: dts: qcom: r0q: enable max77705 PMIC
>   arm64: dts: qcom: r0q: enable hardware clocks
>   arm64: dts: qcom: r0q: enable ufs storage
> 
>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 308 +++++++++++++++++-
>  1 file changed, 299 insertions(+), 9 deletions(-)
> 
> --
> 2.51.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


This patch series was applied (using b4) to base:
 Base: attempting to guess base-commit...
 Base: tags/v6.17-rc1-242-g11cf389c103f (exact match)

If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)

New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/qcom/' for 20250920014637.38175-1-ghatto404@gmail.com:

arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dtb: / (samsung,r0q): spi-gpio@0: 'anyOf' conditional failed, one must be fixed:
	'reg' is a required property
	'ranges' is a required property
	from schema $id: http://devicetree.org/schemas/root-node.yaml#
arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dtb: pinctrl@f100000 (qcom,sm8450-tlmm): Unevaluated properties are not allowed ('spi_clk_tsp_active', 'spi_clk_tsp_sleep', 'spi_cs_tsp_active', 'spi_cs_tsp_sleep', 'spi_miso_tsp_active', 'spi_miso_tsp_sleep', 'spi_mosi_tsp_active', 'spi_mosi_tsp_sleep', 'tsp_int_active', 'tsp_int_sleep_state' were unexpected)
	from schema $id: http://devicetree.org/schemas/pinctrl/qcom,sm8450-tlmm.yaml#
arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dtb: spi-gpio@0 (spi-gpio): $nodename:0: 'spi-gpio@0' does not match '^spi(@.*|-([0-9]|[1-9][0-9]+))?$'
	from schema $id: http://devicetree.org/schemas/spi/spi-gpio.yaml#
arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dtb: spi-gpio@0 (spi-gpio): Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'spi-max-frequency', 'touchscreen@0' were unexpected)
	from schema $id: http://devicetree.org/schemas/spi/spi-gpio.yaml#
arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dtb: /spi-gpio@0/touchscreen@0: failed to match any schema with compatible: ['st,fts2ba61y']






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

* Re: [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC
  2025-09-20  1:46 ` [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC Eric Gonçalves
  2025-09-20 15:48   ` Dmitry Baryshkov
@ 2025-09-25 13:06   ` Konrad Dybcio
  2025-09-26  2:19     ` Eric Gonçalves
  1 sibling, 1 reply; 33+ messages in thread
From: Konrad Dybcio @ 2025-09-25 13:06 UTC (permalink / raw)
  To: Eric Gonçalves, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

On 9/20/25 3:46 AM, Eric Gonçalves wrote:
> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
> PMIC, enable the fuelgauge and charger for now.
> 
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---

[...]

> +&i2c5 {
> +	status = "okay";
> +
> +	max77705_charger: charger@69 {
> +	    compatible = "maxim,max77705-charger";
> +	    reg = <0x69>;

Please use tabs consistently

> +	    monitored-battery = <&battery>;
> +	    interrupt-parent = <&tlmm>;
> +	    interrupts = <5 IRQ_TYPE_LEVEL_LOW>;

interrupts-extended = <&tlmm 5 IRQ...>, here and below

> +	};
> +
> +	fuel-gauge@36 {
> +		reg = <0x36>;

sorting by unit address is welcome

> +		compatible = "maxim,max77705-battery";
> +		power-supplies = <&max77705_charger>;
> +		interrupt-parent = <&tlmm>;
> +		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
> +	};

These nodes should be children of "maxim,max77705"
(see drivers/mfd/max77705.c)

Konrad

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

* Re: [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage
  2025-09-20  1:46 ` [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage Eric Gonçalves
  2025-09-20 20:16   ` Dmitry Baryshkov
@ 2025-09-25 13:07   ` Konrad Dybcio
  2025-09-25 21:37     ` Eric Gonçalves
  1 sibling, 1 reply; 33+ messages in thread
From: Konrad Dybcio @ 2025-09-25 13:07 UTC (permalink / raw)
  To: Eric Gonçalves, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

On 9/20/25 3:46 AM, Eric Gonçalves wrote:
> Enable UFS internal storage of the Samsung Galaxy S22.
> 
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---
>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> index c088f1acf6ea..0a55ce952f93 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> @@ -146,6 +146,24 @@ vreg_l5b_0p88: ldo5 {
>  			regulator-max-microvolt = <888000>;
>  			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>  		};
> +
> +		vreg_l6b_1p2: ldo6 {
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1200000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l7b_2p5: ldo7 {
> +			regulator-min-microvolt = <2504000>;
> +			regulator-max-microvolt = <2504000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l9b_1p2: ldo9 {
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1200000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
>  	};
>  
>  	regulators-1 {
> @@ -370,6 +388,27 @@ tsp_int_sleep: tsp_int_sleep_state {
>  	};
>  };
>  
> +&ufs_mem_hc {
> +	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
> +
> +	vcc-supply = <&vreg_l7b_2p5>;
> +	vcc-max-microamp = <1100000>;

because you set this, you should also set regulator-allow-set-mode and
regulator-allowed-modes

Konrad

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

* Re: [PATCH 2/5] arm64: dts: qcom: r0q: add touchscreen support
  2025-09-20  1:46 ` [PATCH 2/5] arm64: dts: qcom: r0q: add touchscreen support Eric Gonçalves
  2025-09-20 15:46   ` Dmitry Baryshkov
@ 2025-09-25 13:08   ` Konrad Dybcio
  2025-09-25 21:37     ` Eric Gonçalves
  1 sibling, 1 reply; 33+ messages in thread
From: Konrad Dybcio @ 2025-09-25 13:08 UTC (permalink / raw)
  To: Eric Gonçalves, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

On 9/20/25 3:46 AM, Eric Gonçalves wrote:
> Enable the ST-Microelectronics FTS2BA61Y touchscreen. This patch
> depends on "Input: add support for the STM FTS2BA61Y touchscreen".
> 
> The device has an issue where SPI 8 (the bus which the touchscreen is
> connected to) is not working properly right now, so
> spi-gpio is used instead.
> 
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---

[...]

>  &tlmm {
>  	gpio-reserved-ranges = <36 4>; /* SPI (Unused) */
> +
> +	spi_clk_tsp_active: spi_clk_tsp_active {
> +		mux {
> +			pins = "gpio30";
> +			function = "gpio";
> +		};
> +		config {
> +			pins = "gpio30";
> +			drive-strength = <6>;
> +			bias-disable;
> +		};
> +	};

Drop mux/config, put all the properties right under the pin definition

> +
> +	spi_clk_tsp_sleep: spi_clk_tsp_sleep {

Underscores are forbidden in node names, use dashes instead

Konrad

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

* Re: [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks
  2025-09-20  1:46 ` [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks Eric Gonçalves
@ 2025-09-25 13:09   ` Konrad Dybcio
  2025-10-05  3:50     ` Eric Gonçalves
  0 siblings, 1 reply; 33+ messages in thread
From: Konrad Dybcio @ 2025-09-25 13:09 UTC (permalink / raw)
  To: Eric Gonçalves, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

On 9/20/25 3:46 AM, Eric Gonçalves wrote:
> Enable the real-time clocks found in R0Q board.
> 
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---
>  arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> index c1b0b21c0ec5..c088f1acf6ea 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> @@ -225,6 +225,21 @@ vol_up_n: vol-up-n-state {
>  	};
>  };
>  
> +&pmk8350_rtc {
> +	nvmem-cells = <&rtc_offset>;
> +	nvmem-cell-names = "offset";
> +
> +	status = "okay";
> +};
> +
> +&pmk8350_sdam_2 {
> +	status = "okay";
> +
> +	rtc_offset: rtc-offset@bc {

Is this an offset you took from somewhere downstream?

Generally you *really don't want to* poke at random SDAM cells,
as they contain a lot of important settings (incl. battery/charging)

Konrad

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

* Re: [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage
  2025-09-25 13:07   ` Konrad Dybcio
@ 2025-09-25 21:37     ` Eric Gonçalves
  2025-10-06 12:08       ` Konrad Dybcio
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-25 21:37 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel



On September 25, 2025 10:07:31 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>> Enable UFS internal storage of the Samsung Galaxy S22.
>> 
>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>> ---
>>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 39 +++++++++++++++++++
>>  1 file changed, 39 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> index c088f1acf6ea..0a55ce952f93 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> @@ -146,6 +146,24 @@ vreg_l5b_0p88: ldo5 {
>>  			regulator-max-microvolt = <888000>;
>>  			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>  		};
>> +
>> +		vreg_l6b_1p2: ldo6 {
>> +			regulator-min-microvolt = <1200000>;
>> +			regulator-max-microvolt = <1200000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>> +		};
>> +
>> +		vreg_l7b_2p5: ldo7 {
>> +			regulator-min-microvolt = <2504000>;
>> +			regulator-max-microvolt = <2504000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>> +		};
>> +
>> +		vreg_l9b_1p2: ldo9 {
>> +			regulator-min-microvolt = <1200000>;
>> +			regulator-max-microvolt = <1200000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>> +		};
>>  	};
>>  
>>  	regulators-1 {
>> @@ -370,6 +388,27 @@ tsp_int_sleep: tsp_int_sleep_state {
>>  	};
>>  };
>>  
>> +&ufs_mem_hc {
>> +	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
>> +
>> +	vcc-supply = <&vreg_l7b_2p5>;
>> +	vcc-max-microamp = <1100000>;
>
>because you set this, you should also set regulator-allow-set-mode and
>regulator-allowed-modes
>
>Konrad
Why is that necessary?

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

* Re: [PATCH 2/5] arm64: dts: qcom: r0q: add touchscreen support
  2025-09-25 13:08   ` Konrad Dybcio
@ 2025-09-25 21:37     ` Eric Gonçalves
  0 siblings, 0 replies; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-25 21:37 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel



On September 25, 2025 10:08:37 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>> Enable the ST-Microelectronics FTS2BA61Y touchscreen. This patch
>> depends on "Input: add support for the STM FTS2BA61Y touchscreen".
>> 
>> The device has an issue where SPI 8 (the bus which the touchscreen is
>> connected to) is not working properly right now, so
>> spi-gpio is used instead.
>> 
>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>> ---
>
>[...]
>
>>  &tlmm {
>>  	gpio-reserved-ranges = <36 4>; /* SPI (Unused) */
>> +
>> +	spi_clk_tsp_active: spi_clk_tsp_active {
>> +		mux {
>> +			pins = "gpio30";
>> +			function = "gpio";
>> +		};
>> +		config {
>> +			pins = "gpio30";
>> +			drive-strength = <6>;
>> +			bias-disable;
>> +		};
>> +	};
>
>Drop mux/config, put all the properties right under the pin definition
>
>> +
>> +	spi_clk_tsp_sleep: spi_clk_tsp_sleep {
>
>Underscores are forbidden in node names, use dashes instead
>
>Konrad
Will do, thanks

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

* Re: [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC
  2025-09-25 13:06   ` Konrad Dybcio
@ 2025-09-26  2:19     ` Eric Gonçalves
  2025-10-08  8:34       ` Konrad Dybcio
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Gonçalves @ 2025-09-26  2:19 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel



On September 25, 2025 10:06:53 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
>> PMIC, enable the fuelgauge and charger for now.
>> 
>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>> ---
>
>[...]
>
>> +&i2c5 {
>> +	status = "okay";
>> +
>> +	max77705_charger: charger@69 {
>> +	    compatible = "maxim,max77705-charger";
>> +	    reg = <0x69>;
>
>Please use tabs consistently
Sure
>
>> +	    monitored-battery = <&battery>;
>> +	    interrupt-parent = <&tlmm>;
>> +	    interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>
>interrupts-extended = <&tlmm 5 IRQ...>, here and below
why extended?
>
>> +	};
>> +
>> +	fuel-gauge@36 {
>> +		reg = <0x36>;
>
>sorting by unit address is welcome
Sure
>
>> +		compatible = "maxim,max77705-battery";
>> +		power-supplies = <&max77705_charger>;
>> +		interrupt-parent = <&tlmm>;
>> +		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>> +	};
>
>These nodes should be children of "maxim,max77705"
>(see drivers/mfd/max77705.c)
What do you mean by this? I looked at the driver, 
should I add the pmic@66 node and put
the units inside of it? Because starqltechn doesn't do that and
places them outside. Also, by adding the
pmic@66
node it expects to have led/haptics nodes as well.
>
>Konrad

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

* Re: [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks
  2025-09-25 13:09   ` Konrad Dybcio
@ 2025-10-05  3:50     ` Eric Gonçalves
  2025-10-06 12:31       ` Konrad Dybcio
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Gonçalves @ 2025-10-05  3:50 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel



On September 25, 2025 10:09:48 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>> Enable the real-time clocks found in R0Q board.
>> 
>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>> ---
>>  arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> index c1b0b21c0ec5..c088f1acf6ea 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> @@ -225,6 +225,21 @@ vol_up_n: vol-up-n-state {
>>  	};
>>  };
>>  
>> +&pmk8350_rtc {
>> +	nvmem-cells = <&rtc_offset>;
>> +	nvmem-cell-names = "offset";
>> +
>> +	status = "okay";
>> +};
>> +
>> +&pmk8350_sdam_2 {
>> +	status = "okay";
>> +
>> +	rtc_offset: rtc-offset@bc {
>
>Is this an offset you took from somewhere downstream?
>
>Generally you *really don't want to* poke at random SDAM cells,
>as they contain a lot of important settings (incl. battery/charging)
From another sm8450 device, I'm sure it's okay.
>
>Konrad

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

* Re: [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage
  2025-09-25 21:37     ` Eric Gonçalves
@ 2025-10-06 12:08       ` Konrad Dybcio
  2025-10-06 15:49         ` Eric Gonçalves
  0 siblings, 1 reply; 33+ messages in thread
From: Konrad Dybcio @ 2025-10-06 12:08 UTC (permalink / raw)
  To: Eric Gonçalves, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

On 9/25/25 11:37 PM, Eric Gonçalves wrote:
> 
> 
> On September 25, 2025 10:07:31 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>> Enable UFS internal storage of the Samsung Galaxy S22.
>>>
>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>> ---
>>>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 39 +++++++++++++++++++
>>>  1 file changed, 39 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>> index c088f1acf6ea..0a55ce952f93 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>> @@ -146,6 +146,24 @@ vreg_l5b_0p88: ldo5 {
>>>  			regulator-max-microvolt = <888000>;
>>>  			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>>  		};
>>> +
>>> +		vreg_l6b_1p2: ldo6 {
>>> +			regulator-min-microvolt = <1200000>;
>>> +			regulator-max-microvolt = <1200000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>> +		};
>>> +
>>> +		vreg_l7b_2p5: ldo7 {
>>> +			regulator-min-microvolt = <2504000>;
>>> +			regulator-max-microvolt = <2504000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>> +		};
>>> +
>>> +		vreg_l9b_1p2: ldo9 {
>>> +			regulator-min-microvolt = <1200000>;
>>> +			regulator-max-microvolt = <1200000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>> +		};
>>>  	};
>>>  
>>>  	regulators-1 {
>>> @@ -370,6 +388,27 @@ tsp_int_sleep: tsp_int_sleep_state {
>>>  	};
>>>  };
>>>  
>>> +&ufs_mem_hc {
>>> +	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
>>> +
>>> +	vcc-supply = <&vreg_l7b_2p5>;
>>> +	vcc-max-microamp = <1100000>;
>>
>> because you set this, you should also set regulator-allow-set-mode and
>> regulator-allowed-modes
>>
>> Konrad
> Why is that necessary?

Because that is then translated into the mode selection, based on
the aggregated usage

That said, you may also choose to omit this if you want to run all
regulators at high-power mode (less efficient at idle), which forcefully
ensures you're not hitting any current limits 

Konrad

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

* Re: [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks
  2025-10-05  3:50     ` Eric Gonçalves
@ 2025-10-06 12:31       ` Konrad Dybcio
  2025-10-06 15:49         ` Eric Gonçalves
  0 siblings, 1 reply; 33+ messages in thread
From: Konrad Dybcio @ 2025-10-06 12:31 UTC (permalink / raw)
  To: Eric Gonçalves, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

On 10/5/25 5:50 AM, Eric Gonçalves wrote:
> 
> 
> On September 25, 2025 10:09:48 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>> Enable the real-time clocks found in R0Q board.
>>>
>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>> ---
>>>  arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts | 15 +++++++++++++++
>>>  1 file changed, 15 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>> index c1b0b21c0ec5..c088f1acf6ea 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>> @@ -225,6 +225,21 @@ vol_up_n: vol-up-n-state {
>>>  	};
>>>  };
>>>  
>>> +&pmk8350_rtc {
>>> +	nvmem-cells = <&rtc_offset>;
>>> +	nvmem-cell-names = "offset";
>>> +
>>> +	status = "okay";
>>> +};
>>> +
>>> +&pmk8350_sdam_2 {
>>> +	status = "okay";
>>> +
>>> +	rtc_offset: rtc-offset@bc {
>>
>> Is this an offset you took from somewhere downstream?
>>
>> Generally you *really don't want to* poke at random SDAM cells,
>> as they contain a lot of important settings (incl. battery/charging)
> From another sm8450 device, I'm sure it's okay.

That as an argument alone doesn't sound convincing to me, since vendors
also sometimes repurpose unused-by-Qualcomm SDAM cells

I actually found a data source internally and this cell you're trying
to use is reserved for PBS (see drivers/soc/qcom/qcom-pbs.c), meaning
you already fell into this trap..

Konrad

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

* Re: [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks
  2025-10-06 12:31       ` Konrad Dybcio
@ 2025-10-06 15:49         ` Eric Gonçalves
  2025-10-08  8:48           ` Konrad Dybcio
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Gonçalves @ 2025-10-06 15:49 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel



On October 6, 2025 9:31:42 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 10/5/25 5:50 AM, Eric Gonçalves wrote:
>> 
>> 
>> On September 25, 2025 10:09:48 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>>> Enable the real-time clocks found in R0Q board.
>>>>
>>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>>> ---
>>>>  arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts | 15 +++++++++++++++
>>>>  1 file changed, 15 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>> index c1b0b21c0ec5..c088f1acf6ea 100644
>>>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>> @@ -225,6 +225,21 @@ vol_up_n: vol-up-n-state {
>>>>  	};
>>>>  };
>>>>  
>>>> +&pmk8350_rtc {
>>>> +	nvmem-cells = <&rtc_offset>;
>>>> +	nvmem-cell-names = "offset";
>>>> +
>>>> +	status = "okay";
>>>> +};
>>>> +
>>>> +&pmk8350_sdam_2 {
>>>> +	status = "okay";
>>>> +
>>>> +	rtc_offset: rtc-offset@bc {
>>>
>>> Is this an offset you took from somewhere downstream?
>>>
>>> Generally you *really don't want to* poke at random SDAM cells,
>>> as they contain a lot of important settings (incl. battery/charging)
>> From another sm8450 device, I'm sure it's okay.
>
>That as an argument alone doesn't sound convincing to me, since vendors
>also sometimes repurpose unused-by-Qualcomm SDAM cells
>
>I actually found a data source internally and this cell you're trying
>to use is reserved for PBS (see drivers/soc/qcom/qcom-pbs.c), meaning
>you already fell into this trap..
Interesting, in this case then why does rtc still work? And
how can I find the real cell? It's not in downstream DT.
>
>Konrad

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

* Re: [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage
  2025-10-06 12:08       ` Konrad Dybcio
@ 2025-10-06 15:49         ` Eric Gonçalves
  0 siblings, 0 replies; 33+ messages in thread
From: Eric Gonçalves @ 2025-10-06 15:49 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel



On October 6, 2025 9:08:54 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 9/25/25 11:37 PM, Eric Gonçalves wrote:
>> 
>> 
>> On September 25, 2025 10:07:31 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>>> Enable UFS internal storage of the Samsung Galaxy S22.
>>>>
>>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>>> ---
>>>>  .../boot/dts/qcom/sm8450-samsung-r0q.dts      | 39 +++++++++++++++++++
>>>>  1 file changed, 39 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>> index c088f1acf6ea..0a55ce952f93 100644
>>>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>> @@ -146,6 +146,24 @@ vreg_l5b_0p88: ldo5 {
>>>>  			regulator-max-microvolt = <888000>;
>>>>  			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>>>  		};
>>>> +
>>>> +		vreg_l6b_1p2: ldo6 {
>>>> +			regulator-min-microvolt = <1200000>;
>>>> +			regulator-max-microvolt = <1200000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l7b_2p5: ldo7 {
>>>> +			regulator-min-microvolt = <2504000>;
>>>> +			regulator-max-microvolt = <2504000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l9b_1p2: ldo9 {
>>>> +			regulator-min-microvolt = <1200000>;
>>>> +			regulator-max-microvolt = <1200000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>>> +		};
>>>>  	};
>>>>  
>>>>  	regulators-1 {
>>>> @@ -370,6 +388,27 @@ tsp_int_sleep: tsp_int_sleep_state {
>>>>  	};
>>>>  };
>>>>  
>>>> +&ufs_mem_hc {
>>>> +	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
>>>> +
>>>> +	vcc-supply = <&vreg_l7b_2p5>;
>>>> +	vcc-max-microamp = <1100000>;
>>>
>>> because you set this, you should also set regulator-allow-set-mode and
>>> regulator-allowed-modes
>>>
>>> Konrad
>> Why is that necessary?
>
>Because that is then translated into the mode selection, based on
>the aggregated usage
>
>That said, you may also choose to omit this if you want to run all
>regulators at high-power mode (less efficient at idle), which forcefully
>ensures you're not hitting any current limits 
Will do, thanks
>
>Konrad

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

* Re: [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC
  2025-09-26  2:19     ` Eric Gonçalves
@ 2025-10-08  8:34       ` Konrad Dybcio
  2025-10-09 20:31         ` Eric Gonçalves
  0 siblings, 1 reply; 33+ messages in thread
From: Konrad Dybcio @ 2025-10-08  8:34 UTC (permalink / raw)
  To: Eric Gonçalves, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

On 9/26/25 4:19 AM, Eric Gonçalves wrote:
> 
> 
> On September 25, 2025 10:06:53 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
>>> PMIC, enable the fuelgauge and charger for now.
>>>
>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>> ---
>>
>> [...]
>>
>>> +&i2c5 {
>>> +	status = "okay";
>>> +
>>> +	max77705_charger: charger@69 {
>>> +	    compatible = "maxim,max77705-charger";
>>> +	    reg = <0x69>;
>>
>> Please use tabs consistently
> Sure
>>
>>> +	    monitored-battery = <&battery>;
>>> +	    interrupt-parent = <&tlmm>;
>>> +	    interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>
>> interrupts-extended = <&tlmm 5 IRQ...>, here and below
> why extended?
>>
>>> +	};
>>> +
>>> +	fuel-gauge@36 {
>>> +		reg = <0x36>;
>>
>> sorting by unit address is welcome
> Sure
>>
>>> +		compatible = "maxim,max77705-battery";
>>> +		power-supplies = <&max77705_charger>;
>>> +		interrupt-parent = <&tlmm>;
>>> +		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>> +	};
>>
>> These nodes should be children of "maxim,max77705"
>> (see drivers/mfd/max77705.c)
> What do you mean by this? I looked at the driver, 
> should I add the pmic@66 node and put
> the units inside of it? Because starqltechn doesn't do that and
> places them outside. Also, by adding the
> pmic@66
> node it expects to have led/haptics nodes as well.

Well, the chip comes as a single package, so this only makes sense
and the bindings (mfd/maxim,max77705.yaml) corroborate that.

Just looking at the YAML, you should be able to omit the LED part
if it's not connected anywhere

Konrad

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

* Re: [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks
  2025-10-06 15:49         ` Eric Gonçalves
@ 2025-10-08  8:48           ` Konrad Dybcio
  2025-10-09 19:20             ` Eric Gonçalves
  0 siblings, 1 reply; 33+ messages in thread
From: Konrad Dybcio @ 2025-10-08  8:48 UTC (permalink / raw)
  To: Eric Gonçalves, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

On 10/6/25 5:49 PM, Eric Gonçalves wrote:
> 
> 
> On October 6, 2025 9:31:42 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 10/5/25 5:50 AM, Eric Gonçalves wrote:
>>>
>>>
>>> On September 25, 2025 10:09:48 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>>>> Enable the real-time clocks found in R0Q board.
>>>>>
>>>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>>>> ---
>>>>>  arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts | 15 +++++++++++++++
>>>>>  1 file changed, 15 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>>> index c1b0b21c0ec5..c088f1acf6ea 100644
>>>>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>>> @@ -225,6 +225,21 @@ vol_up_n: vol-up-n-state {
>>>>>  	};
>>>>>  };
>>>>>  
>>>>> +&pmk8350_rtc {
>>>>> +	nvmem-cells = <&rtc_offset>;
>>>>> +	nvmem-cell-names = "offset";
>>>>> +
>>>>> +	status = "okay";
>>>>> +};
>>>>> +
>>>>> +&pmk8350_sdam_2 {
>>>>> +	status = "okay";
>>>>> +
>>>>> +	rtc_offset: rtc-offset@bc {
>>>>
>>>> Is this an offset you took from somewhere downstream?
>>>>
>>>> Generally you *really don't want to* poke at random SDAM cells,
>>>> as they contain a lot of important settings (incl. battery/charging)
>>> From another sm8450 device, I'm sure it's okay.
>>
>> That as an argument alone doesn't sound convincing to me, since vendors
>> also sometimes repurpose unused-by-Qualcomm SDAM cells
>>
>> I actually found a data source internally and this cell you're trying
>> to use is reserved for PBS (see drivers/soc/qcom/qcom-pbs.c), meaning
>> you already fell into this trap..
> Interesting, in this case then why does rtc still work? And
> how can I find the real cell? It's not in downstream DT.

Well if nothing accesses that cell between your last write and your first
read, it will of course work, because SDAM is just a means of storage

As for downstream/Android, it does not use SDAM at all

Konrad

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

* Re: [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks
  2025-10-08  8:48           ` Konrad Dybcio
@ 2025-10-09 19:20             ` Eric Gonçalves
  0 siblings, 0 replies; 33+ messages in thread
From: Eric Gonçalves @ 2025-10-09 19:20 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel



On October 8, 2025 5:48:53 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 10/6/25 5:49 PM, Eric Gonçalves wrote:
>> 
>> 
>> On October 6, 2025 9:31:42 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>> On 10/5/25 5:50 AM, Eric Gonçalves wrote:
>>>>
>>>>
>>>> On September 25, 2025 10:09:48 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>>>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>>>>> Enable the real-time clocks found in R0Q board.
>>>>>>
>>>>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>>>>> ---
>>>>>>  arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts | 15 +++++++++++++++
>>>>>>  1 file changed, 15 insertions(+)
>>>>>>
>>>>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>>>> index c1b0b21c0ec5..c088f1acf6ea 100644
>>>>>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>>>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>>>> @@ -225,6 +225,21 @@ vol_up_n: vol-up-n-state {
>>>>>>  	};
>>>>>>  };
>>>>>>  
>>>>>> +&pmk8350_rtc {
>>>>>> +	nvmem-cells = <&rtc_offset>;
>>>>>> +	nvmem-cell-names = "offset";
>>>>>> +
>>>>>> +	status = "okay";
>>>>>> +};
>>>>>> +
>>>>>> +&pmk8350_sdam_2 {
>>>>>> +	status = "okay";
>>>>>> +
>>>>>> +	rtc_offset: rtc-offset@bc {
>>>>>
>>>>> Is this an offset you took from somewhere downstream?
>>>>>
>>>>> Generally you *really don't want to* poke at random SDAM cells,
>>>>> as they contain a lot of important settings (incl. battery/charging)
>>>> From another sm8450 device, I'm sure it's okay.
>>>
>>> That as an argument alone doesn't sound convincing to me, since vendors
>>> also sometimes repurpose unused-by-Qualcomm SDAM cells
>>>
>>> I actually found a data source internally and this cell you're trying
>>> to use is reserved for PBS (see drivers/soc/qcom/qcom-pbs.c), meaning
>>> you already fell into this trap..
>> Interesting, in this case then why does rtc still work? And
>> how can I find the real cell? It's not in downstream DT.
>
>Well if nothing accesses that cell between your last write and your first
>read, it will of course work, because SDAM is just a means of storage
>
>As for downstream/Android, it does not use SDAM at all
Alright, I'll drop this patch then, thanks
>
>Konrad

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

* Re: [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC
  2025-10-08  8:34       ` Konrad Dybcio
@ 2025-10-09 20:31         ` Eric Gonçalves
  2025-10-20 12:06           ` Konrad Dybcio
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Gonçalves @ 2025-10-09 20:31 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel



On October 8, 2025 5:34:00 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 9/26/25 4:19 AM, Eric Gonçalves wrote:
>> 
>> 
>> On September 25, 2025 10:06:53 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>>> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
>>>> PMIC, enable the fuelgauge and charger for now.
>>>>
>>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>>> ---
>>>
>>> [...]
>>>
>>>> +&i2c5 {
>>>> +	status = "okay";
>>>> +
>>>> +	max77705_charger: charger@69 {
>>>> +	    compatible = "maxim,max77705-charger";
>>>> +	    reg = <0x69>;
>>>
>>> Please use tabs consistently
>> Sure
>>>
>>>> +	    monitored-battery = <&battery>;
>>>> +	    interrupt-parent = <&tlmm>;
>>>> +	    interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>>
>>> interrupts-extended = <&tlmm 5 IRQ...>, here and below
>> why extended?
>>>
>>>> +	};
>>>> +
>>>> +	fuel-gauge@36 {
>>>> +		reg = <0x36>;
>>>
>>> sorting by unit address is welcome
>> Sure
>>>
>>>> +		compatible = "maxim,max77705-battery";
>>>> +		power-supplies = <&max77705_charger>;
>>>> +		interrupt-parent = <&tlmm>;
>>>> +		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>>> +	};
>>>
>>> These nodes should be children of "maxim,max77705"
>>> (see drivers/mfd/max77705.c)
>> What do you mean by this? I looked at the driver, 
>> should I add the pmic@66 node and put
>> the units inside of it? Because starqltechn doesn't do that and
>> places them outside. Also, by adding the
>> pmic@66
>> node it expects to have led/haptics nodes as well.
>
>Well, the chip comes as a single package, so this only makes sense
>and the bindings (mfd/maxim,max77705.yaml) corroborate that.
>
>Just looking at the YAML, you should be able to omit the LED part
>if it's not connected anywhere
Well, looking at power/supply/maxim,max77705.yaml shows
that this is how it's meant to be defined, (outside the
maxim,max77705 node), no?
>
>Konrad

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

* Re: [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC
  2025-10-09 20:31         ` Eric Gonçalves
@ 2025-10-20 12:06           ` Konrad Dybcio
  0 siblings, 0 replies; 33+ messages in thread
From: Konrad Dybcio @ 2025-10-20 12:06 UTC (permalink / raw)
  To: Eric Gonçalves, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-arm-msm, linux-kernel

On 10/9/25 10:31 PM, Eric Gonçalves wrote:
> 
> 
> On October 8, 2025 5:34:00 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 9/26/25 4:19 AM, Eric Gonçalves wrote:
>>>
>>>
>>> On September 25, 2025 10:06:53 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>>>> The Samsung Galaxy S22 uses max77705 as its charger, fuelgauge and haptic
>>>>> PMIC, enable the fuelgauge and charger for now.
>>>>>
>>>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>>>> ---
>>>>
>>>> [...]
>>>>
>>>>> +&i2c5 {
>>>>> +	status = "okay";
>>>>> +
>>>>> +	max77705_charger: charger@69 {
>>>>> +	    compatible = "maxim,max77705-charger";
>>>>> +	    reg = <0x69>;
>>>>
>>>> Please use tabs consistently
>>> Sure
>>>>
>>>>> +	    monitored-battery = <&battery>;
>>>>> +	    interrupt-parent = <&tlmm>;
>>>>> +	    interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>>>
>>>> interrupts-extended = <&tlmm 5 IRQ...>, here and below
>>> why extended?
>>>>
>>>>> +	};
>>>>> +
>>>>> +	fuel-gauge@36 {
>>>>> +		reg = <0x36>;
>>>>
>>>> sorting by unit address is welcome
>>> Sure
>>>>
>>>>> +		compatible = "maxim,max77705-battery";
>>>>> +		power-supplies = <&max77705_charger>;
>>>>> +		interrupt-parent = <&tlmm>;
>>>>> +		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
>>>>> +	};
>>>>
>>>> These nodes should be children of "maxim,max77705"
>>>> (see drivers/mfd/max77705.c)
>>> What do you mean by this? I looked at the driver, 
>>> should I add the pmic@66 node and put
>>> the units inside of it? Because starqltechn doesn't do that and
>>> places them outside. Also, by adding the
>>> pmic@66
>>> node it expects to have led/haptics nodes as well.
>>
>> Well, the chip comes as a single package, so this only makes sense
>> and the bindings (mfd/maxim,max77705.yaml) corroborate that.
>>
>> Just looking at the YAML, you should be able to omit the LED part
>> if it's not connected anywhere
> Well, looking at power/supply/maxim,max77705.yaml shows
> that this is how it's meant to be defined, (outside the
> maxim,max77705 node), no?

If you grep for maxim,max77705-charger, you'll notice that the MFD
driver defines a MFD_CELL_OF

So it's reasonable to assume the bindings example is simply not making
this obvious

Konrad

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

end of thread, other threads:[~2025-10-20 12:06 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-20  1:46 [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals Eric Gonçalves
2025-09-20  1:46 ` [PATCH 1/5] arm64: dts: qcom: r0q: add gpio keys Eric Gonçalves
2025-09-20 15:45   ` Dmitry Baryshkov
2025-09-20 18:02     ` Eric Gonçalves
2025-09-20 20:15       ` Dmitry Baryshkov
2025-09-20 20:22         ` Eric Gonçalves
2025-09-20 23:21           ` Dmitry Baryshkov
2025-09-20  1:46 ` [PATCH 2/5] arm64: dts: qcom: r0q: add touchscreen support Eric Gonçalves
2025-09-20 15:46   ` Dmitry Baryshkov
2025-09-25 13:08   ` Konrad Dybcio
2025-09-25 21:37     ` Eric Gonçalves
2025-09-20  1:46 ` [PATCH 3/5] arm64: dts: qcom: r0q: enable max77705 PMIC Eric Gonçalves
2025-09-20 15:48   ` Dmitry Baryshkov
2025-09-20 18:04     ` Eric Gonçalves
2025-09-25 13:06   ` Konrad Dybcio
2025-09-26  2:19     ` Eric Gonçalves
2025-10-08  8:34       ` Konrad Dybcio
2025-10-09 20:31         ` Eric Gonçalves
2025-10-20 12:06           ` Konrad Dybcio
2025-09-20  1:46 ` [PATCH 4/5] arm64: dts: qcom: r0q: enable hardware clocks Eric Gonçalves
2025-09-25 13:09   ` Konrad Dybcio
2025-10-05  3:50     ` Eric Gonçalves
2025-10-06 12:31       ` Konrad Dybcio
2025-10-06 15:49         ` Eric Gonçalves
2025-10-08  8:48           ` Konrad Dybcio
2025-10-09 19:20             ` Eric Gonçalves
2025-09-20  1:46 ` [PATCH 5/5] arm64: dts: qcom: r0q: enable ufs storage Eric Gonçalves
2025-09-20 20:16   ` Dmitry Baryshkov
2025-09-25 13:07   ` Konrad Dybcio
2025-09-25 21:37     ` Eric Gonçalves
2025-10-06 12:08       ` Konrad Dybcio
2025-10-06 15:49         ` Eric Gonçalves
2025-09-22 17:27 ` [PATCH 0/5] arm64: dts: qcom: r0q: enable more peripherals 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).