Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings:dp83867:Add binding for the status led
@ 2021-08-09 8:52 chaochao2021666
2021-08-17 18:48 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: chaochao2021666 @ 2021-08-09 8:52 UTC (permalink / raw)
To: davem, kuba, robh+dt; +Cc: netdev, devicetree, linux-kernel, Chao Zeng
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
+
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
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] dt-bindings:dp83867:Add binding for the status led
2021-08-09 8:52 [PATCH 1/2] dt-bindings:dp83867:Add binding for the status led chaochao2021666
@ 2021-08-17 18:48 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2021-08-17 18:48 UTC (permalink / raw)
To: chaochao2021666; +Cc: davem, kuba, netdev, devicetree, linux-kernel, Chao Zeng
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-17 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 8:52 [PATCH 1/2] dt-bindings:dp83867:Add binding for the status led chaochao2021666
2021-08-17 18:48 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).