Message ID | 1573326009-2275-7-git-send-email-wahrenst@gmx.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ARM: Enable GENET support for RPi 4 | expand |
On 11/9/2019 11:00 AM, Stefan Wahren wrote: > This adds the missing support for the PHY modes RGMII_RXID and > RGMII_ID. Based on the used register settings in the downstream tree > the mode RGMII_RXID is necessary for the Raspberry Pi 4. > > Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Acked-by: Florian Fainelli <f.fainelli@gmail.com> > --- > drivers/net/ethernet/broadcom/genet/bcmmii.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c > index 8f7b2c0..9091e5b 100644 > --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c > +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c > @@ -273,6 +273,16 @@ int bcmgenet_mii_config(struct net_device *dev, bool init) > phy_name = "external RGMII (TX delay)"; > port_ctrl = PORT_MODE_EXT_GPHY; > break; > + > + case PHY_INTERFACE_MODE_RGMII_RXID: > + phy_name = "external RGMII (RX delay)"; > + port_ctrl = PORT_MODE_EXT_GPHY; > + break; > + > + case PHY_INTERFACE_MODE_RGMII_ID: > + phy_name = "external RGMII (RX/TX delay)"; > + port_ctrl = PORT_MODE_EXT_GPHY; > + break; Technically for this one we should probably make sure that we do set id_mode_dis in order for the MAC not to add the delay and leave the PHY to do it though I don't have such a configuration handy to prove/disprove that is necessary.
diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c index 8f7b2c0..9091e5b 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c @@ -273,6 +273,16 @@ int bcmgenet_mii_config(struct net_device *dev, bool init) phy_name = "external RGMII (TX delay)"; port_ctrl = PORT_MODE_EXT_GPHY; break; + + case PHY_INTERFACE_MODE_RGMII_RXID: + phy_name = "external RGMII (RX delay)"; + port_ctrl = PORT_MODE_EXT_GPHY; + break; + + case PHY_INTERFACE_MODE_RGMII_ID: + phy_name = "external RGMII (RX/TX delay)"; + port_ctrl = PORT_MODE_EXT_GPHY; + break; default: dev_err(kdev, "unknown phy mode: %d\n", priv->phy_interface); return -EINVAL;
This adds the missing support for the PHY modes RGMII_RXID and RGMII_ID. Based on the used register settings in the downstream tree the mode RGMII_RXID is necessary for the Raspberry Pi 4. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> --- drivers/net/ethernet/broadcom/genet/bcmmii.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.7.4