]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Add support for microchip SMI0 MDIO bus
authorAndrew Lunn <andrew@lunn.ch>
Tue, 27 Apr 2021 07:09:07 +0000 (09:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Apr 2021 21:13:24 +0000 (14:13 -0700)
commit4be8bbef5c1d59db2cc53b73caefb2072ab83374
tree51c1bd5277f0a3f604e2cdb8c6b437e22408d6f4
parent82aef2afdca8323329ba61c71fded2c2349365d1
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>
drivers/net/mdio/mdio-bitbang.c
drivers/net/mdio/mdio-gpio.c
include/linux/mdio-bitbang.h