linux/drivers/net/phy/qcom/qca808x.c

// SPDX-License-Identifier: GPL-2.0+

#include <linux/phy.h>
#include <linux/module.h>

#include "qcom.h"

/* ADC threshold */
#define QCA808X_PHY_DEBUG_ADC_THRESHOLD
#define QCA808X_ADC_THRESHOLD_MASK
#define QCA808X_ADC_THRESHOLD_80MV
#define QCA808X_ADC_THRESHOLD_100MV
#define QCA808X_ADC_THRESHOLD_200MV
#define QCA808X_ADC_THRESHOLD_300MV

/* CLD control */
#define QCA808X_PHY_MMD3_ADDR_CLD_CTRL7
#define QCA808X_8023AZ_AFE_CTRL_MASK
#define QCA808X_8023AZ_AFE_EN

/* AZ control */
#define QCA808X_PHY_MMD3_AZ_TRAINING_CTRL
#define QCA808X_MMD3_AZ_TRAINING_VAL

#define QCA808X_PHY_MMD1_MSE_THRESHOLD_20DB
#define QCA808X_MSE_THRESHOLD_20DB_VALUE

#define QCA808X_PHY_MMD1_MSE_THRESHOLD_17DB
#define QCA808X_MSE_THRESHOLD_17DB_VALUE

#define QCA808X_PHY_MMD1_MSE_THRESHOLD_27DB
#define QCA808X_MSE_THRESHOLD_27DB_VALUE

#define QCA808X_PHY_MMD1_MSE_THRESHOLD_28DB
#define QCA808X_MSE_THRESHOLD_28DB_VALUE

#define QCA808X_PHY_MMD7_TOP_OPTION1
#define QCA808X_TOP_OPTION1_DATA

#define QCA808X_PHY_MMD3_DEBUG_1
#define QCA808X_MMD3_DEBUG_1_VALUE
#define QCA808X_PHY_MMD3_DEBUG_2
#define QCA808X_MMD3_DEBUG_2_VALUE
#define QCA808X_PHY_MMD3_DEBUG_3
#define QCA808X_MMD3_DEBUG_3_VALUE
#define QCA808X_PHY_MMD3_DEBUG_4
#define QCA808X_MMD3_DEBUG_4_VALUE
#define QCA808X_PHY_MMD3_DEBUG_5
#define QCA808X_MMD3_DEBUG_5_VALUE
#define QCA808X_PHY_MMD3_DEBUG_6
#define QCA808X_MMD3_DEBUG_6_VALUE

/* master/slave seed config */
#define QCA808X_PHY_DEBUG_LOCAL_SEED
#define QCA808X_MASTER_SLAVE_SEED_ENABLE
#define QCA808X_MASTER_SLAVE_SEED_CFG
#define QCA808X_MASTER_SLAVE_SEED_RANGE

/* Hibernation yields lower power consumpiton in contrast with normal operation mode.
 * when the copper cable is unplugged, the PHY enters into hibernation mode in about 10s.
 */
#define QCA808X_DBG_AN_TEST
#define QCA808X_HIBERNATION_EN

#define QCA808X_MMD7_LED2_CTRL
#define QCA808X_MMD7_LED2_FORCE_CTRL
#define QCA808X_MMD7_LED1_CTRL
#define QCA808X_MMD7_LED1_FORCE_CTRL
#define QCA808X_MMD7_LED0_CTRL
#define QCA808X_MMD7_LED_CTRL(x)

#define QCA808X_MMD7_LED0_FORCE_CTRL
#define QCA808X_MMD7_LED_FORCE_CTRL(x)

#define QCA808X_MMD7_LED_POLARITY_CTRL
/* QSDK sets by default 0x46 to this reg that sets BIT 6 for
 * LED to active high. It's not clear what BIT 3 and BIT 4 does.
 */
#define QCA808X_LED_ACTIVE_HIGH

/* QCA808X 1G chip type */
#define QCA808X_PHY_MMD7_CHIP_TYPE
#define QCA808X_PHY_CHIP_TYPE_1G

#define QCA8081_PHY_SERDES_MMD1_FIFO_CTRL
#define QCA8081_PHY_FIFO_RSTN

#define QCA8081_PHY_ID

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

struct qca808x_priv {};

static int qca808x_phy_fast_retrain_config(struct phy_device *phydev)
{}

static int qca808x_phy_ms_seed_enable(struct phy_device *phydev, bool enable)
{}

static bool qca808x_is_prefer_master(struct phy_device *phydev)
{}

static bool qca808x_has_fast_retrain_or_slave_seed(struct phy_device *phydev)
{}

static bool qca808x_is_1g_only(struct phy_device *phydev)
{}

static void qca808x_fill_possible_interfaces(struct phy_device *phydev)
{}

static int qca808x_probe(struct phy_device *phydev)
{}

static int qca808x_config_init(struct phy_device *phydev)
{}

static int qca808x_read_status(struct phy_device *phydev)
{}

static int qca808x_soft_reset(struct phy_device *phydev)
{}

static int qca808x_cable_test_start(struct phy_device *phydev)
{}

static int qca808x_get_features(struct phy_device *phydev)
{}

static int qca808x_config_aneg(struct phy_device *phydev)
{}

static void qca808x_link_change_notify(struct phy_device *phydev)
{}

static int qca808x_led_parse_netdev(struct phy_device *phydev, unsigned long rules,
				    u16 *offload_trigger)
{}

static int qca808x_led_hw_control_enable(struct phy_device *phydev, u8 index)
{}

static int qca808x_led_hw_is_supported(struct phy_device *phydev, u8 index,
				       unsigned long rules)
{}

static int qca808x_led_hw_control_set(struct phy_device *phydev, u8 index,
				      unsigned long rules)
{}

static bool qca808x_led_hw_control_status(struct phy_device *phydev, u8 index)
{}

static int qca808x_led_hw_control_get(struct phy_device *phydev, u8 index,
				      unsigned long *rules)
{}

static int qca808x_led_hw_control_reset(struct phy_device *phydev, u8 index)
{}

static int qca808x_led_brightness_set(struct phy_device *phydev,
				      u8 index, enum led_brightness value)
{}

static int qca808x_led_blink_set(struct phy_device *phydev, u8 index,
				 unsigned long *delay_on,
				 unsigned long *delay_off)
{}

static int qca808x_led_polarity_set(struct phy_device *phydev, int index,
				    unsigned long modes)
{}

static struct phy_driver qca808x_driver[] =;

module_phy_driver(qca808x_driver);

static struct mdio_device_id __maybe_unused qca808x_tbl[] =;

MODULE_DEVICE_TABLE(mdio, qca808x_tbl);