On Fri, Jan 05, 2024 at 03:27:17PM +0100, Christian Marangi wrote: > Add LED support for QCA8081 PHY. > > Documentation for this LEDs PHY is very scarce even with NDA access > to Documentation for OEMs. Only the blink pattern are documented and are > very confusing most of the time. No documentation is present about > forcing the LED on/off or to always blink. > > Those settings were reversed by poking the regs and trying to find the > correct bits to trigger these modes. Some bits mode are not clear and > maybe the documentation option are not 100% correct. For the sake of LED > support the reversed option are enough to add support for current LED > APIs. > > Supported HW control modes are: > - tx > - rx > - link10 > - link100 > - link1000 > - half_duplex > - full_duplex > > Also add support for LED polarity set to set LED polarity to active > high or low. QSDK sets this value to high by default but PHY reset value > doesn't have this enabled by default. > > QSDK also sets 2 additional bits but their usage is not clear, info about > this is added in the header. It was verified that for correct function > of the LED if active high is needed, only BIT 6 is needed. > > Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx> Reviewed-by: Andrew Lunn <andrew@xxxxxxx> Andrew