* [PATCH 1/3] dt-bindings: net: qca,ipq5018: Split IPQ5018 PHY bindings from ar803x
2026-06-01 13:19 [PATCH 0/3] IPQ5018: Add and enable GEPHY RX and TX clocks George Moussalem via B4 Relay
@ 2026-06-01 13:19 ` George Moussalem via B4 Relay
2026-06-01 17:45 ` Rob Herring (Arm)
2026-06-01 13:19 ` [PATCH 2/3] arm64: qcom: ipq5018: Add GEPHY RX and TX clocks George Moussalem via B4 Relay
2026-06-01 13:19 ` [PATCH 3/3] net: phy: qca,at803x: add RX and TX clock management for IPQ5018 PHY George Moussalem via B4 Relay
2 siblings, 1 reply; 6+ messages in thread
From: George Moussalem via B4 Relay @ 2026-06-01 13:19 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 definition for the Qualcomm IPQ5018 Internal PHY out of the
qca,ar803x.yaml binding file and isolate them in a dedicated
qca,ipq5018.yaml file. This is necessary due to the restriction of max
one clock in ethernet-phy.yaml which ar803x references as further
testing revealed that the RX and TX clocks of the IPQ5018 PHY need to
be explicitly enabled.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
.../devicetree/bindings/net/qca,ar803x.yaml | 43 -------------
.../devicetree/bindings/net/qca,ipq5018.yaml | 75 ++++++++++++++++++++++
2 files changed, 75 insertions(+), 43 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/qca,ar803x.yaml b/Documentation/devicetree/bindings/net/qca,ar803x.yaml
index 7ae5110e7aa2..3acd09f0da86 100644
--- a/Documentation/devicetree/bindings/net/qca,ar803x.yaml
+++ b/Documentation/devicetree/bindings/net/qca,ar803x.yaml
@@ -16,37 +16,8 @@ description: |
allOf:
- $ref: ethernet-phy.yaml#
- - if:
- properties:
- compatible:
- contains:
- enum:
- - ethernet-phy-id004d.d0c0
-
- then:
- properties:
- reg:
- const: 7 # This PHY is always at MDIO address 7 in the IPQ5018 SoC
-
- resets:
- items:
- - description:
- GE PHY MISC reset which triggers a reset across MDC, DSP, RX, and TX lines.
-
- qcom,dac-preset-short-cable:
- description:
- Set if this phy is connected to another phy to adjust the values for
- MDAC and EDAC to adjust amplitude, bias current settings, and error
- detection and correction algorithm to accommodate for short cable length.
- If not set, DAC values are not modified and it is assumed the MDI output pins
- of this PHY are directly connected to an RJ45 connector.
- type: boolean
properties:
- compatible:
- enum:
- - ethernet-phy-id004d.d0c0
-
qca,clk-out-frequency:
description: Clock output frequency in Hertz.
$ref: /schemas/types.yaml#/definitions/uint32
@@ -161,17 +132,3 @@ examples:
};
};
};
- - |
- #include <dt-bindings/reset/qcom,gcc-ipq5018.h>
-
- mdio {
- #address-cells = <1>;
- #size-cells = <0>;
-
- ge_phy: ethernet-phy@7 {
- compatible = "ethernet-phy-id004d.d0c0";
- reg = <7>;
-
- resets = <&gcc GCC_GEPHY_MISC_ARES>;
- };
- };
diff --git a/Documentation/devicetree/bindings/net/qca,ipq5018.yaml b/Documentation/devicetree/bindings/net/qca,ipq5018.yaml
new file mode 100644
index 000000000000..7cdc96f6d389
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/qca,ipq5018.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/qca,ipq5018.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Atheros IPQ5018 Internal PHY
+
+maintainers:
+ - George Moussalem <george.moussalem@outlook.com>
+
+description: |
+ The IPQ5018 PHY is part of the IPQ5018 SoC and is always wired to GMAC0.
+ The PHY supports 10/100/1000 mbps link modes, CDT, auto-negotiation and
+ 802.3az EEE.
+
+properties:
+ compatible:
+ const: ethernet-phy-id004d.d0c0
+
+ 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:
+ GE PHY MISC reset which triggers a reset across MDC, DSP, RX, and TX lines.
+
+ qcom,dac-preset-short-cable:
+ description: |
+ Set if this phy is connected to another phy to adjust the values for
+ MDAC and EDAC to adjust amplitude, bias current settings, and error
+ detection and correction algorithm to accommodate for short cable length.
+ If not set, DAC values are not modified and it is assumed the MDI output pins
+ of this PHY are directly connected to an RJ45 connector.
+ type: boolean
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - resets
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-ipq5018.h>
+ #include <dt-bindings/reset/qcom,gcc-ipq5018.h>
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ 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] 6+ messages in thread* Re: [PATCH 1/3] dt-bindings: net: qca,ipq5018: Split IPQ5018 PHY bindings from ar803x
2026-06-01 13:19 ` [PATCH 1/3] dt-bindings: net: qca,ipq5018: Split IPQ5018 PHY bindings from ar803x George Moussalem via B4 Relay
@ 2026-06-01 17:45 ` Rob Herring (Arm)
2026-06-01 20:49 ` Rob Herring
0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring (Arm) @ 2026-06-01 17:45 UTC (permalink / raw)
To: George Moussalem
Cc: Russell King, Heiner Kallweit, Konrad Dybcio, David S. Miller,
Eric Dumazet, Jakub Kicinski, Florian Fainelli, Conor Dooley,
Bjorn Andersson, netdev, Krzysztof Kozlowski, devicetree,
linux-kernel, linux-arm-msm, Andrew Lunn, Paolo Abeni,
Konrad Dybcio
On Mon, 01 Jun 2026 17:19:08 +0400, George Moussalem wrote:
> Move the definition for the Qualcomm IPQ5018 Internal PHY out of the
> qca,ar803x.yaml binding file and isolate them in a dedicated
> qca,ipq5018.yaml file. This is necessary due to the restriction of max
> one clock in ethernet-phy.yaml which ar803x references as further
> testing revealed that the RX and TX clocks of the IPQ5018 PHY need to
> be explicitly enabled.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> .../devicetree/bindings/net/qca,ar803x.yaml | 43 -------------
> .../devicetree/bindings/net/qca,ipq5018.yaml | 75 ++++++++++++++++++++++
> 2 files changed, 75 insertions(+), 43 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/qca,ipq5018.example.dtb: ethernet-phy@7 (ethernet-phy-id004d.d0c0): clocks: [[4294967295, 36], [4294967295, 37]] is too long
from schema $id: http://devicetree.org/schemas/net/ethernet-phy.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260601-ipq5018-gephy-clocks-v1-1-2df8287712c3@outlook.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] dt-bindings: net: qca,ipq5018: Split IPQ5018 PHY bindings from ar803x
2026-06-01 17:45 ` Rob Herring (Arm)
@ 2026-06-01 20:49 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2026-06-01 20:49 UTC (permalink / raw)
To: George Moussalem
Cc: Russell King, Heiner Kallweit, Konrad Dybcio, David S. Miller,
Eric Dumazet, Jakub Kicinski, Florian Fainelli, Conor Dooley,
Bjorn Andersson, netdev, Krzysztof Kozlowski, devicetree,
linux-kernel, linux-arm-msm, Andrew Lunn, Paolo Abeni,
Konrad Dybcio
On Mon, Jun 01, 2026 at 12:45:25PM -0500, Rob Herring (Arm) wrote:
>
> On Mon, 01 Jun 2026 17:19:08 +0400, George Moussalem wrote:
> > Move the definition for the Qualcomm IPQ5018 Internal PHY out of the
> > qca,ar803x.yaml binding file and isolate them in a dedicated
> > qca,ipq5018.yaml file. This is necessary due to the restriction of max
> > one clock in ethernet-phy.yaml which ar803x references as further
> > testing revealed that the RX and TX clocks of the IPQ5018 PHY need to
> > be explicitly enabled.
Just splitting does not solve this problem as you can see with the
error. You will need to drop this constraint from ethernet-phy.yaml and
add it (1 clock) to every specific phy binding (that uses 'clocks').
> >
> > Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> > ---
> > .../devicetree/bindings/net/qca,ar803x.yaml | 43 -------------
> > .../devicetree/bindings/net/qca,ipq5018.yaml | 75 ++++++++++++++++++++++
> > 2 files changed, 75 insertions(+), 43 deletions(-)
> >
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/qca,ipq5018.example.dtb: ethernet-phy@7 (ethernet-phy-id004d.d0c0): clocks: [[4294967295, 36], [4294967295, 37]] is too long
> from schema $id: http://devicetree.org/schemas/net/ethernet-phy.yaml
>
> doc reference errors (make refcheckdocs):
>
> See https://patchwork.kernel.org/project/devicetree/patch/20260601-ipq5018-gephy-clocks-v1-1-2df8287712c3@outlook.com
>
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
>
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
>
> pip3 install dtschema --upgrade
>
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] arm64: qcom: ipq5018: Add GEPHY RX and TX clocks
2026-06-01 13:19 [PATCH 0/3] IPQ5018: Add and enable GEPHY RX and TX clocks George Moussalem via B4 Relay
2026-06-01 13:19 ` [PATCH 1/3] dt-bindings: net: qca,ipq5018: Split IPQ5018 PHY bindings from ar803x George Moussalem via B4 Relay
@ 2026-06-01 13:19 ` George Moussalem via B4 Relay
2026-06-01 13:19 ` [PATCH 3/3] net: phy: qca,at803x: add RX and TX clock management for IPQ5018 PHY George Moussalem via B4 Relay
2 siblings, 0 replies; 6+ messages in thread
From: George Moussalem via B4 Relay @ 2026-06-01 13:19 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] 6+ messages in thread* [PATCH 3/3] net: phy: qca,at803x: add RX and TX clock management for IPQ5018 PHY
2026-06-01 13:19 [PATCH 0/3] IPQ5018: Add and enable GEPHY RX and TX clocks George Moussalem via B4 Relay
2026-06-01 13:19 ` [PATCH 1/3] dt-bindings: net: qca,ipq5018: Split IPQ5018 PHY bindings from ar803x George Moussalem via B4 Relay
2026-06-01 13:19 ` [PATCH 2/3] arm64: qcom: ipq5018: Add GEPHY RX and TX clocks George Moussalem via B4 Relay
@ 2026-06-01 13:19 ` George Moussalem via B4 Relay
2 siblings, 0 replies; 6+ messages in thread
From: George Moussalem via B4 Relay @ 2026-06-01 13:19 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] 6+ messages in thread