Thread (1 message) 1 message, 1 author, 2011-05-18

Re: Pinmux with device tree

From: Mitch Bradley <hidden>
Date: 2011-05-18 19:33:22

On 5/18/2011 6:34 AM, Simon Glass wrote:
Hi,

I see a new pinmux system in the LKML. Has anyone looked at how to
represent pinmux settings in the device tree?

On a related topic, the examples that are used for GPIOs assume a
flags word which describes things like pull-ups, direction, etc. This
seems pretty cumbersome and gets worse with pinmuxes. People editing
the device trees want to see symbolic information rather than a coded
number, a bit like a #define. I can see this can be done with strings
but this is inefficient in time and space, and is error-prone.  Is
there support for this in device trees that I have missed?
Open Firmware deals with this by defining both a numerical 
representation and a text representation.  The numerical representation 
appears in memory in device tree property values, and the corresponding 
text representation is for display and human input.

It primarily applies to unit addresses, i.e. the "reg" property value, 
but the idea generalizes.  The device tree compiler could accept the 
symbolic names, converting them into well-defined bitfield values which 
would be stored in integer cells within property values.


Regards,
Simon
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help