[PATCH net-next v7 4/4] riscv: dts: eswin: eic7700-hifive-premier-p550: enable Ethernet controller
Andrew Lunn
andrew at lunn.ch
Tue Apr 28 18:41:53 PDT 2026
> +&gmac1 {
> + phy-handle = <&gmac1_phy0>;
> + /*
> + * For the TX path of gmac1, there is a skew between the TX clock
> + * and data on the MAC controller inside the silicon. This skew happens
> + * to be approximately 2 ns. Therefore, it can be considered that the
> + * 2 ns delay of TX is provided by the MAC.
> + * No delay configuration for tx is needed in software via PHY driver.
> + */
> + phy-mode = "rgmii-rxid";
This is wrong. Take a read of
https://elixir.bootlin.com/linux/v6.15/source/Documentation/devicetree/bindings/net/ethernet-controller.yaml#L287
phy-mode describes the board. If the board provides the 2ns delay, you
use rgmii. If the MAC/PHY pair needs to provide the delay, you using
rgmii-id.
If rgmii-id is used, it is up to the MAC/PHY to decide which will add
the delay. If the MAC adds the delay, it needs to mask the value of
phy-mode it passes to the PHY so it does not also add the delay.
Your broken hardware means you cannot support 'rgmii' or 'rgmii-rx',
since you cannot turn off this 2ns delay, so you end up with double
delays if anybody designs a board with 2ns TX delay on the board
itself. So please validate the PHY modes and return -EINVAL if these
modes are used.
Andrew
---
pw-bot: cr
More information about the linux-riscv
mailing list