Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1263859

Re: "compatible" and "model" properties in .dts for ARC boards

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: "compatible" and "model" properties in .dts for ARC boards
Date 2015-11-06 10:10 +0100
Message-ID <qrLbY-2xT-25@gated-at.bofh.it> (permalink)
References <qrH8m-8d7-7@gated-at.bofh.it> <qrH8m-8d7-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Friday 06 November 2015 04:45:24 Vineet Gupta wrote:
> >
> > During OpenWRT upsreaming process one interesting topic was raised.
> > See in the middle of https://lists.openwrt.org/pipermail/openwrt-devel/2015-November/036959.html
> >
> > In Device Tree descriptions for our boards we don't use "model" property
> > even though it is a required one as specified by ePAPR, see
> > http://free-electrons.com/~thomas/pub/Power_ePAPR_APPROVED_v1.0.pdf,
> > page 39 "Table 3-1 Root node properties".
> >
> > Instead we put 2 items in "compatible" property.
> >
> > For example:
> > ------------------->8----------------
> > compatible = "snps,axs101", "snps,arc-sdp";
> > ------------------->8----------------
> >
> > And from ePAPR standpoint it makes sense to split contents of that "compatible"
> > property in 2:
> > ------------------->8----------------
> > compatible = "snps,arc-sdp";
> > model = "snps,axs101";
> > ------------------->8----------------
> 
> It seems model is just a descriptive label and we can surely add them to existing DT.
> compatible on the other hand is more fundamental used for exact comparisons etc
> and follows the vendor,device convention.
> It is pretty common for compatible to have multiple strings for exactly the same
> reason as I have them here. Both axs101 and axs103 are based on sdp thus we want
> the ability to have both pieces of information and use as needed.

Correct.

The model should also be a human readable name of the machine, just one
string like "Synapsys AXS101 Development Board" (or whatever that is called).

> > But I do see problems with implementation of that thing.
> > Today we have a luxury of selection of AXS init functionality
> > based on that compatible value and if "snps,axs101" goes in
> > "model" then we'll need to add some more code in
> > arch/arc/plat-axs10x/axs10x.c that reads "model" value with
> > of_get_property() and then compare to "axs10{1|3}".
> >
> > Any thoughts?

That should use the of_machine_is_compatible() helper. The model string
is for printing in dmesg or /proc/cpuinfo.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: "compatible" and "model" properties in .dts for ARC boards Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-06 05:50 +0100
  Re: "compatible" and "model" properties in .dts for ARC boards Arnd Bergmann <arnd@arndb.de> - 2015-11-06 10:10 +0100
    Re: "compatible" and "model" properties in .dts for ARC boards Jonas Gorski <jogo@openwrt.org> - 2015-11-06 12:00 +0100

csiph-web