* [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5
@ 2026-06-10 12:04 Konrad Dybcio
2026-06-10 12:04 ` [PATCH 1/4] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
` (4 more replies)
0 siblings, 5 replies; 23+ messages in thread
From: Konrad Dybcio @ 2026-06-10 12:04 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
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio
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>
---
Konrad Dybcio (4):
dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
phy: qcom-qusb2: Fix SM6115 init sequence
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 | 4 +--
4 files changed, 43 insertions(+), 5 deletions(-)
---
base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c
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] 23+ messages in thread
* [PATCH 1/4] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
2026-06-10 12:04 [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
@ 2026-06-10 12:04 ` Konrad Dybcio
2026-06-10 12:25 ` sashiko-bot
2026-06-13 18:36 ` Krzysztof Kozlowski
2026-06-10 12:04 ` [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence Konrad Dybcio
` (3 subsequent siblings)
4 siblings, 2 replies; 23+ messages in thread
From: Konrad Dybcio @ 2026-06-10 12:04 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
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio
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).
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 39851ba9de43..807d64aee547 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
@@ -30,6 +30,9 @@ properties:
- qcom,sdm660-qusb2-phy
- qcom,sm4250-qusb2-phy
- qcom,sm6115-qusb2-phy
+ - items:
+ - const: qcom,sm6125-qusb2-phy
+ - const: qcom,sm6115-qusb2-phy
- items:
- enum:
- qcom,sc7180-qusb2-phy
@@ -57,6 +60,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.
@@ -160,7 +169,6 @@ required:
- "#phy-cells"
- clocks
- clock-names
- - vdd-supply
- vdda-pll-supply
- vdda-phy-dpdm-supply
- resets
@@ -182,6 +190,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:
@@ -196,10 +220,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.54.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence
2026-06-10 12:04 [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
2026-06-10 12:04 ` [PATCH 1/4] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
@ 2026-06-10 12:04 ` Konrad Dybcio
2026-06-10 12:57 ` Abel Vesa
` (2 more replies)
2026-06-10 12:04 ` [PATCH 3/4] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs Konrad Dybcio
` (2 subsequent siblings)
4 siblings, 3 replies; 23+ messages in thread
From: Konrad Dybcio @ 2026-06-10 12:04 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
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio
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")
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 eb93015be841..c304ccd9f31f 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.54.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 3/4] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs
2026-06-10 12:04 [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
2026-06-10 12:04 ` [PATCH 1/4] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
2026-06-10 12:04 ` [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence Konrad Dybcio
@ 2026-06-10 12:04 ` Konrad Dybcio
2026-06-10 12:18 ` sashiko-bot
2026-06-10 13:21 ` Dmitry Baryshkov
2026-06-10 12:04 ` [PATCH 4/4] arm64: dts: qcom: sm6125: Fix QUSB2 compatible Konrad Dybcio
2026-06-10 12:49 ` [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
4 siblings, 2 replies; 23+ messages in thread
From: Konrad Dybcio @ 2026-06-10 12:04 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
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio
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.
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 2f67e665996f..b7cd1928335c 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -3192,7 +3192,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";
};
@@ -3206,7 +3211,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.54.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 4/4] arm64: dts: qcom: sm6125: Fix QUSB2 compatible
2026-06-10 12:04 [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
` (2 preceding siblings ...)
2026-06-10 12:04 ` [PATCH 3/4] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs Konrad Dybcio
@ 2026-06-10 12:04 ` Konrad Dybcio
2026-06-10 12:53 ` Dmitry Baryshkov
2026-06-10 12:49 ` [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
4 siblings, 1 reply; 23+ messages in thread
From: Konrad Dybcio @ 2026-06-10 12:04 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
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio
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.
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 6e84c226948c..688548cef0f1 100644
--- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
@@ -681,7 +681,8 @@ gcc: clock-controller@1400000 {
};
hsusb_phy1: phy@1613000 {
- compatible = "qcom,msm8996-qusb2-phy";
+ compatible = "qcom,sm6125-qusb2-phy",
+ "qcom,sm6115-qusb2-phy";
reg = <0x01613000 0x180>;
#phy-cells = <0>;
--
2.54.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH 3/4] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs
2026-06-10 12:04 ` [PATCH 3/4] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs Konrad Dybcio
@ 2026-06-10 12:18 ` sashiko-bot
2026-06-10 13:22 ` Dmitry Baryshkov
2026-06-10 13:21 ` Dmitry Baryshkov
1 sibling, 1 reply; 23+ messages in thread
From: sashiko-bot @ 2026-06-10 12:18 UTC (permalink / raw)
To: Konrad Dybcio
Cc: vkoul, neil.armstrong, olteanv, linux-phy, robh, conor+dt,
devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Adding the VDD_MX power domain interacts brokenly with the PHY driver's runtime PM implementation, permanently pinning the VDD_MX power rail and causing a severe battery drain regression during system idle.
--
commit f3735b6dfcc42f0f55443d0f81c7b256532b0e25
Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs
This commit adds the VDD_MX power rail description to the QUSB2 PHYs in the
msm8996 device tree. It explicitly sets the power domain and required OPPs
for both primary and secondary PHY nodes.
> diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> index 2f67e665996f3..b7cd1928335c8 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> @@ -3192,7 +3192,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>;
[Severity: High]
Does adding this power domain permanently pin the VDD_MX rail?
Looking at the driver in drivers/phy/qualcomm/phy-qcom-qusb2.c,
qusb2_phy_probe() sets up runtime PM like this:
pm_runtime_set_active(dev);
pm_runtime_forbid(dev);
ret = devm_pm_runtime_enable(dev);
Because the driver forbids runtime suspend by default, the device stays
permanently active.
If we attach the PM domain and require an OPP here, won't the generic PM
domain framework apply the OPP4 performance state permanently, preventing the
SoC from scaling down its logic voltage during system idle?
> +
> nvmem-cells = <&qusb2p_hstx_trim>;
> +
> status = "disabled";
> };
>
> @@ -3206,7 +3211,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";
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260610-topic-8996_61x5_qusb2phy-v1-0-d7135980e78f@oss.qualcomm.com?part=3
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/4] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
2026-06-10 12:04 ` [PATCH 1/4] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
@ 2026-06-10 12:25 ` sashiko-bot
2026-06-13 18:36 ` Krzysztof Kozlowski
1 sibling, 0 replies; 23+ messages in thread
From: sashiko-bot @ 2026-06-10 12:25 UTC (permalink / raw)
To: Konrad Dybcio
Cc: vkoul, linux-phy, neil.armstrong, olteanv, robh, conor+dt,
devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Driver/Schema Mismatch: Driver unconditionally requests 'vdd' regulator while schema removes it for MSM8996
--
commit 3e28a2c0425272ba6818b0dca5f1d04b00a00662
Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
This commit adds a specific compatible string for SM6125 with an SM6115
fallback. It also updates the MSM8996 bindings to require power domains
and operating performance points instead of a vdd-supply.
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> index 39851ba9de436..807d64aee547c 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
[ ... ]
> @@ -182,6 +190,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
[ ... ]
> @@ -196,10 +220,13 @@ examples:
> <&gcc GCC_RX1_USB2_CLKREF_CLK>;
> clock-names = "cfg_ahb", "ref";
>
> - vdd-supply = <&pm8994_l28>;
[Severity: Medium]
Does this removal of vdd-supply for MSM8996 create a mismatch with the
existing qusb2 driver?
Looking at qusb2_phy_probe() in drivers/phy/qualcomm/phy-qcom-qusb2.c, the
driver unconditionally requests all regulators defined in
qusb2_phy_vreg_names, which includes the vdd supply:
drivers/phy/qualcomm/phy-qcom-qusb2.c:qusb2_phy_probe()
num = ARRAY_SIZE(qphy->vregs);
for (i = 0; i < num; i++)
qphy->vregs[i].supply = qusb2_phy_vreg_names[i];
ret = devm_regulator_bulk_get(dev, num, qphy->vregs);
If a device tree omits vdd-supply to follow this new schema intent, will
the driver fail to probe with -ENODEV or log an unwanted warning when
falling back to a dummy regulator?
Should the driver be updated to handle the vdd regulator as optional for
hardware variants that use power domains?
> vdda-pll-supply = <&pm8994_l12>;
> vdda-phy-dpdm-supply = <&pm8994_l24>;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260610-topic-8996_61x5_qusb2phy-v1-0-d7135980e78f@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] 23+ messages in thread
* Re: [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5
2026-06-10 12:04 [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
` (3 preceding siblings ...)
2026-06-10 12:04 ` [PATCH 4/4] arm64: dts: qcom: sm6125: Fix QUSB2 compatible Konrad Dybcio
@ 2026-06-10 12:49 ` Konrad Dybcio
2026-06-10 13:03 ` Dmitry Baryshkov
4 siblings, 1 reply; 23+ messages in thread
From: Konrad Dybcio @ 2026-06-10 12:49 UTC (permalink / raw)
To: Konrad Dybcio, Vinod Koul, Neil Armstrong, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Iskren Chernev,
Greg Kroah-Hartman, Bjorn Andersson
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel
On 6/10/26 2:04 PM, Konrad Dybcio wrote:
> 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>
> ---
> Konrad Dybcio (4):
> dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
> phy: qcom-qusb2: Fix SM6115 init sequence
> 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 | 4 +--
> 4 files changed, 43 insertions(+), 5 deletions(-)
> ---
Note that msm8996pro may need even more looking into, but that's a
story for another day
Konrad
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 4/4] arm64: dts: qcom: sm6125: Fix QUSB2 compatible
2026-06-10 12:04 ` [PATCH 4/4] arm64: dts: qcom: sm6125: Fix QUSB2 compatible Konrad Dybcio
@ 2026-06-10 12:53 ` Dmitry Baryshkov
0 siblings, 0 replies; 23+ messages in thread
From: Dmitry Baryshkov @ 2026-06-10 12:53 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, linux-arm-msm, linux-phy, devicetree,
linux-kernel, Konrad Dybcio
On Wed, Jun 10, 2026 at 02:04:17PM +0200, 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.
>
> 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(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence
2026-06-10 12:04 ` [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence Konrad Dybcio
@ 2026-06-10 12:57 ` Abel Vesa
2026-06-10 13:20 ` Dmitry Baryshkov
2026-06-14 12:29 ` Iskren Chernev
2 siblings, 0 replies; 23+ messages in thread
From: Abel Vesa @ 2026-06-10 12:57 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, linux-arm-msm, linux-phy, devicetree,
linux-kernel, Konrad Dybcio
On 26-06-10 14:04:15, Konrad Dybcio wrote:
> 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")
> 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] 23+ messages in thread
* Re: [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5
2026-06-10 12:49 ` [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
@ 2026-06-10 13:03 ` Dmitry Baryshkov
2026-06-10 13:13 ` Konrad Dybcio
0 siblings, 1 reply; 23+ messages in thread
From: Dmitry Baryshkov @ 2026-06-10 13:03 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Konrad Dybcio, Vinod Koul, Neil Armstrong, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Iskren Chernev,
Greg Kroah-Hartman, Bjorn Andersson, linux-arm-msm, linux-phy,
devicetree, linux-kernel
On Wed, Jun 10, 2026 at 02:49:31PM +0200, Konrad Dybcio wrote:
> On 6/10/26 2:04 PM, Konrad Dybcio wrote:
> > 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>
> > ---
> > Konrad Dybcio (4):
> > dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
> > phy: qcom-qusb2: Fix SM6115 init sequence
> > 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 | 4 +--
> > 4 files changed, 43 insertions(+), 5 deletions(-)
> > ---
>
> Note that msm8996pro may need even more looking into, but that's a
> story for another day
JFYI, MSM8996 Pro is being used in the DRM / Mesa CI. If there is an
important difference, it would be nice to get it sorted out too.
--
With best wishes
Dmitry
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5
2026-06-10 13:03 ` Dmitry Baryshkov
@ 2026-06-10 13:13 ` Konrad Dybcio
2026-06-10 13:20 ` Dmitry Baryshkov
0 siblings, 1 reply; 23+ messages in thread
From: Konrad Dybcio @ 2026-06-10 13:13 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Konrad Dybcio, Vinod Koul, Neil Armstrong, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Iskren Chernev,
Greg Kroah-Hartman, Bjorn Andersson, linux-arm-msm, linux-phy,
devicetree, linux-kernel
On 6/10/26 3:03 PM, Dmitry Baryshkov wrote:
> On Wed, Jun 10, 2026 at 02:49:31PM +0200, Konrad Dybcio wrote:
>> On 6/10/26 2:04 PM, Konrad Dybcio wrote:
>>> 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>
>>> ---
>>> Konrad Dybcio (4):
>>> dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
>>> phy: qcom-qusb2: Fix SM6115 init sequence
>>> 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 | 4 +--
>>> 4 files changed, 43 insertions(+), 5 deletions(-)
>>> ---
>>
>> Note that msm8996pro may need even more looking into, but that's a
>> story for another day
>
> JFYI, MSM8996 Pro is being used in the DRM / Mesa CI. If there is an
> important difference, it would be nice to get it sorted out too.
reg 96 pro
0x80 0xF8 0xD0 [!] QUSB2PHY_PORT_TUNE1
0x84 0xB3 0xB3
0x88 0x83 0x83
0x8C 0xC0 0xC0
0x90 none 0x02 [!] QUSB2PHY_PORT_TUNE5
0x08 0x30 0x30
0x0C 0x79 0x79
0x10 0x21 0x21
0x9C 0x14 0x14
0x1C 0x9F 0x9F
0x18 0x00 0x00
apparently this is indeed SoC-specific (via docs) but also apparently
may not be very important (although should be fixed regardless as
some designs may rely on this)
Konrad
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5
2026-06-10 13:13 ` Konrad Dybcio
@ 2026-06-10 13:20 ` Dmitry Baryshkov
2026-09-03 14:18 ` Konrad Dybcio
0 siblings, 1 reply; 23+ messages in thread
From: Dmitry Baryshkov @ 2026-06-10 13:20 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Konrad Dybcio, Vinod Koul, Neil Armstrong, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Iskren Chernev,
Greg Kroah-Hartman, Bjorn Andersson, linux-arm-msm, linux-phy,
devicetree, linux-kernel
On Wed, Jun 10, 2026 at 03:13:01PM +0200, Konrad Dybcio wrote:
> On 6/10/26 3:03 PM, Dmitry Baryshkov wrote:
> > On Wed, Jun 10, 2026 at 02:49:31PM +0200, Konrad Dybcio wrote:
> >> On 6/10/26 2:04 PM, Konrad Dybcio wrote:
> >>> 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>
> >>> ---
> >>> Konrad Dybcio (4):
> >>> dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
> >>> phy: qcom-qusb2: Fix SM6115 init sequence
> >>> 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 | 4 +--
> >>> 4 files changed, 43 insertions(+), 5 deletions(-)
> >>> ---
> >>
> >> Note that msm8996pro may need even more looking into, but that's a
> >> story for another day
> >
> > JFYI, MSM8996 Pro is being used in the DRM / Mesa CI. If there is an
> > important difference, it would be nice to get it sorted out too.
>
> reg 96 pro
> 0x80 0xF8 0xD0 [!] QUSB2PHY_PORT_TUNE1
> 0x84 0xB3 0xB3
> 0x88 0x83 0x83
> 0x8C 0xC0 0xC0
> 0x90 none 0x02 [!] QUSB2PHY_PORT_TUNE5
> 0x08 0x30 0x30
> 0x0C 0x79 0x79
> 0x10 0x21 0x21
> 0x9C 0x14 0x14
> 0x1C 0x9F 0x9F
> 0x18 0x00 0x00
>
> apparently this is indeed SoC-specific (via docs) but also apparently
> may not be very important (although should be fixed regardless as
> some designs may rely on this)
Would you send a patch, please?
>
> Konrad
>
> --
> linux-phy mailing list
> linux-phy@lists.infradead.org
> https://lists.infradead.org/mailman/listinfo/linux-phy
--
With best wishes
Dmitry
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence
2026-06-10 12:04 ` [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence Konrad Dybcio
2026-06-10 12:57 ` Abel Vesa
@ 2026-06-10 13:20 ` Dmitry Baryshkov
2026-06-14 12:29 ` Iskren Chernev
2 siblings, 0 replies; 23+ messages in thread
From: Dmitry Baryshkov @ 2026-06-10 13:20 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, linux-arm-msm, linux-phy, devicetree,
linux-kernel, Konrad Dybcio
On Wed, Jun 10, 2026 at 02:04:15PM +0200, Konrad Dybcio wrote:
> 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")
> 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(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/4] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs
2026-06-10 12:04 ` [PATCH 3/4] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs Konrad Dybcio
2026-06-10 12:18 ` sashiko-bot
@ 2026-06-10 13:21 ` Dmitry Baryshkov
2026-06-10 13:33 ` Konrad Dybcio
1 sibling, 1 reply; 23+ messages in thread
From: Dmitry Baryshkov @ 2026-06-10 13:21 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, linux-arm-msm, linux-phy, devicetree,
linux-kernel, Konrad Dybcio
On Wed, Jun 10, 2026 at 02:04:16PM +0200, 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.
>
> 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 2f67e665996f..b7cd1928335c 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> @@ -3192,7 +3192,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>;
Interesting, might it be the reason for QUSB PLL locking issues which I
have been observing from time to time?
> +
> nvmem-cells = <&qusb2p_hstx_trim>;
> +
> status = "disabled";
> };
>
> @@ -3206,7 +3211,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.54.0
>
>
> --
> linux-phy mailing list
> linux-phy@lists.infradead.org
> https://lists.infradead.org/mailman/listinfo/linux-phy
--
With best wishes
Dmitry
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/4] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs
2026-06-10 12:18 ` sashiko-bot
@ 2026-06-10 13:22 ` Dmitry Baryshkov
0 siblings, 0 replies; 23+ messages in thread
From: Dmitry Baryshkov @ 2026-06-10 13:22 UTC (permalink / raw)
To: sashiko-reviews
Cc: Konrad Dybcio, vkoul, neil.armstrong, olteanv, linux-phy, robh,
conor+dt, devicetree
On Wed, Jun 10, 2026 at 12:18:23PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] Adding the VDD_MX power domain interacts brokenly with the PHY driver's runtime PM implementation, permanently pinning the VDD_MX power rail and causing a severe battery drain regression during system idle.
> --
>
> commit f3735b6dfcc42f0f55443d0f81c7b256532b0e25
> Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs
>
> This commit adds the VDD_MX power rail description to the QUSB2 PHYs in the
> msm8996 device tree. It explicitly sets the power domain and required OPPs
> for both primary and secondary PHY nodes.
>
> > diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > index 2f67e665996f3..b7cd1928335c8 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > @@ -3192,7 +3192,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>;
>
> [Severity: High]
> Does adding this power domain permanently pin the VDD_MX rail?
>
> Looking at the driver in drivers/phy/qualcomm/phy-qcom-qusb2.c,
> qusb2_phy_probe() sets up runtime PM like this:
>
> pm_runtime_set_active(dev);
> pm_runtime_forbid(dev);
> ret = devm_pm_runtime_enable(dev);
>
> Because the driver forbids runtime suspend by default, the device stays
> permanently active.
I think it should be solved separately. For now, let's make sure that
the PHY is properly powered up.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/4] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs
2026-06-10 13:21 ` Dmitry Baryshkov
@ 2026-06-10 13:33 ` Konrad Dybcio
0 siblings, 0 replies; 23+ messages in thread
From: Konrad Dybcio @ 2026-06-10 13:33 UTC (permalink / raw)
To: Dmitry Baryshkov, Konrad Dybcio
Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Wesley Cheng, Iskren Chernev, Greg Kroah-Hartman,
Bjorn Andersson, linux-arm-msm, linux-phy, devicetree,
linux-kernel
On 6/10/26 3:21 PM, Dmitry Baryshkov wrote:
> On Wed, Jun 10, 2026 at 02:04:16PM +0200, 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.
>>
>> 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 2f67e665996f..b7cd1928335c 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
>> @@ -3192,7 +3192,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>;
>
> Interesting, might it be the reason for QUSB PLL locking issues which I
> have been observing from time to time?
Possibly. I'm surprised that this is such a high value (4 out of 7,
whatever that used to mean in the olden RPM SMD times, maybe NOM?)
but that's what msm-3.18 uses..
Konrad
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/4] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996
2026-06-10 12:04 ` [PATCH 1/4] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
2026-06-10 12:25 ` sashiko-bot
@ 2026-06-13 18:36 ` Krzysztof Kozlowski
1 sibling, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2026-06-13 18:36 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, linux-arm-msm, linux-phy, devicetree,
linux-kernel, Konrad Dybcio
On Wed, Jun 10, 2026 at 02:04:14PM +0200, Konrad Dybcio wrote:
> 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).
>
> 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(-)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence
2026-06-10 12:04 ` [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence Konrad Dybcio
2026-06-10 12:57 ` Abel Vesa
2026-06-10 13:20 ` Dmitry Baryshkov
@ 2026-06-14 12:29 ` Iskren Chernev
2026-06-15 10:44 ` Konrad Dybcio
2 siblings, 1 reply; 23+ messages in thread
From: Iskren Chernev @ 2026-06-14 12:29 UTC (permalink / raw)
To: Konrad Dybcio, Vinod Koul, Neil Armstrong, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
Greg Kroah-Hartman, Bjorn Andersson
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Konrad Dybcio
On 6/10/26 3:04 PM, Konrad Dybcio wrote:
> 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.
They came from DTB extracted from a running billie2 (OnePlus Nord N100):
[1]
https://mainlining.dev/wp-content/uploads/2021/02/03_dtbdump_Qualcomm_Technologies_Inc._Bengal_SoC.dts
The phone was bough early after launch, so it could have been
wrong/updated later.
> 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")
> 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 eb93015be841..c304ccd9f31f 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),
>
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence
2026-06-14 12:29 ` Iskren Chernev
@ 2026-06-15 10:44 ` Konrad Dybcio
2026-06-17 12:48 ` Iskren Chernev
0 siblings, 1 reply; 23+ messages in thread
From: Konrad Dybcio @ 2026-06-15 10:44 UTC (permalink / raw)
To: Iskren Chernev, Konrad Dybcio, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
Greg Kroah-Hartman, Bjorn Andersson
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel
On 6/14/26 2:29 PM, Iskren Chernev wrote:
>
>
> On 6/10/26 3:04 PM, Konrad Dybcio wrote:
>> 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.
>
> They came from DTB extracted from a running billie2 (OnePlus Nord N100):
> [1] https://mainlining.dev/wp-content/uploads/2021/02/03_dtbdump_Qualcomm_Technologies_Inc._Bengal_SoC.dts
>
> The phone was bough early after launch, so it could have been wrong/updated later.
Good to see you're still around!
Looks like vendor tuning. I see that even the initial commit for
6115 had the init sequence I posted. And the OnePlus sources have
what seems like a project-specific local copy of the DTSI:
https://github.com/OnePlusOSS/android_kernel_oneplus_sm4250/blob/oneplus/SM4250_Q_10.0/arch/arm64/boot/dts/vendor/qcom/bengal-usb.dtsi#L145
https://github.com/OnePlusOSS/android_kernel_oneplus_sm4250/blob/oneplus/SM4250_Q_10.0/arch/arm64/boot/dts/vendor/20882/bengal-usb.dtsi#L148
To support that, we should add a new property to override the TUNEx
registers - like e.g. qcom,hstx-trim-value that's already consumed
Would you like to look into that, or should I take this?
Konrad
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence
2026-06-15 10:44 ` Konrad Dybcio
@ 2026-06-17 12:48 ` Iskren Chernev
2026-06-17 13:03 ` Konrad Dybcio
0 siblings, 1 reply; 23+ messages in thread
From: Iskren Chernev @ 2026-06-17 12:48 UTC (permalink / raw)
To: Konrad Dybcio, Konrad Dybcio, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
Greg Kroah-Hartman, Bjorn Andersson
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel
On 6/15/26 1:44 PM, Konrad Dybcio wrote:
> On 6/14/26 2:29 PM, Iskren Chernev wrote:
>>
>>
>> On 6/10/26 3:04 PM, Konrad Dybcio wrote:
>>> 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.
>>
>> They came from DTB extracted from a running billie2 (OnePlus Nord N100):
>> [1] https://mainlining.dev/wp-content/uploads/2021/02/03_dtbdump_Qualcomm_Technologies_Inc._Bengal_SoC.dts
>>
>> The phone was bough early after launch, so it could have been wrong/updated later.
>
> Good to see you're still around!
>
> Looks like vendor tuning. I see that even the initial commit for
> 6115 had the init sequence I posted. And the OnePlus sources have
> what seems like a project-specific local copy of the DTSI:
>
> https://github.com/OnePlusOSS/android_kernel_oneplus_sm4250/blob/oneplus/SM4250_Q_10.0/arch/arm64/boot/dts/vendor/qcom/bengal-usb.dtsi#L145
> https://github.com/OnePlusOSS/android_kernel_oneplus_sm4250/blob/oneplus/SM4250_Q_10.0/arch/arm64/boot/dts/vendor/20882/bengal-usb.dtsi#L148
>
> To support that, we should add a new property to override the TUNEx
> registers - like e.g. qcom,hstx-trim-value that's already consumed
My 2 cents - I never understood why init sequences are taboo in mainline
and widely used in downstream. I guess if it doesn't change (but across
what and who decides) it should be in code, but if it's "tuning"
- whatever that means, possibly depends on other components around, it
should be "configurable" via DT.
> Would you like to look into that, or should I take this?
You can take it, the other option is to mark a TODO, and if somebody
feels strongly about the binary value in a usb tune register s/he can
take up the task.
I just wanted to point out that the number didn't come from a random
number generator (or AI).
> Konrad
Iskren
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence
2026-06-17 12:48 ` Iskren Chernev
@ 2026-06-17 13:03 ` Konrad Dybcio
0 siblings, 0 replies; 23+ messages in thread
From: Konrad Dybcio @ 2026-06-17 13:03 UTC (permalink / raw)
To: Iskren Chernev, Konrad Dybcio, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng,
Greg Kroah-Hartman, Bjorn Andersson
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel
On 6/17/26 2:48 PM, Iskren Chernev wrote:
>
>
> On 6/15/26 1:44 PM, Konrad Dybcio wrote:
>> On 6/14/26 2:29 PM, Iskren Chernev wrote:
>>>
>>>
>>> On 6/10/26 3:04 PM, Konrad Dybcio wrote:
>>>> 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.
>>>
>>> They came from DTB extracted from a running billie2 (OnePlus Nord N100):
>>> [1] https://mainlining.dev/wp-content/uploads/2021/02/03_dtbdump_Qualcomm_Technologies_Inc._Bengal_SoC.dts
>>>
>>> The phone was bough early after launch, so it could have been wrong/updated later.
>>
>> Good to see you're still around!
>>
>> Looks like vendor tuning. I see that even the initial commit for
>> 6115 had the init sequence I posted. And the OnePlus sources have
>> what seems like a project-specific local copy of the DTSI:
>>
>> https://github.com/OnePlusOSS/android_kernel_oneplus_sm4250/blob/oneplus/SM4250_Q_10.0/arch/arm64/boot/dts/vendor/qcom/bengal-usb.dtsi#L145
>> https://github.com/OnePlusOSS/android_kernel_oneplus_sm4250/blob/oneplus/SM4250_Q_10.0/arch/arm64/boot/dts/vendor/20882/bengal-usb.dtsi#L148
>>
>> To support that, we should add a new property to override the TUNEx
>> registers - like e.g. qcom,hstx-trim-value that's already consumed
>
> My 2 cents - I never understood why init sequences are taboo in mainline
> and widely used in downstream. I guess if it doesn't change (but across
> what and who decides) it should be in code, but if it's "tuning"
> - whatever that means, possibly depends on other components around, it
> should be "configurable" via DT.
The PHY has some electrical characteristics of its own, and then atop
that are the characteristics of what's on the other end of it. Making
all parameters configurable (i.e. raw init sequence) leads to duplication
and pure blob seqeuences, whereas making everything constant leads to
polluting the driver (if every device-specific seq was to be in C files)
I think the current model of "override as necessary" is OK, especially
since we can use the upstream leverage to require describing what the
altered parameters actually change
>> Would you like to look into that, or should I take this?
>
> You can take it, the other option is to mark a TODO, and if somebody
> feels strongly about the binary value in a usb tune register s/he can
> take up the task.
Seems like OnePlus does.. actually, a number of vendors do. Sony
does/used to do some tuning there too.
> I just wanted to point out that the number didn't come from a random
> number generator (or AI).
I'm sorry if my language was too harsh. You used the best sources
you had and had no reason to believe they were not the expected values.
Konrad
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5
2026-06-10 13:20 ` Dmitry Baryshkov
@ 2026-09-03 14:18 ` Konrad Dybcio
0 siblings, 0 replies; 23+ messages in thread
From: Konrad Dybcio @ 2026-09-03 14:18 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Konrad Dybcio, Vinod Koul, Neil Armstrong, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Iskren Chernev,
Greg Kroah-Hartman, Bjorn Andersson, linux-arm-msm, linux-phy,
devicetree, linux-kernel
On 6/10/26 3:20 PM, Dmitry Baryshkov wrote:
> On Wed, Jun 10, 2026 at 03:13:01PM +0200, Konrad Dybcio wrote:
>> On 6/10/26 3:03 PM, Dmitry Baryshkov wrote:
>>> On Wed, Jun 10, 2026 at 02:49:31PM +0200, Konrad Dybcio wrote:
>>>> On 6/10/26 2:04 PM, Konrad Dybcio wrote:
>>>>> 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.
[...]
>> reg 96 pro
>> 0x80 0xF8 0xD0 [!] QUSB2PHY_PORT_TUNE1
>> 0x84 0xB3 0xB3
>> 0x88 0x83 0x83
>> 0x8C 0xC0 0xC0
>> 0x90 none 0x02 [!] QUSB2PHY_PORT_TUNE5
>> 0x08 0x30 0x30
>> 0x0C 0x79 0x79
>> 0x10 0x21 0x21
>> 0x9C 0x14 0x14
>> 0x1C 0x9F 0x9F
>> 0x18 0x00 0x00
>>
>> apparently this is indeed SoC-specific (via docs) but also apparently
>> may not be very important (although should be fixed regardless as
>> some designs may rely on this)
>
> Would you send a patch, please?
So the tuning differences may be taken care of through a separate table,
or by adding support for overriding parameters for the QUSB2PHYv1 (8996
-class) devices. Currently the overrides only really work as intended
for V2/V3 (SDM845-class) PHYs as the register layout changed majorly.
I think the real right solution here is to fix the overrides.
dt-bindings clearly created by an LLM :)
I implemented some of it, but I currently don't have the time
for finishing it up - feel free to take it further. It would also
help adjust the specific OnePlus init sequence that was originally
used for every SM6115 device (patch 2)
I also discovered that the interrupt mask is wrong for V1 PHYs.
At this point maybe it'd be easier to split off the v1 support to
a separate driver? Anyway, up to you.
I'll resend this series as-is as it fixes actual issues.
Konrad
commit 792eeeb5d43428cedc72c5778f664a33c4cf2b30
Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Date: Thu Sep 3 16:10:36 2026 +0200
[WIP] qusb2phy v1 overrides/tuning/fixups
Assisted-by: LLM
diff --git a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
index 39e796cd5dc6..13a5c08fdb8e 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
@@ -169,6 +169,22 @@ properties:
maximum: 3
default: 0
+ qcom,man-sqrx-dis-value:
+ description:
+ It is a 1 bit value that enables manual squelch receiver disable.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 1
+ default: 0
+
+ qcom,squelch-eop-delay-value:
+ description:
+ It is a 2 bit value that specifies the squelch end-of-packet delay.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 3
+ default: 0
+
required:
- compatible
- reg
@@ -182,10 +198,17 @@ required:
allOf:
- if:
not:
- properties:
- compatible:
- contains:
- const: qcom,qusb2-v2-phy
+ anyOf:
+ - properties:
+ compatible:
+ contains:
+ const: qcom,qusb2-v2-phy
+ - properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8996-qusb2-phy
then:
properties:
qcom,imp-res-offset-value: false
@@ -196,6 +219,19 @@ allOf:
qcom,preemphasis-width: false
qcom,hsdisc-trim-value: false
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8996-qusb2-phy
+ then:
+ properties:
+ qcom,man-sqrx-dis-value: false
+ qcom,squelch-eop-delay-value: false
+
# On MSM8996, VDD is supplied via the MX power domain
- if:
properties:
diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
index c34d847b123c..a9435b6e1637 100644
--- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
+++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
@@ -51,7 +51,22 @@
#define PHY_CLK_SCHEME_SEL BIT(0)
+/* V1 (MSM8996) register fields */
+
+/* QUSB2PHY_PORT_TUNE2 register bits */
+#define UTM_HSTX_TRIM_V1 GENMASK(7, 4)
+
+/* QUSB2PHY_PORT_TUNE4 register bits */
+#define SQUELCH_EOP_DLY_V1 GENMASK(7, 6)
+#define MAN_SQRX_DIS_V1 BIT(4)
+#define PREEMPH_WIDTH_HALF_BIT_V1 BIT(3)
+#define PREEMPHASIS_EN_MASK_V1 GENMASK(2, 0)
+
+/* V2/V3 (SDM845) register fields */
/* QUSB2PHY_INTR_CTRL register bits */
+
+// v1: 4-chg 3-dmse_high 2-dmse 1-dpse_high 0-dpse
+// v3: 4- dmse_high 3-dpse_high 2-chg_det 1-dmse_intr 0-dpse_intr
#define DMSE_INTR_HIGH_SEL BIT(4)
#define DPSE_INTR_HIGH_SEL BIT(3)
#define CHG_DET_INTR_EN BIT(2)
@@ -443,14 +458,17 @@ struct override_param {
u8 value;
};
-/*struct override_params - structure holding qusb2 v2 phy overriding params
+/**
+ * struct override_params - structure holding QUSB2 PHY override parameters
* @imp_res_offset: rescode offset to be updated in IMP_CTRL1 register
- * @hstx_trim: HSTX_TRIM to be updated in TUNE1 register
- * @preemphasis: Amplitude Pre-Emphasis to be updated in TUNE1 register
- * @preemphasis_width: half/full-width Pre-Emphasis updated via TUNE1
- * @bias_ctrl: bias ctrl to be updated in BIAS_CONTROL_2 register
- * @charge_ctrl: charge ctrl to be updated in CHG_CTRL2 register
- * @hsdisc_trim: disconnect threshold to be updated in TUNE2 register
+ * @hstx_trim: High-Speed TX trim
+ * @preemphasis: Amplitude Pre-Emphasis
+ * @preemphasis_width: Pre-Emphasis width (half/full)
+ * @bias_ctrl: bias control value
+ * @charge_ctrl: charge control value
+ * @hsdisc_trim: High-Speed disconnect threshold
+ * @man_sqrx_dis: manual squelch receiver disable
+ * @squelch_eop_delay: squelch end-of-packet delay
*/
struct override_params {
struct override_param imp_res_offset;
@@ -460,6 +478,9 @@ struct override_params {
struct override_param bias_ctrl;
struct override_param charge_ctrl;
struct override_param hsdisc_trim;
+
+ struct override_param man_sqrx_dis;
+ struct override_param squelch_eop_delay;
};
/**
@@ -558,11 +579,48 @@ void qcom_qusb2_phy_configure(void __iomem *base,
}
}
-/*
- * Update board specific PHY tuning override values if specified from
- * device tree.
- */
-static void qusb2_phy_override_phy_params(struct qusb2_phy *qphy)
+static void qusb2_v1_phy_override_phy_params(struct qusb2_phy *qphy)
+{
+ const struct qusb2_phy_cfg *cfg = qphy->cfg;
+ struct override_params *or = &qphy->overrides;
+
+ if (or->hstx_trim.override) {
+ qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE2],
+ FIELD_PREP(UTM_HSTX_TRIM_V1, or->hstx_trim.value),
+ UTM_HSTX_TRIM_V1);
+ }
+
+ if (or->squelch_eop_delay.override) {
+ qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE4],
+ FIELD_PREP(SQUELCH_EOP_DLY_V1, or->squelch_eop_delay.value),
+ SQUELCH_EOP_DLY_V1);
+ }
+
+ if (or->man_sqrx_dis.override) {
+ qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE4],
+ FIELD_PREP(MAN_SQRX_DIS_V1, or->man_sqrx_dis.value),
+ MAN_SQRX_DIS_V1);
+ }
+
+ if (or->preemphasis.override) {
+ qusb2_write_mask(qphy->base, cfg->regs[QUSB2PHY_PORT_TUNE4],
+ FIELD_PREP(PREEMPHASIS_EN_MASK_V1, or->preemphasis.value),
+ PREEMPHASIS_EN_MASK_V1);
+ }
+
+ if (or->preemphasis_width.override) {
+ if (or->preemphasis_width.value == QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT)
+ qusb2_setbits(qphy->base,
+ cfg->regs[QUSB2PHY_PORT_TUNE4],
+ PREEMPH_WIDTH_HALF_BIT_V1);
+ else
+ qusb2_clrbits(qphy->base,
+ cfg->regs[QUSB2PHY_PORT_TUNE4],
+ PREEMPH_WIDTH_HALF_BIT_V1);
+ }
+}
+
+static void qusb2_v3_phy_override_phy_params(struct qusb2_phy *qphy)
{
const struct qusb2_phy_cfg *cfg = qphy->cfg;
struct override_params *or = &qphy->overrides;
@@ -840,7 +898,10 @@ static int qusb2_phy_init(struct phy *phy)
cfg->tbl_num);
/* Override board specific PHY tuning values */
- qusb2_phy_override_phy_params(qphy);
+ if (true /* TODO: */)
+ qusb2_v3_phy_override_phy_params(qphy);
+ else
+ qusb2_v1_phy_override_phy_params(qphy);
/* Set efuse value for tuning the PHY */
qusb2_phy_set_tune2_param(qphy);
@@ -1136,6 +1197,18 @@ static int qusb2_phy_probe(struct platform_device *pdev)
or->hsdisc_trim.override = true;
}
+ if (!of_property_read_u32(dev->of_node, "qcom,man-sqrx-dis-value",
+ &value)) {
+ or->man_sqrx_dis.value = (u8)value;
+ or->man_sqrx_dis.override = true;
+ }
+
+ if (!of_property_read_u32(dev->of_node,
+ "qcom,squelch-eop-delay-value", &value)) {
+ or->squelch_eop_delay.value = (u8)value;
+ or->squelch_eop_delay.override = true;
+ }
+
dev_set_drvdata(dev, qphy);
/*
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 23+ messages in thread
end of thread, other threads:[~2026-09-03 14:19 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 12:04 [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
2026-06-10 12:04 ` [PATCH 1/4] dt-bindings: phy: qcom,qusb2: Straighten out SM6125 and MSM8996 Konrad Dybcio
2026-06-10 12:25 ` sashiko-bot
2026-06-13 18:36 ` Krzysztof Kozlowski
2026-06-10 12:04 ` [PATCH 2/4] phy: qcom-qusb2: Fix SM6115 init sequence Konrad Dybcio
2026-06-10 12:57 ` Abel Vesa
2026-06-10 13:20 ` Dmitry Baryshkov
2026-06-14 12:29 ` Iskren Chernev
2026-06-15 10:44 ` Konrad Dybcio
2026-06-17 12:48 ` Iskren Chernev
2026-06-17 13:03 ` Konrad Dybcio
2026-06-10 12:04 ` [PATCH 3/4] arm64: dts: qcom: msm8996: Add VDD_MX to QUSB2 PHYs Konrad Dybcio
2026-06-10 12:18 ` sashiko-bot
2026-06-10 13:22 ` Dmitry Baryshkov
2026-06-10 13:21 ` Dmitry Baryshkov
2026-06-10 13:33 ` Konrad Dybcio
2026-06-10 12:04 ` [PATCH 4/4] arm64: dts: qcom: sm6125: Fix QUSB2 compatible Konrad Dybcio
2026-06-10 12:53 ` Dmitry Baryshkov
2026-06-10 12:49 ` [PATCH 0/4] Fix up QUSB2 PHY description for MSM8996/SM61[12]5 Konrad Dybcio
2026-06-10 13:03 ` Dmitry Baryshkov
2026-06-10 13:13 ` Konrad Dybcio
2026-06-10 13:20 ` Dmitry Baryshkov
2026-09-03 14:18 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox