* [PATCH v2 0/4] IPQ5018: Add and enable GEPHY RX and TX clocks
@ 2026-06-02 6:50 George Moussalem via B4 Relay
2026-06-02 6:50 ` [PATCH v2 1/4] dt-bindings: net: ethernet-phy: move clocks property to invidivual PHY bindings George Moussalem via B4 Relay
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: George Moussalem via B4 Relay @ 2026-06-02 6:50 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Bjorn Andersson, Konrad Dybcio
Cc: netdev, devicetree, linux-kernel, Konrad Dybcio, linux-arm-msm,
George Moussalem
Greetings,
This patch series addresses a missing hardware description issue for the
Qualcomm IPQ5018 Internal Ethernet PHY, where the data paths fail to
function correctly unless their dedicated RX and TX clocks are
explicitly enabled.
Further testing revealed that leaving these clocks unmanaged by the
kernel, they were inadvertently left enabled by the bootloader / QSDK
platform, which masked the issue. Testing a fresh network configuration
path exposed that the data link fails to work without explicit software
gating.
To correctly introduce the required multi-clock properties, the IPQ5018
binding definition must first be split away from the shared
qca,ar803x.yaml schema. This isolation is required because ar803x
references the generic ethernet-phy.yaml, which enforces a strict
single-clock limit constraint.
- Patch 1: Moves the clocks property and its restriction out of the
generic ethernet-phy.yaml schema to individual bindings files
that need it to allow for PHYs that require multiple clocks.
- Patch 2: Add clocks property to qca,ar803x.yaml for the IPQ5018 PHY.
- Patch 3: Appends the missing RX/TX clock definitions into the IPQ5018
device tree before driver modification to avoid the driver
failing to probe.
- Patch 4: Updates the Qualcomm AT803x PHY driver framework to acquire,
enable, and gate these clocks upon link state changes for
runtime power optimization.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
Changes in v2:
- Added patch 1 to move the clocks property and its restriction out of
the generic ethernet-phy.yaml schema to individual bindings files that
need it to allow for PHYs that require multiple clocks.
- Reverted splitting out IPQ5018 from the shared qca,ar803x.yaml schema
and simply added the clocks and clock-names properties to the
definition of the IPQ5018 PHY.
- Corrected / updated commit title of patch 4 (qca,at803x -> at803x)
- Link to v1: https://lore.kernel.org/r/20260601-ipq5018-gephy-clocks-v1-0-2df8287712c3@outlook.com
---
George Moussalem (4):
dt-bindings: net: ethernet-phy: move clocks property to invidivual PHY bindings
dt-bindings: net: qca,ar803x: Add clocks property for IPQ5018 PHY
arm64: qcom: ipq5018: Add GEPHY RX and TX clocks
net: phy: at803x: add RX and TX clock management for IPQ5018 PHY
.../devicetree/bindings/net/ethernet-phy.yaml | 6 ------
.../devicetree/bindings/net/qca,ar803x.yaml | 14 +++++++++++++
.../devicetree/bindings/net/realtek,rtl82xx.yaml | 6 ++++++
arch/arm64/boot/dts/qcom/ipq5018.dtsi | 3 +++
drivers/net/phy/qcom/at803x.c | 23 ++++++++++++++++++++++
5 files changed, 46 insertions(+), 6 deletions(-)
---
base-commit: 7da7f07112610a520567421dd2ffcb51beaefbcc
change-id: 20260601-ipq5018-gephy-clocks-e8a2440178a0
Best regards,
--
George Moussalem <george.moussalem@outlook.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/4] dt-bindings: net: ethernet-phy: move clocks property to invidivual PHY bindings
2026-06-02 6:50 [PATCH v2 0/4] IPQ5018: Add and enable GEPHY RX and TX clocks George Moussalem via B4 Relay
@ 2026-06-02 6:50 ` George Moussalem via B4 Relay
2026-06-02 16:34 ` Conor Dooley
2026-06-02 6:50 ` [PATCH v2 2/4] dt-bindings: net: qca,ar803x: Add clocks property for IPQ5018 PHY George Moussalem via B4 Relay
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: George Moussalem via B4 Relay @ 2026-06-02 6:50 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Bjorn Andersson, Konrad Dybcio
Cc: netdev, devicetree, linux-kernel, Konrad Dybcio, linux-arm-msm,
George Moussalem
From: George Moussalem <george.moussalem@outlook.com>
Move the clock property and restriction from the ethernet-phy.yaml file
to the individual PHY binding files. This allows each PHY to manage its
own clock requirements.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
Commit 350b7a258f20 introduced the clocks property with a restriction to
maximum 1 to the main ethernet-phy.yaml binding for Realtek to add an
optional external clock source. This is restrictive to all PHY bindings,
as some PHYs may require more than 1 clock such as the IPQ5018 PHY which
requires 2 clocks (for RX and TX).
There are three other PHY drivers that require clock management:
- Micrel: requires 1 optional clock and the micrel.yaml file already
accomodates for the clock property.
- SMSC: requires an optional clock and the legacy bindings file
(smsc-lan87xx.txt) already accomodates for the clock property.
- BCM7xxx: requires an optional clock. I could not find a bindings file
for this PHY family.
---
Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 ------
Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml | 6 ++++++
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 21a1a63506f0..709ea976ef79 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -105,12 +105,6 @@ properties:
1BR-10 names. The PHY must be configured to operate in BroadR-Reach mode
by software.
- clocks:
- maxItems: 1
- description:
- External clock connected to the PHY. If not specified it is assumed
- that the PHY uses a fixed crystal or an internal oscillator.
-
enet-phy-lane-swap:
$ref: /schemas/types.yaml#/definitions/flag
description:
diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
index 45033c31a2d5..8a26f6941dc4 100644
--- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
+++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
@@ -38,6 +38,12 @@ properties:
- ethernet-phy-id001c.cad0
- ethernet-phy-id001c.cb00
+ clocks:
+ maxItems: 1
+ description:
+ External clock connected to the PHY. If not specified it is assumed
+ that the PHY uses a fixed crystal or an internal oscillator.
+
leds: true
realtek,aldps-enable:
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/4] dt-bindings: net: qca,ar803x: Add clocks property for IPQ5018 PHY
2026-06-02 6:50 [PATCH v2 0/4] IPQ5018: Add and enable GEPHY RX and TX clocks George Moussalem via B4 Relay
2026-06-02 6:50 ` [PATCH v2 1/4] dt-bindings: net: ethernet-phy: move clocks property to invidivual PHY bindings George Moussalem via B4 Relay
@ 2026-06-02 6:50 ` George Moussalem via B4 Relay
2026-06-02 16:29 ` Conor Dooley
2026-06-02 6:50 ` [PATCH v2 3/4] arm64: qcom: ipq5018: Add GEPHY RX and TX clocks George Moussalem via B4 Relay
2026-06-02 6:50 ` [PATCH v2 4/4] net: phy: at803x: add RX and TX clock management for IPQ5018 PHY George Moussalem via B4 Relay
3 siblings, 1 reply; 7+ messages in thread
From: George Moussalem via B4 Relay @ 2026-06-02 6:50 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Bjorn Andersson, Konrad Dybcio
Cc: netdev, devicetree, linux-kernel, Konrad Dybcio, linux-arm-msm,
George Moussalem
From: George Moussalem <george.moussalem@outlook.com>
Further testing revealed that the RX and TX clocks of the IPQ5018 PHY
need to be explicitly enabled. As such, add the clocks property to the
schema.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
Documentation/devicetree/bindings/net/qca,ar803x.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/qca,ar803x.yaml b/Documentation/devicetree/bindings/net/qca,ar803x.yaml
index 7ae5110e7aa2..07615640b0ed 100644
--- a/Documentation/devicetree/bindings/net/qca,ar803x.yaml
+++ b/Documentation/devicetree/bindings/net/qca,ar803x.yaml
@@ -28,6 +28,16 @@ allOf:
reg:
const: 7 # This PHY is always at MDIO address 7 in the IPQ5018 SoC
+ clocks:
+ items:
+ - description: RX clock
+ - description: TX clock
+
+ clock-names:
+ items:
+ - const: rx
+ - const: tx
+
resets:
items:
- description:
@@ -162,6 +172,7 @@ examples:
};
};
- |
+ #include <dt-bindings/clock/qcom,gcc-ipq5018.h>
#include <dt-bindings/reset/qcom,gcc-ipq5018.h>
mdio {
@@ -172,6 +183,9 @@ examples:
compatible = "ethernet-phy-id004d.d0c0";
reg = <7>;
+ clocks = <&gcc GCC_GEPHY_RX_CLK>,
+ <&gcc GCC_GEPHY_TX_CLK>;
+ clock-names = "rx", "tx";
resets = <&gcc GCC_GEPHY_MISC_ARES>;
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/4] arm64: qcom: ipq5018: Add GEPHY RX and TX clocks
2026-06-02 6:50 [PATCH v2 0/4] IPQ5018: Add and enable GEPHY RX and TX clocks George Moussalem via B4 Relay
2026-06-02 6:50 ` [PATCH v2 1/4] dt-bindings: net: ethernet-phy: move clocks property to invidivual PHY bindings George Moussalem via B4 Relay
2026-06-02 6:50 ` [PATCH v2 2/4] dt-bindings: net: qca,ar803x: Add clocks property for IPQ5018 PHY George Moussalem via B4 Relay
@ 2026-06-02 6:50 ` George Moussalem via B4 Relay
2026-06-02 6:50 ` [PATCH v2 4/4] net: phy: at803x: add RX and TX clock management for IPQ5018 PHY George Moussalem via B4 Relay
3 siblings, 0 replies; 7+ messages in thread
From: George Moussalem via B4 Relay @ 2026-06-02 6:50 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Bjorn Andersson, Konrad Dybcio
Cc: netdev, devicetree, linux-kernel, Konrad Dybcio, linux-arm-msm,
George Moussalem
From: George Moussalem <george.moussalem@outlook.com>
Add RX and TX clocks for the IPQ5018 GEPHY to enable the datapath.
Fixes: f5f2b835e316 ("arm64: dts: qcom: ipq5018: Add GE PHY to internal mdio bus")
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
arch/arm64/boot/dts/qcom/ipq5018.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
index 6f8004a22a1f..60c27a6f2b10 100644
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
@@ -229,6 +229,9 @@ ge_phy: ethernet-phy@7 {
compatible = "ethernet-phy-id004d.d0c0";
reg = <7>;
+ clocks = <&gcc GCC_GEPHY_RX_CLK>,
+ <&gcc GCC_GEPHY_TX_CLK>;
+ clock-names = "rx", "tx";
resets = <&gcc GCC_GEPHY_MISC_ARES>;
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 4/4] net: phy: at803x: add RX and TX clock management for IPQ5018 PHY
2026-06-02 6:50 [PATCH v2 0/4] IPQ5018: Add and enable GEPHY RX and TX clocks George Moussalem via B4 Relay
` (2 preceding siblings ...)
2026-06-02 6:50 ` [PATCH v2 3/4] arm64: qcom: ipq5018: Add GEPHY RX and TX clocks George Moussalem via B4 Relay
@ 2026-06-02 6:50 ` George Moussalem via B4 Relay
3 siblings, 0 replies; 7+ messages in thread
From: George Moussalem via B4 Relay @ 2026-06-02 6:50 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Bjorn Andersson, Konrad Dybcio
Cc: netdev, devicetree, linux-kernel, Konrad Dybcio, linux-arm-msm,
George Moussalem
From: George Moussalem <george.moussalem@outlook.com>
Acquire and enable the RX and TX clocks for the IPQ5018 PHY. These
clocks are required for the PHY's datapath to function correctly.
In addition, gate the clocks upon link state changes for improved power
management.
Fixes: d46502279a11 ("net: phy: qcom: at803x: Add Qualcomm IPQ5018 Internal PHY support")
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
drivers/net/phy/qcom/at803x.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/net/phy/qcom/at803x.c b/drivers/net/phy/qcom/at803x.c
index 63726cf98cd4..b7361a14220d 100644
--- a/drivers/net/phy/qcom/at803x.c
+++ b/drivers/net/phy/qcom/at803x.c
@@ -19,6 +19,7 @@
#include <linux/regulator/consumer.h>
#include <linux/of.h>
#include <linux/phylink.h>
+#include <linux/clk.h>
#include <linux/reset.h>
#include <linux/phy_port.h>
#include <dt-bindings/net/qca-ar803x.h>
@@ -176,6 +177,8 @@ struct at803x_context {
};
struct ipq5018_priv {
+ struct clk *rx_clk;
+ struct clk *tx_clk;
struct reset_control *rst;
bool set_short_cable_dac;
};
@@ -1062,6 +1065,16 @@ static int ipq5018_config_init(struct phy_device *phydev)
static void ipq5018_link_change_notify(struct phy_device *phydev)
{
+ struct ipq5018_priv *priv = phydev->priv;
+
+ if (phydev->link) {
+ clk_enable(priv->rx_clk);
+ clk_enable(priv->tx_clk);
+ } else {
+ clk_disable(priv->rx_clk);
+ clk_disable(priv->tx_clk);
+ }
+
/*
* Reset the FIFO buffer upon link disconnects to clear any residual data
* which may cause issues with the FIFO which it cannot recover from.
@@ -1084,6 +1097,16 @@ static int ipq5018_probe(struct phy_device *phydev)
priv->set_short_cable_dac = of_property_read_bool(dev->of_node,
"qcom,dac-preset-short-cable");
+ priv->rx_clk = devm_clk_get_enabled(dev, "rx");
+ if (IS_ERR(priv->rx_clk))
+ return dev_err_probe(dev, PTR_ERR(priv->rx_clk),
+ "failed to get and enable RX clock\n");
+
+ priv->tx_clk = devm_clk_get_enabled(dev, "tx");
+ if (IS_ERR(priv->tx_clk))
+ return dev_err_probe(dev, PTR_ERR(priv->tx_clk),
+ "failed to get and enable TX clock\n");
+
priv->rst = devm_reset_control_array_get_exclusive(dev);
if (IS_ERR(priv->rst))
return dev_err_probe(dev, PTR_ERR(priv->rst),
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/4] dt-bindings: net: qca,ar803x: Add clocks property for IPQ5018 PHY
2026-06-02 6:50 ` [PATCH v2 2/4] dt-bindings: net: qca,ar803x: Add clocks property for IPQ5018 PHY George Moussalem via B4 Relay
@ 2026-06-02 16:29 ` Conor Dooley
0 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2026-06-02 16:29 UTC (permalink / raw)
To: george.moussalem
Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Bjorn Andersson, Konrad Dybcio, netdev, devicetree, linux-kernel,
Konrad Dybcio, linux-arm-msm
[-- Attachment #1: Type: text/plain, Size: 75 bytes --]
Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: net: ethernet-phy: move clocks property to invidivual PHY bindings
2026-06-02 6:50 ` [PATCH v2 1/4] dt-bindings: net: ethernet-phy: move clocks property to invidivual PHY bindings George Moussalem via B4 Relay
@ 2026-06-02 16:34 ` Conor Dooley
0 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2026-06-02 16:34 UTC (permalink / raw)
To: george.moussalem
Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Bjorn Andersson, Konrad Dybcio, netdev, devicetree, linux-kernel,
Konrad Dybcio, linux-arm-msm
[-- Attachment #1: Type: text/plain, Size: 3168 bytes --]
On Tue, Jun 02, 2026 at 10:50:37AM +0400, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@outlook.com>
>
> Move the clock property and restriction from the ethernet-phy.yaml file
> to the individual PHY binding files. This allows each PHY to manage its
> own clock requirements.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> Commit 350b7a258f20 introduced the clocks property with a restriction to
> maximum 1 to the main ethernet-phy.yaml binding for Realtek to add an
> optional external clock source. This is restrictive to all PHY bindings,
> as some PHYs may require more than 1 clock such as the IPQ5018 PHY which
> requires 2 clocks (for RX and TX).
>
> There are three other PHY drivers that require clock management:
> - Micrel: requires 1 optional clock and the micrel.yaml file already
> accomodates for the clock property.
> - SMSC: requires an optional clock and the legacy bindings file
> (smsc-lan87xx.txt) already accomodates for the clock property.
> - BCM7xxx: requires an optional clock. I could not find a bindings file
> for this PHY family.
Have you done a large-scale dtbs_check run with this patch applied and
checked that it does not ban having a clock for phys with no dedicated
bindings?
I feel like weakening the limit of a single clock is probably more
accurate than outright banning clocks for ethernet phys without a
dedicated binding?
Cheers,
Conor.
> ---
> Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 ------
> Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml | 6 ++++++
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> index 21a1a63506f0..709ea976ef79 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> @@ -105,12 +105,6 @@ properties:
> 1BR-10 names. The PHY must be configured to operate in BroadR-Reach mode
> by software.
>
> - clocks:
> - maxItems: 1
> - description:
> - External clock connected to the PHY. If not specified it is assumed
> - that the PHY uses a fixed crystal or an internal oscillator.
> -
> enet-phy-lane-swap:
> $ref: /schemas/types.yaml#/definitions/flag
> description:
> diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> index 45033c31a2d5..8a26f6941dc4 100644
> --- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> +++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> @@ -38,6 +38,12 @@ properties:
> - ethernet-phy-id001c.cad0
> - ethernet-phy-id001c.cb00
>
> + clocks:
> + maxItems: 1
> + description:
> + External clock connected to the PHY. If not specified it is assumed
> + that the PHY uses a fixed crystal or an internal oscillator.
> +
> leds: true
>
> realtek,aldps-enable:
>
> --
> 2.53.0
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-06-02 16:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 6:50 [PATCH v2 0/4] IPQ5018: Add and enable GEPHY RX and TX clocks George Moussalem via B4 Relay
2026-06-02 6:50 ` [PATCH v2 1/4] dt-bindings: net: ethernet-phy: move clocks property to invidivual PHY bindings George Moussalem via B4 Relay
2026-06-02 16:34 ` Conor Dooley
2026-06-02 6:50 ` [PATCH v2 2/4] dt-bindings: net: qca,ar803x: Add clocks property for IPQ5018 PHY George Moussalem via B4 Relay
2026-06-02 16:29 ` Conor Dooley
2026-06-02 6:50 ` [PATCH v2 3/4] arm64: qcom: ipq5018: Add GEPHY RX and TX clocks George Moussalem via B4 Relay
2026-06-02 6:50 ` [PATCH v2 4/4] net: phy: at803x: add RX and TX clock management for IPQ5018 PHY George Moussalem via B4 Relay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox