phy: fixed_phy: Add gpio to determine link up/down.
authorAndrew Lunn <andrew@lunn.ch>
Mon, 31 Aug 2015 13:56:53 +0000 (15:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Aug 2015 21:48:02 +0000 (14:48 -0700)
An SFP module may have a link up/down status pin which can be
connection to a GPIO line of the host. Add support for reading such an
GPIO in the fixed_phy driver.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/devicetree/bindings/net/fixed-link.txt
Documentation/networking/stmmac.txt
arch/m68k/coldfire/m5272.c
arch/mips/ar7/platform.c
arch/mips/bcm47xx/setup.c
drivers/net/ethernet/broadcom/genet/bcmmii.c
drivers/net/phy/fixed_phy.c
drivers/of/of_mdio.c
include/linux/phy_fixed.h

index 82bf7e0..ec5d889 100644 (file)
@@ -17,6 +17,8 @@ properties:
   enabled.
 * 'asym-pause' (boolean, optional), to indicate that asym_pause should
   be enabled.
+* 'link-gpios' ('gpio-list', optional), to indicate if a gpio can be read
+  to determine if the link is up.
 
 Old, deprecated 'fixed-link' binding:
 
@@ -30,7 +32,7 @@ Old, deprecated 'fixed-link' binding:
   - e: asymmetric pause configuration: 0 for no asymmetric pause, 1 for
     asymmetric pause
 
-Example:
+Examples:
 
 ethernet@0 {
        ...
@@ -40,3 +42,13 @@ ethernet@0 {
        };
        ...
 };
+
+ethernet@1 {
+       ...
+       fixed-link {
+             speed = <1000>;
+             pause;
+             link-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+       };
+       ...
+};
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge