[RFC PATCH net-next 2/8] phy: introduce the PHY_MODE_ETHERNET_PHY mode for phy_set_mode_ext()
From: Vladimir Oltean
Date: Thu Aug 17 2023 - 11:07:46 EST
As opposed to PHY_MODE_ETHERNET which takes a phy_interface_t as is
expected to be used by an Ethernet MAC driver, PHY_MODE_ETHERNET takes
an enum ethtool_link_mode_bit_indices and expects to be used by an
Ethernet PHY driver.
It is true that the phy_interface_t type also contains definitions for
PHY_INTERFACE_MODE_10GKR and PHY_INTERFACE_MODE_1000BASEKX, but those
were deemed to be mistakes, and shouldn't be used going forward, when
10GBase-KR and 1GBase-KX are really link modes. Thus, I believe that the
distinction is necessary, rather than hacking more improper PHY modes.
In particular to the Lynx SerDes, it can be used (as the PMA/PMD layer)
in conjunction with a separate backplane AN/LT block to form a
full-fledged copper backplane Ethernet PHY. The configuration of the
lanes is relatively similar to what is done for a typical MAC-to-PHY
link, except that we allow tuning the electrical equalization parameters
of the link (support for which will come as a separate change).
Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
---
include/linux/phy/phy.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 456d21c67e4f..7e10761303fc 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -39,6 +39,7 @@ enum phy_mode {
PHY_MODE_UFS_HS_B,
PHY_MODE_PCIE,
PHY_MODE_ETHERNET,
+ PHY_MODE_ETHERNET_PHY,
PHY_MODE_MIPI_DPHY,
PHY_MODE_SATA,
PHY_MODE_LVDS,
--
2.34.1