Re: [PATCH v3] net: phy: DP83822: enable rgmii mode if phy_interface_is_rgmii

From: Tommaso Merciai
Date: Mon May 23 2022 - 03:21:46 EST


On Sat, May 21, 2022 at 08:39:02PM +0200, Andrew Lunn wrote:
> On Sat, May 21, 2022 at 01:58:46AM +0200, Tommaso Merciai wrote:
> > RGMII mode can be enable from dp83822 straps, and also writing bit 9
> > of register 0x17 - RMII and Status Register (RCSR).
> > When phy_interface_is_rgmii rgmii mode must be enabled, same for
> > contrary, this prevents malconfigurations of hw straps
> >
> > References:
> > - https://www.ti.com/lit/gpn/dp83822i p66
> >
> > Signed-off-by: Tommaso Merciai <tommaso.merciai@xxxxxxxxxxxxxxxxxxxx>
> > Co-developed-by: Michael Trimarchi <michael@xxxxxxxxxxxxxxxxxxxx>
> > Suggested-by: Alberto Bianchi <alberto.bianchi@xxxxxxxxxxxxxxxxxxxx>
> > Tested-by: Tommaso Merciai <tommaso.merciai@xxxxxxxxxxxxxxxxxxxx>
>
> Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
>
> If you want to, you could go further. If bit 9 is clear, bit 5 defines
> the mode, either RMII or MII. There are interface modes defined for
> these, so you could get bit 5 as well.

Hi Andrew,
Thanks for the review and for your time.
I'll try to go further, like you suggest :)

Regards,
Tommaso

>
> Andrew

--
Tommaso Merciai
Embedded Linux Engineer
tommaso.merciai@xxxxxxxxxxxxxxxxxxxx
__________________________________

Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info@xxxxxxxxxxxxxxxxxxxx
www.amarulasolutions.com