devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn
@ 2024-10-08 16:51 Dzmitry Sankouski
  2024-10-08 16:51 ` [PATCH v6 01/12] arm64: dts: qcom: sdm845: enable gmu Dzmitry Sankouski
                   ` (11 more replies)
  0 siblings, 12 replies; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski,
	Konrad Dybcio

Contains starqltechn device tree changes.
Add support for new features:
- sound (headphones and mics only)
- gpu
- panel
- buttons
- MAX77705 MFD:
  - charger
  - fuelgauge
  - haptic
  - led

Binding Dependencies:
- s2dos05: https://lore.kernel.org/r/20241007-starqltechn_integration_upstream-v6-0-264309aa66de@gmail.com
- max77705: https://lore.kernel.org/r/20241007-starqltechn_integration_upstream-v6-0-0d38b5090c57@gmail.com
- s6e3ha8 panel: https://lore.kernel.org/r/20241006-starqltechn_integration_upstream-v6-0-8336b9cd6c34@gmail.com

Runtime Dependencies:
- gcc845 gp clock: https://lore.kernel.org/r/20241007-starqltechn_integration_upstream-v6-0-dd75c06c708d@gmail.com

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
Changes in v6:
- refactor: no space between tags in commit message
- rename starqltechn to sdm845-starqltechn in commit summaries
- Link to v5: https://lore.kernel.org/r/20240926-starqltechn_integration_upstream-v5-0-d2084672ff2f@gmail.com

Changes in v5:
- Split patchset per subsystem
- Add links to subsystem patchsets in description
- Link to v4: https://lore.kernel.org/r/20240913-starqltechn_integration_upstream-v4-0-2d2efd5c5877@gmail.com

Changes in v4:
- Rewrite max77705, max77705_charger, max77705_fuel_gauge from scratch
- Reorder patches:
  - squash max77705 subdevice bindings in core file because
    no resources there
  - split device tree changes
- Use _ as space for filenames in power/supply like the majority
- Replace gcc-845 freq_tbl frequencies patch with new approach,
  based on automatic m/n/pre_div value generation
- Link to v3: https://lore.kernel.org/r/20240618-starqltechn_integration_upstream-v3-0-e3f6662017ac@gmail.com

Changes in version 3:
- disable crypto patch removed(disabled on distro level)
- dts framebuffer node along with related patches removed,
because panel driver added
- fix 'make O=.output_arm64 CHECK_DTBS=y qcom/sdm845-samsung-starqltechn.dtb'
errors, but it still complains on 'monitored-battery' and
'power-supplies' though I have 'power-supply.yaml' link in charger
and fuel gauge bindings.

---
Dzmitry Sankouski (12):
      arm64: dts: qcom: sdm845: enable gmu
      arm64: dts: qcom: sdm845-starqltechn: remove wifi
      arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
      arm64: dts: qcom: sdm845-starqltechn: refactor node order
      arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios
      arm64: dts: qcom: sdm845-starqltechn: add gpio keys
      arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC
      arm64: dts: qcom: sdm845-starqltechn: add display PMIC
      arm64: dts: qcom: sdm845-starqltechn: add touchscreen support
      arm64: dts: qcom: sdm845-starqltechn: add initial sound support
      arm64: dts: qcom: sdm845-starqltechn: add graphics support
      arm64: dts: qcom: sdm845-starqltechn: add modem support

 arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi                   |   4 -
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts                   |   4 -
 arch/arm64/boot/dts/qcom/sdm845-mtp.dts                      |   4 -
 arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi          |   4 -
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts      | 573 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts            |   4 -
 arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi        |   4 -
 arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi |   4 -
 arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts           |   4 -
 arch/arm64/boot/dts/qcom/sdm845.dtsi                         |   2 -
 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts         |   4 -
 11 files changed, 564 insertions(+), 47 deletions(-)
---
base-commit: 58ca61c1a866bfdaa5e19fb19a2416764f847d75
change-id: 20240617-starqltechn_integration_upstream-bc86850b2fe3

Best regards,
-- 
Dzmitry Sankouski <dsankouski@gmail.com>


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

* [PATCH v6 01/12] arm64: dts: qcom: sdm845: enable gmu
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-26 10:20   ` Konrad Dybcio
  2024-10-08 16:51 ` [PATCH v6 02/12] arm64: dts: qcom: sdm845-starqltechn: remove wifi Dzmitry Sankouski
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Leave gmu enabled, because it's only probed when
GPU is.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
Changes in v5:
- delete gmu node from sdm850-lenovo-yoga-c630
  (it's imported from sdm845.dtsi)
---
 arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi                   | 4 ----
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts                   | 4 ----
 arch/arm64/boot/dts/qcom/sdm845-mtp.dts                      | 4 ----
 arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi          | 4 ----
 arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts            | 4 ----
 arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi        | 4 ----
 arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 4 ----
 arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts           | 4 ----
 arch/arm64/boot/dts/qcom/sdm845.dtsi                         | 2 --
 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts         | 4 ----
 10 files changed, 38 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
index e8276db9eabb..a5149a384167 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
@@ -741,10 +741,6 @@ touchscreen@10 {
 	};
 };
 
-&gmu {
-	status = "okay";
-};
-
 &gpu {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index 9a6d3d0c0ee4..59cb6e6e434c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -444,10 +444,6 @@ &gcc {
 			   <GCC_LPASS_SWAY_CLK>;
 };
 
-&gmu {
-	status = "okay";
-};
-
 &gpi_dma0 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
index 2391f842c903..d31efad8a321 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
@@ -414,10 +414,6 @@ &gcc {
 			   <GCC_LPASS_SWAY_CLK>;
 };
 
-&gmu {
-	status = "okay";
-};
-
 &gpu {
 	status = "okay";
 
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index 46e25c53829a..8a0f154bffc3 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -345,10 +345,6 @@ &gcc {
 				<GCC_LPASS_SWAY_CLK>;
 };
 
-&gmu {
-	status = "okay";
-};
-
 &gpu {
 	status = "okay";
 
diff --git a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
index 486ce175e6bc..87fc4021e024 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
@@ -419,10 +419,6 @@ &gcc {
 			   <GCC_LPASS_SWAY_CLK>;
 };
 
-&gmu {
-	status = "okay";
-};
-
 &gpu {
 	status = "okay";
 
diff --git a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
index b02a1dc5fecd..a3a304e1ac87 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
@@ -415,10 +415,6 @@ &gcc {
 			<GCC_LPASS_SWAY_CLK>;
 };
 
-&gmu {
-	status = "okay";
-};
-
 &gpi_dma0 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
index 617b17b2d7d9..f790eb73abdd 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
@@ -239,10 +239,6 @@ &gcc {
 			   <GCC_LPASS_SWAY_CLK>;
 };
 
-&gmu {
-	status = "okay";
-};
-
 &gpu {
 	status = "okay";
 
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
index e386b504e978..501575c9beda 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
@@ -381,10 +381,6 @@ &gcc {
 				<GCC_LPASS_SWAY_CLK>;
 };
 
-&gmu {
-	status = "okay";
-};
-
 &gpi_dma0 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 54077549b9da..fe154216f138 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4948,8 +4948,6 @@ gmu: gmu@506a000 {
 
 			operating-points-v2 = <&gmu_opp_table>;
 
-			status = "disabled";
-
 			gmu_opp_table: opp-table {
 				compatible = "operating-points-v2";
 
diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
index f18050848cd8..ca81f3664abd 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -355,10 +355,6 @@ &gcc {
 			   <GCC_LPASS_SWAY_CLK>;
 };
 
-&gmu {
-	status = "okay";
-};
-
 &gpu {
 	status = "okay";
 	zap-shader {

-- 
2.39.2


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

* [PATCH v6 02/12] arm64: dts: qcom: sdm845-starqltechn: remove wifi
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
  2024-10-08 16:51 ` [PATCH v6 01/12] arm64: dts: qcom: sdm845: enable gmu Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-08 16:51 ` [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake Dzmitry Sankouski
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski,
	Konrad Dybcio

Starqltechn has broadcom chip for wifi, so sdm845 wifi part
can be disabled.

Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>

---
Changes in v6:
- refactor: no space between tag in commit message.
- refactor: s/starqltechn/sdm845-starqltechn in subject.
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index d37a433130b9..6fc30fd1262b 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -418,14 +418,6 @@ &usb_1_qmpphy {
 	status = "okay";
 };
 
-&wifi {
-	vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
-	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
-	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
-	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
-	status = "okay";
-};
-
 &tlmm {
 	gpio-reserved-ranges = <0 4>, <27 4>, <81 4>, <85 4>;
 

-- 
2.39.2


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

* [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
  2024-10-08 16:51 ` [PATCH v6 01/12] arm64: dts: qcom: sdm845: enable gmu Dzmitry Sankouski
  2024-10-08 16:51 ` [PATCH v6 02/12] arm64: dts: qcom: sdm845-starqltechn: remove wifi Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-26 10:41   ` Konrad Dybcio
  2024-10-08 16:51 ` [PATCH v6 04/12] arm64: dts: qcom: sdm845-starqltechn: refactor node order Dzmitry Sankouski
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Usb regulator was wrongly pointed to vreg_l1a_0p875.
However, on starqltechn it's powered from vreg_l5a_0p8.

Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>

---
Changes in v6:
- refactor: no space between tag in commit message.
- refactor: s/starqltechn/sdm845-starqltechn in subject.
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 6fc30fd1262b..f3f2b25883d8 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -135,8 +135,6 @@ vdda_pll_cc_ebi23:
 		vdda_sp_sensor:
 		vdda_ufs1_core:
 		vdda_ufs2_core:
-		vdda_usb1_ss_core:
-		vdda_usb2_ss_core:
 		vreg_l1a_0p875: ldo1 {
 			regulator-min-microvolt = <880000>;
 			regulator-max-microvolt = <880000>;
@@ -157,6 +155,7 @@ vreg_l3a_1p0: ldo3 {
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
 
+		vdda_usb1_ss_core:
 		vdd_wcss_cx:
 		vdd_wcss_mx:
 		vdda_wcss_pll:

-- 
2.39.2


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

* [PATCH v6 04/12] arm64: dts: qcom: sdm845-starqltechn: refactor node order
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
                   ` (2 preceding siblings ...)
  2024-10-08 16:51 ` [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-08 16:51 ` [PATCH v6 05/12] arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios Dzmitry Sankouski
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>

---
Changes in v6:
- refactor: no space between tag in commit message.
- refactor: s/starqltechn/sdm845-starqltechn in subject.
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index f3f2b25883d8..8a0d63bd594b 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -382,8 +382,8 @@ &ufs_mem_phy {
 };
 
 &sdhc_2 {
-	pinctrl-names = "default";
 	pinctrl-0 = <&sdc2_clk_state &sdc2_cmd_state &sdc2_data_state &sd_card_det_n_state>;
+	pinctrl-names = "default";
 	cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
 	vmmc-supply = <&vreg_l21a_2p95>;
 	vqmmc-supply = <&vddpx_2>;

-- 
2.39.2


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

* [PATCH v6 05/12] arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
                   ` (3 preceding siblings ...)
  2024-10-08 16:51 ` [PATCH v6 04/12] arm64: dts: qcom: sdm845-starqltechn: refactor node order Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-26 10:21   ` Konrad Dybcio
  2024-10-08 16:51 ` [PATCH v6 06/12] arm64: dts: qcom: sdm845-starqltechn: add gpio keys Dzmitry Sankouski
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Starqltechn has 2 reserved gpio ranges <27 4>, <85 4>.
<27 4> is spi for eSE(embedded Secure Element).
<85 4> is spi for fingerprint.

Remove excess reserved gpio regions.

Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>

---
Changes in v6:
- refactor: no space between tag in commit message.
- refactor: s/starqltechn/sdm845-starqltechn in subject.
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 8a0d63bd594b..5948b401165c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -418,7 +418,8 @@ &usb_1_qmpphy {
 };
 
 &tlmm {
-	gpio-reserved-ranges = <0 4>, <27 4>, <81 4>, <85 4>;
+	gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */
+			       <85 4>; /* SPI (fingerprint reader) */
 
 	sdc2_clk_state: sdc2-clk-state {
 		pins = "sdc2_clk";

-- 
2.39.2


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

* [PATCH v6 06/12] arm64: dts: qcom: sdm845-starqltechn: add gpio keys
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
                   ` (4 preceding siblings ...)
  2024-10-08 16:51 ` [PATCH v6 05/12] arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-26 10:38   ` Konrad Dybcio
  2024-10-08 16:51 ` [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC Dzmitry Sankouski
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Add support for phone buttons.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>

---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject.
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 5948b401165c..a3bd5231569d 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -7,9 +7,11 @@
 
 /dts-v1/;
 
+#include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "sdm845.dtsi"
+#include "pm8998.dtsi"
 
 / {
 	chassis-type = "handset";
@@ -69,6 +71,25 @@ memory@a1300000 {
 			pmsg-size = <0x40000>;
 		};
 	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+		autorepeat;
+
+		key-vol-up {
+			label = "volume_up";
+			gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			debounce-interval = <15>;
+		};
+
+		key-wink {
+			label = "key_wink";
+			gpios = <&pm8998_gpios 19 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_ENTER>;
+			debounce-interval = <15>;
+		};
+	};
 };
 
 
@@ -417,6 +438,21 @@ &usb_1_qmpphy {
 	status = "okay";
 };
 
+&pm8998_resin {
+	linux,code = <KEY_VOLUMEDOWN>;
+	status = "okay";
+};
+
+&pm8998_gpios {
+	chg_int_default: chg-int-default-state {
+		pins = "gpio11";
+		function = "normal";
+		input-enable;
+		bias-disable;
+		power-source = <0>;
+	};
+};
+
 &tlmm {
 	gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */
 			       <85 4>; /* SPI (fingerprint reader) */

-- 
2.39.2


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

* [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
                   ` (5 preceding siblings ...)
  2024-10-08 16:51 ` [PATCH v6 06/12] arm64: dts: qcom: sdm845-starqltechn: add gpio keys Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-26 10:36   ` Konrad Dybcio
  2024-10-08 16:51 ` [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC Dzmitry Sankouski
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Add support for max77705 MFD device. Supported sub-devices:
 charger, fuelgauge, haptic, led

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
- refactor: 'm' < 's', so putting motor tlmm nodes first

Changes in v5:
- fix according to binding changes
- reorder vib_pwm node
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index a3bd5231569d..7d1d57f41024 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -18,6 +18,16 @@ / {
 	model = "Samsung Galaxy S9 SM-G9600";
 	compatible = "samsung,starqltechn", "qcom,sdm845";
 
+	battery: battery {
+		compatible = "simple-battery";
+		constant-charge-current-max-microamp = <2150000>;
+		charge-full-design-microamp-hours = <3000000>;
+
+		over-voltage-threshold-microvolt = <4500000>;
+		voltage-min-design-microvolt = <3400000>;
+		voltage-max-design-microvolt = <4350000>;
+	};
+
 	chosen {
 		#address-cells = <2>;
 		#size-cells = <2>;
@@ -90,6 +100,27 @@ key-wink {
 			debounce-interval = <15>;
 		};
 	};
+
+	vib_regulator: gpio-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "haptic";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-boot-on;
+		enable-active-high;
+		gpio = <&pm8998_gpios 18 GPIO_ACTIVE_HIGH>;
+	};
+
+	vib_pwm: pwm {
+		compatible = "clk-pwm";
+		#pwm-cells = <2>;
+		assigned-clock-parents = <&rpmhcc RPMH_CXO_CLK>;
+		assigned-clocks = <&gcc GCC_GP1_CLK_SRC>;
+		clocks = <&gcc GCC_GP1_CLK>;
+		pinctrl-0 = <&motor_pwm_default_state>;
+		pinctrl-1 = <&motor_pwm_suspend_state>;
+		pinctrl-names = "default", "suspend";
+	};
 };
 
 
@@ -385,10 +416,66 @@ &qupv3_id_1 {
 	status = "okay";
 };
 
+&gpi_dma1 {
+	status = "okay";
+};
+
 &uart9 {
 	status = "okay";
 };
 
+&i2c14 {
+	status = "okay";
+
+	pmic@66 {
+		compatible = "maxim,max77705";
+		reg = <0x66>;
+		interrupt-parent = <&pm8998_gpios>;
+		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+		pinctrl-0 = <&chg_int_default>;
+		pinctrl-names = "default";
+
+		leds {
+			compatible = "maxim,max77705-led";
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			led@1 {
+				reg = <1>;
+				label = "red:usr1";
+			};
+
+			led@2 {
+				reg = <2>;
+				label = "green:usr2";
+			};
+
+			led@3 {
+				reg = <3>;
+				label = "blue:usr3";
+			};
+		};
+
+		max77705_charger: charger {
+			compatible = "maxim,max77705-charger";
+			monitored-battery = <&battery>;
+		};
+
+		fuel-gauge {
+			compatible = "maxim,max77705-fuel-gauge";
+			monitored-battery = <&battery>;
+			power-supplies = <&max77705_charger>;
+			shunt-resistor-micro-ohms = <5000>;
+		};
+
+		haptic {
+			compatible = "maxim,max77705-haptic";
+			haptic-supply = <&vib_regulator>;
+			pwms = <&vib_pwm 0 100000>;
+		};
+	};
+};
+
 &ufs_mem_hc {
 	reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
 	vcc-supply = <&vreg_l20a_2p95>;
@@ -457,6 +544,22 @@ &tlmm {
 	gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */
 			       <85 4>; /* SPI (fingerprint reader) */
 
+	motor_pwm_default_state: motor-pwm-active-state {
+		pins = "gpio57";
+		function = "gcc_gp1";
+		drive-strength = <2>;
+		bias-disable;
+		output-high;
+	};
+
+	motor_pwm_suspend_state: motor-pwm-suspend-state {
+		pins = "gpio57";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+		output-low;
+	};
+
 	sdc2_clk_state: sdc2-clk-state {
 		pins = "sdc2_clk";
 		bias-disable;

-- 
2.39.2


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

* [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
                   ` (6 preceding siblings ...)
  2024-10-08 16:51 ` [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-11-04 14:15   ` Konrad Dybcio
  2024-10-08 16:51 ` [PATCH v6 09/12] arm64: dts: qcom: sdm845-starqltechn: add touchscreen support Dzmitry Sankouski
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Add support for s2dos05 display / touchscreen PMIC

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
- refactor: 'i' < 'm', so put tlmm i2c node before motor*

Changes in v5:
- simplify regulator names
- remove single buck index
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 7d1d57f41024..5635f3b088cf 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -39,6 +39,9 @@ framebuffer: framebuffer@9d400000 {
 			height = <2960>;
 			stride = <(1440 * 4)>;
 			format = "a8r8g8b8";
+			vci-supply = <&s2dos05_ldo4>;
+			vddr-supply = <&s2dos05_buck>;
+			vdd3-supply = <&s2dos05_ldo1>;
 		};
 	};
 
@@ -101,6 +104,66 @@ key-wink {
 		};
 	};
 
+	i2c21 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&tlmm 127 GPIO_ACTIVE_HIGH>;
+		scl-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;
+		i2c-gpio,delay-us = <2>;
+		pinctrl-0 = <&i2c21_sda_state &i2c21_scl_state>;
+		pinctrl-names = "default";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pmic@60 {
+			compatible = "samsung,s2dos05";
+			reg = <0x60>;
+
+			regulators {
+				s2dos05_ldo1: ldo1 {
+					regulator-active-discharge = <1>;
+					regulator-enable-ramp-delay = <12000>;
+					regulator-min-microvolt = <1500000>;
+					regulator-max-microvolt = <2000000>;
+					regulator-name = "ldo1";
+				};
+
+				s2dos05_ldo2: ldo2 {
+					regulator-active-discharge = <1>;
+					regulator-boot-on;
+					regulator-enable-ramp-delay = <12000>;
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-name = "ldo2";
+				};
+
+				s2dos05_ldo3: ldo3 {
+					regulator-active-discharge = <1>;
+					regulator-boot-on;
+					regulator-enable-ramp-delay = <12000>;
+					regulator-min-microvolt = <3000000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-name = "ldo3";
+				};
+
+				s2dos05_ldo4: ldo4 {
+					regulator-active-discharge = <1>;
+					regulator-enable-ramp-delay = <12000>;
+					regulator-min-microvolt = <2700000>;
+					regulator-max-microvolt = <3775000>;
+					regulator-name = "ldo4";
+				};
+
+				s2dos05_buck: buck {
+					regulator-active-discharge = <1>;
+					regulator-enable-ramp-delay = <12000>;
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <2100000>;
+					regulator-name = "buck";
+				};
+			};
+		};
+	};
+
 	vib_regulator: gpio-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "haptic";
@@ -544,6 +607,20 @@ &tlmm {
 	gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */
 			       <85 4>; /* SPI (fingerprint reader) */
 
+	i2c21_sda_state: i2c21-sda-state {
+		pins = "gpio127";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	i2c21_scl_state: i2c21-scl-state {
+		pins = "gpio128";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	motor_pwm_default_state: motor-pwm-active-state {
 		pins = "gpio57";
 		function = "gcc_gp1";

-- 
2.39.2


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

* [PATCH v6 09/12] arm64: dts: qcom: sdm845-starqltechn: add touchscreen support
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
                   ` (7 preceding siblings ...)
  2024-10-08 16:51 ` [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-08 16:51 ` [PATCH v6 10/12] arm64: dts: qcom: sdm845-starqltechn: add initial sound support Dzmitry Sankouski
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Add support for samsung,s6sy761 touchscreen.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>

---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 5635f3b088cf..2a367625d591 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -561,6 +561,23 @@ &sdhc_2 {
 	status = "okay";
 };
 
+&i2c11 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	touchscreen@48 {
+		compatible = "samsung,s6sy761";
+		reg = <0x48>;
+		interrupt-parent = <&tlmm>;
+		interrupts = <120 IRQ_TYPE_LEVEL_HIGH>;
+		vdd-supply = <&s2dos05_ldo2>;
+		avdd-supply = <&s2dos05_ldo3>;
+
+		pinctrl-0 = <&touch_irq_state>;
+		pinctrl-names = "default";
+	};
+};
+
 &usb_1 {
 	status = "okay";
 };
@@ -665,4 +682,15 @@ sd_card_det_n_state: sd-card-det-n-state {
 		function = "gpio";
 		bias-pull-up;
 	};
+
+	touch_irq_state: touch-irq-state {
+		pins = "gpio120";
+		function = "gpio";
+		bias-disable;
+	};
+};
+
+&qup_i2c11_default {
+	drive-strength = <2>;
+	bias-disable;
 };

-- 
2.39.2


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

* [PATCH v6 10/12] arm64: dts: qcom: sdm845-starqltechn: add initial sound support
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
                   ` (8 preceding siblings ...)
  2024-10-08 16:51 ` [PATCH v6 09/12] arm64: dts: qcom: sdm845-starqltechn: add touchscreen support Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-26 10:32   ` Konrad Dybcio
  2024-10-08 16:51 ` [PATCH v6 11/12] arm64: dts: qcom: sdm845-starqltechn: add graphics support Dzmitry Sankouski
  2024-10-08 16:51 ` [PATCH v6 12/12] arm64: dts: qcom: sdm845-starqltechn: add modem support Dzmitry Sankouski
  11 siblings, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Add support for sound (headphones and mics only)
Also redefine slpi reserved memory, because adsp_mem overlaps with
slpi_mem inherited from sdm845.dtsi.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>

---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject.
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 213 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 213 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 2a367625d591..4d459fb85782 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -10,8 +10,15 @@
 #include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
+
 #include "sdm845.dtsi"
 #include "pm8998.dtsi"
+#include "sdm845-wcd9340.dtsi"
+
+/delete-node/ &adsp_mem;
+/delete-node/ &slpi_mem;
 
 / {
 	chassis-type = "handset";
@@ -83,6 +90,16 @@ memory@a1300000 {
 			ftrace-size = <0x40000>;
 			pmsg-size = <0x40000>;
 		};
+
+		slpi_mem: slpi@96700000 {
+			reg = <0 0x96700000 0 0xf00000>;
+			no-map;
+		};
+
+		adsp_mem: memory@97800000 {
+			reg = <0 0x97800000 0 0x2000000>;
+			no-map;
+		};
 	};
 
 	gpio_keys {
@@ -578,6 +595,202 @@ touchscreen@48 {
 	};
 };
 
+&adsp_pas {
+	firmware-name = "qcom/sdm845/starqltechn/adsp.mbn";
+	status = "okay";
+};
+
+&lpasscc {
+	status = "okay";
+};
+
+&wcd9340 {
+	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
+	vdd-buck-supply = <&vreg_s4a_1p8>;
+	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
+	vdd-tx-supply = <&vreg_s4a_1p8>;
+	vdd-rx-supply = <&vreg_s4a_1p8>;
+	vdd-io-supply = <&vreg_s4a_1p8>;
+	qcom,micbias1-microvolt = <1800000>;
+	qcom,micbias2-microvolt = <2700000>;
+	qcom,micbias3-microvolt = <1800000>;
+	qcom,micbias4-microvolt = <1800000>;
+};
+
+&sound {
+	compatible = "qcom,sdm845-sndcard";
+	model = "Samsung Galaxy S9";
+	pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	audio-routing =	"RX_BIAS", "MCLK",
+			"AMIC2", "MIC BIAS2", /* Headset Mic */
+			"AMIC3", "MIC BIAS2", /* FMLeft Tx */
+			"AMIC4", "MIC BIAS2", /* FMRight Tx */
+			"DMIC0", "MIC BIAS1", /* Digital Mic0 */
+			"DMIC5", "MIC BIAS4", /* Digital Mic1 */
+			"DMIC4", "MIC BIAS4", /* Digital Mic2 */
+			"DMIC3", "MIC BIAS3", /* Digital Mic3 */
+			"DMIC2", "MIC BIAS3", /* Digital Mic4 */
+			"DMIC1", "MIC BIAS1"; /* Digital Mic5 */
+
+	mm1-dai-link {
+		link-name = "MultiMedia1";
+		cpu {
+			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+		};
+	};
+
+	mm2-dai-link {
+		link-name = "MultiMedia2";
+		cpu {
+			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
+		};
+	};
+
+	mm3-dai-link {
+		link-name = "MultiMedia3";
+		cpu {
+			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
+		};
+	};
+
+	mm4-dai-link {
+		link-name = "MultiMedia4";
+		cpu {
+			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
+		};
+	};
+
+	mm5-dai-link {
+		link-name = "MultiMedia5";
+		cpu {
+			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA5>;
+		};
+	};
+
+	mm6-dai-link {
+		link-name = "MultiMedia6";
+		cpu {
+			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA6>;
+		};
+	};
+
+	slim-dai-link {
+		link-name = "SLIM Playback 1";
+		cpu {
+			sound-dai = <&q6afedai SLIMBUS_0_RX>;
+		};
+
+		platform {
+			sound-dai = <&q6routing>;
+		};
+
+		codec {
+			sound-dai = <&wcd9340 0>;
+		};
+	};
+
+	slimcap-dai-link {
+		link-name = "SLIM Capture 1";
+		cpu {
+			sound-dai = <&q6afedai SLIMBUS_0_TX>;
+		};
+
+		platform {
+			sound-dai = <&q6routing>;
+		};
+
+		codec {
+			sound-dai = <&wcd9340 1>;
+		};
+	};
+
+	slim2-dai-link {
+		link-name = "SLIM Playback 2";
+		cpu {
+			sound-dai = <&q6afedai SLIMBUS_1_RX>;
+		};
+
+		platform {
+			sound-dai = <&q6routing>;
+		};
+
+		codec {
+			sound-dai = <&wcd9340 2>; /* AIF2_PB */
+		};
+	};
+
+	slimcap2-dai-link {
+		link-name = "SLIM Capture 2";
+		cpu {
+			sound-dai = <&q6afedai SLIMBUS_1_TX>;
+		};
+
+		platform {
+			sound-dai = <&q6routing>;
+		};
+
+		codec {
+			sound-dai = <&wcd9340 3>; /* AIF2_CAP */
+		};
+	};
+
+	slimcap3-dai-link {
+		link-name = "SLIM Capture 3";
+		cpu {
+			sound-dai = <&q6afedai SLIMBUS_2_TX>;
+		};
+
+		platform {
+			sound-dai = <&q6routing>;
+		};
+
+		codec {
+			sound-dai = <&wcd9340 5>; /* AIF3_CAP */
+		};
+	};
+};
+
+&q6afedai {
+	dai@22 {
+		reg = <22>;
+		qcom,sd-lines = <1>;
+	};
+
+	dai@23 {
+		reg = <23>;
+		qcom,sd-lines = <0>;
+	};
+};
+
+&q6asmdai {
+	dai@0 {
+		reg = <0>;
+	};
+
+	dai@1 {
+		reg = <1>;
+	};
+
+	dai@2 {
+		reg = <2>;
+	};
+
+	dai@3 {
+		reg = <3>;
+	};
+
+	dai@4 {
+		reg = <4>;
+	};
+
+	dai@5 {
+		reg = <5>;
+	};
+};
+
 &usb_1 {
 	status = "okay";
 };

-- 
2.39.2


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

* [PATCH v6 11/12] arm64: dts: qcom: sdm845-starqltechn: add graphics support
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
                   ` (9 preceding siblings ...)
  2024-10-08 16:51 ` [PATCH v6 10/12] arm64: dts: qcom: sdm845-starqltechn: add initial sound support Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-08 16:51 ` [PATCH v6 12/12] arm64: dts: qcom: sdm845-starqltechn: add modem support Dzmitry Sankouski
  11 siblings, 0 replies; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Add support for gpu and panel.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
Changes for v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
- refactor: remove 'sde' prefix in tlmm dsi nodes
- refactor: place tlmm dsi nodes alphabetically

Changes for v5:
- fix label names
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 4d459fb85782..043ae14c4fa9 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -203,6 +203,52 @@ vib_pwm: pwm {
 	};
 };
 
+&gpu {
+	status = "okay";
+
+	zap-shader {
+		memory-region = <&gpu_mem>;
+		firmware-name = "qcom/sdm845/starqltechn/a630_zap.mbn";
+	};
+};
+
+&mdss {
+	status = "okay";
+};
+
+&mdss_dsi0 {
+	vdda-supply = <&vreg_l26a_1p2>;
+	status = "okay";
+
+	panel@0 {
+		compatible = "samsung,s6e3ha8";
+		reg = <0>;
+		vci-supply = <&s2dos05_ldo4>;
+		vddr-supply = <&s2dos05_buck>;
+		vdd3-supply = <&s2dos05_ldo1>;
+		te-gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
+		pinctrl-0 = <&dsi_default &dsi_te>;
+		pinctrl-1 = <&dsi_suspend &dsi_te>;
+		pinctrl-names = "default", "suspend";
+
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&mdss_dsi0_out>;
+			};
+		};
+	};
+};
+
+&mdss_dsi0_out {
+	data-lanes = <0 1 2 3>;
+	remote-endpoint = <&panel_in>;
+};
+
+&mdss_dsi0_phy {
+	vdds-supply = <&vdda_mipi_dsi0_pll>;
+	status = "okay";
+};
 
 &apps_rsc {
 	regulators-0 {
@@ -837,6 +883,27 @@ &tlmm {
 	gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */
 			       <85 4>; /* SPI (fingerprint reader) */
 
+	dsi_default: dsi-default-state {
+		pins = "gpio6";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-disable;
+	};
+
+	dsi_suspend: dsi-suspend-state {
+		pins = "gpio6";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	dsi_te: dsi-te-state {
+		pins = "gpio10";
+		function = "mdp_vsync";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
 	i2c21_sda_state: i2c21-sda-state {
 		pins = "gpio127";
 		function = "gpio";

-- 
2.39.2


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

* [PATCH v6 12/12] arm64: dts: qcom: sdm845-starqltechn: add modem support
  2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
                   ` (10 preceding siblings ...)
  2024-10-08 16:51 ` [PATCH v6 11/12] arm64: dts: qcom: sdm845-starqltechn: add graphics support Dzmitry Sankouski
@ 2024-10-08 16:51 ` Dzmitry Sankouski
  2024-10-26 10:29   ` Konrad Dybcio
  11 siblings, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-10-08 16:51 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Add support for modem and ipa(IP Accelerator).
Add spss reserved memory node.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>

---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject.
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 043ae14c4fa9..a10db080e483 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -17,6 +17,8 @@
 #include "pm8998.dtsi"
 #include "sdm845-wcd9340.dtsi"
 
+/delete-node/ &rmtfs_mem;
+/delete-node/ &spss_mem;
 /delete-node/ &adsp_mem;
 /delete-node/ &slpi_mem;
 
@@ -91,15 +93,39 @@ memory@a1300000 {
 			pmsg-size = <0x40000>;
 		};
 
+		/*
+		 * It seems like reserving the old rmtfs_mem region is also needed to prevent
+		 * random crashes which are most likely modem related, more testing needed.
+		 */
+		removed_region: removed-region@88f00000 {
+			reg = <0 0x88f00000 0 0x1c00000>;
+			no-map;
+		};
+
 		slpi_mem: slpi@96700000 {
 			reg = <0 0x96700000 0 0xf00000>;
 			no-map;
 		};
 
+		spss_mem: spss@97700000 {
+			reg = <0 0x97700000 0 0x100000>;
+			no-map;
+		};
+
 		adsp_mem: memory@97800000 {
 			reg = <0 0x97800000 0 0x2000000>;
 			no-map;
 		};
+
+		rmtfs_mem: rmtfs-mem@fde00000 {
+			compatible = "qcom,rmtfs-mem";
+			reg = <0 0xfde00000 0 0x202000>;
+			qcom,use-guard-pages;
+			no-map;
+
+			qcom,client-id = <1>;
+			qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
+		};
 	};
 
 	gpio_keys {
@@ -837,6 +863,19 @@ dai@5 {
 	};
 };
 
+&mss_pil {
+	firmware-name = "qcom/sdm845/starqltechn/mba.mbn",
+			"qcom/sdm845/starqltechn/modem.mbn";
+	status = "okay";
+};
+
+&ipa {
+	qcom,gsi-loader = "self";
+	memory-region = <&ipa_fw_mem>;
+	firmware-name = "qcom/sdm845/starqltechn/ipa_fws.mbn";
+	status = "okay";
+};
+
 &usb_1 {
 	status = "okay";
 };

-- 
2.39.2


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

* Re: [PATCH v6 01/12] arm64: dts: qcom: sdm845: enable gmu
  2024-10-08 16:51 ` [PATCH v6 01/12] arm64: dts: qcom: sdm845: enable gmu Dzmitry Sankouski
@ 2024-10-26 10:20   ` Konrad Dybcio
  0 siblings, 0 replies; 31+ messages in thread
From: Konrad Dybcio @ 2024-10-26 10:20 UTC (permalink / raw)
  To: Dzmitry Sankouski, cros-qcom-dts-watchers, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> Leave gmu enabled, because it's only probed when
> GPU is.
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v6 05/12] arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios
  2024-10-08 16:51 ` [PATCH v6 05/12] arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios Dzmitry Sankouski
@ 2024-10-26 10:21   ` Konrad Dybcio
  0 siblings, 0 replies; 31+ messages in thread
From: Konrad Dybcio @ 2024-10-26 10:21 UTC (permalink / raw)
  To: Dzmitry Sankouski, cros-qcom-dts-watchers, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> Starqltechn has 2 reserved gpio ranges <27 4>, <85 4>.
> <27 4> is spi for eSE(embedded Secure Element).
> <85 4> is spi for fingerprint.
> 
> Remove excess reserved gpio regions.
> 
> Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> 

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v6 12/12] arm64: dts: qcom: sdm845-starqltechn: add modem support
  2024-10-08 16:51 ` [PATCH v6 12/12] arm64: dts: qcom: sdm845-starqltechn: add modem support Dzmitry Sankouski
@ 2024-10-26 10:29   ` Konrad Dybcio
  0 siblings, 0 replies; 31+ messages in thread
From: Konrad Dybcio @ 2024-10-26 10:29 UTC (permalink / raw)
  To: Dzmitry Sankouski, cros-qcom-dts-watchers, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> Add support for modem and ipa(IP Accelerator).
> Add spss reserved memory node.
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> 
> ---


Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v6 10/12] arm64: dts: qcom: sdm845-starqltechn: add initial sound support
  2024-10-08 16:51 ` [PATCH v6 10/12] arm64: dts: qcom: sdm845-starqltechn: add initial sound support Dzmitry Sankouski
@ 2024-10-26 10:32   ` Konrad Dybcio
  2024-12-02 11:43     ` Dzmitry Sankouski
  0 siblings, 1 reply; 31+ messages in thread
From: Konrad Dybcio @ 2024-10-26 10:32 UTC (permalink / raw)
  To: Dzmitry Sankouski, cros-qcom-dts-watchers, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> Add support for sound (headphones and mics only)
> Also redefine slpi reserved memory, because adsp_mem overlaps with
> slpi_mem inherited from sdm845.dtsi.
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> 
> ---

[...]

> +&sound {
> +	compatible = "qcom,sdm845-sndcard";
> +	model = "Samsung Galaxy S9";

Are spaces cool with userspace?

> +	pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +
> +	audio-routing =	"RX_BIAS", "MCLK",
> +			"AMIC2", "MIC BIAS2", /* Headset Mic */
> +			"AMIC3", "MIC BIAS2", /* FMLeft Tx */
> +			"AMIC4", "MIC BIAS2", /* FMRight Tx */
> +			"DMIC0", "MIC BIAS1", /* Digital Mic0 */
> +			"DMIC5", "MIC BIAS4", /* Digital Mic1 */
> +			"DMIC4", "MIC BIAS4", /* Digital Mic2 */
> +			"DMIC3", "MIC BIAS3", /* Digital Mic3 */
> +			"DMIC2", "MIC BIAS3", /* Digital Mic4 */
> +			"DMIC1", "MIC BIAS1"; /* Digital Mic5 */
> +
> +	mm1-dai-link {
> +		link-name = "MultiMedia1";
> +		cpu {

Please add a newline before subnodes

[...]

> +
> +		codec {
> +			sound-dai = <&wcd9340 2>; /* AIF2_PB */

It would be nice to create a binding for wcd9340, like
include/dt-bindings/sound/qcom,wcd9335.h

Konrad

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

* Re: [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC
  2024-10-08 16:51 ` [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC Dzmitry Sankouski
@ 2024-10-26 10:36   ` Konrad Dybcio
  2024-12-02 10:45     ` Dzmitry Sankouski
  0 siblings, 1 reply; 31+ messages in thread
From: Konrad Dybcio @ 2024-10-26 10:36 UTC (permalink / raw)
  To: Dzmitry Sankouski, cros-qcom-dts-watchers, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> Add support for max77705 MFD device. Supported sub-devices:
>  charger, fuelgauge, haptic, led
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---

[...]

> +	vib_regulator: gpio-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "haptic";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +		regulator-boot-on;
> +		enable-active-high;
> +		gpio = <&pm8998_gpios 18 GPIO_ACTIVE_HIGH>;
> +	};

Please try to match the property order in the newest DTs, e.g.
vreg_wwan in x1e80100-crd.dts

> +
> +	vib_pwm: pwm {
> +		compatible = "clk-pwm";
> +		#pwm-cells = <2>;
> +		assigned-clock-parents = <&rpmhcc RPMH_CXO_CLK>;

Don't you want to set assigned-clock-rates instead?

> +		assigned-clocks = <&gcc GCC_GP1_CLK_SRC>;
> +		clocks = <&gcc GCC_GP1_CLK>;
> +		pinctrl-0 = <&motor_pwm_default_state>;
> +		pinctrl-1 = <&motor_pwm_suspend_state>;
> +		pinctrl-names = "default", "suspend";
> +	};
>  };

Looks good otherwise

Konrad

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

* Re: [PATCH v6 06/12] arm64: dts: qcom: sdm845-starqltechn: add gpio keys
  2024-10-08 16:51 ` [PATCH v6 06/12] arm64: dts: qcom: sdm845-starqltechn: add gpio keys Dzmitry Sankouski
@ 2024-10-26 10:38   ` Konrad Dybcio
  2024-12-02 10:58     ` Dzmitry Sankouski
  0 siblings, 1 reply; 31+ messages in thread
From: Konrad Dybcio @ 2024-10-26 10:38 UTC (permalink / raw)
  To: Dzmitry Sankouski, cros-qcom-dts-watchers, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> Add support for phone buttons.
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> 
> ---
> Changes in v6:
> - refactor: s/starqltechn/sdm845-starqltechn in subject.
> ---
>  arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> index 5948b401165c..a3bd5231569d 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> @@ -7,9 +7,11 @@
>  
>  /dts-v1/;
>  
> +#include <dt-bindings/input/linux-event-codes.h>
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>  #include "sdm845.dtsi"
> +#include "pm8998.dtsi"
>  
>  / {
>  	chassis-type = "handset";
> @@ -69,6 +71,25 @@ memory@a1300000 {
>  			pmsg-size = <0x40000>;
>  		};
>  	};
> +
> +	gpio_keys {

Node names must not contain underscores, use '-' instead

> +		compatible = "gpio-keys";
> +		autorepeat;
> +
> +		key-vol-up {
> +			label = "volume_up";

This is passed on to userspace, many DTs use a less programmer-y style,
like "Volume Up"

> +			gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
> +			linux,code = <KEY_VOLUMEUP>;
> +			debounce-interval = <15>;
> +		};
> +
> +		key-wink {
> +			label = "key_wink";

What's this key? Bixby?

Konrad

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

* Re: [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
  2024-10-08 16:51 ` [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake Dzmitry Sankouski
@ 2024-10-26 10:41   ` Konrad Dybcio
  2024-12-02 13:41     ` Dzmitry Sankouski
  0 siblings, 1 reply; 31+ messages in thread
From: Konrad Dybcio @ 2024-10-26 10:41 UTC (permalink / raw)
  To: Dzmitry Sankouski, cros-qcom-dts-watchers, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> Usb regulator was wrongly pointed to vreg_l1a_0p875.
> However, on starqltechn it's powered from vreg_l5a_0p8.
> 
> Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> 
> ---

I really really doubt that the supplies for on-SoC PHYs were altered,
given these regulators are assigned based on their specific characteristics

Konrad

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

* Re: [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC
  2024-10-08 16:51 ` [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC Dzmitry Sankouski
@ 2024-11-04 14:15   ` Konrad Dybcio
  2024-12-02 13:18     ` Dzmitry Sankouski
  2024-12-02 13:25     ` Dzmitry Sankouski
  0 siblings, 2 replies; 31+ messages in thread
From: Konrad Dybcio @ 2024-11-04 14:15 UTC (permalink / raw)
  To: Dzmitry Sankouski, cros-qcom-dts-watchers, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> Add support for s2dos05 display / touchscreen PMIC
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---
> Changes in v6:
> - refactor: s/starqltechn/sdm845-starqltechn in subject
> - refactor: 'i' < 'm', so put tlmm i2c node before motor*

Now you have 'i'2c21 before 'g'pio-regulator :/

> 
> Changes in v5:
> - simplify regulator names
> - remove single buck index
> ---

[...]

>  
> +	i2c21 {
> +		compatible = "i2c-gpio";

I'm not sure this has been asked before - is the GENI SE for I2C21
disabled? Or are there reasons to use i2c-gpio instead?

Konrad

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

* Re: [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC
  2024-10-26 10:36   ` Konrad Dybcio
@ 2024-12-02 10:45     ` Dzmitry Sankouski
  0 siblings, 0 replies; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-12-02 10:45 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

сб, 26 окт. 2024 г. в 13:36, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>
> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> > Add support for max77705 MFD device. Supported sub-devices:
> >  charger, fuelgauge, haptic, led
> >
> > Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> > ---
>
> [...]
> > +
> > +     vib_pwm: pwm {
> > +             compatible = "clk-pwm";
> > +             #pwm-cells = <2>;
> > +             assigned-clock-parents = <&rpmhcc RPMH_CXO_CLK>;
>
> Don't you want to set assigned-clock-rates instead?

assigned-clock-rates would set GCC_GP1_CLK_SRC rate, and automatically
select the proper parent clock best suited for rate.

However, as per discussion in
https://patchwork.kernel.org/project/linux-samsung-soc/patch/20240618-starqltechn_integration_upstream-v3-2-e3f6662017ac@gmail.com
the old approach with additional freq_tbl entries was criticised. New
approach, introduced in
https://lore.kernel.org/all/20241007-starqltechn_integration_upstream-v6-0-dd75c06c708d@gmail.com/
automatically calculates m/n/d values for GP clock, but it cannot
select best suited parent - it's user responsibility.
>
> > +             assigned-clocks = <&gcc GCC_GP1_CLK_SRC>;
> > +             clocks = <&gcc GCC_GP1_CLK>;
> > +             pinctrl-0 = <&motor_pwm_default_state>;
> > +             pinctrl-1 = <&motor_pwm_suspend_state>;
> > +             pinctrl-names = "default", "suspend";
> > +     };
> >  };
>
> Looks good otherwise
>
> Konrad

--
Best regards and thanks for review,
Dzmitry

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

* Re: [PATCH v6 06/12] arm64: dts: qcom: sdm845-starqltechn: add gpio keys
  2024-10-26 10:38   ` Konrad Dybcio
@ 2024-12-02 10:58     ` Dzmitry Sankouski
  0 siblings, 0 replies; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-12-02 10:58 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

сб, 26 окт. 2024 г. в 13:38, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>
> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> > Add support for phone buttons.
> >
> > Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> >
> > ---
(...)
> > +                     gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
> > +                     linux,code = <KEY_VOLUMEUP>;
> > +                     debounce-interval = <15>;
> > +             };
> > +
> > +             key-wink {
> > +                     label = "key_wink";
>
> What's this key? Bixby?

Yes, I'll rename to 'Bixby'

>
> Konrad

-- 

Best regards and thanks for review,
Dzmitry

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

* Re: [PATCH v6 10/12] arm64: dts: qcom: sdm845-starqltechn: add initial sound support
  2024-10-26 10:32   ` Konrad Dybcio
@ 2024-12-02 11:43     ` Dzmitry Sankouski
  0 siblings, 0 replies; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-12-02 11:43 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

сб, 26 окт. 2024 г. в 13:32, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>
> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> > Add support for sound (headphones and mics only)
> > Also redefine slpi reserved memory, because adsp_mem overlaps with
> > slpi_mem inherited from sdm845.dtsi.
> >
> > Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> >
> > ---
>
> [...]
>
> > +&sound {
> > +     compatible = "qcom,sdm845-sndcard";
> > +     model = "Samsung Galaxy S9";
>
> Are spaces cool with userspace?

Yes. Oneplus enchilada is the same.

-- 
Best regards and thanks for review,
Dzmitry

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

* Re: [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC
  2024-11-04 14:15   ` Konrad Dybcio
@ 2024-12-02 13:18     ` Dzmitry Sankouski
  2024-12-02 15:01       ` Konrad Dybcio
  2024-12-02 13:25     ` Dzmitry Sankouski
  1 sibling, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-12-02 13:18 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

пн, 4 нояб. 2024 г. в 17:15, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>
> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> > Add support for s2dos05 display / touchscreen PMIC
> >
> > Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> > ---
> > Changes in v6:
> > - refactor: s/starqltechn/sdm845-starqltechn in subject
> > - refactor: 'i' < 'm', so put tlmm i2c node before motor*
>
> Now you have 'i'2c21 before 'g'pio-regulator :/

That refactor was about tlmm inner nodes. For soc nodes
rule `nodes of the same type can be grouped together` should apply I guess.
I think I should move it to regulators.

> [...]
>
> >
> > +     i2c21 {
> > +             compatible = "i2c-gpio";
>
> I'm not sure this has been asked before - is the GENI SE for I2C21
> disabled? Or are there reasons to use i2c-gpio instead?
>

I2c21 is wired on pins 127, 128, and those pins don't have a GENI SE function.

--
Best regards and thanks for review,
Dzmitry

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

* Re: [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC
  2024-11-04 14:15   ` Konrad Dybcio
  2024-12-02 13:18     ` Dzmitry Sankouski
@ 2024-12-02 13:25     ` Dzmitry Sankouski
  1 sibling, 0 replies; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-12-02 13:25 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

пн, 4 нояб. 2024 г. в 17:15, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>
> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> > Add support for s2dos05 display / touchscreen PMIC
> >
> > Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> > ---
> > Changes in v6:
> > - refactor: s/starqltechn/sdm845-starqltechn in subject
> > - refactor: 'i' < 'm', so put tlmm i2c node before motor*
>
> Now you have 'i'2c21 before 'g'pio-regulator :/
>
WIll move i2c21 node before gpio-keys, too


--
Best regards and thanks for review,
Dzmitry

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

* Re: [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
  2024-10-26 10:41   ` Konrad Dybcio
@ 2024-12-02 13:41     ` Dzmitry Sankouski
  2024-12-02 15:09       ` Konrad Dybcio
  0 siblings, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-12-02 13:41 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

сб, 26 окт. 2024 г. в 13:41, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>
> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> > Usb regulator was wrongly pointed to vreg_l1a_0p875.
> > However, on starqltechn it's powered from vreg_l5a_0p8.
> >
> > Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")
> > Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> >
> > ---
>
> I really really doubt that the supplies for on-SoC PHYs were altered,
> given these regulators are assigned based on their specific characteristics
>

From rooted android system from klabit87 on starqltechn:

```
starqltechn:/ # cat /proc/cpuinfo | grep Hardware
Hardware        : Qualcomm Technologies, Inc SDM845
starqltechn:/ # uname -a
Linux localhost 4.9.186-klabitV6.5 #1 SMP PREEMPT Thu Dec 10 19:42:53
CST 2020 aarch64
starqltechn:/ # cat
/sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa1-pm8998_l1/consumers
Device-Supply                    EN    Min_uV   Max_uV  load_uA
ae90000.qcom,dp_display-vdda-0p9 N     880000   880000        0
1d87000.ufsphy_mem-vdda-phy      Y     880000   880000    62900
ae96400.qcom,mdss_dsi_phy0-vdda-0p9 N          0        0        0
ae94400.qcom,mdss_dsi_phy0-vdda-0p9 Y     880000   880000    36000
1c00000.qcom,pcie-vreg-0.9       Y     880000   880000    24000
pm8998_l1                        N          0        0        0
starqltechn:/ # cat
/sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa5-pm8998_l5/consumers
Device-Supply                    EN    Min_uV   Max_uV  load_uA
ae90000.qcom,dp_display-vdda-usb1-ss-core N          0        0        0
88e2000.qusb-vdd                 Y     800000   800000        0
88e8000.ssphy-vdd                Y     800000   800000        0
pm8998_l5                        N          0        0        0
```

I also downloaded kernel source from Samsung, to check its dts,
and it also powers qusb@88e2000 and ssphy@88e8000 from 'pm8998_l5' regulator.

-- 
Best regards and thanks for review,
Dzmitry

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

* Re: [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC
  2024-12-02 13:18     ` Dzmitry Sankouski
@ 2024-12-02 15:01       ` Konrad Dybcio
  0 siblings, 0 replies; 31+ messages in thread
From: Konrad Dybcio @ 2024-12-02 15:01 UTC (permalink / raw)
  To: Dzmitry Sankouski, Konrad Dybcio
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

On 2.12.2024 2:18 PM, Dzmitry Sankouski wrote:
> пн, 4 нояб. 2024 г. в 17:15, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>>
>> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
>>> Add support for s2dos05 display / touchscreen PMIC
>>>
>>> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
>>> ---
>>> Changes in v6:
>>> - refactor: s/starqltechn/sdm845-starqltechn in subject
>>> - refactor: 'i' < 'm', so put tlmm i2c node before motor*
>>
>> Now you have 'i'2c21 before 'g'pio-regulator :/
> 
> That refactor was about tlmm inner nodes. For soc nodes
> rule `nodes of the same type can be grouped together` should apply I guess.
> I think I should move it to regulators.
> 
>> [...]
>>
>>>
>>> +     i2c21 {
>>> +             compatible = "i2c-gpio";
>>
>> I'm not sure this has been asked before - is the GENI SE for I2C21
>> disabled? Or are there reasons to use i2c-gpio instead?
>>
> 
> I2c21 is wired on pins 127, 128, and those pins don't have a GENI SE function.

Right, I was able to confirm that's the case in general, not only
in the Linux pinctrl driver

Konrad

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

* Re: [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
  2024-12-02 13:41     ` Dzmitry Sankouski
@ 2024-12-02 15:09       ` Konrad Dybcio
  2024-12-02 20:10         ` Dzmitry Sankouski
  0 siblings, 1 reply; 31+ messages in thread
From: Konrad Dybcio @ 2024-12-02 15:09 UTC (permalink / raw)
  To: Dzmitry Sankouski, Konrad Dybcio
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

On 2.12.2024 2:41 PM, Dzmitry Sankouski wrote:
> сб, 26 окт. 2024 г. в 13:41, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>>
>> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
>>> Usb regulator was wrongly pointed to vreg_l1a_0p875.
>>> However, on starqltechn it's powered from vreg_l5a_0p8.
>>>
>>> Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")
>>> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
>>>
>>> ---
>>
>> I really really doubt that the supplies for on-SoC PHYs were altered,
>> given these regulators are assigned based on their specific characteristics
>>
> 
> From rooted android system from klabit87 on starqltechn:
> 
> ```
> starqltechn:/ # cat /proc/cpuinfo | grep Hardware
> Hardware        : Qualcomm Technologies, Inc SDM845
> starqltechn:/ # uname -a
> Linux localhost 4.9.186-klabitV6.5 #1 SMP PREEMPT Thu Dec 10 19:42:53
> CST 2020 aarch64
> starqltechn:/ # cat
> /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa1-pm8998_l1/consumers
> Device-Supply                    EN    Min_uV   Max_uV  load_uA
> ae90000.qcom,dp_display-vdda-0p9 N     880000   880000        0
> 1d87000.ufsphy_mem-vdda-phy      Y     880000   880000    62900
> ae96400.qcom,mdss_dsi_phy0-vdda-0p9 N          0        0        0
> ae94400.qcom,mdss_dsi_phy0-vdda-0p9 Y     880000   880000    36000
> 1c00000.qcom,pcie-vreg-0.9       Y     880000   880000    24000
> pm8998_l1                        N          0        0        0
> starqltechn:/ # cat
> /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa5-pm8998_l5/consumers
> Device-Supply                    EN    Min_uV   Max_uV  load_uA
> ae90000.qcom,dp_display-vdda-usb1-ss-core N          0        0        0
> 88e2000.qusb-vdd                 Y     800000   800000        0
> 88e8000.ssphy-vdd                Y     800000   800000        0
> pm8998_l5                        N          0        0        0
> ```
> 
> I also downloaded kernel source from Samsung, to check its dts,
> and it also powers qusb@88e2000 and ssphy@88e8000 from 'pm8998_l5' regulator.

Interesting.. could you try to forcefully shut down L5A (I doubt you'll
be able to do so with L1A given it powers so much digital logic), or
set its regulator-min&max-microvolt to a way-too-low voltage (vmin
seems to be 312000)?

You should then be able to tell fairly easily, depending on whether usb2
still works after a replug

Konrad

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

* Re: [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
  2024-12-02 15:09       ` Konrad Dybcio
@ 2024-12-02 20:10         ` Dzmitry Sankouski
  2024-12-05 16:41           ` Konrad Dybcio
  0 siblings, 1 reply; 31+ messages in thread
From: Dzmitry Sankouski @ 2024-12-02 20:10 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

пн, 2 дек. 2024 г. в 18:09, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>
> On 2.12.2024 2:41 PM, Dzmitry Sankouski wrote:
> > сб, 26 окт. 2024 г. в 13:41, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
> >>
> >> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
> >>> Usb regulator was wrongly pointed to vreg_l1a_0p875.
> >>> However, on starqltechn it's powered from vreg_l5a_0p8.
> >>>
> >>> Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")
> >>> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> >>>
> >>> ---
> >>
> >> I really really doubt that the supplies for on-SoC PHYs were altered,
> >> given these regulators are assigned based on their specific characteristics
> >>
> >
> > From rooted android system from klabit87 on starqltechn:
> >
> > ```
> > starqltechn:/ # cat /proc/cpuinfo | grep Hardware
> > Hardware        : Qualcomm Technologies, Inc SDM845
> > starqltechn:/ # uname -a
> > Linux localhost 4.9.186-klabitV6.5 #1 SMP PREEMPT Thu Dec 10 19:42:53
> > CST 2020 aarch64
> > starqltechn:/ # cat
> > /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa1-pm8998_l1/consumers
> > Device-Supply                    EN    Min_uV   Max_uV  load_uA
> > ae90000.qcom,dp_display-vdda-0p9 N     880000   880000        0
> > 1d87000.ufsphy_mem-vdda-phy      Y     880000   880000    62900
> > ae96400.qcom,mdss_dsi_phy0-vdda-0p9 N          0        0        0
> > ae94400.qcom,mdss_dsi_phy0-vdda-0p9 Y     880000   880000    36000
> > 1c00000.qcom,pcie-vreg-0.9       Y     880000   880000    24000
> > pm8998_l1                        N          0        0        0
> > starqltechn:/ # cat
> > /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa5-pm8998_l5/consumers
> > Device-Supply                    EN    Min_uV   Max_uV  load_uA
> > ae90000.qcom,dp_display-vdda-usb1-ss-core N          0        0        0
> > 88e2000.qusb-vdd                 Y     800000   800000        0
> > 88e8000.ssphy-vdd                Y     800000   800000        0
> > pm8998_l5                        N          0        0        0
> > ```
> >
> > I also downloaded kernel source from Samsung, to check its dts,
> > and it also powers qusb@88e2000 and ssphy@88e8000 from 'pm8998_l5' regulator.
>
> Interesting.. could you try to forcefully shut down L5A (I doubt you'll
> be able to do so with L1A given it powers so much digital logic), or
> set its regulator-min&max-microvolt to a way-too-low voltage (vmin
> seems to be 312000)?
>
> You should then be able to tell fairly easily, depending on whether usb2
> still works after a replug
>

Usb doesn't worked in such experiment:
Here's the log:
```
[    3.541733] ldo5: Setting 312000-312000uV
......
[    3.808224] dwc3 a600000.usb: Adding to iommu group 5
[    3.823116] qcom-qmp-combo-phy 88e8000.phy: phy initialization timed-out
[    3.824323] phy phy-88e8000.phy.0: phy init failed --> -110
[    3.825916] dwc3 a600000.usb: error -ETIMEDOUT: failed to initialize core
[    3.827208] dwc3 a600000.usb: probe with driver dwc3 failed with error -110
[    3.828548] probe of a600000.usb returned 110 after 20399 usecs
```

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

* Re: [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
  2024-12-02 20:10         ` Dzmitry Sankouski
@ 2024-12-05 16:41           ` Konrad Dybcio
  0 siblings, 0 replies; 31+ messages in thread
From: Konrad Dybcio @ 2024-12-05 16:41 UTC (permalink / raw)
  To: Dzmitry Sankouski
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

On 2.12.2024 9:10 PM, Dzmitry Sankouski wrote:
> пн, 2 дек. 2024 г. в 18:09, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>>
>> On 2.12.2024 2:41 PM, Dzmitry Sankouski wrote:
>>> сб, 26 окт. 2024 г. в 13:41, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>>>>
>>>> On 8.10.2024 6:51 PM, Dzmitry Sankouski wrote:
>>>>> Usb regulator was wrongly pointed to vreg_l1a_0p875.
>>>>> However, on starqltechn it's powered from vreg_l5a_0p8.
>>>>>
>>>>> Fixes: d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")
>>>>> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
>>>>>
>>>>> ---
>>>>
>>>> I really really doubt that the supplies for on-SoC PHYs were altered,
>>>> given these regulators are assigned based on their specific characteristics
>>>>
>>>
>>> From rooted android system from klabit87 on starqltechn:
>>>
>>> ```
>>> starqltechn:/ # cat /proc/cpuinfo | grep Hardware
>>> Hardware        : Qualcomm Technologies, Inc SDM845
>>> starqltechn:/ # uname -a
>>> Linux localhost 4.9.186-klabitV6.5 #1 SMP PREEMPT Thu Dec 10 19:42:53
>>> CST 2020 aarch64
>>> starqltechn:/ # cat
>>> /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa1-pm8998_l1/consumers
>>> Device-Supply                    EN    Min_uV   Max_uV  load_uA
>>> ae90000.qcom,dp_display-vdda-0p9 N     880000   880000        0
>>> 1d87000.ufsphy_mem-vdda-phy      Y     880000   880000    62900
>>> ae96400.qcom,mdss_dsi_phy0-vdda-0p9 N          0        0        0
>>> ae94400.qcom,mdss_dsi_phy0-vdda-0p9 Y     880000   880000    36000
>>> 1c00000.qcom,pcie-vreg-0.9       Y     880000   880000    24000
>>> pm8998_l1                        N          0        0        0
>>> starqltechn:/ # cat
>>> /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa5-pm8998_l5/consumers
>>> Device-Supply                    EN    Min_uV   Max_uV  load_uA
>>> ae90000.qcom,dp_display-vdda-usb1-ss-core N          0        0        0
>>> 88e2000.qusb-vdd                 Y     800000   800000        0
>>> 88e8000.ssphy-vdd                Y     800000   800000        0
>>> pm8998_l5                        N          0        0        0
>>> ```
>>>
>>> I also downloaded kernel source from Samsung, to check its dts,
>>> and it also powers qusb@88e2000 and ssphy@88e8000 from 'pm8998_l5' regulator.
>>
>> Interesting.. could you try to forcefully shut down L5A (I doubt you'll
>> be able to do so with L1A given it powers so much digital logic), or
>> set its regulator-min&max-microvolt to a way-too-low voltage (vmin
>> seems to be 312000)?
>>
>> You should then be able to tell fairly easily, depending on whether usb2
>> still works after a replug
>>
> 
> Usb doesn't worked in such experiment:
> Here's the log:
> ```
> [    3.541733] ldo5: Setting 312000-312000uV
> ......
> [    3.808224] dwc3 a600000.usb: Adding to iommu group 5
> [    3.823116] qcom-qmp-combo-phy 88e8000.phy: phy initialization timed-out
> [    3.824323] phy phy-88e8000.phy.0: phy init failed --> -110
> [    3.825916] dwc3 a600000.usb: error -ETIMEDOUT: failed to initialize core
> [    3.827208] dwc3 a600000.usb: probe with driver dwc3 failed with error -110
> [    3.828548] probe of a600000.usb returned 110 after 20399 usecs

Wow, I'm really surprised

That said, thank you for confirming

Konrad

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

end of thread, other threads:[~2024-12-05 16:41 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-08 16:51 [PATCH v6 00/12] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
2024-10-08 16:51 ` [PATCH v6 01/12] arm64: dts: qcom: sdm845: enable gmu Dzmitry Sankouski
2024-10-26 10:20   ` Konrad Dybcio
2024-10-08 16:51 ` [PATCH v6 02/12] arm64: dts: qcom: sdm845-starqltechn: remove wifi Dzmitry Sankouski
2024-10-08 16:51 ` [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake Dzmitry Sankouski
2024-10-26 10:41   ` Konrad Dybcio
2024-12-02 13:41     ` Dzmitry Sankouski
2024-12-02 15:09       ` Konrad Dybcio
2024-12-02 20:10         ` Dzmitry Sankouski
2024-12-05 16:41           ` Konrad Dybcio
2024-10-08 16:51 ` [PATCH v6 04/12] arm64: dts: qcom: sdm845-starqltechn: refactor node order Dzmitry Sankouski
2024-10-08 16:51 ` [PATCH v6 05/12] arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios Dzmitry Sankouski
2024-10-26 10:21   ` Konrad Dybcio
2024-10-08 16:51 ` [PATCH v6 06/12] arm64: dts: qcom: sdm845-starqltechn: add gpio keys Dzmitry Sankouski
2024-10-26 10:38   ` Konrad Dybcio
2024-12-02 10:58     ` Dzmitry Sankouski
2024-10-08 16:51 ` [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC Dzmitry Sankouski
2024-10-26 10:36   ` Konrad Dybcio
2024-12-02 10:45     ` Dzmitry Sankouski
2024-10-08 16:51 ` [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC Dzmitry Sankouski
2024-11-04 14:15   ` Konrad Dybcio
2024-12-02 13:18     ` Dzmitry Sankouski
2024-12-02 15:01       ` Konrad Dybcio
2024-12-02 13:25     ` Dzmitry Sankouski
2024-10-08 16:51 ` [PATCH v6 09/12] arm64: dts: qcom: sdm845-starqltechn: add touchscreen support Dzmitry Sankouski
2024-10-08 16:51 ` [PATCH v6 10/12] arm64: dts: qcom: sdm845-starqltechn: add initial sound support Dzmitry Sankouski
2024-10-26 10:32   ` Konrad Dybcio
2024-12-02 11:43     ` Dzmitry Sankouski
2024-10-08 16:51 ` [PATCH v6 11/12] arm64: dts: qcom: sdm845-starqltechn: add graphics support Dzmitry Sankouski
2024-10-08 16:51 ` [PATCH v6 12/12] arm64: dts: qcom: sdm845-starqltechn: add modem support Dzmitry Sankouski
2024-10-26 10:29   ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).