Files
linux/include/soc/fsl/phy-fsl-lynx.h
Vladimir Oltean 6dc92ba487 phy: lynx-10g: new driver
Introduce a driver for the networking lanes of the 10G Lynx SerDes
block, present on the majority of Layerscape and QorIQ (Freescale/NXP)
SoCs.

As with the 28G Lynx, the SerDes lanes come pre-initialized out of
reset and the consumers use them that way outside the Generic PHY
framework (for networking, the static configuration remains for the
entire SoC lifetime, whereas for SATA and PCIe, the hardware
reconfigures itself automatically for other link speeds).

The need for the Generic PHY framework comes specifically for networking
use cases where a static lane configuration is not sufficient. For
example a network MAC is connected to an SFP cage, where various SFP or
SFP+ modules can be connected. Each of them may require a different
SerDes protocol (SGMII, 1000Base-X, 10GBase-R), which phylink + sfp-bus
are responsible of figuring out. The phylink drivers are:
- enetc
- felix
- dpaa_eth (fman_memac)
- dpaa2-eth
- dpaa2-switch

and they all need to reconfigure the SerDes for the requested link mode,
using phy_set_mode_ext() (and phy_validate() to see if it is supported
in the first place).

Note that SerDes 2 on LS1088A is exclusively non-networking, so there is
currently no need for this driver. Therefore we skip matching on its
compatible string and do not probe on that device.

Co-developed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20260610151952.2141019-16-vladimir.oltean@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-06-11 12:39:47 +05:30

44 lines
815 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/* Copyright 2023-2026 NXP */
#ifndef __PHY_FSL_LYNX_H_
#define __PHY_FSL_LYNX_H_
enum lynx_lane_mode {
LANE_MODE_UNKNOWN,
LANE_MODE_1000BASEX_SGMII,
LANE_MODE_2500BASEX,
LANE_MODE_QSGMII,
LANE_MODE_10G_QXGMII,
LANE_MODE_10GBASER,
LANE_MODE_USXGMII,
LANE_MODE_25GBASER,
LANE_MODE_MAX,
};
static inline bool lynx_lane_mode_uses_gmii_mac(enum lynx_lane_mode mode)
{
switch (mode) {
case LANE_MODE_1000BASEX_SGMII:
case LANE_MODE_2500BASEX:
case LANE_MODE_QSGMII:
case LANE_MODE_10G_QXGMII:
return true;
default:
return false;
}
}
static inline bool lynx_lane_mode_uses_xgmii_mac(enum lynx_lane_mode mode)
{
switch (mode) {
case LANE_MODE_10GBASER:
case LANE_MODE_USXGMII:
return true;
default:
return false;
}
}
#endif /* __PHY_FSL_LYNX_H_ */