Re: [PATCH v10 net-next 6/7] dt-bindings: mfd: ocelot: add bindings for VSC7512

From: Colin Foster
Date: Tue Jun 14 2022 - 17:28:13 EST


Hi Rob,

Thanks for the feedback! I'll include these changes in my next set.

On Tue, Jun 14, 2022 at 02:43:45PM -0600, Rob Herring wrote:
> On Fri, Jun 10, 2022 at 01:23:29PM -0700, Colin Foster wrote:
...
> > +properties:
> > + compatible:
> > + enum:
> > + - mscc,vsc7512-spi
>
> '-spi' is redundant as we know what bus this is on looking at the
> parent.
>

Ahh... I see this now. A spi driver and an i2c driver (or otherwise)
can share the same compatible string, and the device tree sorts that
out for me. Thanks!

> > +
> > + reg:
> > + maxItems: 1
> > +
> > + "#address-cells":
> > + const: 1
> > +
> > + "#size-cells":
> > + const: 0
>
> No size? That's odd given the child nodes are the same as memory mapped
> peripherals which expect a size.

This one has gone back and forth a couple times. The base addresses were
hard-coded in the driver and kept out of the device tree. But I couldn't
explicitly differentiate between mfd children "mdio0" and "mdio1" below,
so I recently added the address cells back in. This way mfd_cell->of_reg
and mfd_cell->use_of_reg can be used.

Unless suggested otherwise, I'll add size in here. As it is right now,
that size will be essentially ignored though. The resources (base and
size) are all defined in drivers/mfd/ocelot-core.c during the last patch
of this series.