* [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
` (6 more replies)
0 siblings, 7 replies; 15+ 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] 15+ 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-03 19:36 ` sashiko-bot
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
` (5 subsequent siblings)
6 siblings, 2 replies; 15+ 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] 15+ 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:38 ` sashiko-bot
2026-08-03 19:27 ` [PATCH v2 3/6] arm64: dts: qcom: lemans-evk: fix SerDes PHY regulator supplies Mohd Ayaan Anwar
` (4 subsequent siblings)
6 siblings, 1 reply; 15+ 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] 15+ 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:37 ` sashiko-bot
2026-08-03 19:28 ` [PATCH v2 4/6] arm64: dts: qcom: lemans-ride-common: " Mohd Ayaan Anwar
` (3 subsequent siblings)
6 siblings, 1 reply; 15+ 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] 15+ 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:43 ` sashiko-bot
2026-08-03 19:28 ` [PATCH v2 5/6] arm64: dts: qcom: monaco-evk: " Mohd Ayaan Anwar
` (2 subsequent siblings)
6 siblings, 1 reply; 15+ 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] 15+ 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:47 ` sashiko-bot
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
6 siblings, 1 reply; 15+ 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] 15+ 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-03 19:36 ` sashiko-bot
2026-08-04 8:36 ` [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
6 siblings, 1 reply; 15+ 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] 15+ messages in thread
* Re: [PATCH v2 6/6] arm64: dts: qcom: qcs8300-ride: fix SerDes PHY regulator supplies
2026-08-03 19:28 ` [PATCH v2 6/6] arm64: dts: qcom: qcs8300-ride: " Mohd Ayaan Anwar
@ 2026-08-03 19:36 ` sashiko-bot
0 siblings, 0 replies; 15+ messages in thread
From: sashiko-bot @ 2026-08-03 19:36 UTC (permalink / raw)
To: Mohd Ayaan Anwar
Cc: vkoul, olteanv, linux-phy, neil.armstrong, robh, devicetree,
conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Incomplete device tree migration for SerDes PHY regulator supplies breaks Ethernet on Monaco Monza SOM.
--
--- Patch [6]: [PATCH v2 6/6] arm64: dts: qcom: qcs8300-ride: fix SerDes PHY regulator supplies ---
commit 8e38978ea8c058004487a19a9a664f9946b8306c
Author: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
arm64: dts: qcom: qcs8300-ride: fix SerDes PHY regulator supplies
This commit fixes the SerDes PHY node in qcs8300-ride.dts by replacing the
single phy-supply property with the required vdda-0p9-supply and
vdda-1p2-supply properties. This ensures both the 1.2V and 0.9V rails are
properly provided to the PHY.
> diff --git a/arch/arm64/boot/dts/qcom/qcs8300-ride.dts b/arch/arm64/boot/dts/qcom/qcs8300-ride.dts
> index 1ff39530ea3de..76c34215dbdf0 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";
> };
[Severity: High]
This isn't a bug introduced by this patch, but I noticed that another file in
the tree, arch/arm64/boot/dts/qcom/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:
&serdes0 {
phy-supply = <&vreg_l5a>;
status = "okay";
};
Since the PHY driver strictly expects the two named regulator supplies via
devm_regulator_bulk_get_const, won't leaving this old configuration break
Ethernet on the Monaco Monza SOM during boot by either failing to probe
or timing out on calibration?
Should monaco-monza-som.dtsi be updated similarly in this patch or as a
follow-up in this series?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804-b4-sgmiieth_serdes_regulator-v2-0-c4bc688177dd@oss.qualcomm.com?part=6
^ permalink raw reply [flat|nested] 15+ 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-03 19:36 ` sashiko-bot
2026-08-04 6:19 ` Krzysztof Kozlowski
1 sibling, 0 replies; 15+ messages in thread
From: sashiko-bot @ 2026-08-03 19:36 UTC (permalink / raw)
To: Mohd Ayaan Anwar
Cc: olteanv, robh, conor+dt, linux-phy, neil.armstrong, devicetree,
vkoul
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The device tree binding deprecates `phy-supply` in favor of new named regulators `vdda-0p9-supply` and `vdda-1p2-supply`, but the driver (`phy-qcom-sgmii-eth.c`) was not updated to request or enable them. When device trees are updated to follow the new binding and drop the deprecated `phy-supply`, the PHY subsystem core (`phy-core.c`) will no longer find and enable the generic `phy` regulator, leaving the PHY unpowered.
--
--- Patch [1]: [PATCH v2 1/6] dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add named voltage rails and deprecate phy-supply ---
commit 3cc6ac4d3b35571e8657dd8e304e3f7c33b822ec
Author: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add named voltage rails and deprecate phy-supply
The Qualcomm SGMII SerDes PHY has two distinct voltage supply rails. This
commit deprecates the generic 'phy-supply' property and instead adds two
specific named supply properties.
> 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 90fc8c039219c..e573abcb937df 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.
[Severity: High]
Does this change cause a functional regression when device trees are updated
to follow the new binding?
When device tree authors update their nodes to use vdda-0p9-supply and
vdda-1p2-supply instead of the deprecated phy-supply, it appears the
regulators will remain unpowered.
The PHY subsystem core (phy-core.c) looks for the generic phy-supply during
phy_create(). If it is missing from the device tree, the core will not
enable it.
At the same time, the corresponding driver does not seem to have been
updated to fetch and enable these new specific regulators:
drivers/phy/qualcomm/phy-qcom-sgmii-eth.c:qcom_dwmac_sgmii_phy_probe()
Should qcom_dwmac_sgmii_phy_probe() be updated alongside this binding to
request the new regulators (for example, using devm_regulator_bulk_get()),
so the PHY doesn't fail to initialize when phy-supply is omitted?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804-b4-sgmiieth_serdes_regulator-v2-0-c4bc688177dd@oss.qualcomm.com?part=1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 3/6] arm64: dts: qcom: lemans-evk: fix SerDes PHY regulator supplies
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:37 ` sashiko-bot
0 siblings, 0 replies; 15+ messages in thread
From: sashiko-bot @ 2026-08-03 19:37 UTC (permalink / raw)
To: Mohd Ayaan Anwar
Cc: linux-phy, olteanv, robh, devicetree, vkoul, neil.armstrong,
conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Incomplete fix for SGMII SerDes PHY regulator supplies leaving downstream boards broken.
--
--- Patch [3]: [PATCH v2 3/6] arm64: dts: qcom: lemans-evk: fix SerDes PHY regulator supplies ---
commit 06c318320f4f12178e107aa08e3b5435de261d50
Author: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
arm64: dts: qcom: lemans-evk: fix SerDes PHY regulator supplies
This commit fixes the SerDes PHY regulator supplies for the lemans-evk board
and its IFP mezzanine overlay. It replaces the incorrect phy-supply with
vdda-0p9-supply and vdda-1p2-supply.
[ ... ]
> diff --git a/arch/arm64/boot/dts/qcom/lemans-evk.dts b/arch/arm64/boot/dts/qcom/lemans-evk.dts
> index 0c53640c42a65..5c046b9bfb3cd 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>;
[Severity: High]
This isn't a bug introduced by this patch, but should this fix be applied to
other boards using this PHY?
It looks like several other device trees still define the deprecated
phy-supply property, such as in
arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi:
&serdes0 {
phy-supply = <&vreg_l5a>;
status = "okay";
};
And similarly in arch/arm64/boot/dts/qcom/qcs8300-ride.dts,
arch/arm64/boot/dts/qcom/monaco-monza-som.dtsi, and
arch/arm64/boot/dts/qcom/monaco-evk.dts.
Booting these unmodified boards could result in the PHY driver either failing
to probe or falling back to dummy regulators and failing calibration, breaking
SGMII Ethernet connectivity.
Could the fix be extended to cover these other boards as well to ensure they
receive both required voltage supplies?
>
> status = "okay";
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804-b4-sgmiieth_serdes_regulator-v2-0-c4bc688177dd@oss.qualcomm.com?part=3
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 2/6] phy: qcom: sgmii-eth: vote for both voltage rails with correct current loads
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:38 ` sashiko-bot
0 siblings, 0 replies; 15+ messages in thread
From: sashiko-bot @ 2026-08-03 19:38 UTC (permalink / raw)
To: Mohd Ayaan Anwar
Cc: devicetree, linux-phy, vkoul, robh, conor+dt, neil.armstrong,
olteanv
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The PHY provider is registered before its driver data is set, creating a race condition where a consumer could trigger a NULL pointer dereference.
--
--- Patch [2]: [PATCH v2 2/6] phy: qcom: sgmii-eth: vote for both voltage rails with correct current loads ---
commit 1203fb5a9ba082470a0383befe64f62c484ac7d5
Author: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
phy: qcom: sgmii-eth: vote for both voltage rails with correct current loads
This commit updates the driver to explicitly vote for both voltage supply
rails with their correct peak current loads using
devm_regulator_bulk_get_const(), rather than relying on the PHY framework's
implicit single-rail voting. It also adds the necessary regulator
enable/disable calls in the power path.
> diff --git a/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c b/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c
> index f48faa2929a68..7137200c3f310 100644
> --- a/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c
> +++ b/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c
[ ... ]
> @@ -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);
[Severity: High]
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?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804-b4-sgmiieth_serdes_regulator-v2-0-c4bc688177dd@oss.qualcomm.com?part=2
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 4/6] arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies
2026-08-03 19:28 ` [PATCH v2 4/6] arm64: dts: qcom: lemans-ride-common: " Mohd Ayaan Anwar
@ 2026-08-03 19:43 ` sashiko-bot
0 siblings, 0 replies; 15+ messages in thread
From: sashiko-bot @ 2026-08-03 19:43 UTC (permalink / raw)
To: Mohd Ayaan Anwar
Cc: neil.armstrong, robh, vkoul, devicetree, conor+dt, olteanv,
linux-phy
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Incomplete refactoring: missing DT updates for new PHY regulator requirements on Monaco and QCS8300 boards
--
--- Patch [4]: [PATCH v2 4/6] arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies ---
commit defd43449ca452b489164f877878995171548517
Author: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies
This commit replaces the incorrect phy-supply property with the required
vdda-0p9-supply and vdda-1p2-supply properties for both SerDes PHY nodes in
the lemans-ride-common device tree.
> diff --git a/arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi b/arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi
> index cefb8ff008063..923fd8736f31d 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>;
> +
[Severity: High]
This is a pre-existing issue, but shouldn't other boards in the tree that
use the deprecated phy-supply for serdes0 also be updated?
For example, arch/arm64/boot/dts/qcom/monaco-evk.dts still uses:
&serdes0 {
phy-supply = <&vreg_l4a>;
status = "okay";
};
arch/arm64/boot/dts/qcom/monaco-monza-som.dtsi still uses:
&serdes0 {
phy-supply = <&vreg_l5a>;
status = "okay";
};
And arch/arm64/boot/dts/qcom/qcs8300-ride.dts still uses:
&serdes0 {
phy-supply = <&vreg_l5a>;
status = "okay";
};
Without these updates, will the driver fall back to dummy regulators and fail
to place the required voltage and load votes for these boards? This might
result in PHY calibration timing out or Ethernet failing when shared rails
enter runtime PM suspend.
> status = "okay";
> };
>
> &serdes1 {
> - phy-supply = <&vreg_l5a>;
> + vdda-0p9-supply = <&vreg_l4a>;
> + vdda-1p2-supply = <&vreg_l1c>;
> +
> status = "okay";
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804-b4-sgmiieth_serdes_regulator-v2-0-c4bc688177dd@oss.qualcomm.com?part=4
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 5/6] arm64: dts: qcom: monaco-evk: fix SerDes PHY regulator supplies
2026-08-03 19:28 ` [PATCH v2 5/6] arm64: dts: qcom: monaco-evk: " Mohd Ayaan Anwar
@ 2026-08-03 19:47 ` sashiko-bot
0 siblings, 0 replies; 15+ messages in thread
From: sashiko-bot @ 2026-08-03 19:47 UTC (permalink / raw)
To: Mohd Ayaan Anwar
Cc: conor+dt, neil.armstrong, vkoul, linux-phy, robh, olteanv,
devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Incomplete device tree migration causes a functional regression on qcs8300-ride and monaco-monza-som boards, where the SerDes PHY will fail to power up because its 0.9V regulator rail is not enabled.
--
--- Patch [5]: [PATCH v2 5/6] arm64: dts: qcom: monaco-evk: fix SerDes PHY regulator supplies ---
commit 77126601ae0cd79ff3e3276e8f35420b21a2d2f5
Author: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
arm64: dts: qcom: monaco-evk: fix SerDes PHY regulator supplies
The commit updates the SerDes PHY node in the monaco-evk device tree to use
explicit named regulator supplies (vdda-0p9-supply and vdda-1p2-supply)
instead of the deprecated phy-supply property. This ensures both required
rails are properly described and enabled.
> diff --git a/arch/arm64/boot/dts/qcom/monaco-evk.dts b/arch/arm64/boot/dts/qcom/monaco-evk.dts
> index 9d17ef7d2caf1..f787e78b35ce4 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>;
[Severity: High]
Does this migration to vdda-0p9-supply and vdda-1p2-supply need to be applied
to other boards as well?
Looking at arch/arm64/boot/dts/qcom/qcs8300-ride.dts and
arch/arm64/boot/dts/qcom/monaco-monza-som.dtsi, they still use the deprecated
phy-supply property for serdes0:
arch/arm64/boot/dts/qcom/qcs8300-ride.dts:serdes0 {
phy-supply = <&vreg_l5a>;
status = "okay";
};
If the qcom-dwmac-sgmii-phy driver was updated in this series to require
explicit vdda-0p9 and vdda-1p2 supplies, devm_regulator_bulk_get_const() will
fall back to dummy regulators for these missing named supplies.
This would leave the 0.9V physical rail unpowered on these other boards, which
causes the PHY calibration to time out and the Ethernet interface to fail to
initialize.
Should these device trees also be updated to ensure their SerDes PHYs do not
fail to power up?
>
> status = "okay";
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804-b4-sgmiieth_serdes_regulator-v2-0-c4bc688177dd@oss.qualcomm.com?part=5
^ permalink raw reply [flat|nested] 15+ 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-03 19:36 ` sashiko-bot
@ 2026-08-04 6:19 ` Krzysztof Kozlowski
1 sibling, 0 replies; 15+ 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] 15+ 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
6 siblings, 0 replies; 15+ 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] 15+ messages in thread
end of thread, other threads:[~2026-08-04 8:36 UTC | newest]
Thread overview: 15+ 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-03 19:36 ` sashiko-bot
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:38 ` sashiko-bot
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:37 ` sashiko-bot
2026-08-03 19:28 ` [PATCH v2 4/6] arm64: dts: qcom: lemans-ride-common: " Mohd Ayaan Anwar
2026-08-03 19:43 ` sashiko-bot
2026-08-03 19:28 ` [PATCH v2 5/6] arm64: dts: qcom: monaco-evk: " Mohd Ayaan Anwar
2026-08-03 19:47 ` sashiko-bot
2026-08-03 19:28 ` [PATCH v2 6/6] arm64: dts: qcom: qcs8300-ride: " Mohd Ayaan Anwar
2026-08-03 19:36 ` sashiko-bot
2026-08-04 8:36 ` [PATCH v2 0/6] Fix regulator voting for the Qualcomm SGMII SerDes PHY Mohd Ayaan Anwar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox