diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2021-06-14 06:31:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-14 12:54:43 -0700 |
commit | ec4b94f9b37bf028cb9b9c39cd1c1cb5dd1ab40c (patch) | |
tree | 1da11280c19dc5fa62ad9f714f66c6be1e0264a0 /include/linux | |
parent | ffa85b73c3c4143a8e8087c0930f6c5a6ead8e9f (diff) | |
download | linux-ec4b94f9b37bf028cb9b9c39cd1c1cb5dd1ab40c.tar.gz linux-ec4b94f9b37bf028cb9b9c39cd1c1cb5dd1ab40c.tar.bz2 linux-ec4b94f9b37bf028cb9b9c39cd1c1cb5dd1ab40c.zip |
net: phy: micrel: move phy reg offsets to common header
Some micrel devices share the same PHY register defines. This patch
moves them to one common header so other drivers can reuse them.
And reuse generic MII_* defines where possible.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/micrel_phy.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h index 416ee6dd2574..b03e2afcb53f 100644 --- a/include/linux/micrel_phy.h +++ b/include/linux/micrel_phy.h @@ -45,4 +45,17 @@ #define MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW 0x104 #define MICREL_KSZ9021_RGMII_RX_DATA_PAD_SCEW 0x105 +/* 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 BIT(5) +/* 1 = Force MDI (transmit on RXP/RXM pins), 0 = Normal operation + * (transmit on TXP/TXM pins) + */ +#define KSZ886X_BMCR_FORCE_MDI BIT(4) +/* 1 = Disable auto MDI-X */ +#define KSZ886X_BMCR_DISABLE_AUTO_MDIX BIT(3) +#define KSZ886X_BMCR_DISABLE_FAR_END_FAULT BIT(2) +#define KSZ886X_BMCR_DISABLE_TRANSMIT BIT(1) +#define KSZ886X_BMCR_DISABLE_LED BIT(0) + #endif /* _MICREL_PHY_H */ |