netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: net: Add dp83867 LED mode constants
@ 2020-03-04 10:52 Markus Moll
  2020-03-05 19:12 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Moll @ 2020-03-04 10:52 UTC (permalink / raw)
  To: netdev
  Cc: Andrew Lunn, Florian Fainelli, Heiner Kallweit, Russell King,
	David S. Miller

These values reflect the register settings of LEDCR1, which maps PHY
status signals to LED pins.

Signed-off-by: Markus Moll <moll.markus@arcor.de>
---

This is the first of three patches that adds led configuration support
to the TI DP83867 driver. The DP83867 PHY has four LED output pins
(three of which are dedicated pins, one is muxed) whose functions are
configurable. To let system designers statically configure the LED
output functions, a devicetree property "ti,led-modes" is added. The
four entries of ti,led-modes correspond to the four LED settings in the
LEDCR1 register of the PHY.

The new led_modes field of dp83867_private is initialized only if
CONFIG_OF_MDIO is set. This is consistent with how all other fields of
that structure are currently initialized (e.g. tx_id_delay).

 include/dt-bindings/net/ti-dp83867.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/dt-bindings/net/ti-dp83867.h b/include/dt-bindings/net/ti-dp83867.h
index 6fc4b445d3a..53a33956b63 100644
--- a/include/dt-bindings/net/ti-dp83867.h
+++ b/include/dt-bindings/net/ti-dp83867.h
@@ -50,4 +50,21 @@
 #define DP83867_CLK_O_SEL_REF_CLK		0xC
 /* Special flag to indicate clock should be off */
 #define DP83867_CLK_O_SEL_OFF			0xFFFFFFFF
+
+/* LEDCR LED modes */
+#define DP83867_LED_LINK			0x0
+#define DP83867_LED_ACT_RX_TX			0x1
+#define DP83867_LED_ACT_TX			0x2
+#define DP83867_LED_ACT_RX			0x3
+#define DP83867_LED_COLLISION			0x4
+#define DP83867_LED_LINK_1000_BT		0x5
+#define DP83867_LED_LINK_100_BTX		0x6
+#define DP83867_LED_LINK_10_BT			0x7
+#define DP83867_LED_LINK_10_100_BT		0x8
+#define DP83867_LED_LINK_100_1000_BT		0x9
+#define DP83867_LED_FULL_DUPLEX			0xA
+#define DP83867_LED_LINK_AND_ACT		0xB
+#define DP83867_LED_RX_TX_ERROR			0xD
+#define DP83867_LED_RX_ERROR			0xE
+
 #endif
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/3] dt-bindings: net: Add dp83867 LED mode constants
  2020-03-04 10:52 [PATCH 1/3] dt-bindings: net: Add dp83867 LED mode constants Markus Moll
@ 2020-03-05 19:12 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2020-03-05 19:12 UTC (permalink / raw)
  To: Markus Moll
  Cc: netdev, Florian Fainelli, Heiner Kallweit, Russell King, David S. Miller

On Wed, Mar 04, 2020 at 11:52:06AM +0100, Markus Moll wrote:
> These values reflect the register settings of LEDCR1, which maps PHY
> status signals to LED pins.

Hi Markus

We just rejected a similar patchset, for the marvell 10G PHY.

https://www.spinics.net/lists/netdev/msg633789.html

We need to be consistent and also reject this :-(

	Andrew

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-05 19:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 10:52 [PATCH 1/3] dt-bindings: net: Add dp83867 LED mode constants Markus Moll
2020-03-05 19:12 ` Andrew Lunn

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).