lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2045683506.315295.1583319126809@mail.vodafone.de>
Date:   Wed, 4 Mar 2020 11:52:06 +0100 (CET)
From:   Markus Moll <moll.markus@...or.de>
To:     netdev@...r.kernel.org
Cc:     Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "David S. Miller" <davem@...emloft.net>
Subject: [PATCH 1/3] dt-bindings: net: Add dp83867 LED mode constants

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

Signed-off-by: Markus Moll <moll.markus@...or.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ