net: phy: Add LED mode driver for Microsemi PHYs.
Subsystems (4)
PATCH v3 1/1 net: phy: Add LED mode driver for Microsemi PHYs.
From: Raju Lakkaraju <[email protected]>
LED Mode:
Microsemi PHY support 2 LEDs (LED[0] and LED[1]) to display different status information that can be selected by setting LED mode.
LED Mode parameter (vsc8531, led-0-mode) and (vsc8531, led-1-mode) get from Device Tree.
---
Change set:
v0:
- Initial version of LED driver for Microsemi PHYs. v1:
- Update all review comments given by Andrew.
- Add new header file "mscc-phy-vsc8531.h" to define DT macros.
- Add error/range check for DT LED mode input
v2:
- Fixed x86_64 build error.
v3:
- Update all review comments.
- Fix the error check condition.
.../devicetree/bindings/net/mscc-phy-vsc8531.txt | 10 +++ drivers/net/phy/mscc.c | 85 +++++++++++++++++++++- include/dt-bindings/net/mscc-phy-vsc8531.h | 29 ++++++++ 3 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/net/mscc-phy-vsc8531.h
Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt +10 -0
@@ -27,6 +27,14 @@ Optional properties: 'vddmac'. Default value is 0%. Ref: Table:1 - Edge rate change (below). +- vsc8531,led-0-mode : LED mode. Specify how the LED[0] should behave. + Allowed values are define in + "include/dt-bindings/net/mscc-phy-vsc8531.h". + Default value is VSC8531_LINK_1000_ACTIVITY (1). +- vsc8531,led-1-mode : LED mode. Specify how the LED[1] should behave. + Allowed values are define in + "include/dt-bindings/net/mscc-phy-vsc8531.h". + Default value is VSC8531_LINK_100_ACTIVITY (2). Table: 1 - Edge rate change ----------------------------------------------------------------|
@@ -60,4 +68,6 @@ Example: compatible = "ethernet-phy-id0007.0570"; vsc8531,vddmac = <3300>; vsc8531,edge-slowdown = <7>; + vsc8531,led-0-mode = <LINK_1000_ACTIVITY>; + vsc8531,led-1-mode = <LINK_100_ACTIVITY>; };
drivers/net/phy/mscc.c +84 -1
139 lines not on this page · raw message
include/dt-bindings/net/mscc-phy-vsc8531.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Device Tree constants for Microsemi VSC8531 PHY +* +* Author: Nagaraju Lakkaraju +* +* License: Dual MIT/GPL +* Copyright (c) 2017 Microsemi Corporation +*/ + +#ifndef _DT_BINDINGS_MSCC_VSC8531_H +#define _DT_BINDINGS_MSCC_VSC8531_H + +/* PHY LED Modes */ +#define VSC8531_LINK_ACTIVITY 0 +#define VSC8531_LINK_1000_ACTIVITY 1 +#define VSC8531_LINK_100_ACTIVITY 2 +#define VSC8531_LINK_10_ACTIVITY 3 +#define VSC8531_LINK_100_1000_ACTIVITY 4 +#define VSC8531_LINK_10_1000_ACTIVITY 5 +#define VSC8531_LINK_10_100_ACTIVITY 6 +#define VSC8531_DUPLEX_COLLISION 8 +#define VSC8531_COLLISION 9 +#define VSC8531_ACTIVITY 10 +#define VSC8531_AUTONEG_FAULT 12 +#define VSC8531_SERIAL_MODE 13 +#define VSC8531_FORCE_LED_OFF 14 +#define VSC8531_FORCE_LED_ON 15 + +#endif
Signature · 1 line
2.7.4
From: Raju Lakkaraju <[email protected]>
Date: Tue, 7 Feb 2017 19:10:26 +0530
Quoted 10 lines
From: Raju Lakkaraju <[email protected]>
LED Mode:
Microsemi PHY support 2 LEDs (LED[0] and LED[1]) to display different status information that can be selected by setting LED mode.LED Mode parameter (vsc8531, led-0-mode) and (vsc8531, led-1-mode) get from Device Tree.
Signed-off-by Raju Lakkaraju <[email protected]>
Applied, thank you.
A message that is not in the archive (sent off-list or not yet received): 1486474826-29426-1-git-send-email-Raju.Lakkaraju-dzo6w/[email protected]
Quoted 35 lines · Raju Lakkaraju
From: Raju Lakkaraju <Raju.Lakkaraju-dzo6w/[email protected]>
LED Mode:
Microsemi PHY support 2 LEDs (LED[0] and LED[1]) to display different status information that can be selected by setting LED mode.LED Mode parameter (vsc8531, led-0-mode) and (vsc8531, led-1-mode) get from Device Tree.
Signed-off-by Raju Lakkaraju <Raju.Lakkaraju-dzo6w/[email protected]>---
Change set:
v0:
- Initial version of LED driver for Microsemi PHYs. v1:
- Update all review comments given by Andrew.
- Add new header file "mscc-phy-vsc8531.h" to define DT macros.
- Add error/range check for DT LED mode input
v2:
- Fixedx86_64build error.
v3:
- Update all review comments.
- Fix the error check condition..../devicetree/bindings/net/mscc-phy-vsc8531.txt | 10 +++ drivers/net/phy/mscc.c | 85 +++++++++++++++++++++- include/dt-bindings/net/mscc-phy-vsc8531.h | 29 ++++++++ 3 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/net/mscc-phy-vsc8531.hDocumentation/devicetree/bindings/net/mscc-phy-vsc8531.txt +0
-0
Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt Optional properties: · line 34
Quoted 8 lines
Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt +5
-0@@ -27,6 +27,14 @@ Optional properties: 'vddmac'. Default value is 0%. Ref: Table:1 - Edge rate change (below). +- vsc8531,led-0-mode : LED mode. Specify how the LED[0] should behave. + Allowed values are define in + "include/dt-bindings/net/mscc-phy-vsc8531.h". + Default value is VSC8531_LINK_1000_ACTIVITY (1). +- vsc8531,led-1-mode : LED mode. Specify how the LED[1] should behave.
You failed to address my comment on v2. vsc8531 is not a vendor prefix. Please fix in a new patch since David already applied it.
Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Rob,
Quoted 12 lines · Rob Herring
EXTERNAL EMAIL
Quoted 4 lines · Raju Lakkaraju
From: Raju Lakkaraju <Raju.Lakkaraju-dzo6w/[email protected]>
+ Default value is
VSC8531_LINK_1000_ACTIVITY(1).
+- vsc8531,led-1-mode : LED mode. Specify how the LED[1] should behave.You failed to address my comment on v2. vsc8531 is not a vendor prefix. Please fix in a new patch since David already applied it.
Accpeted my fault. i missed your comment.
Do i need to change from "vsc8531, led-0-mode" to "mscc, led-0-mode" Is this your suggestion?
Quoted 1 line
Rob
---
Thanks,
Raju.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Andrew Lunn
maintainerQuoted 12 lines · Raju Lakkaraju
Hi Rob,
Quoted 9 lines · Rob Herring
EXTERNAL EMAIL
Quoted 4 lines · Raju Lakkaraju
From: Raju Lakkaraju <[email protected]>
+ Default value is
VSC8531_LINK_1000_ACTIVITY(1).
+- vsc8531,led-1-mode : LED mode. Specify how the LED[1] should behave.
Quoted 7 lines
Quoted 3 lines
You failed to address my comment on v2. vsc8531 is not a vendor prefix. Please fix in a new patch since David already applied it.
Accpeted my fault. i missed your comment.
Do i need to change from "vsc8531, led-0-mode" to "mscc, led-0-mode" Is this your suggestion?
Hi Raju
Are there any in kernel users of this binding? I don't think there are. I know Microsemi has a modified beagle bone black available as a development board, but i don't think mainline support for this board has been added yet?
Since there is nothing to remain backwards compatible with, you could change all the property names?
Andrew
A message that is not in the archive (sent off-list or not yet received): 20170216090646.GA29082-dzo6w/[email protected]
Quoted 12 lines · Raju Lakkaraju
Hi Rob,
Quoted 9 lines · Rob Herring
EXTERNAL EMAIL
Quoted 4 lines · Raju Lakkaraju
From: Raju Lakkaraju <Raju.Lakkaraju-dzo6w/[email protected]>
+ Default value is
VSC8531_LINK_1000_ACTIVITY(1).
+- vsc8531,led-1-mode : LED mode. Specify how the LED[1] should behave.
Quoted 7 lines
Quoted 3 lines
You failed to address my comment on v2. vsc8531 is not a vendor prefix. Please fix in a new patch since David already applied it.
Accpeted my fault. i missed your comment.
Do i need to change from "vsc8531, led-0-mode" to "mscc, led-0-mode" Is this your suggestion?
Well, there shouldn't be a space there, but yess, mscc is the prefix.
Read my original comments. I also suggested combining this to a single property.
Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAL_JsqJLCe1O7Bv526zAY-s-R1DcnA2O0bpx48dTFGSgeu-Edw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi Rob,
Thank you for code review comments.
Quoted 10 lines · Rob Herring
EXTERNAL EMAIL
Quoted 2 lines
Do i need to change from "vsc8531, led-0-mode" to "mscc, led-0-mode" Is this your suggestion?
Well, there shouldn't be a space there, but yess, mscc is the prefix.
Read my original comments. I also suggested combining this to a single property.
Accepted your comment.
Fix the combining into single property and change prefix to mscc. I sent the latest code for review. Please review and send your comments.
Quoted 1 line
Rob
---
Thanks,
Raju
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html