On Wed, 2020-05-13 at 23:02 +0100, Darren Stevens wrote: > Hello Scott > > On 08/05/2020, Scott Wood wrote: > > On Thu, 2020-05-07 at 22:30 +0100, Darren Stevens wrote: > > > > > > +/include/ "p5040si-pre.dtsi" > > > + > > > +/ { > > > + model = "varisys,CYRUS5040"; > > > + compatible = "varisys,CYRUS"; > > > > Is this board 100% compatible with the Cyrus P5020 board, down to every > > last > > quirk, except for the SoC plugged into it? If not, they shouldn't have > > the > > same compatible. If they are, then couldn't everything in this file but > > the > > SoC include be moved to a dtsi shared with cyrus_p5020.dts? > > It's not 100% compatible, the mdio ports map to different fman ports, but > both as are 'corenet generic' boards, I added varisys,CYRUS so it would be > detected in corenet_generic.c - support for the 5020 was added by Andy > Flemming, I've just tried to copy what he did. > > I can add another entry to the table, but do we realy want a separate entry > in the table for every supported board rather than using the device tree for > similar boards?
A separate compatible for each board is generally what we've done, as it allows for the possibility of board-specific quirks. At least it's just a table entry; back in the day it used to be a separate file. :-P That said, if you're pretty sure that all potentially relevant differences are described elsewhere in the device tree, I wouldn't mind too much if it becomes: compatible = "varisys,CYRUS5040", "varisys,CYRUS"; -Scott