net: bcmgenet: Patch PHY interface for dedicated PHY driver
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 17 Sep 2021 21:55:38 +0000 (14:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Sep 2021 10:52:07 +0000 (11:52 +0100)
commitb972b54a68b2512a7528658ecd023aea108c03a5
treec4fcee652454d58925ab62c2632d8f794ab51f51
parent0efcc3f201452aa42670d2da1d72858f95d0b7f7
net: bcmgenet: Patch PHY interface for dedicated PHY driver

When we are using a dedicated PHY driver (not the Generic PHY driver)
chances are that it is going to configure RGMII delays and do that in a
way that is incompatible with our incorrect interpretation of the
phy_interface value.

Add a quirk in order to reverse the PHY_INTERFACE_MODE_RGMII to the
value of PHY_INTERFACE_MODE_RGMII_ID such that the MAC continues to be
configured the way it used to be, but the PHY driver can account for
adding delays. Conversely when PHY_INTERFACE_MODE_RGMII_TXID is
specified, return PHY_INTERFACE_MODE_RGMII_RXID to the PHY since we will
have enabled a TXC MAC delay (id_mode_dis=0, meaning there is a delay
inserted).

This is not considered a bug fix at this point since it only affects
Broadcom STB platforms shipping with a Device Tree blob that is not
updatable in the field (quite a few devices out there) and which was
generated using the scripted Device Tree environment shipped with those
platforms' SDK.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmmii.c