Re: [PATCH net] net: phy: dp83867: restore the LED polarity after a soft reset

From: Andrew Lunn

Date: Tue Sep 08 2026 - 12:05:19 EST


On Tue, Sep 08, 2026 at 08:49:01PM +0900, Donggeun Yoo wrote:
> dp83867_led_polarity_set() programs the LEDCR2 polarity bit for a
> DT-configured LED. It runs once, from phy_probe() via of_phy_leds().
> Every phy_init_hw() afterwards (phy_attach_direct(), mdio_bus_phy_resume(),
> and MAC drivers such as fec_main.c) calls .soft_reset first, and
> dp83867_phy_reset() issues DP83867_SW_RESET, which restores register
> defaults. config_init does not touch LEDCR2 and the requested value is
> not cached, so a DT-configured LED polarity is lost from the first
> attach onward.

What about the other bits in LEDCR2? dp83867_led_brightness_set()
might of been used to turn the LED on/off in order to show the state
of my caps lock key, etc.

Andrew