* [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY
@ 2026-08-03 19:27 Mohd Ayaan Anwar
2026-08-03 19:27 ` [PATCH v2 1/6] dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add named voltage rails and deprecate phy-supply Mohd Ayaan Anwar
` (7 more replies)
0 siblings, 8 replies; 10+ messages in thread
From: Mohd Ayaan Anwar @ 2026-08-03 19:27 UTC (permalink / raw)
To: Konrad Dybcio, Krzysztof Kozlowski, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Wasim Nazir,
Mohd Ayaan Anwar, Umang Chheda, Yijie Yang
Cc: Loic Poulain, linux-arm-msm, linux-phy, devicetree, linux-kernel,
Mohd Ayaan Anwar
This is a long overdue v2 of the original patch series which tried to
address a SerDes power-up failure observed on the QCS8300 Ride board
using the phy-qcom-sgmii-eth driver. After going through a rabbit hole
of hardware schematics and power data, I now have a fuller picture of
this IP.
The Qualcomm SGMII SerDes PHY (used in Lemans and Monaco SoCs) is
powered by two voltage rails. The schematics call them vdda-0p9 and
vdda-1p2, so that's what we follow in the series. Additionally, the
0.9V regulator draws a peak current of 46 mA and the 1.2V regulator
draws a peak current of 15 mA.
If both rails are not enabled, we see the original issue where the
SerDes calibration times out:
qcom-dwmac-sgmii-phy 8909000.phy: QSERDES_COM_C_READY_STATUS timed-out
qcom-ethqos 23040000.ethernet eth0: __stmmac_open: Serdes powerup failed
Currently, the DT nodes across affected boards incorrectly describe
only a single regulator via the generic 'phy-supply' property (and in
some cases point to the wrong rail entirely). Moreover, the driver does
not set the proper current loads and just relies on an enable vote.
This series corrects this by:
1. Fixing the DT binding to describe both named supplies.
2. Fixing all affected board DTS to use the correct vdda-0p9-supply
and vdda-1p2-supply properties.
3. Adding bulk regulator support to the PHY driver so it enables both
supplies and sets the proper current loads.
The patches are sequenced to maintain bisectability. With the driver
change, the PHY framework will continue to vote for the regulator
described by 'phy-supply'. The DT changes which follow then remove
'phy-supply' in favour of 'vdda-0p9' and 'vdda-1p2'.
Testing:
This series was tested on the following Lemans and Monaco based boards.
1. Lemans IQ-9075 EVK with the IFP+ Mezzanine attach (dual GMAC +
QCOM SGMII SerDes + QCA8081 PHY)
2. Lemans QCS9100 Ride (dual GMAC + QCOM SGMII SerDes + AQR115C PHY)
3. Monaco IQ-8275 EVK (single GMAC + QCOM SGMII SerDes + QCA8081 PHY)
4. Monaco QCS8300 Ride (dual GMAC + QCOM SGMII SerDes + AQR115C PHY)
To conclusively test the new regulator voting, I tested builds with all
the other consumers of the regulators disabled from the DTS to ensure
that the phy-qcom-sgmii-eth driver held the only vote.
Changes since v1:
- Fixed the DT bindings to describe the actual SerDes PHY hardware,
which actually has two supplies rather than only one - Krzysztof.
- Use regulator_bulk_* APIs to properly set the current loads of the
two supplies - Konrad.
- Fixed Lemans board DTS files that incorrectly voted for vreg_l5a;
the correct rails per the power diagram are vreg_l4a (0.9V) and
vreg_l1c (1.2V).
- Link to v1: https://lore.kernel.org/linux-arm-msm/20251124-sgmiieth_serdes_regulator-v1-0-73ae8f9cbe2a@oss.qualcomm.com/T/#m0b93e06a0d6a09c4c1b65c500b475958ed5e288d.
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
---
Mohd Ayaan Anwar (6):
dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add named voltage rails and deprecate phy-supply
phy: qcom: sgmii-eth: vote for both voltage rails with correct current loads
arm64: dts: qcom: lemans-evk: fix SerDes PHY regulator supplies
arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies
arm64: dts: qcom: monaco-evk: fix SerDes PHY regulator supplies
arm64: dts: qcom: qcs8300-ride: fix SerDes PHY regulator supplies
.../bindings/phy/qcom,sa8775p-dwmac-sgmii-phy.yaml | 11 +++++++
.../boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso | 3 +-
arch/arm64/boot/dts/qcom/lemans-evk.dts | 3 +-
arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi | 8 +++--
arch/arm64/boot/dts/qcom/monaco-evk.dts | 3 +-
arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 4 ++-
drivers/phy/qualcomm/phy-qcom-sgmii-eth.c | 37 +++++++++++++++++++---
7 files changed, 59 insertions(+), 10 deletions(-)
---
base-commit: 415606a7be939835db9b0d6b711887586646346d
change-id: 20260803-b4-sgmiieth_serdes_regulator-0cf9e58dbb12
Best regards,
--
Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/6] dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add named voltage rails and deprecate phy-supply
2026-08-03 19:27 [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
@ 2026-08-03 19:27 ` Mohd Ayaan Anwar
2026-08-04 6:19 ` Krzysztof Kozlowski
2026-08-03 19:27 ` [PATCH v2 2/6] phy: qcom: sgmii-eth: vote for both voltage rails with correct current loads Mohd Ayaan Anwar
` (6 subsequent siblings)
7 siblings, 1 reply; 10+ messages in thread
From: Mohd Ayaan Anwar @ 2026-08-03 19:27 UTC (permalink / raw)
To: Konrad Dybcio, Krzysztof Kozlowski, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Wasim Nazir,
Mohd Ayaan Anwar, Umang Chheda, Yijie Yang
Cc: Loic Poulain, linux-arm-msm, linux-phy, devicetree, linux-kernel,
Mohd Ayaan Anwar
The Qualcomm SGMII SerDes PHY has two distinct voltage supply rails,
vdda-0p9 and vdda-1p2. The binding incorrectly described only a single
generic supply via 'phy-supply'.
Deprecate 'phy-supply' and instead add two named supply properties. The
0.9V rail draws a peak current of 46 mA and the 1.2V rail draws 15 mA.
Fixes: 97b795125704 ("dt-bindings: phy: describe the Qualcomm SGMII PHY")
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
---
.../devicetree/bindings/phy/qcom,sa8775p-dwmac-sgmii-phy.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/qcom,sa8775p-dwmac-sgmii-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sa8775p-dwmac-sgmii-phy.yaml
index 90fc8c039219c739eae05cc17108a9a2fc6193df..e573abcb937df914ced25ec87add7955bbba7b87 100644
--- a/Documentation/devicetree/bindings/phy/qcom,sa8775p-dwmac-sgmii-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,sa8775p-dwmac-sgmii-phy.yaml
@@ -35,6 +35,17 @@ properties:
phy-supply:
description:
Phandle to a regulator that provides power to the PHY.
+ deprecated: true
+
+ vdda-0p9-supply:
+ description:
+ Phandle to a 0.9V regulator supply to the PHY, which draws a peak
+ current of 46 mA.
+
+ vdda-1p2-supply:
+ description:
+ Phandle to a 1.2V regulator supply to the PHY, which draws a peak
+ current of 15 mA.
"#phy-cells":
const: 0
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/6] phy: qcom: sgmii-eth: vote for both voltage rails with correct current loads
2026-08-03 19:27 [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
2026-08-03 19:27 ` [PATCH v2 1/6] dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add named voltage rails and deprecate phy-supply Mohd Ayaan Anwar
@ 2026-08-03 19:27 ` Mohd Ayaan Anwar
2026-08-03 19:27 ` [PATCH v2 3/6] arm64: dts: qcom: lemans-evk: fix SerDes PHY regulator supplies Mohd Ayaan Anwar
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Mohd Ayaan Anwar @ 2026-08-03 19:27 UTC (permalink / raw)
To: Konrad Dybcio, Krzysztof Kozlowski, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Wasim Nazir,
Mohd Ayaan Anwar, Umang Chheda, Yijie Yang
Cc: Loic Poulain, linux-arm-msm, linux-phy, devicetree, linux-kernel,
Mohd Ayaan Anwar
The SerDes PHY has two voltage supply rails, vdda-0p9 and vdda-1p2,
that must both be enabled for calibration to succeed. Without them:
qcom-dwmac-sgmii-phy 8909000.phy: QSERDES_COM_C_READY_STATUS timed-out
qcom-ethqos 23040000.ethernet eth0: __stmmac_open: Serdes powerup failed
The driver relied solely on the PHY framework's implicit enable of
'phy-supply', which only voted for a single rail and set no current
load. Use devm_regulator_bulk_get_const() to acquire both supplies and
set the peak current loads (46 mA for vdda-0p9, 15 mA for vdda-1p2)
as required by the hardware.
Fixes: 601d06277007 ("phy: qcom: add the SGMII SerDes PHY driver")
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
---
drivers/phy/qualcomm/phy-qcom-sgmii-eth.c | 37 +++++++++++++++++++++++++++----
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c b/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c
index f48faa2929a682be6024ee349fac6fd1b6464cb3..7137200c3f310a4d2642bb9bdbe3adb7589b2241 100644
--- a/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c
+++ b/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c
@@ -11,6 +11,7 @@
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
#include "phy-qcom-qmp-pcs-sgmii.h"
#include "phy-qcom-qmp-qserdes-com-v5.h"
@@ -26,7 +27,15 @@
#define QSERDES_PCS_SGMIIPHY_READY BIT(7)
#define QSERDES_COM_C_PLL_LOCKED BIT(1)
+static const struct regulator_bulk_data qcom_dwmac_sgmii_phy_vregs[] = {
+ { .supply = "vdda-0p9", .init_load_uA = 46000 },
+ { .supply = "vdda-1p2", .init_load_uA = 15000 },
+};
+
+#define QCOM_SGMII_NUM_SUPPLIES ARRAY_SIZE(qcom_dwmac_sgmii_phy_vregs)
+
struct qcom_dwmac_sgmii_phy_data {
+ struct regulator_bulk_data *vregs;
struct regmap *regmap;
struct clk *refclk;
phy_interface_t interface;
@@ -273,13 +282,24 @@ static int qcom_dwmac_sgmii_phy_power_on(struct phy *phy)
struct qcom_dwmac_sgmii_phy_data *data = phy_get_drvdata(phy);
int ret;
- ret = clk_prepare_enable(data->refclk);
- if (ret < 0)
+ ret = regulator_bulk_enable(QCOM_SGMII_NUM_SUPPLIES, data->vregs);
+ if (ret)
return ret;
+ ret = clk_prepare_enable(data->refclk);
+ if (ret)
+ goto err_disable_regulators;
+
ret = qcom_dwmac_sgmii_phy_calibrate(phy);
- if (ret < 0)
- clk_disable_unprepare(data->refclk);
+ if (ret)
+ goto err_disable_clk;
+
+ return 0;
+
+err_disable_clk:
+ clk_disable_unprepare(data->refclk);
+err_disable_regulators:
+ regulator_bulk_disable(QCOM_SGMII_NUM_SUPPLIES, data->vregs);
return ret;
}
@@ -296,6 +316,8 @@ static int qcom_dwmac_sgmii_phy_power_off(struct phy *phy)
clk_disable_unprepare(data->refclk);
+ regulator_bulk_disable(QCOM_SGMII_NUM_SUPPLIES, data->vregs);
+
return 0;
}
@@ -357,6 +379,7 @@ static int qcom_dwmac_sgmii_phy_probe(struct platform_device *pdev)
struct phy_provider *provider;
void __iomem *base;
struct phy *phy;
+ int ret;
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
if (!data)
@@ -381,6 +404,12 @@ static int qcom_dwmac_sgmii_phy_probe(struct platform_device *pdev)
if (IS_ERR(data->refclk))
return PTR_ERR(data->refclk);
+ ret = devm_regulator_bulk_get_const(dev, QCOM_SGMII_NUM_SUPPLIES,
+ qcom_dwmac_sgmii_phy_vregs,
+ &data->vregs);
+ if (ret)
+ return ret;
+
provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
if (IS_ERR(provider))
return PTR_ERR(provider);
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 3/6] arm64: dts: qcom: lemans-evk: fix SerDes PHY regulator supplies
2026-08-03 19:27 [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
2026-08-03 19:27 ` [PATCH v2 1/6] dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add named voltage rails and deprecate phy-supply Mohd Ayaan Anwar
2026-08-03 19:27 ` [PATCH v2 2/6] phy: qcom: sgmii-eth: vote for both voltage rails with correct current loads Mohd Ayaan Anwar
@ 2026-08-03 19:27 ` Mohd Ayaan Anwar
2026-08-03 19:28 ` [PATCH v2 4/6] arm64: dts: qcom: lemans-ride-common: " Mohd Ayaan Anwar
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Mohd Ayaan Anwar @ 2026-08-03 19:27 UTC (permalink / raw)
To: Konrad Dybcio, Krzysztof Kozlowski, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Wasim Nazir,
Mohd Ayaan Anwar, Umang Chheda, Yijie Yang
Cc: Loic Poulain, linux-arm-msm, linux-phy, devicetree, linux-kernel,
Mohd Ayaan Anwar
The SerDes PHY nodes were configured with 'phy-supply = <&vreg_l5a>',
which was incorrect on two counts: vreg_l5a is not a supply the PHY
requires, and only one rail was described whereas the hardware needs
two.
The PHY requires vdda-0p9 (vreg_l4a) and vdda-1p2 (vreg_l1c). Replace
the incorrect phy-supply with these two named properties on both the
base EVK node and the IFP mezzanine overlay.
Fixes: 71ee90ed1756 ("arm64: dts: qcom: lemans-evk: Enable 2.5G Ethernet interface")
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso | 3 ++-
arch/arm64/boot/dts/qcom/lemans-evk.dts | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso b/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso
index 6cfa0bc1440e91d32df0695ae4059050e4e20b56..8651c412d0288fcf2ab69fbfaed86f68fb2b4fc5 100644
--- a/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso
+++ b/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso
@@ -291,7 +291,8 @@ pcie@0,1 {
};
&serdes1 {
- phy-supply = <&vreg_l5a>;
+ vdda-0p9-supply = <&vreg_l4a>;
+ vdda-1p2-supply = <&vreg_l1c>;
status = "okay";
};
diff --git a/arch/arm64/boot/dts/qcom/lemans-evk.dts b/arch/arm64/boot/dts/qcom/lemans-evk.dts
index 0c53640c42a65c62375e71f7ae79cbc834a05888..5c046b9bfb3cdec59cffc1dfdbf9f2a51dc9721b 100644
--- a/arch/arm64/boot/dts/qcom/lemans-evk.dts
+++ b/arch/arm64/boot/dts/qcom/lemans-evk.dts
@@ -978,7 +978,8 @@ &sdhc {
};
&serdes0 {
- phy-supply = <&vreg_l5a>;
+ vdda-0p9-supply = <&vreg_l4a>;
+ vdda-1p2-supply = <&vreg_l1c>;
status = "okay";
};
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 4/6] arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies
2026-08-03 19:27 [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
` (2 preceding siblings ...)
2026-08-03 19:27 ` [PATCH v2 3/6] arm64: dts: qcom: lemans-evk: fix SerDes PHY regulator supplies Mohd Ayaan Anwar
@ 2026-08-03 19:28 ` Mohd Ayaan Anwar
2026-08-03 19:28 ` [PATCH v2 5/6] arm64: dts: qcom: monaco-evk: " Mohd Ayaan Anwar
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Mohd Ayaan Anwar @ 2026-08-03 19:28 UTC (permalink / raw)
To: Konrad Dybcio, Krzysztof Kozlowski, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Wasim Nazir,
Mohd Ayaan Anwar, Umang Chheda, Yijie Yang
Cc: Loic Poulain, linux-arm-msm, linux-phy, devicetree, linux-kernel,
Mohd Ayaan Anwar
Both SerDes PHY nodes were configured with 'phy-supply = <&vreg_l5a>',
which was incorrect on two counts: vreg_l5a is not a supply the PHY
requires, and only one rail was described where the hardware needs two.
The PHY requires vdda-0p9 (vreg_l4a) and vdda-1p2 (vreg_l1c). Replace
the incorrect phy-supply with these two named properties on both nodes.
Fixes: 5ef26fb8b3ed ("arm64: dts: qcom: sa8775p-ride: enable the SerDes PHY")
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi b/arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi
index cefb8ff0080631e25e9dd3a05cd810c6955bf1fe..923fd8736f31df2eb5198b27ddf52c171f7b2943 100644
--- a/arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi
@@ -856,12 +856,16 @@ &qup_uart17_rx {
};
&serdes0 {
- phy-supply = <&vreg_l5a>;
+ vdda-0p9-supply = <&vreg_l4a>;
+ vdda-1p2-supply = <&vreg_l1c>;
+
status = "okay";
};
&serdes1 {
- phy-supply = <&vreg_l5a>;
+ vdda-0p9-supply = <&vreg_l4a>;
+ vdda-1p2-supply = <&vreg_l1c>;
+
status = "okay";
};
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 5/6] arm64: dts: qcom: monaco-evk: fix SerDes PHY regulator supplies
2026-08-03 19:27 [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
` (3 preceding siblings ...)
2026-08-03 19:28 ` [PATCH v2 4/6] arm64: dts: qcom: lemans-ride-common: " Mohd Ayaan Anwar
@ 2026-08-03 19:28 ` Mohd Ayaan Anwar
2026-08-03 19:28 ` [PATCH v2 6/6] arm64: dts: qcom: qcs8300-ride: " Mohd Ayaan Anwar
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Mohd Ayaan Anwar @ 2026-08-03 19:28 UTC (permalink / raw)
To: Konrad Dybcio, Krzysztof Kozlowski, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Wasim Nazir,
Mohd Ayaan Anwar, Umang Chheda, Yijie Yang
Cc: Loic Poulain, linux-arm-msm, linux-phy, devicetree, linux-kernel,
Mohd Ayaan Anwar
The SerDes PHY node was configured with 'phy-supply = <&vreg_l4a>',
which only described one of the two supplies the hardware requires.
While vreg_l4a is the correct 0.9V rail, the 1.2V rail (vreg_l5a)
was missing entirely.
Replace phy-supply with the two named properties vdda-0p9-supply
(vreg_l4a) and vdda-1p2-supply (vreg_l5a).
Fixes: 117d6bc9326b ("arm64: dts: qcom: qcs8300: Add Monaco EVK board")
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/monaco-evk.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/monaco-evk.dts b/arch/arm64/boot/dts/qcom/monaco-evk.dts
index 9d17ef7d2caf130564efc2d0159ac0de39126e80..f787e78b35ce48d7544116e4383561b81def8ec7 100644
--- a/arch/arm64/boot/dts/qcom/monaco-evk.dts
+++ b/arch/arm64/boot/dts/qcom/monaco-evk.dts
@@ -706,7 +706,8 @@ &sdhc_1 {
};
&serdes0 {
- phy-supply = <&vreg_l4a>;
+ vdda-0p9-supply = <&vreg_l4a>;
+ vdda-1p2-supply = <&vreg_l5a>;
status = "okay";
};
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 6/6] arm64: dts: qcom: qcs8300-ride: fix SerDes PHY regulator supplies
2026-08-03 19:27 [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
` (4 preceding siblings ...)
2026-08-03 19:28 ` [PATCH v2 5/6] arm64: dts: qcom: monaco-evk: " Mohd Ayaan Anwar
@ 2026-08-03 19:28 ` Mohd Ayaan Anwar
2026-08-04 8:36 ` [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
2026-08-07 4:59 ` Manivannan Sadhasivam
7 siblings, 0 replies; 10+ messages in thread
From: Mohd Ayaan Anwar @ 2026-08-03 19:28 UTC (permalink / raw)
To: Konrad Dybcio, Krzysztof Kozlowski, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Wasim Nazir,
Mohd Ayaan Anwar, Umang Chheda, Yijie Yang
Cc: Loic Poulain, linux-arm-msm, linux-phy, devicetree, linux-kernel,
Mohd Ayaan Anwar
The SerDes PHY node was configured with 'phy-supply = <&vreg_l5a>',
which only covered the 1.2V rail. The 0.9V rail (vreg_l4a) was missing
entirely.
Replace phy-supply with the two named properties vdda-0p9-supply
(vreg_l4a) and vdda-1p2-supply (vreg_l5a).
Fixes: 787cb3b4c434 ("arm64: dts: qcom: qcs8300-ride: enable ethernet0")
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/qcs8300-ride.dts b/arch/arm64/boot/dts/qcom/qcs8300-ride.dts
index 1ff39530ea3deebe454416d70a289e44c2d89e3f..76c34215dbdf07e520fe96d350f52da8c4485c97 100644
--- a/arch/arm64/boot/dts/qcom/qcs8300-ride.dts
+++ b/arch/arm64/boot/dts/qcom/qcs8300-ride.dts
@@ -702,7 +702,9 @@ &remoteproc_gpdsp {
};
&serdes0 {
- phy-supply = <&vreg_l5a>;
+ vdda-0p9-supply = <&vreg_l4a>;
+ vdda-1p2-supply = <&vreg_l5a>;
+
status = "okay";
};
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/6] dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add named voltage rails and deprecate phy-supply
2026-08-03 19:27 ` [PATCH v2 1/6] dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add named voltage rails and deprecate phy-supply Mohd Ayaan Anwar
@ 2026-08-04 6:19 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-04 6:19 UTC (permalink / raw)
To: Mohd Ayaan Anwar, Konrad Dybcio, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Wasim Nazir,
Mohd Ayaan Anwar, Umang Chheda, Yijie Yang
Cc: Loic Poulain, linux-arm-msm, linux-phy, devicetree, linux-kernel
On 03/08/2026 21:27, Mohd Ayaan Anwar wrote:
> The Qualcomm SGMII SerDes PHY has two distinct voltage supply rails,
> vdda-0p9 and vdda-1p2. The binding incorrectly described only a single
> generic supply via 'phy-supply'.
>
> Deprecate 'phy-supply' and instead add two named supply properties. The
> 0.9V rail draws a peak current of 46 mA and the 1.2V rail draws 15 mA.
>
> Fixes: 97b795125704 ("dt-bindings: phy: describe the Qualcomm SGMII PHY")
> Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY
2026-08-03 19:27 [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
` (5 preceding siblings ...)
2026-08-03 19:28 ` [PATCH v2 6/6] arm64: dts: qcom: qcs8300-ride: " Mohd Ayaan Anwar
@ 2026-08-04 8:36 ` Mohd Ayaan Anwar
2026-08-07 4:59 ` Manivannan Sadhasivam
7 siblings, 0 replies; 10+ messages in thread
From: Mohd Ayaan Anwar @ 2026-08-04 8:36 UTC (permalink / raw)
To: Konrad Dybcio, Krzysztof Kozlowski, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Wasim Nazir,
Mohd Ayaan Anwar, Umang Chheda, Yijie Yang
Cc: Loic Poulain, linux-arm-msm, linux-phy, devicetree, linux-kernel
On Tue, Aug 04, 2026 at 12:57:56AM +0530, Mohd Ayaan Anwar wrote:
> This series corrects this by:
>
> 1. Fixing the DT binding to describe both named supplies.
> 2. Fixing all affected board DTS to use the correct vdda-0p9-supply
> and vdda-1p2-supply properties.
> 3. Adding bulk regulator support to the PHY driver so it enables both
> supplies and sets the proper current loads.
>
> The patches are sequenced to maintain bisectability. With the driver
> change, the PHY framework will continue to vote for the regulator
> described by 'phy-supply'. The DT changes which follow then remove
> 'phy-supply' in favour of 'vdda-0p9' and 'vdda-1p2'.
>
Sashiko raises some valid concerns [0]:
--
1. This isn't a bug introduced by this patch, but I noticed that
another file in the tree, monaco-monza-som.dtsi, still has the exact
same configuration you are fixing here. It retains the deprecated
phy-supply property and lacks the required 0.9V rail.
Should monaco-monza-som.dtsi be updated similarly in this patch or as a
follow-up in this series?
2. This is a pre-existing issue, but does registering the PHY provider
before setting the driver data create a race condition here?
Looking at the end of qcom_dwmac_sgmii_phy_probe():
provider = devm_of_phy_provider_register(dev,
of_phy_simple_xlate);
if (IS_ERR(provider))
return PTR_ERR(provider);
phy_set_drvdata(phy, data);
By calling devm_of_phy_provider_register() first, the PHY is made
available to consumers before phy_set_drvdata() initializes the private
data. If a consumer (such as a deferred probe workqueue) concurrently
looks up the PHY and immediately invokes an operation like
phy_power_on(), could qcom_dwmac_sgmii_phy_power_on() read a NULL
driver data pointer and cause a NULL pointer dereference when
attempting to access data->vregs?
--
For 1., I can either post a follow-up patch or add it as part of v3.
For 2., this is a genuine pre-existing bug. I will raise a separate
patch to move phy_set_drvdata() before devm_of_phy_provider_register()
to close the race window.
Ayaan
[0] https://sashiko.dev/#/patchset/20260804-b4-sgmiieth_serdes_regulator-v2-0-c4bc688177dd@oss.qualcomm.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY
2026-08-03 19:27 [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
` (6 preceding siblings ...)
2026-08-04 8:36 ` [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
@ 2026-08-07 4:59 ` Manivannan Sadhasivam
7 siblings, 0 replies; 10+ messages in thread
From: Manivannan Sadhasivam @ 2026-08-07 4:59 UTC (permalink / raw)
To: Mohd Ayaan Anwar
Cc: Konrad Dybcio, Krzysztof Kozlowski, Vinod Koul, Neil Armstrong,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Bjorn Andersson, Konrad Dybcio, Wasim Nazir,
Mohd Ayaan Anwar, Umang Chheda, Yijie Yang, Loic Poulain,
linux-arm-msm, linux-phy, devicetree, linux-kernel
On Tue, Aug 04, 2026 at 12:57:56AM +0530, Mohd Ayaan Anwar wrote:
> This is a long overdue v2 of the original patch series which tried to
> address a SerDes power-up failure observed on the QCS8300 Ride board
> using the phy-qcom-sgmii-eth driver. After going through a rabbit hole
> of hardware schematics and power data, I now have a fuller picture of
> this IP.
>
> The Qualcomm SGMII SerDes PHY (used in Lemans and Monaco SoCs) is
> powered by two voltage rails. The schematics call them vdda-0p9 and
> vdda-1p2, so that's what we follow in the series. Additionally, the
> 0.9V regulator draws a peak current of 46 mA and the 1.2V regulator
> draws a peak current of 15 mA.
>
> If both rails are not enabled, we see the original issue where the
> SerDes calibration times out:
>
> qcom-dwmac-sgmii-phy 8909000.phy: QSERDES_COM_C_READY_STATUS timed-out
> qcom-ethqos 23040000.ethernet eth0: __stmmac_open: Serdes powerup failed
>
> Currently, the DT nodes across affected boards incorrectly describe
> only a single regulator via the generic 'phy-supply' property (and in
> some cases point to the wrong rail entirely). Moreover, the driver does
> not set the proper current loads and just relies on an enable vote.
>
> This series corrects this by:
>
> 1. Fixing the DT binding to describe both named supplies.
> 2. Fixing all affected board DTS to use the correct vdda-0p9-supply
> and vdda-1p2-supply properties.
> 3. Adding bulk regulator support to the PHY driver so it enables both
> supplies and sets the proper current loads.
>
> The patches are sequenced to maintain bisectability. With the driver
> change, the PHY framework will continue to vote for the regulator
> described by 'phy-supply'. The DT changes which follow then remove
> 'phy-supply' in favour of 'vdda-0p9' and 'vdda-1p2'.
>
> Testing:
> This series was tested on the following Lemans and Monaco based boards.
> 1. Lemans IQ-9075 EVK with the IFP+ Mezzanine attach (dual GMAC +
> QCOM SGMII SerDes + QCA8081 PHY)
> 2. Lemans QCS9100 Ride (dual GMAC + QCOM SGMII SerDes + AQR115C PHY)
> 3. Monaco IQ-8275 EVK (single GMAC + QCOM SGMII SerDes + QCA8081 PHY)
> 4. Monaco QCS8300 Ride (dual GMAC + QCOM SGMII SerDes + AQR115C PHY)
> To conclusively test the new regulator voting, I tested builds with all
> the other consumers of the regulators disabled from the DTS to ensure
> that the phy-qcom-sgmii-eth driver held the only vote.
>
> Changes since v1:
> - Fixed the DT bindings to describe the actual SerDes PHY hardware,
> which actually has two supplies rather than only one - Krzysztof.
> - Use regulator_bulk_* APIs to properly set the current loads of the
> two supplies - Konrad.
> - Fixed Lemans board DTS files that incorrectly voted for vreg_l5a;
> the correct rails per the power diagram are vreg_l4a (0.9V) and
> vreg_l1c (1.2V).
> - Link to v1: https://lore.kernel.org/linux-arm-msm/20251124-sgmiieth_serdes_regulator-v1-0-73ae8f9cbe2a@oss.qualcomm.com/T/#m0b93e06a0d6a09c4c1b65c500b475958ed5e288d.
>
> Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-08-07 5:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 19:27 [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
2026-08-03 19:27 ` [PATCH v2 1/6] dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add named voltage rails and deprecate phy-supply Mohd Ayaan Anwar
2026-08-04 6:19 ` Krzysztof Kozlowski
2026-08-03 19:27 ` [PATCH v2 2/6] phy: qcom: sgmii-eth: vote for both voltage rails with correct current loads Mohd Ayaan Anwar
2026-08-03 19:27 ` [PATCH v2 3/6] arm64: dts: qcom: lemans-evk: fix SerDes PHY regulator supplies Mohd Ayaan Anwar
2026-08-03 19:28 ` [PATCH v2 4/6] arm64: dts: qcom: lemans-ride-common: " Mohd Ayaan Anwar
2026-08-03 19:28 ` [PATCH v2 5/6] arm64: dts: qcom: monaco-evk: " Mohd Ayaan Anwar
2026-08-03 19:28 ` [PATCH v2 6/6] arm64: dts: qcom: qcs8300-ride: " Mohd Ayaan Anwar
2026-08-04 8:36 ` [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
2026-08-07 4:59 ` Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox