Re: [RFC v1 net-next 8/8] net: dsa: ocelot: add external ocelot switch control

From: Colin Foster
Date: Mon Sep 12 2022 - 11:31:43 EST


On Mon, Sep 12, 2022 at 11:51:14AM +0100, Lee Jones wrote:
> On Sun, 11 Sep 2022, Colin Foster wrote:
>
> > Add control of an external VSC7512 chip by way of the ocelot-mfd interface.
> >
> > Currently the four copper phy ports are fully functional. Communication to
> > external phys is also functional, but the SGMII / QSGMII interfaces are
> > currently non-functional.
> >
> > Signed-off-by: Colin Foster <colin.foster@xxxxxxxxxxxxxxxx>
> > ---
> >
> > v1 from previous RFC:
> > * Remove unnecessary byteorder and kconfig header includes.
> > * Create OCELOT_EXT_PORT_MODE_SERDES macro to match vsc9959.
> > * Utilize readx_poll_timeout for SYS_RESET_CFG_MEM_INIT.
> > * *_io_res struct arrays have been moved to the MFD files.
> > * Changes to utilize phylink_generic_validate() have been squashed.
> > * dev_err_probe() is used in the probe function.
> > * Make ocelot_ext_switch_of_match static.
> > * Relocate ocelot_ext_ops structure to be next to vsc7512_info, to
> > match what was done in other felix drivers.
> > * Utilize dev_get_regmap() instead of the obsolete
> > ocelot_init_regmap_from_resource() routine.
> >
> > ---
> > drivers/mfd/ocelot-core.c | 3 +
> > drivers/net/dsa/ocelot/Kconfig | 14 ++
> > drivers/net/dsa/ocelot/Makefile | 5 +
> > drivers/net/dsa/ocelot/ocelot_ext.c | 254 ++++++++++++++++++++++++++++
> > include/soc/mscc/ocelot.h | 2 +
> > 5 files changed, 278 insertions(+)
> > create mode 100644 drivers/net/dsa/ocelot/ocelot_ext.c
> >
> > diff --git a/drivers/mfd/ocelot-core.c b/drivers/mfd/ocelot-core.c
> > index aa7fa21b354c..b7b9f6855f74 100644
> > --- a/drivers/mfd/ocelot-core.c
> > +++ b/drivers/mfd/ocelot-core.c
> > @@ -188,6 +188,9 @@ static const struct mfd_cell vsc7512_devs[] = {
> > .use_of_reg = true,
> > .num_resources = ARRAY_SIZE(vsc7512_miim1_resources),
> > .resources = vsc7512_miim1_resources,
> > + }, {
> > + .name = "ocelot-ext-switch",
> > + .of_compatible = "mscc,vsc7512-ext-switch",
> > },
> > };
>
> Please separate this out into its own patch.

I'll do that.

>
> --
> Lee Jones [李琼斯]