Subject: Re: [PATCH v2 5/5] net: dsa: add support for mv88e6250

From: Andrew Lunn <[email-masked]>
Date: Mon, 3 Jun 2019 14:45:52 +0200

On Mon, Jun 03, 2019 at 08:52:38AM +0000, Rasmus Villemoes wrote:
> On 24/05/2019 16.27, Andrew Lunn wrote:
> >> @@ -4841,6 +4910,10 @@ static const struct of_device_id mv88e6xxx_of_match[] = {
> >>  		.compatible = "marvell,mv88e6190",
> >>  		.data = &mv88e6xxx_table[MV88E6190],
> >>  	},
> >> +	{
> >> +		.compatible = "marvell,mv88e6250",
> >> +		.data = &mv88e6xxx_table[MV88E6250],
> >> +	},
> >>  	{ /* sentinel */ },
> >>  };
> > 
> > Ah, yes. I had not thought about that. A device at address 0 would be
> > found, but a device at address 16 would be missed.
> 
> Eh, no? The port registers are at offset 0x8, i.e. at either SMI address
> 8 or 24, so I don't think a 6250 at address 0 could be detected using
> either of the existing families?

Even better.

The real problem is, people keep trying to add new compatible strings
here when they should not. The compatible string is about being able
to read the ID registers, not to list every single switch chip family.

This is one case where it really is needed, and i had not thought
about that.

      Andrew