diff options
| author | David S. Miller <davem@davemloft.net> | 2014-04-16 15:10:00 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-04-16 15:10:00 -0400 |
| commit | c3206e6fc0e1459c56a42e0eb5a3f559e6ca43f1 (patch) | |
| tree | c1599c41838c6af66e2474daba28537ef0a6397c /include/linux | |
| parent | bc383ea52278f1fafd7592ea7faf4b8f1edd8602 (diff) | |
| parent | f1d54c47502f42f5c4b89dacbe845ecd87ca002e (diff) | |
Merge branch 'mdio-gpio'
Guenter Roeck says:
====================
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
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mdio-gpio.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mdio-gpio.h b/include/linux/mdio-gpio.h index 7c9fe3c2be73..66c30a763b10 100644 --- a/include/linux/mdio-gpio.h +++ b/include/linux/mdio-gpio.h | |||
| @@ -17,6 +17,11 @@ struct mdio_gpio_platform_data { | |||
| 17 | /* GPIO numbers for bus pins */ | 17 | /* GPIO numbers for bus pins */ |
| 18 | unsigned int mdc; | 18 | unsigned int mdc; |
| 19 | unsigned int mdio; | 19 | unsigned int mdio; |
| 20 | unsigned int mdo; | ||
| 21 | |||
| 22 | bool mdc_active_low; | ||
| 23 | bool mdio_active_low; | ||
| 24 | bool mdo_active_low; | ||
| 20 | 25 | ||
| 21 | unsigned int phy_mask; | 26 | unsigned int phy_mask; |
| 22 | int irqs[PHY_MAX_ADDR]; | 27 | int irqs[PHY_MAX_ADDR]; |
