net: phy: broadcom: add helper to write/read RDB registers

RDB (Register Data Base) registers are used on newer Broadcom PHYs. Add
helper to read, write and modify these registers.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Michael Walle
2020-04-20 20:21:11 +02:00
committed by David S. Miller
parent b86a037385
commit 0a32f1ff2a
3 changed files with 92 additions and 0 deletions

View File

@@ -115,6 +115,9 @@
#define MII_BCM54XX_SHD_VAL(x) ((x & 0x1f) << 10)
#define MII_BCM54XX_SHD_DATA(x) ((x & 0x3ff) << 0)
#define MII_BCM54XX_RDB_ADDR 0x1e
#define MII_BCM54XX_RDB_DATA 0x1f
/*
* AUXILIARY CONTROL SHADOW ACCESS REGISTERS. (PHY REG 0x18)
*/