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


Groups > linux.kernel > #1271129

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

Path csiph.com!goblin3!goblin.stu.neva.ru!sewer!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Vineet Gupta <Vineet.Gupta1@synopsys.com>
Newsgroups linux.kernel
Subject Re: "compatible" and "model" properties in .dts for ARC boards
Date Tue, 17 Nov 2015 13:20:01 +0100
Message-ID <qvNoR-4Us-5@gated-at.bofh.it> (permalink)
References <qrH8m-8d7-7@gated-at.bofh.it> <qrH8m-8d7-5@gated-at.bofh.it> <qrLbY-2xT-25@gated-at.bofh.it> <qrMUq-3qm-11@gated-at.bofh.it>
X-Original-To Jonas Gorski <jogo@openwrt.org>, Arnd Bergmann <arnd@arndb.de>, "Vineet Gupta" <Vineet.Gupta1@synopsys.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version 1.0
Content-Type text/plain; charset="windows-1252"
Content-Transfer-Encoding 7bit
X-Originating-IP [10.12.197.182]
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 68
Organization linux.* mail to news gateway
X-Original-Cc Alexey Brodkin <Alexey.Brodkin@synopsys.com>, "linux-snps-arc@lists.infradead.org" <linux-snps-arc@lists.infradead.org>, lkml <linux-kernel@vger.kernel.org>, Rob Herring <robh@kernel.org>
X-Original-Date Tue, 17 Nov 2015 17:48:48 +0530
X-Original-Message-ID <564B1B28.5090403@synopsys.com>
X-Original-Newsgroups gmane.linux.kernel,gmane.linux.kernel.arc
X-Original-References <1446749422.3151.29.camel@synopsys.com> <C2D7FE5348E1B147BCA15975FBA23075F44D0C84@IN01WEMBXA.internal.synopsys.com> <82634871.ymdF4uL7TN@wuerfel> <563C8788.9090301@openwrt.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1271129

Show key headers only | View raw


On Friday 06 November 2015 04:27 PM, Jonas Gorski wrote:
> On 06.11.2015 09:59, Arnd Bergmann wrote:
>> 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).
> 
> This contradicts ePAPR, which says the model's recommended* format is the same as
> the compatible one's (<vendor>,<model>). Most PowerPC and some MIPS dts files
> follow that, while ARM(64) uses the free text form.
> 
> To me it looks like the intended usage was
> model = <actual_model>; compatible = <platform>;
> but the actual usage in arm is
> model = <human readable string>; compatible = <actual_model>, <platform>;
> 
> Of course for changing this in the existing dts files it might be a bit late, but it
> would be good to decide which of these two is the actually expected format. 
> 
> It also is a required property, and we have a few boards not having a model property,
> including the example in Documentation/devicetree/usage-model.txt.
> 
> 
> Jonas
> 
> * compatible strings are also only "recommended" to be in that format.
> 

Alexey, can u please rework the DT files per Jonas' suggestion above.

Thx,
-Vineet
--
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 | Find similar | Unroll thread


Thread

Re: "compatible" and "model" properties in .dts for ARC boards Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 13:20 +0100

csiph-web