diff options
author | Andrew Lunn <andrew@lunn.ch> | 2021-04-27 10:09:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-28 00:13:24 +0300 |
commit | 800fcab8230f622544a12403977b5b7259a076f8 (patch) | |
tree | 51c1bd5277f0a3f604e2cdb8c6b437e22408d6f4 /include/linux/mdio-bitbang.h | |
parent | 61df0e7bbb90fac8c77203e0fa570804617f137d (diff) | |
download | linux-800fcab8230f622544a12403977b5b7259a076f8.tar.xz |
net: phy: Add support for microchip SMI0 MDIO bus
SMI0 is a mangled version of MDIO. The main low level difference is
the MDIO C22 OP code is always 0, not 0x2 or 0x1 for Read/Write. The
read/write information is instead encoded in the PHY address.
Extend the bit-bang code to allow the op code to be overridden, but
default to normal C22 values. Add an extra compatible to the mdio-gpio
driver, and when this compatible is present, set the op codes to 0.
A higher level driver, sitting on top of the basic MDIO bus driver can
then implement the rest of the microchip SMI0 odderties.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mdio-bitbang.h')
-rw-r--r-- | include/linux/mdio-bitbang.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mdio-bitbang.h b/include/linux/mdio-bitbang.h index aca4dc037b70..373630fe5c28 100644 --- a/include/linux/mdio-bitbang.h +++ b/include/linux/mdio-bitbang.h @@ -33,6 +33,9 @@ struct mdiobb_ops { struct mdiobb_ctrl { const struct mdiobb_ops *ops; + unsigned int override_op_c22; + u8 op_c22_read; + u8 op_c22_write; }; int mdiobb_read(struct mii_bus *bus, int phy, int reg); |