linux/drivers/net/phy/marvell-88x2222.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Marvell 88x2222 dual-port multi-speed ethernet transceiver.
 *
 * Supports:
 *	XAUI on the host side.
 *	1000Base-X or 10GBase-R on the line side.
 *	SGMII over 1000Base-X.
 */
#include <linux/module.h>
#include <linux/phy.h>
#include <linux/delay.h>
#include <linux/mdio.h>
#include <linux/marvell_phy.h>
#include <linux/of.h>
#include <linux/sfp.h>
#include <linux/netdevice.h>

/* Port PCS Configuration */
#define MV_PCS_CONFIG
#define MV_PCS_HOST_XAUI
#define MV_PCS_LINE_10GBR
#define MV_PCS_LINE_1GBX_AN
#define MV_PCS_LINE_SGMII_AN

/* Port Reset and Power Down */
#define MV_PORT_RST
#define MV_LINE_RST_SW
#define MV_HOST_RST_SW
#define MV_PORT_RST_SW

/* PMD Receive Signal Detect */
#define MV_RX_SIGNAL_DETECT
#define MV_RX_SIGNAL_DETECT_GLOBAL

/* 1000Base-X/SGMII Control Register */
#define MV_1GBX_CTRL

/* 1000BASE-X/SGMII Status Register */
#define MV_1GBX_STAT

/* 1000Base-X Auto-Negotiation Advertisement Register */
#define MV_1GBX_ADVERTISE

/* 1000Base-X PHY Specific Status Register */
#define MV_1GBX_PHY_STAT
#define MV_1GBX_PHY_STAT_AN_RESOLVED
#define MV_1GBX_PHY_STAT_DUPLEX
#define MV_1GBX_PHY_STAT_SPEED100
#define MV_1GBX_PHY_STAT_SPEED1000

#define AUTONEG_TIMEOUT

struct mv2222_data {};

/* SFI PMA transmit enable */
static int mv2222_tx_enable(struct phy_device *phydev)
{}

/* SFI PMA transmit disable */
static int mv2222_tx_disable(struct phy_device *phydev)
{}

static int mv2222_soft_reset(struct phy_device *phydev)
{}

static int mv2222_disable_aneg(struct phy_device *phydev)
{}

static int mv2222_enable_aneg(struct phy_device *phydev)
{}

static int mv2222_set_sgmii_speed(struct phy_device *phydev)
{}

static bool mv2222_is_10g_capable(struct phy_device *phydev)
{}

static bool mv2222_is_1gbx_capable(struct phy_device *phydev)
{}

static bool mv2222_is_sgmii_capable(struct phy_device *phydev)
{}

static int mv2222_config_line(struct phy_device *phydev)
{}

/* Switch between 1G (1000Base-X/SGMII) and 10G (10GBase-R) modes */
static int mv2222_swap_line_type(struct phy_device *phydev)
{}

static int mv2222_setup_forced(struct phy_device *phydev)
{}

static int mv2222_config_aneg(struct phy_device *phydev)
{}

static int mv2222_aneg_done(struct phy_device *phydev)
{}

/* Returns negative on error, 0 if link is down, 1 if link is up */
static int mv2222_read_status_10g(struct phy_device *phydev)
{}

/* Returns negative on error, 0 if link is down, 1 if link is up */
static int mv2222_read_status_1g(struct phy_device *phydev)
{}

static bool mv2222_link_is_operational(struct phy_device *phydev)
{}

static int mv2222_read_status(struct phy_device *phydev)
{}

static int mv2222_resume(struct phy_device *phydev)
{}

static int mv2222_suspend(struct phy_device *phydev)
{}

static int mv2222_get_features(struct phy_device *phydev)
{}

static int mv2222_config_init(struct phy_device *phydev)
{}

static int mv2222_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
{}

static void mv2222_sfp_remove(void *upstream)
{}

static void mv2222_sfp_link_up(void *upstream)
{}

static void mv2222_sfp_link_down(void *upstream)
{}

static const struct sfp_upstream_ops sfp_phy_ops =;

static int mv2222_probe(struct phy_device *phydev)
{}

static struct phy_driver mv2222_drivers[] =;
module_phy_driver(mv2222_drivers);

static struct mdio_device_id __maybe_unused mv2222_tbl[] =;
MODULE_DEVICE_TABLE(mdio, mv2222_tbl);

MODULE_DESCRIPTION();
MODULE_LICENSE();