Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Fix up QUSB2 PHY description for MSM8996/SM61[12]5
@ 2026-09-03 14:25 Konrad Dybcio
  2026-09-03 14:25 ` [PATCH v2 1/5] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Konrad Dybcio @ 2026-09-03 14:25 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Iskren Chernev, Greg Kroah-Hartman,
	Bjorn Andersson, Konrad Dybcio, Manivannan Sadhasivam
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio,
	Krzysztof Kozlowski, Dmitry Baryshkov, Abel Vesa

The MSM8996 QUSB2PHY was not being guaranteed a power source.
The SM6125's QUSB2PHY was believed to be idential as the 96 one. It
wasn't. This series tackles that, freeing us of some dt checker
errors about vdd-supply not found on MSM8996 boards.

Compile-tested only, but docs confirm my findings..

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
Changes in v2:
- Pick up tags
- Add a code-janitory patch ("Remove _SHIFT defines")
- Link to v1: https://patch.msgid.link/20260610-topic-8996_61x5_qusb2phy-v1-0-d7135980e78f@oss.qualcomm.com

To: Vinod Koul <vkoul@kernel.org>
To: Neil Armstrong <neil.armstrong@linaro.org>
To: Manivannan Sadhasivam <mani@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Wesley Cheng <quic_wcheng@quicinc.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Iskren Chernev <me@iskren.info>
To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-phy@lists.infradead.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
Konrad Dybcio (5):
      dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
      phy: qcom-qusb2: Fix SM6115 init sequence
      phy: qcom-qusb2: Remove _SHIFT defines
      arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs
      arm64: dts: qcom: sm6125: Fix QUSB2 compatible

 .../devicetree/bindings/phy/qcom,qusb2-phy.yaml    | 31 ++++++++++++++++--
 arch/arm64/boot/dts/qcom/msm8996.dtsi              | 10 ++++++
 arch/arm64/boot/dts/qcom/sm6125.dtsi               |  3 +-
 drivers/phy/qualcomm/phy-qcom-qusb2.c              | 37 ++++++++++------------
 4 files changed, 58 insertions(+), 23 deletions(-)
---
base-commit: 32b6ef9a5d0eca44f9cd91f52f4faa89f145a0de
change-id: 20260610-topic-8996_61x5_qusb2phy-ad052b99e9de

Best regards,
--  
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH v2 1/5] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
  2026-09-03 14:25 [PATCH v2 0/5] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
@ 2026-09-03 14:25 ` Konrad Dybcio
  2026-09-03 14:46   ` sashiko-bot
  2026-09-03 14:25 ` [PATCH v2 2/5] phy: qcom-qusb2: Fix SM6115 init sequence Konrad Dybcio
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2026-09-03 14:25 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Iskren Chernev, Greg Kroah-Hartman,
	Bjorn Andersson, Konrad Dybcio, Manivannan Sadhasivam
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio,
	Krzysztof Kozlowski

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

SM6125 DT currently uses just the MSM8996 compatible (without a primary
SM6125-specific one). This is not only wrong for the reasons of
violating guidelines, but also happens to not be valid.

The MSM8996 PHY is quite similar, although it requies a different init
sequence (for arch reasons). MSM8996 also needs different power
plumbing, as the VDD supply is fed through VDD_MX (which we define as
a power domain rather than a regulator), unlike on SM6125.

The init sequence seems to have been "good enough", but now that the
bindings clearly diverge, add a new compatible for SM6125 with a SM6115
fallback (as they seem to be an exact match from the SW interface POV).

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 .../devicetree/bindings/phy/qcom,qusb2-phy.yaml    | 31 ++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
index 001fd0ccc985..cfc5a1d16b7f 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
@@ -31,6 +31,9 @@ properties:
               - qcom,shikra-qusb2-phy
               - qcom,sm4250-qusb2-phy
               - qcom,sm6115-qusb2-phy
+      - items:
+          - const: qcom,sm6125-qusb2-phy
+          - const: qcom,sm6115-qusb2-phy
       - items:
           - enum:
               - qcom,ipq5210-qusb2-phy
@@ -62,6 +65,12 @@ properties:
       - const: ref
       - const: iface
 
+  power-domains:
+    maxItems: 1
+
+  required-opps:
+    maxItems: 1
+
   vdd-supply:
     description:
       Phandle to 0.9V regulator supply to PHY digital circuit.
@@ -165,7 +174,6 @@ required:
   - "#phy-cells"
   - clocks
   - clock-names
-  - vdd-supply
   - vdda-pll-supply
   - vdda-phy-dpdm-supply
   - resets
@@ -187,6 +195,22 @@ allOf:
         qcom,preemphasis-width: false
         qcom,hsdisc-trim-value: false
 
+  # On MSM8996, VDD is supplied via the MX power domain
+  - if:
+      properties:
+        compatible:
+          const: qcom,msm8996-qusb2-phy
+    then:
+      required:
+        - power-domains
+        - required-opps
+    else:
+      properties:
+        power-domains: false
+        required-opps: false
+      required:
+        - vdd-supply
+
 additionalProperties: false
 
 examples:
@@ -201,10 +225,13 @@ examples:
                  <&gcc GCC_RX1_USB2_CLKREF_CLK>;
         clock-names = "cfg_ahb", "ref";
 
-        vdd-supply = <&pm8994_l28>;
         vdda-pll-supply = <&pm8994_l12>;
         vdda-phy-dpdm-supply = <&pm8994_l24>;
 
         resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
+
+        power-domains = <&rpmpd_mx>;
+        required-opps = <&rpmpd_opp4>;
+
         nvmem-cells = <&qusb2p_hstx_trim>;
     };

-- 
2.55.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH v2 2/5] phy: qcom-qusb2: Fix SM6115 init sequence
  2026-09-03 14:25 [PATCH v2 0/5] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
  2026-09-03 14:25 ` [PATCH v2 1/5] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
@ 2026-09-03 14:25 ` Konrad Dybcio
  2026-09-03 14:25 ` [PATCH v2 3/5] phy: qcom-qusb2: Remove _SHIFT defines Konrad Dybcio
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2026-09-03 14:25 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Iskren Chernev, Greg Kroah-Hartman,
	Bjorn Andersson, Konrad Dybcio, Manivannan Sadhasivam
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio,
	Dmitry Baryshkov, Abel Vesa

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

I don't know where the existing one came from, but it's apparently
wrong, according to both docs and a downstream DT [1]. Fix it up.

The updated values also happen to match SM6125, which will allow us
to fix that platform too.

[1] https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/heads/android-msm-bramble-4.19-android11-qpr1/qcom/bengal-usb.dtsi#145

Fixes: 7756f1d6369e ("phy: qcom-qusb2: Add configuration for SM4250 and SM6115")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 drivers/phy/qualcomm/phy-qcom-qusb2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
index 2e5fdb620cb2..aac36ed994b1 100644
--- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
+++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
@@ -233,9 +233,9 @@ static const struct qusb2_phy_init_tbl msm8998_init_tbl[] = {
 
 static const struct qusb2_phy_init_tbl sm6115_init_tbl[] = {
 	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0xf8),
-	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0x53),
+	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0xb3),
 	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE3, 0x81),
-	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE4, 0x17),
+	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE4, 0xc0),
 
 	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_TUNE, 0x30),
 	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL1, 0x79),

-- 
2.55.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH v2 3/5] phy: qcom-qusb2: Remove _SHIFT defines
  2026-09-03 14:25 [PATCH v2 0/5] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
  2026-09-03 14:25 ` [PATCH v2 1/5] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
  2026-09-03 14:25 ` [PATCH v2 2/5] phy: qcom-qusb2: Fix SM6115 init sequence Konrad Dybcio
@ 2026-09-03 14:25 ` Konrad Dybcio
  2026-09-03 15:03   ` Abel Vesa
  2026-09-03 14:25 ` [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs Konrad Dybcio
  2026-09-03 14:25 ` [PATCH v2 5/5] arm64: dts: qcom: sm6125: Fix QUSB2 compatible Konrad Dybcio
  4 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2026-09-03 14:25 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Iskren Chernev, Greg Kroah-Hartman,
	Bjorn Andersson, Konrad Dybcio, Manivannan Sadhasivam
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

These are unnecessary as they may be inferred from the mask. Drop them.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 drivers/phy/qualcomm/phy-qcom-qusb2.c | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
index aac36ed994b1..50c60d56d447 100644
--- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
+++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2017, 2019, The Linux Foundation. All rights reserved.
  */
 
+#include <linux/bitfield.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/err.h>
@@ -64,26 +65,20 @@
 
 /* QUSB2PHY_IMP_CTRL1 register bits */
 #define IMP_RES_OFFSET_MASK			GENMASK(5, 0)
-#define IMP_RES_OFFSET_SHIFT			0x0
 
 /* QUSB2PHY_PLL_BIAS_CONTROL_2 register bits */
 #define BIAS_CTRL2_RES_OFFSET_MASK		GENMASK(5, 0)
-#define BIAS_CTRL2_RES_OFFSET_SHIFT		0x0
 
 /* QUSB2PHY_CHG_CONTROL_2 register bits */
 #define CHG_CTRL2_OFFSET_MASK			GENMASK(5, 4)
-#define CHG_CTRL2_OFFSET_SHIFT			0x4
 
 /* QUSB2PHY_PORT_TUNE1 register bits */
 #define HSTX_TRIM_MASK				GENMASK(7, 4)
-#define HSTX_TRIM_SHIFT				0x4
 #define PREEMPH_WIDTH_HALF_BIT			BIT(2)
 #define PREEMPHASIS_EN_MASK			GENMASK(1, 0)
-#define PREEMPHASIS_EN_SHIFT			0x0
 
 /* QUSB2PHY_PORT_TUNE2 register bits */
 #define HSDISC_TRIM_MASK			GENMASK(1, 0)
-#define HSDISC_TRIM_SHIFT			0x0
 
 #define QUSB2PHY_PLL_ANALOG_CONTROLS_TWO	0x04
 #define QUSB2PHY_PLL_CLOCK_INVERTERS		0x18c
@@ -545,28 +540,28 @@ static void qusb2_phy_override_phy_params(struct qusb2_phy *qphy)
 
 	if (or->imp_res_offset.override)
 		qusb2_write_mask(qphy->base, QUSB2PHY_IMP_CTRL1,
-		or->imp_res_offset.value << IMP_RES_OFFSET_SHIFT,
-			     IMP_RES_OFFSET_MASK);
+				 FIELD_PREP(IMP_RES_OFFSET_MASK, or->imp_res_offset.value),
+				 IMP_RES_OFFSET_MASK);
 
 	if (or->bias_ctrl.override)
 		qusb2_write_mask(qphy->base, QUSB2PHY_PLL_BIAS_CONTROL_2,
-		or->bias_ctrl.value << BIAS_CTRL2_RES_OFFSET_SHIFT,
-			   BIAS_CTRL2_RES_OFFSET_MASK);
+				 FIELD_PREP(BIAS_CTRL2_RES_OFFSET_MASK, or->bias_ctrl.value),
+				 BIAS_CTRL2_RES_OFFSET_MASK);
 
 	if (or->charge_ctrl.override)
 		qusb2_write_mask(qphy->base, QUSB2PHY_CHG_CTRL2,
-		or->charge_ctrl.value << CHG_CTRL2_OFFSET_SHIFT,
-			     CHG_CTRL2_OFFSET_MASK);
+				 FIELD_PREP(CHG_CTRL2_OFFSET_MASK, or->charge_ctrl.value),
+				 CHG_CTRL2_OFFSET_MASK);
 
 	if (or->hstx_trim.override)
 		qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE1],
-		or->hstx_trim.value << HSTX_TRIM_SHIFT,
+				 FIELD_PREP(HSTX_TRIM_MASK, or->hstx_trim.value),
 				 HSTX_TRIM_MASK);
 
 	if (or->preemphasis.override)
 		qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE1],
-		or->preemphasis.value << PREEMPHASIS_EN_SHIFT,
-				PREEMPHASIS_EN_MASK);
+				 FIELD_PREP(PREEMPHASIS_EN_MASK, or->preemphasis.value),
+				 PREEMPHASIS_EN_MASK);
 
 	if (or->preemphasis_width.override) {
 		if (or->preemphasis_width.value ==
@@ -582,7 +577,7 @@ static void qusb2_phy_override_phy_params(struct qusb2_phy *qphy)
 
 	if (or->hsdisc_trim.override)
 		qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE2],
-		or->hsdisc_trim.value << HSDISC_TRIM_SHIFT,
+				 FIELD_PREP(HSDISC_TRIM_MASK, or->hsdisc_trim.value),
 				 HSDISC_TRIM_MASK);
 }
 
@@ -623,10 +618,12 @@ static void qusb2_phy_set_tune2_param(struct qusb2_phy *qphy)
 	/* Fused TUNE1/2 value is the higher nibble only */
 	if (cfg->update_tune1_with_efuse)
 		qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE1],
-				 hstx_trim << HSTX_TRIM_SHIFT, HSTX_TRIM_MASK);
+				 FIELD_PREP(HSTX_TRIM_MASK, hstx_trim),
+				 HSTX_TRIM_MASK);
 	else
 		qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE2],
-				 hstx_trim << HSTX_TRIM_SHIFT, HSTX_TRIM_MASK);
+				 FIELD_PREP(HSTX_TRIM_MASK, hstx_trim),
+				 HSTX_TRIM_MASK);
 }
 
 static int qusb2_phy_set_mode(struct phy *phy,

-- 
2.55.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs
  2026-09-03 14:25 [PATCH v2 0/5] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
                   ` (2 preceding siblings ...)
  2026-09-03 14:25 ` [PATCH v2 3/5] phy: qcom-qusb2: Remove _SHIFT defines Konrad Dybcio
@ 2026-09-03 14:25 ` Konrad Dybcio
  2026-09-03 15:02   ` Abel Vesa
  2026-09-03 14:25 ` [PATCH v2 5/5] arm64: dts: qcom: sm6125: Fix QUSB2 compatible Konrad Dybcio
  4 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2026-09-03 14:25 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Iskren Chernev, Greg Kroah-Hartman,
	Bjorn Andersson, Konrad Dybcio, Manivannan Sadhasivam
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio,
	Dmitry Baryshkov

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

The QUSB2 PHYs are powered by (among others) the VDD_MX power rail.
Describe that in the DT.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 818e5660df91..cf17dbbacad0 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -3216,7 +3216,12 @@ hsusb_phy1: phy@7411000 {
 			clock-names = "cfg_ahb", "ref";
 
 			resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
+
+			power-domains = <&rpmpd MSM8996_VDDMX>;
+			required-opps = <&rpmpd_opp4>;
+
 			nvmem-cells = <&qusb2p_hstx_trim>;
+
 			status = "disabled";
 		};
 
@@ -3230,7 +3235,12 @@ hsusb_phy2: phy@7412000 {
 			clock-names = "cfg_ahb", "ref";
 
 			resets = <&gcc GCC_QUSB2PHY_SEC_BCR>;
+
+			power-domains = <&rpmpd MSM8996_VDDMX>;
+			required-opps = <&rpmpd_opp4>;
+
 			nvmem-cells = <&qusb2s_hstx_trim>;
+
 			status = "disabled";
 		};
 

-- 
2.55.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH v2 5/5] arm64: dts: qcom: sm6125: Fix QUSB2 compatible
  2026-09-03 14:25 [PATCH v2 0/5] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
                   ` (3 preceding siblings ...)
  2026-09-03 14:25 ` [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs Konrad Dybcio
@ 2026-09-03 14:25 ` Konrad Dybcio
  2026-09-03 15:01   ` Abel Vesa
  4 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2026-09-03 14:25 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Iskren Chernev, Greg Kroah-Hartman,
	Bjorn Andersson, Konrad Dybcio, Manivannan Sadhasivam
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio,
	Dmitry Baryshkov

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

There are a couple issues with the current description:

1) The msm8996 compatible is wholly reused, without a SM6125-specific
   primary compatible
2) MSM8996 has a different power setup (VDD powered through a RPMPD
   power-domain vs a regulator)
3) MSM8996 uses a different init sequence

As part of fixing all of them, use a SM6125-specific compatible with a
SM6115 fallback.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/sm6125.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi
index 86de1560bdef..1b2de5a01a6e 100644
--- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
@@ -682,7 +682,8 @@ gcc: clock-controller@1400000 {
 		};
 
 		hsusb_phy1: phy@1613000 {
-			compatible = "qcom,msm8996-qusb2-phy";
+			compatible = "qcom,sm6125-qusb2-phy",
+				     "qcom,sm6115-qusb2-phy";
 			reg = <0x0 0x01613000 0x0 0x180>;
 			#phy-cells = <0>;
 

-- 
2.55.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH v2 1/5] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
  2026-09-03 14:25 ` [PATCH v2 1/5] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
@ 2026-09-03 14:46   ` sashiko-bot
  0 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-09-03 14:46 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: devicetree, vkoul, robh, neil.armstrong, linux-phy, conor+dt,
	olteanv

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The binding change causes dtbs_check to fail for existing in-tree MSM8996 and SM6125 device trees, and introduces an architectural disconnect with the driver's unconditional regulator requests.
--

commit a8357f1a883ddad429bf80e6c26f5fba143404de
Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996

SM6125 DT currently uses just the MSM8996 compatible (without a primary
SM6125-specific one). This commit adds a new compatible for SM6125 with
a SM6115 fallback. It also updates the MSM8996 binding to require
power-domains and required-opps instead of vdd-supply.

> diff --git a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> index 001fd0ccc9852..cfc5a1d16b7f2 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
[ ... ]
> @@ -187,6 +195,22 @@ allOf:
>          qcom,preemphasis-width: false
>          qcom,hsdisc-trim-value: false
>  
> +  # On MSM8996, VDD is supplied via the MX power domain
> +  - if:
> +      properties:
> +        compatible:
> +          const: qcom,msm8996-qusb2-phy
> +    then:
> +      required:
> +        - power-domains
> +        - required-opps

[Severity: Medium]
Will this break dtbs_check for existing in-tree MSM8996 and SM6125 device
trees by mandating power-domains for MSM8996 before the in-tree device
trees are updated?

While this dtbs_check breakage is resolved later in the series by commit
"arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs" and commit
"arm64: dts: qcom: sm6125: Fix QUSB2 compatible", does this change create
an architectural disconnect with the driver that remains unresolved?

Looking at drivers/phy/qualcomm/phy-qcom-qusb2.c, it unconditionally
requires the vdd regulator:

drivers/phy/qualcomm/phy-qcom-qusb2.c:qusb2_phy_vreg_names[] = {
        "vdd", "vdda-pll", "vdda-phy-dpdm",
};

If a strictly schema-compliant device tree omits vdd-supply for MSM8996,
would this cause the driver to fail probing when it unconditionally fetches
vdd via devm_regulator_bulk_get()?

> +    else:
> +      properties:
> +        power-domains: false
> +        required-opps: false
> +      required:
> +        - vdd-supply

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260903-topic-8996_61x5_qusb2phy-v2-0-4c3f980a4560@oss.qualcomm.com?part=1

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH v2 5/5] arm64: dts: qcom: sm6125: Fix QUSB2 compatible
  2026-09-03 14:25 ` [PATCH v2 5/5] arm64: dts: qcom: sm6125: Fix QUSB2 compatible Konrad Dybcio
@ 2026-09-03 15:01   ` Abel Vesa
  0 siblings, 0 replies; 10+ messages in thread
From: Abel Vesa @ 2026-09-03 15:01 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Iskren Chernev, Greg Kroah-Hartman,
	Bjorn Andersson, Manivannan Sadhasivam, linux-arm-msm, linux-phy,
	devicetree, linux-kernel, Konrad Dybcio, Dmitry Baryshkov

On 26-09-03 16:25:32, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> There are a couple issues with the current description:
> 
> 1) The msm8996 compatible is wholly reused, without a SM6125-specific
>    primary compatible
> 2) MSM8996 has a different power setup (VDD powered through a RPMPD
>    power-domain vs a regulator)
> 3) MSM8996 uses a different init sequence
> 
> As part of fixing all of them, use a SM6125-specific compatible with a
> SM6115 fallback.
> 
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs
  2026-09-03 14:25 ` [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs Konrad Dybcio
@ 2026-09-03 15:02   ` Abel Vesa
  0 siblings, 0 replies; 10+ messages in thread
From: Abel Vesa @ 2026-09-03 15:02 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Iskren Chernev, Greg Kroah-Hartman,
	Bjorn Andersson, Manivannan Sadhasivam, linux-arm-msm, linux-phy,
	devicetree, linux-kernel, Konrad Dybcio, Dmitry Baryshkov

On 26-09-03 16:25:31, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> The QUSB2 PHYs are powered by (among others) the VDD_MX power rail.
> Describe that in the DT.
> 
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH v2 3/5] phy: qcom-qusb2: Remove _SHIFT defines
  2026-09-03 14:25 ` [PATCH v2 3/5] phy: qcom-qusb2: Remove _SHIFT defines Konrad Dybcio
@ 2026-09-03 15:03   ` Abel Vesa
  0 siblings, 0 replies; 10+ messages in thread
From: Abel Vesa @ 2026-09-03 15:03 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wesley Cheng, Iskren Chernev, Greg Kroah-Hartman,
	Bjorn Andersson, Manivannan Sadhasivam, linux-arm-msm, linux-phy,
	devicetree, linux-kernel, Konrad Dybcio

On 26-09-03 16:25:30, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> These are unnecessary as they may be inferred from the mask. Drop them.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

end of thread, other threads:[~2026-09-03 15:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 14:25 [PATCH v2 0/5] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
2026-09-03 14:25 ` [PATCH v2 1/5] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
2026-09-03 14:46   ` sashiko-bot
2026-09-03 14:25 ` [PATCH v2 2/5] phy: qcom-qusb2: Fix SM6115 init sequence Konrad Dybcio
2026-09-03 14:25 ` [PATCH v2 3/5] phy: qcom-qusb2: Remove _SHIFT defines Konrad Dybcio
2026-09-03 15:03   ` Abel Vesa
2026-09-03 14:25 ` [PATCH v2 4/5] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs Konrad Dybcio
2026-09-03 15:02   ` Abel Vesa
2026-09-03 14:25 ` [PATCH v2 5/5] arm64: dts: qcom: sm6125: Fix QUSB2 compatible Konrad Dybcio
2026-09-03 15:01   ` Abel Vesa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox