Re: [PATCH v4 net-next 5/5] net: phy: marvell-88q2xxx: add driver for the Marvell 88Q2220 PHY

From: Dimitri Fedrau
Date: Mon Jan 08 2024 - 06:17:02 EST


Am Mon, Jan 08, 2024 at 11:08:44AM +0000 schrieb Simon Horman:
> On Mon, Jan 08, 2024 at 10:37:00AM +0100, Dimitri Fedrau wrote:
> > Add a driver for the Marvell 88Q2220. This driver allows to detect the
> > link, switch between 100BASE-T1 and 1000BASE-T1 and switch between
> > master and slave mode. Autonegoation is supported.
>
> nit: Autonegotiation
>
Will fix it in V5.
> > Signed-off-by: Dimitri Fedrau <dima.fedrau@xxxxxxxxx>
> > ---
> > drivers/net/phy/marvell-88q2xxx.c | 206 +++++++++++++++++++++++++++++-
> > include/linux/marvell_phy.h | 1 +
> > 2 files changed, 201 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/net/phy/marvell-88q2xxx.c b/drivers/net/phy/marvell-88q2xxx.c
>
> ...
>
> > @@ -29,6 +36,42 @@
> >
> > #define MDIO_MMD_PCS_MV_RX_STAT 33328
> >
> > +struct mmd_val {
> > + int devad;
> > + u32 regnum;
> > + u16 val;
> > +};
> > +
> > +const struct mmd_val mv88q222x_revb0_init_seq0[] = {
> > + { MDIO_MMD_PCS, 0x8033, 0x6801 },
> > + { MDIO_MMD_AN, MDIO_AN_T1_CTRL, 0x0 },
> > + { MDIO_MMD_PMAPMD, MDIO_CTRL1,
> > + MDIO_CTRL1_LPOWER | MDIO_PMA_CTRL1_SPEED1000 },
> > + { MDIO_MMD_PCS, 0xfe1b, 0x48 },
> > + { MDIO_MMD_PCS, 0xffe4, 0x6b6 },
> > + { MDIO_MMD_PMAPMD, MDIO_CTRL1, 0x0 },
> > + { MDIO_MMD_PCS, MDIO_CTRL1, 0x0 },
> > +};
> > +
> > +const struct mmd_val mv88q222x_revb0_init_seq1[] = {
> > + { MDIO_MMD_PCS, 0xfe79, 0x0 },
> > + { MDIO_MMD_PCS, 0xfe07, 0x125a },
> > + { MDIO_MMD_PCS, 0xfe09, 0x1288 },
> > + { MDIO_MMD_PCS, 0xfe08, 0x2588 },
> > + { MDIO_MMD_PCS, 0xfe11, 0x1105 },
> > + { MDIO_MMD_PCS, 0xfe72, 0x042c },
> > + { MDIO_MMD_PCS, 0xfbba, 0xcb2 },
> > + { MDIO_MMD_PCS, 0xfbbb, 0xc4a },
> > + { MDIO_MMD_AN, 0x8032, 0x2020 },
> > + { MDIO_MMD_AN, 0x8031, 0xa28 },
> > + { MDIO_MMD_AN, 0x8031, 0xc28 },
> > + { MDIO_MMD_PCS, 0xffdb, 0xfc10 },
> > + { MDIO_MMD_PCS, 0xfe1b, 0x58 },
> > + { MDIO_MMD_PCS, 0xfe79, 0x4 },
> > + { MDIO_MMD_PCS, 0xfe5f, 0xe8 },
> > + { MDIO_MMD_PCS, 0xfe05, 0x755c },
> > +};
>
> nit: mv88q222x_revb0_init_seq0 and mv88q222x_revb0_init_seq1 seem
> to only be used in this file. Perhaps they should be static.
>
> ...

You are right, will fix it in V5. Thanks.

Best regards,
Dimitri