From: Andrew Lunn <andrew@lunn.ch>
To: Jonas Gorski <jonas.gorski@gmail.com>
Cc: "Florian Fainelli" <florian.fainelli@broadcom.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Vivien Didelot" <vivien.didelot@gmail.com>,
"Álvaro Fernández Rojas" <noltari@gmail.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 2/3] net: dsa: b53: fix configuring RGMII delay on bcm63xx
Date: Mon, 19 May 2025 22:34:17 +0200 [thread overview]
Message-ID: <2e5e16a1-e59e-470d-a1d9-618a1b9efdd4@lunn.ch> (raw)
In-Reply-To: <CAOiHx=nwbs7030GKZHLc6Pc6LA6Hqq0NYfNSt=3zOgnj5zpAYQ@mail.gmail.com>
> > These changes look wrong. There is more background here:
> >
> > https://elixir.bootlin.com/linux/v6.15-rc7/source/Documentation/devicetree/bindings/net/ethernet-controller.yaml#L287
>
> This is what makes it work for me (I tested all four modes, rgmii,
> rgmii-id, rgmii-txid and rgmii-rxid).
So you have rgmii-id which works, and the rest are broken?
> E.g. with a phy-mode of "rgmii-id", both b53 and the PHY driver would
> enable rx and tx delays, causing the delays to be 4 ns instead of 2
> ns. So I don't see how this could have ever worked.
In this situation, the switch port is playing the role of MAC. Hence i
would stick to what is suggested in ethernet-controller.yaml. The MAC
does not add any delays, and leaves it to the PHY.
phylink_fwnode_phy_connect() gets the phy-mode from the DT blob, and
passes it to phylib when it calls phy_attach_direct().
There is a second use case for DSA, when the port is connected to the
host, i.e. the port is a CPU port. In that setup, the port is playing
the PHY side of the RGMII connection, with the host conduit interface
being the MAC. In that setup, the above recommendations is that the
conduit interface does not add delays, with the expectation the 'PHY'
adds the delays. Then the DSA port does need to add delays. So you
might want to use dsa_is_cpu_port() to decide if to add delays or not.
Andrew
---
pw-bot: cr
next prev parent reply other threads:[~2025-05-19 20:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 17:45 [PATCH net 0/3] net: dsa: fix RGMII ports on BCM63xx Jonas Gorski
2025-05-19 17:45 ` [PATCH net 1/3] net: dsa: b53: do not enable EEE on bcm63xx Jonas Gorski
2025-05-19 21:40 ` Florian Fainelli
2025-05-19 17:45 ` [PATCH net 2/3] net: dsa: b53: fix configuring RGMII delay " Jonas Gorski
2025-05-19 19:14 ` Andrew Lunn
2025-05-19 19:44 ` Jonas Gorski
2025-05-19 20:34 ` Andrew Lunn [this message]
2025-05-19 21:43 ` Jonas Gorski
2025-05-20 0:15 ` Andrew Lunn
2025-05-23 9:08 ` Jonas Gorski
2025-05-23 13:24 ` Andrew Lunn
2025-05-19 21:38 ` Florian Fainelli
2025-05-19 17:45 ` [PATCH net 3/3] net: dsa: b53: allow RGMII for bcm63xx RGMII ports Jonas Gorski
2025-05-19 21:40 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e5e16a1-e59e-470d-a1d9-618a1b9efdd4@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=jonas.gorski@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=noltari@gmail.com \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®