linux/drivers/net/phy/dp83tc811.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Driver for the Texas Instruments DP83TC811 PHY
 *
 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
 *
 */

#include <linux/ethtool.h>
#include <linux/etherdevice.h>
#include <linux/kernel.h>
#include <linux/mii.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/phy.h>
#include <linux/netdevice.h>

#define DP83TC811_PHY_ID
#define DP83811_DEVADDR

#define MII_DP83811_SGMII_CTRL
#define MII_DP83811_INT_STAT1
#define MII_DP83811_INT_STAT2
#define MII_DP83811_INT_STAT3
#define MII_DP83811_RESET_CTRL

#define DP83811_HW_RESET
#define DP83811_SW_RESET

/* INT_STAT1 bits */
#define DP83811_RX_ERR_HF_INT_EN
#define DP83811_MS_TRAINING_INT_EN
#define DP83811_ANEG_COMPLETE_INT_EN
#define DP83811_ESD_EVENT_INT_EN
#define DP83811_WOL_INT_EN
#define DP83811_LINK_STAT_INT_EN
#define DP83811_ENERGY_DET_INT_EN
#define DP83811_LINK_QUAL_INT_EN

/* INT_STAT2 bits */
#define DP83811_JABBER_DET_INT_EN
#define DP83811_POLARITY_INT_EN
#define DP83811_SLEEP_MODE_INT_EN
#define DP83811_OVERTEMP_INT_EN
#define DP83811_OVERVOLTAGE_INT_EN
#define DP83811_UNDERVOLTAGE_INT_EN

/* INT_STAT3 bits */
#define DP83811_LPS_INT_EN
#define DP83811_NO_FRAME_INT_EN
#define DP83811_POR_DONE_INT_EN

#define MII_DP83811_RXSOP1
#define MII_DP83811_RXSOP2
#define MII_DP83811_RXSOP3

/* WoL Registers */
#define MII_DP83811_WOL_CFG
#define MII_DP83811_WOL_STAT
#define MII_DP83811_WOL_DA1
#define MII_DP83811_WOL_DA2
#define MII_DP83811_WOL_DA3

/* WoL bits */
#define DP83811_WOL_MAGIC_EN
#define DP83811_WOL_SECURE_ON
#define DP83811_WOL_EN
#define DP83811_WOL_INDICATION_SEL
#define DP83811_WOL_CLR_INDICATION

/* SGMII CTRL bits */
#define DP83811_TDR_AUTO
#define DP83811_SGMII_EN
#define DP83811_SGMII_AUTO_NEG_EN
#define DP83811_SGMII_TX_ERR_DIS
#define DP83811_SGMII_SOFT_RESET

static int dp83811_ack_interrupt(struct phy_device *phydev)
{}

static int dp83811_set_wol(struct phy_device *phydev,
			   struct ethtool_wolinfo *wol)
{}

static void dp83811_get_wol(struct phy_device *phydev,
			    struct ethtool_wolinfo *wol)
{}

static int dp83811_config_intr(struct phy_device *phydev)
{}

static irqreturn_t dp83811_handle_interrupt(struct phy_device *phydev)
{}

static int dp83811_config_aneg(struct phy_device *phydev)
{}

static int dp83811_config_init(struct phy_device *phydev)
{}

static int dp83811_phy_reset(struct phy_device *phydev)
{}

static int dp83811_suspend(struct phy_device *phydev)
{}

static int dp83811_resume(struct phy_device *phydev)
{}

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

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

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();