linux/include/linux/micrel_phy.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * include/linux/micrel_phy.h
 *
 * Micrel PHY IDs
 */

#ifndef _MICREL_PHY_H
#define _MICREL_PHY_H

#define MICREL_OUI

#define MICREL_PHY_ID_MASK

#define PHY_ID_KSZ8873MLL
#define PHY_ID_KSZ9021
#define PHY_ID_KSZ9021RLRN
#define PHY_ID_KS8737
#define PHY_ID_KSZ8021
#define PHY_ID_KSZ8031
#define PHY_ID_KSZ8041
/* undocumented */
#define PHY_ID_KSZ8041RNLI
#define PHY_ID_KSZ8051
/* same id: ks8001 Rev. A/B, and ks8721 Rev 3. */
#define PHY_ID_KSZ8001
/* same id: KS8081, KS8091 */
#define PHY_ID_KSZ8081
#define PHY_ID_KSZ8061
#define PHY_ID_KSZ9031
#define PHY_ID_KSZ9131
#define PHY_ID_LAN8814
#define PHY_ID_LAN8804
#define PHY_ID_LAN8841

#define PHY_ID_KSZ886X
#define PHY_ID_KSZ8863

#define PHY_ID_KSZ87XX

#define PHY_ID_KSZ9477

/* struct phy_device dev_flags definitions */
#define MICREL_PHY_50MHZ_CLK
#define MICREL_PHY_FXEN
#define MICREL_KSZ8_P1_ERRATA
#define MICREL_NO_EEE

#define MICREL_KSZ9021_EXTREG_CTRL
#define MICREL_KSZ9021_EXTREG_DATA_WRITE
#define MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW
#define MICREL_KSZ9021_RGMII_RX_DATA_PAD_SCEW

/* Device specific MII_BMCR (Reg 0) bits */
/* 1 = HP Auto MDI/MDI-X mode, 0 = Microchip Auto MDI/MDI-X mode */
#define KSZ886X_BMCR_HP_MDIX
/* 1 = Force MDI (transmit on RXP/RXM pins), 0 = Normal operation
 * (transmit on TXP/TXM pins)
 */
#define KSZ886X_BMCR_FORCE_MDI
/* 1 = Disable auto MDI-X */
#define KSZ886X_BMCR_DISABLE_AUTO_MDIX
#define KSZ886X_BMCR_DISABLE_FAR_END_FAULT
#define KSZ886X_BMCR_DISABLE_TRANSMIT
#define KSZ886X_BMCR_DISABLE_LED

/* PHY Special Control/Status Register (Reg 31) */
#define KSZ886X_CTRL_MDIX_STAT
#define KSZ886X_CTRL_FORCE_LINK
#define KSZ886X_CTRL_PWRSAVE
#define KSZ886X_CTRL_REMOTE_LOOPBACK

#endif /* _MICREL_PHY_H */