[PATCH 2/3] net: phy: mediatek: Add mtk phy lib for token ring access & LED/other manipulations

Andrew Lunn andrew at lunn.ch
Wed May 8 05:25:56 PDT 2024


On Tue, May 07, 2024 at 03:40:09PM +0100, Daniel Golle wrote:
> > +/* Registers on MDIO_MMD_VEND2 */
> > +#define MTK_PHY_LED0_ON_CTRL			0x24
> > +#define MTK_PHY_LED1_ON_CTRL			0x26
> > +#define   MTK_PHY_LED_ON_MASK			GENMASK(6, 0)
> 
> Shouldn't this be
> GENMASK(6, 0) | BIT(7)
> 
> to include the MTK_PHY_LED_ON_LINK2500 bit as well?
> 
> I also noticed that this bit is the only difference between the LED
> controller of the internal 2.5G PHY in MT7988 and the Airoha EN8811H
> (driver air_en8811h.c, present in net-next). The EN8811H seems to use
> BIT(8) for LED_ON_LINK2500.
> 
> Could you create this helper library in a way that it would be useful
> also for the otherwise identical LED controller of the Airoha EN8811H,
> ie. supporting both variants with LED_ON_LINK2500 at BIT(7) as well as
> BIT(8) would be worth it imho as all the rest could be shared.

Please trim the email when replying to just what is relevant. If i
need to page down lots of time to find a comment it is possible i will
skip write passed a comment...

     Andrew



More information about the linux-arm-kernel mailing list