linux/drivers/net/phy/microchip_t1s.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Driver for Microchip 10BASE-T1S PHYs
 *
 * Support: Microchip Phys:
 *  lan8670/1/2 Rev.B1
 *  lan8650/1 Rev.B0 Internal PHYs
 */

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

#define PHY_ID_LAN867X_REVB1
#define PHY_ID_LAN865X_REVB0

#define LAN867X_REG_STS2

#define LAN867x_RESET_COMPLETE_STS

#define LAN865X_REG_CFGPARAM_ADDR
#define LAN865X_REG_CFGPARAM_DATA
#define LAN865X_REG_CFGPARAM_CTRL
#define LAN865X_REG_STS2

#define LAN865X_CFGPARAM_READ_ENABLE

/* The arrays below are pulled from the following table from AN1699
 * Access MMD Address Value Mask
 * RMW 0x1F 0x00D0 0x0002 0x0E03
 * RMW 0x1F 0x00D1 0x0000 0x0300
 * RMW 0x1F 0x0084 0x3380 0xFFC0
 * RMW 0x1F 0x0085 0x0006 0x000F
 * RMW 0x1F 0x008A 0xC000 0xF800
 * RMW 0x1F 0x0087 0x801C 0x801C
 * RMW 0x1F 0x0088 0x033F 0x1FFF
 * W   0x1F 0x008B 0x0404 ------
 * RMW 0x1F 0x0080 0x0600 0x0600
 * RMW 0x1F 0x00F1 0x2400 0x7F00
 * RMW 0x1F 0x0096 0x2000 0x2000
 * W   0x1F 0x0099 0x7F80 ------
 */

static const u32 lan867x_revb1_fixup_registers[12] =;

static const u16 lan867x_revb1_fixup_values[12] =;

static const u16 lan867x_revb1_fixup_masks[12] =;

/* LAN865x Rev.B0 configuration parameters from AN1760 */
static const u32 lan865x_revb0_fixup_registers[28] =;

static const u16 lan865x_revb0_fixup_values[28] =;

static const u16 lan865x_revb0_fixup_cfg_regs[5] =;

/* Pulled from AN1760 describing 'indirect read'
 *
 * write_register(0x4, 0x00D8, addr)
 * write_register(0x4, 0x00DA, 0x2)
 * return (int8)(read_register(0x4, 0x00D9))
 *
 * 0x4 refers to memory map selector 4, which maps to MDIO_MMD_VEND2
 */
static int lan865x_revb0_indirect_read(struct phy_device *phydev, u16 addr)
{}

/* This is pulled straight from AN1760 from 'calculation of offset 1' &
 * 'calculation of offset 2'
 */
static int lan865x_generate_cfg_offsets(struct phy_device *phydev, s8 offsets[2])
{}

static int lan865x_read_cfg_params(struct phy_device *phydev, u16 cfg_params[])
{}

static int lan865x_write_cfg_params(struct phy_device *phydev, u16 cfg_params[])
{}

static int lan865x_setup_cfgparam(struct phy_device *phydev)
{}

static int lan865x_revb0_config_init(struct phy_device *phydev)
{}

static int lan867x_revb1_config_init(struct phy_device *phydev)
{}

static int lan86xx_read_status(struct phy_device *phydev)
{}

static struct phy_driver microchip_t1s_driver[] =;

module_phy_driver(microchip_t1s_driver);

static struct mdio_device_id __maybe_unused tbl[] =;

MODULE_DEVICE_TABLE(mdio, tbl);

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