Re: [PATCH 1/2] net: phy: motorcomm: add led_brightness_set for YT8521

From
Andrew Lunn <andrew@lunn.ch>
Date
2026-11-10 16:53:36
Also in
lkml
Reply to
Chukun Pan, 2026-11-10
On Tue, Nov 10, 2026 at 06:00:00PM +0800, Chukun Pan wrote:
Add support for manual brightness setting on YT8521/YT8531 PHY.
Has this been tested on real hardware? Have you had it blinking the
heartbeat? Shift-lock etc.
quoted hunk ↗ jump to hunk
--- a/drivers/net/phy/motorcomm.c
+++ b/drivers/net/phy/motorcomm.c
@@ -258,6 +258,10 @@
 #define YTPHY_WCR_INTR_SEL			BIT(6)
 #define YTPHY_WCR_ENABLE			BIT(3)
 
+#define YTPHY_LED_GENERAL_CFG_REG		0xA00B
+#define YTPHY_LED_FORCE_MODE(x)			BIT((x) * 3)
+#define YTPHY_LED_FORCE_EN(x)			BIT((x) * 3 + 2)
+
 /* 2b00 84ms
  * 2b01 168ms  *default*
  * 2b10 336ms
I _think_ this is the wrong place to insert these. 2b00 84ms refers to
YTPHY_WCR_PULSE_WIDTH_MASK which is used with YTPHY_WOL_CONFIG_REG? So
you insert these in the middle of WOL bits.

The sorting of registers is a bit messed up in this driver, but i
think you need to insert before:

#define YTPHY_PAD_DRIVE_STRENGTH_REG		0xA010

    Andrew

---
pw-bot: cr
Thread (9 messages) 9 messages, 3 authors, last reply 7d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help