#include <linux/mdio.h>
#include <linux/of.h>
#include <linux/pcs/pcs-mtk-lynxi.h>
#include <linux/phylink.h>
#include <linux/regmap.h>
#define SGMSYS_PCS_CONTROL_1 …
#define SGMII_BMCR …
#define SGMII_BMSR …
#define SGMSYS_PCS_DEVICE_ID …
#define SGMII_LYNXI_DEV_ID …
#define SGMSYS_PCS_ADVERTISE …
#define SGMII_ADVERTISE …
#define SGMII_LPA …
#define SGMSYS_PCS_SCRATCH …
#define SGMII_DEV_VERSION …
#define SGMSYS_PCS_LINK_TIMER …
#define SGMII_LINK_TIMER_MASK …
#define SGMII_LINK_TIMER_VAL(ns) …
#define SGMSYS_SGMII_MODE …
#define SGMII_IF_MODE_SGMII …
#define SGMII_SPEED_DUPLEX_AN …
#define SGMII_SPEED_MASK …
#define SGMII_SPEED_10 …
#define SGMII_SPEED_100 …
#define SGMII_SPEED_1000 …
#define SGMII_DUPLEX_HALF …
#define SGMII_REMOTE_FAULT_DIS …
#define SGMSYS_RESERVED_0 …
#define SGMII_SW_RESET …
#define SGMII_PHY_SPEED_MASK …
#define SGMII_PHY_SPEED_1_25G …
#define SGMII_PHY_SPEED_3_125G …
#define SGMSYS_QPHY_PWR_STATE_CTRL …
#define SGMII_PHYA_PWD …
#define SGMSYS_QPHY_WRAP_CTRL …
#define SGMII_PN_SWAP_MASK …
#define SGMII_PN_SWAP_TX_RX …
struct mtk_pcs_lynxi { … };
static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
{ … }
static void mtk_pcs_lynxi_get_state(struct phylink_pcs *pcs,
struct phylink_link_state *state)
{ … }
static int mtk_pcs_lynxi_config(struct phylink_pcs *pcs, unsigned int neg_mode,
phy_interface_t interface,
const unsigned long *advertising,
bool permit_pause_to_mac)
{ … }
static void mtk_pcs_lynxi_restart_an(struct phylink_pcs *pcs)
{ … }
static void mtk_pcs_lynxi_link_up(struct phylink_pcs *pcs,
unsigned int neg_mode,
phy_interface_t interface, int speed,
int duplex)
{ … }
static void mtk_pcs_lynxi_disable(struct phylink_pcs *pcs)
{ … }
static const struct phylink_pcs_ops mtk_pcs_lynxi_ops = …;
struct phylink_pcs *mtk_pcs_lynxi_create(struct device *dev,
struct regmap *regmap, u32 ana_rgc3,
u32 flags)
{ … }
EXPORT_SYMBOL(…);
void mtk_pcs_lynxi_destroy(struct phylink_pcs *pcs)
{ … }
EXPORT_SYMBOL(…);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;