mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 08:34:20 +08:00
net: phy: aquantia: Add some additional phy interfaces
These are documented in the AQR115 register reference. I haven't tested them, but perhaps they'll be useful to someone. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b7e9294885
commit
7de26bf144
@ -27,9 +27,12 @@
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS 0xe812
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3)
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR 0
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KX 1
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI 2
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII 3
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_XAUI 4
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII 6
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_RXAUI 7
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII 10
|
||||
|
||||
#define MDIO_AN_VEND_PROV 0xc400
|
||||
@ -401,15 +404,24 @@ static int aqr107_read_status(struct phy_device *phydev)
|
||||
case MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR:
|
||||
phydev->interface = PHY_INTERFACE_MODE_10GKR;
|
||||
break;
|
||||
case MDIO_PHYXS_VEND_IF_STATUS_TYPE_KX:
|
||||
phydev->interface = PHY_INTERFACE_MODE_1000BASEKX;
|
||||
break;
|
||||
case MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI:
|
||||
phydev->interface = PHY_INTERFACE_MODE_10GBASER;
|
||||
break;
|
||||
case MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII:
|
||||
phydev->interface = PHY_INTERFACE_MODE_USXGMII;
|
||||
break;
|
||||
case MDIO_PHYXS_VEND_IF_STATUS_TYPE_XAUI:
|
||||
phydev->interface = PHY_INTERFACE_MODE_XAUI;
|
||||
break;
|
||||
case MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII:
|
||||
phydev->interface = PHY_INTERFACE_MODE_SGMII;
|
||||
break;
|
||||
case MDIO_PHYXS_VEND_IF_STATUS_TYPE_RXAUI:
|
||||
phydev->interface = PHY_INTERFACE_MODE_RXAUI;
|
||||
break;
|
||||
case MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII:
|
||||
phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
|
||||
break;
|
||||
@ -522,11 +534,14 @@ static int aqr107_config_init(struct phy_device *phydev)
|
||||
|
||||
/* Check that the PHY interface type is compatible */
|
||||
if (phydev->interface != PHY_INTERFACE_MODE_SGMII &&
|
||||
phydev->interface != PHY_INTERFACE_MODE_1000BASEKX &&
|
||||
phydev->interface != PHY_INTERFACE_MODE_2500BASEX &&
|
||||
phydev->interface != PHY_INTERFACE_MODE_XGMII &&
|
||||
phydev->interface != PHY_INTERFACE_MODE_USXGMII &&
|
||||
phydev->interface != PHY_INTERFACE_MODE_10GKR &&
|
||||
phydev->interface != PHY_INTERFACE_MODE_10GBASER)
|
||||
phydev->interface != PHY_INTERFACE_MODE_10GBASER &&
|
||||
phydev->interface != PHY_INTERFACE_MODE_XAUI &&
|
||||
phydev->interface != PHY_INTERFACE_MODE_RXAUI)
|
||||
return -ENODEV;
|
||||
|
||||
WARN(phydev->interface == PHY_INTERFACE_MODE_XGMII,
|
||||
|
Loading…
Reference in New Issue
Block a user