diff mbox series

[1/2] dt-bindings:dp83867:Add binding for the status led

Message ID 20210809085213.324129-1-chaochao2021666@163.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [1/2] dt-bindings:dp83867:Add binding for the status led | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 1 maintainers not CCed: dmurphy@ti.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 36 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

chaochao2021666@163.com Aug. 9, 2021, 8:52 a.m. UTC
From: Chao Zeng <chao.zeng@siemens.com>

The phy status led of each of board maybe different.
Provide a method to custom phy status led behavior.

Datasheet:
http://www.ti.com/product/DP83867IR/datasheet

Signed-off-by: Chao Zeng <chao.zeng@siemens.com>
---
 .../devicetree/bindings/net/ti,dp83867.yaml    |  6 ++++++
 include/dt-bindings/net/ti-dp83867.h           | 18 ++++++++++++++++++
 2 files changed, 24 insertions(+)

Comments

Rob Herring Aug. 17, 2021, 6:48 p.m. UTC | #1
On Mon, Aug 09, 2021 at 04:52:13PM +0800, chaochao2021666@163.com wrote:
> From: Chao Zeng <chao.zeng@siemens.com>
> 
> The phy status led of each of board maybe different.
> Provide a method to custom phy status led behavior.
> 
> Datasheet:
> http://www.ti.com/product/DP83867IR/datasheet
> 
> Signed-off-by: Chao Zeng <chao.zeng@siemens.com>
> ---
>  .../devicetree/bindings/net/ti,dp83867.yaml    |  6 ++++++
>  include/dt-bindings/net/ti-dp83867.h           | 18 ++++++++++++++++++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.yaml b/Documentation/devicetree/bindings/net/ti,dp83867.yaml
> index 047d757e8d82..a46a437818f2 100644
> --- a/Documentation/devicetree/bindings/net/ti,dp83867.yaml
> +++ b/Documentation/devicetree/bindings/net/ti,dp83867.yaml
> @@ -106,6 +106,12 @@ properties:
>        Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h for applicable
>        values.
>  
> +  ti,led-sel:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: |
> +      This configure the status led. See dt-bindings/net/ti-dp83867.h
> +      for different status led settings,select different configures

There's ongoing discussions about using the LED bindings/subsystem for 
this type of LED.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.yaml b/Documentation/devicetree/bindings/net/ti,dp83867.yaml
index 047d757e8d82..a46a437818f2 100644
--- a/Documentation/devicetree/bindings/net/ti,dp83867.yaml
+++ b/Documentation/devicetree/bindings/net/ti,dp83867.yaml
@@ -106,6 +106,12 @@  properties:
       Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h for applicable
       values.
 
+  ti,led-sel:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: |
+      This configure the status led. See dt-bindings/net/ti-dp83867.h
+      for different status led settings,select different configures
+
 required:
   - reg
 
diff --git a/include/dt-bindings/net/ti-dp83867.h b/include/dt-bindings/net/ti-dp83867.h
index 6fc4b445d3a1..de59c3a42c1e 100644
--- a/include/dt-bindings/net/ti-dp83867.h
+++ b/include/dt-bindings/net/ti-dp83867.h
@@ -48,6 +48,24 @@ 
 #define DP83867_CLK_O_SEL_CHN_C_TCLK		0xA
 #define DP83867_CLK_O_SEL_CHN_D_TCLK		0xB
 #define DP83867_CLK_O_SEL_REF_CLK		0xC
+
+/* Led configuration flag*/
+#define DP83867_LINK_ESTABLISHED				0x0
+#define DP83867_RECEIVE_TRANSMIT_ACTIVITY		0x1
+#define DP83867_TRANSMIT_ACTIVITY				0x2
+#define DP83867_RECEIVE_ACTIVITY				0x3
+#define DP83867_COLLISION_DETECTED				0x4
+#define DP83867_LINK_ESTABLISHED_1000BT			0x5
+#define DP83867_LINK_ESTABLISHED_100BTX			0x6
+#define DP83867_LINK_ESTABLISHED_10BT			0x7
+#define DP83867_LINK_ESTABLISHED_10_100_BT		0x8
+#define DP83867_LINK_ESTABLISHED_100_1000_BT	0x9
+#define DP83867_FULL_DUPLEX						0xA
+#define DP83867_LINK_ESTABLISHED_BLINK_TRANSMIT_RECEIVE 0xB
+#define DP83867_RESERVED						0xC
+#define DP83867_RECEIVE_TRANSMIT_ERROR			0xD
+#define DP83867_RECEIVE_ERROR					0xE
+
 /* Special flag to indicate clock should be off */
 #define DP83867_CLK_O_SEL_OFF			0xFFFFFFFF
 #endif