Skip to content

net: mdio-gpio enhancements

Guenter Roeck lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: mdio-gpio: Use devm_ functions where possibledrivers/net/phy/mdio-gpio.c+5 -146 replies
2/3net: mdio-gpio: Add support for active low gpio pinsdrivers/net/phy/mdio-gpio.c include/linux/mdio-gpio.h+16 -61 reply
3/3net: mdio-gpio: Add support for separate MDI and MDO gpio pinsdrivers/net/phy/mdio-gpio.c include/linux/mdio-gpio.h+33 -31 reply

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchChris Healy
1/3T-b T-b T-b
2/3T-b
3/3T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] net: mdio-gpio enhancements

The following series of patches adds support for active-low gpio pins as well as for systems with separate MDI and MDO pins to the mdio-gpio driver.

A board using those features is based on a COM Express CPU board. The COM Express standard supports GPIO pins on its connector, with one caveat: The pins on the connector have fixed direction and are hard configured either as input or output pins. The COM Express Design Guide [1] provides additional details.

The hardware uses three of the GPO/GPI pins from the COM Express board to drive an MDIO bus. Connectivity between GPI/GPO pins and the MDIO bus is as follows.

GPI2 --------------------+------------ MDIO

                         |
            +--------+   |
GPO2 ---+---G        |   |
        |   |        |   |
       4.7k | 2N7002 D---+
	|   |        |
	+---S        |
	|   +--------+
       GND

GPO1 --------------------------------- MDC

To support this hardware, two extensions to the driver were necessary.

- Due to the FET in the MDO path (GPO2), the MDO signal is inverted. The driver therefore has to support active-low GPIO pins.

- The MDIO signal must be separated into MDI and MDO.

Those changes are implemented in patch 2/3 and 3/3. Patch 1/3 simplifies the error path and thus the subsequent patches.

[1] http://www.picmg.org/pdf/picmg_comdg_100.pdf

----------------------------------------------------------------
Guenter Roeck (3):
net: mdio-gpio: Use devm_ functions where possible
net: mdio-gpio: Add support for active low gpio pins
net: mdio-gpio: Add support for separate MDI and MDO gpio pins

 drivers/net/phy/mdio-gpio.c |   68 ++++++++++++++++++++++++++++++-------------
 include/linux/mdio-gpio.h   |    5 ++++
 2 files changed, 52 insertions(+), 21 deletions(-)