* [PATCH] arm64: dts: renesas: white-hawk: ethernet: Define AVB1 and AVB2 PHY
@ 2024-06-25 13:30 Niklas Söderlund
2024-06-25 14:54 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Niklas Söderlund @ 2024-06-25 13:30 UTC (permalink / raw)
To: Geert Uytterhoeven, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-renesas-soc, devicetree
Cc: Niklas Söderlund
Align with other Renesas SoCs and use the specific compatible for the
PHYs connected to AVB1 and AVB2, Marvell 88Q2110/QFN40. This allows
software to identify the PHY model at any time, regardless of the state
of the PHY reset line.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
arch/arm64/boot/dts/renesas/white-hawk-ethernet.dtsi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/renesas/white-hawk-ethernet.dtsi b/arch/arm64/boot/dts/renesas/white-hawk-ethernet.dtsi
index 595ec4ff4cdd..40a08b57b479 100644
--- a/arch/arm64/boot/dts/renesas/white-hawk-ethernet.dtsi
+++ b/arch/arm64/boot/dts/renesas/white-hawk-ethernet.dtsi
@@ -27,7 +27,8 @@ mdio {
reset-post-delay-us = <4000>;
avb1_phy: ethernet-phy@0 {
- compatible = "ethernet-phy-ieee802.3-c45";
+ compatible = "ethernet-phy-id002b.0980",
+ "ethernet-phy-ieee802.3-c22";
reg = <0>;
interrupt-parent = <&gpio6>;
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
@@ -49,7 +50,8 @@ mdio {
reset-post-delay-us = <4000>;
avb2_phy: ethernet-phy@0 {
- compatible = "ethernet-phy-ieee802.3-c45";
+ compatible = "ethernet-phy-id002b.0980",
+ "ethernet-phy-ieee802.3-c22";
reg = <0>;
interrupt-parent = <&gpio5>;
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: renesas: white-hawk: ethernet: Define AVB1 and AVB2 PHY
2024-06-25 13:30 [PATCH] arm64: dts: renesas: white-hawk: ethernet: Define AVB1 and AVB2 PHY Niklas Söderlund
@ 2024-06-25 14:54 ` Geert Uytterhoeven
2024-06-25 17:14 ` Niklas Söderlund
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2024-06-25 14:54 UTC (permalink / raw)
To: Niklas Söderlund
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-renesas-soc,
devicetree
Hi Niklas,
On Tue, Jun 25, 2024 at 3:31 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> Align with other Renesas SoCs and use the specific compatible for the
> PHYs connected to AVB1 and AVB2, Marvell 88Q2110/QFN40. This allows
> software to identify the PHY model at any time, regardless of the state
> of the PHY reset line.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thanks for your patch!
> --- a/arch/arm64/boot/dts/renesas/white-hawk-ethernet.dtsi
> +++ b/arch/arm64/boot/dts/renesas/white-hawk-ethernet.dtsi
> @@ -27,7 +27,8 @@ mdio {
> reset-post-delay-us = <4000>;
>
> avb1_phy: ethernet-phy@0 {
> - compatible = "ethernet-phy-ieee802.3-c45";
> + compatible = "ethernet-phy-id002b.0980",
> + "ethernet-phy-ieee802.3-c22";
> reg = <0>;
> interrupt-parent = <&gpio6>;
> interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> @@ -49,7 +50,8 @@ mdio {
> reset-post-delay-us = <4000>;
>
> avb2_phy: ethernet-phy@0 {
> - compatible = "ethernet-phy-ieee802.3-c45";
> + compatible = "ethernet-phy-id002b.0980",
> + "ethernet-phy-ieee802.3-c22";
> reg = <0>;
> interrupt-parent = <&gpio5>;
> interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
Originally, I added explicit ethernet-phy-id* compatible values because
Linux does not deassert the reset line before trying to read the PHY
ID, hence failing. Have you checked if this is still the case after
introducing the mdio subnode? I'd rather not add the explicit IDs,
as board manufacturers may change the PHY revision or even the PHY
model without notice.
You can find my original test procedure, using kexec or bind/rebind, at
https://lore.kernel.org/cover.1631174218.git.geert+renesas@glider.be/.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: renesas: white-hawk: ethernet: Define AVB1 and AVB2 PHY
2024-06-25 14:54 ` Geert Uytterhoeven
@ 2024-06-25 17:14 ` Niklas Söderlund
0 siblings, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2024-06-25 17:14 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-renesas-soc,
devicetree
Hi Geert,
On 2024-06-25 16:54:38 +0200, Geert Uytterhoeven wrote:
> Hi Niklas,
>
> On Tue, Jun 25, 2024 at 3:31 PM Niklas Söderlund
> <niklas.soderlund+renesas@ragnatech.se> wrote:
> > Align with other Renesas SoCs and use the specific compatible for the
> > PHYs connected to AVB1 and AVB2, Marvell 88Q2110/QFN40. This allows
> > software to identify the PHY model at any time, regardless of the state
> > of the PHY reset line.
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>
> Thanks for your patch!
>
> > --- a/arch/arm64/boot/dts/renesas/white-hawk-ethernet.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/white-hawk-ethernet.dtsi
> > @@ -27,7 +27,8 @@ mdio {
> > reset-post-delay-us = <4000>;
> >
> > avb1_phy: ethernet-phy@0 {
> > - compatible = "ethernet-phy-ieee802.3-c45";
> > + compatible = "ethernet-phy-id002b.0980",
> > + "ethernet-phy-ieee802.3-c22";
> > reg = <0>;
> > interrupt-parent = <&gpio6>;
> > interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> > @@ -49,7 +50,8 @@ mdio {
> > reset-post-delay-us = <4000>;
> >
> > avb2_phy: ethernet-phy@0 {
> > - compatible = "ethernet-phy-ieee802.3-c45";
> > + compatible = "ethernet-phy-id002b.0980",
> > + "ethernet-phy-ieee802.3-c22";
> > reg = <0>;
> > interrupt-parent = <&gpio5>;
> > interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
>
> Originally, I added explicit ethernet-phy-id* compatible values because
> Linux does not deassert the reset line before trying to read the PHY
> ID, hence failing. Have you checked if this is still the case after
> introducing the mdio subnode? I'd rather not add the explicit IDs,
> as board manufacturers may change the PHY revision or even the PHY
> model without notice.
>
> You can find my original test procedure, using kexec or bind/rebind, at
> https://lore.kernel.org/cover.1631174218.git.geert+renesas@glider.be/.
Indeed the mdio subnode reset do the trick without needing to hardcode
the PHY compatible. At lest for RAVB, for the RTSN we still need to
hardcode it as RTSN cant talk C45 when probing the PHY.
Anyhow this patch can be dropped.
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
Kind Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-25 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25 13:30 [PATCH] arm64: dts: renesas: white-hawk: ethernet: Define AVB1 and AVB2 PHY Niklas Söderlund
2024-06-25 14:54 ` Geert Uytterhoeven
2024-06-25 17:14 ` Niklas Söderlund
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).