-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Phil Elwell
authored and
David S. Miller
committed
Apr 20, 2018
1 parent
760db29
commit 1827b06
Showing
5 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#ifndef _DT_BINDINGS_MICROCHIP_LAN78XX_H | ||
#define _DT_BINDINGS_MICROCHIP_LAN78XX_H | ||
|
||
/* LED modes for LAN7800/LAN7850 embedded PHY */ | ||
|
||
#define LAN78XX_LINK_ACTIVITY 0 | ||
#define LAN78XX_LINK_1000_ACTIVITY 1 | ||
#define LAN78XX_LINK_100_ACTIVITY 2 | ||
#define LAN78XX_LINK_10_ACTIVITY 3 | ||
#define LAN78XX_LINK_100_1000_ACTIVITY 4 | ||
#define LAN78XX_LINK_10_1000_ACTIVITY 5 | ||
#define LAN78XX_LINK_10_100_ACTIVITY 6 | ||
#define LAN78XX_DUPLEX_COLLISION 8 | ||
#define LAN78XX_COLLISION 9 | ||
#define LAN78XX_ACTIVITY 10 | ||
#define LAN78XX_AUTONEG_FAULT 12 | ||
#define LAN78XX_FORCE_LED_OFF 14 | ||
#define LAN78XX_FORCE_LED_ON 15 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters