summaryrefslogtreecommitdiff
path: root/include/linux/microchipphy.h
diff options
context:
space:
mode:
authorPhil Elwell <phil@raspberrypi.org>2018-04-19 19:59:39 +0300
committerDavid S. Miller <davem@davemloft.net>2018-04-20 18:39:09 +0300
commit1827b0678863bc97a1653fdf5308762b2aefcd56 (patch)
tree801fad406c632c29b280d07f43a8a45ff6c5f52a /include/linux/microchipphy.h
parent760db29bdc97b73ff60b091315ad787b1deb5cf5 (diff)
downloadlinux-1827b0678863bc97a1653fdf5308762b2aefcd56.tar.xz
lan78xx: Read LED states from Device Tree
Add support for DT property "microchip,led-modes", a vector of zero to four cells (u32s) in the range 0-15, each of which sets the mode for one of the LEDs. Some possible values are: 0=link/activity 1=link1000/activity 2=link100/activity 3=link10/activity 4=link100/1000/activity 5=link10/1000/activity 6=link10/100/activity 14=off 15=on These values are given symbolic constants in a dt-bindings header. Also use the presence of the DT property to indicate that the LEDs should be enabled - necessary in the event that no valid OTP or EEPROM is available. Signed-off-by: Phil Elwell <phil@raspberrypi.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/microchipphy.h')
-rw-r--r--include/linux/microchipphy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/microchipphy.h b/include/linux/microchipphy.h
index eb492d47f717..8e4015e7f8d3 100644
--- a/include/linux/microchipphy.h
+++ b/include/linux/microchipphy.h
@@ -70,4 +70,7 @@
#define LAN88XX_MMD3_CHIP_ID (32877)
#define LAN88XX_MMD3_CHIP_REV (32878)
+/* Registers specific to the LAN7800/LAN7850 embedded phy */
+#define LAN78XX_PHY_LED_MODE_SELECT (0x1D)
+
#endif /* _MICROCHIPPHY_H */