Thread (58 messages) 58 messages, 14 authors, 2013-08-01

Defining schemas for Device Tree

From: Stephen Warren <hidden>
Date: 2013-07-30 17:34:12

On 07/30/2013 11:29 AM, jonsmirl at gmail.com wrote:
On Tue, Jul 30, 2013 at 1:19 PM, Stephen Warren [off-list ref] wrote:
quoted
On 07/30/2013 07:14 AM, jonsmirl at gmail.com wrote:
quoted
On Tue, Jul 30, 2013 at 6:25 AM, Mark Brown [off-list ref] wrote:
quoted
On Mon, Jul 29, 2013 at 08:30:29PM -0400, jonsmirl at gmail.com wrote:
quoted
This...
tx-dma-channel = <&pdma0 7>; /* preliminary */
rx-dma-channel = <&pdma0 6>; /* preliminary */
quoted
Probably should be
dmas = <&pdma0 7>,<&pdma0 6>;
dma-names = "tx", "rx";
It should be - the latter is the generic DMA binding.  There's a lot of
bindings in the kernel that predate that but people are currently
working to transfer over, this is one of the examples of instability
that everyone is talking about.
Is something similar to this possible in device tree syntax?
dmas =  <"tx" &pdma0 7>,  <"rx"  &pdma0 6>;
I /think/ you can physically write that in *.dts, or something very
similar; with the strings outside the <>:

dmas = "tx", <&pdma0 7>, "rx", <&pdma0 6>;

However, there's been strong push-back (i.e. doing that has not been
allowed at all) on attempting to mix variable-length strings and
fixed-length/alignment integer cells in the same property. This is
primarily because you then can't ensure that the integer cell data is
aligned in the DTB (dtc and/or the DTB format spec does/requires/allows
Can we turn the strings into string phandles? Then they'd be fixed sized.
I believe that phandles point at nodes not arbitrary data, so no.

Now, could the DTB format be enhanced to allow that? Perhaps, although
we'd need a different string syntax to enable it, since existing
bindings would require the current inline-string format. That's getting
outside the realm of schemas and making active changes to the DT format
though...
That might provide a way to internationalize the strings too.
I don't think internationalization is needed; DT is an interface to
drivers/SW, rather than something end-user-visible.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help