
There are several plaforms that use XFI and/or USXGMII protocols but declare them as XGMII in U-Boot because that's already defined. These protocols are not identical and in some cases specific configuration has to be applied for each of them. This patch series introduces XFI and USXGMII and updates the Aquantia PHY driver to use them, in addition to the existing XGMII.
Currently AQR PHYs rely exclusively on firmware to configure system side protocols as well as a few other parameters, which means that FW has to be replaced on the PHY when switching between SGMII, SGMII-2.5G, XFI, USXGMII. This patch set adds support to the driver to reconfigure the system interface protocol based on the interface selected by the ethernet driver (typically picked up from DT). Additional configuration (mdi-reversal, smb-addr) is also picked up by Aquantia driver from the PHY DT node, if present from a couple of newly defined properties.
The new aquantia DT attributes are documented in a new binding document. Also added a generic PHY node binding document using content from Linux.
And last, update ENETC to use the new interface types.
This patch set supersedes v2: https://patchwork.ozlabs.org/project/uboot/list/?series=124595
Changes in v3: - It seems some Gen1 Aquantia PHYs don't behave well when put in low power and we're not even reconfiguring Gen1 PHYs anyway, so just leave them alone. - Changed subject and description in cover letter. - Other minor changes.
Changes in v2: - Flip USX AN bit both ways as needed, in v1 it was only set for USXGMII but not reset for XFI - Use CONFIG_DM_ETH instead of CONFIG_OF_CONTROL around the codeu using phydev->node - Use variable name interface instead of if_type for consistency with the rest of the code.
Alex Marginean (11): include: phy: define XFI and USXGMII interface types include: phy: add data field for private driver data drivers: net: aquantia: use XFI, USXGMII interface types drivers: net: aquantia: add PHY generation information drivers: net: aquantia: set up SI protocol based on interface type drivers: net: aquantia: set MDI reversal based on DT property drivers: net: aquantia: set SMBus addr based on DT property drivers: net: aquantia: check system interface too when checking for link up doc: bindings: add bindings document for PHY nodes doc: bindings: Aquantia PHY node binding drivers: net: fsl_enetc: use XFI, USXGMII interface type macros
doc/device-tree-bindings/net/aquantia-phy.txt | 25 ++ doc/device-tree-bindings/net/phy.txt | 24 ++ drivers/net/fsl_enetc.c | 2 + drivers/net/phy/aquantia.c | 226 ++++++++++++++++-- include/phy.h | 3 + include/phy_interface.h | 4 + 6 files changed, 265 insertions(+), 19 deletions(-) create mode 100644 doc/device-tree-bindings/net/aquantia-phy.txt create mode 100644 doc/device-tree-bindings/net/phy.txt