All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Linus Walleij
	(linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org)"
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: Tegra pinmux Device Tree support
Date: Tue, 9 Aug 2011 14:43:43 -0600	[thread overview]
Message-ID: <20110809204343.GA11568@ponder.secretlab.ca> (raw)
In-Reply-To: <20110809201815.GA21684-apL1N+EY0C9YtYNIL7UdTEEOCMrvLtNR@public.gmane.org>

On Tue, Aug 09, 2011 at 09:18:15PM +0100, Jamie Iles wrote:
> Hi Grant,
> 
> On Tue, Aug 09, 2011 at 11:34:28AM -0600, Grant Likely wrote:
> > We talked about this a bit at Linaro connect.  Outside of the more
> > complex runtime-reconfiguration of pin mux, there is a general need
> > for arbitrary initialization sequences to registers.  Also, pretty
> > much exactly what you need for tegra is needed for imx, omap and many
> > others.  The though was, rather than trying to come up with some kind
> > of pinmux-specific binding for pin states, which could end up being
> > very verbose if everything was split out into properties, we could
> > instead have a binding for register initialization sequences.
> > Something like this:
> > 
> > 	pinmux-initseq = <reg1 value1> <reg1 value2> ...;
> > 
> > And then add some macros for DTC to make it easier to define things
> > like pinmux setup tables.  Although the binding above is probably too
> > simple and naive.
> 
> Unfortunately we have devices where the pinmux registers aren't directly 
> memory mapped so I'm not sure that this would work for our devices 
> (which admittedly don't have a friendly muxing configuration...).  We 
> don't have a single way of muxing pins so at the moment we have a fairly 
> hideous set of structures and macros to allow us to create smallish 
> definitions of pins, but I can't see a nice way to express this in the 
> DT.
> 
> At the moment I have a simple pinmux API that takes the pin name and 
> setting name as strings, so I was thinking for a simple binding (for 
> configuration) I could have something like:
> 
> 	pinmux {
> 		pinmux-decode0 = "decode";
> 		pinmux-decode1 = "gpio";
> 	};
> 
> I remember in another thread you mentioned the possibility of building 
> some tables and embedding the binary data in the DT, but that has 
> potential problems with versioning of the structures.

Structure/binding versioning is easy.  If it really is necessary to
change the binding in an incompatible way, then change the compatible
value too.

g.

WARNING: multiple messages have this Message-ID (diff)
From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: Tegra pinmux Device Tree support
Date: Tue, 9 Aug 2011 14:43:43 -0600	[thread overview]
Message-ID: <20110809204343.GA11568@ponder.secretlab.ca> (raw)
In-Reply-To: <20110809201815.GA21684@pulham.picochip.com>

On Tue, Aug 09, 2011 at 09:18:15PM +0100, Jamie Iles wrote:
> Hi Grant,
> 
> On Tue, Aug 09, 2011 at 11:34:28AM -0600, Grant Likely wrote:
> > We talked about this a bit at Linaro connect.  Outside of the more
> > complex runtime-reconfiguration of pin mux, there is a general need
> > for arbitrary initialization sequences to registers.  Also, pretty
> > much exactly what you need for tegra is needed for imx, omap and many
> > others.  The though was, rather than trying to come up with some kind
> > of pinmux-specific binding for pin states, which could end up being
> > very verbose if everything was split out into properties, we could
> > instead have a binding for register initialization sequences.
> > Something like this:
> > 
> > 	pinmux-initseq = <reg1 value1> <reg1 value2> ...;
> > 
> > And then add some macros for DTC to make it easier to define things
> > like pinmux setup tables.  Although the binding above is probably too
> > simple and naive.
> 
> Unfortunately we have devices where the pinmux registers aren't directly 
> memory mapped so I'm not sure that this would work for our devices 
> (which admittedly don't have a friendly muxing configuration...).  We 
> don't have a single way of muxing pins so at the moment we have a fairly 
> hideous set of structures and macros to allow us to create smallish 
> definitions of pins, but I can't see a nice way to express this in the 
> DT.
> 
> At the moment I have a simple pinmux API that takes the pin name and 
> setting name as strings, so I was thinking for a simple binding (for 
> configuration) I could have something like:
> 
> 	pinmux {
> 		pinmux-decode0 = "decode";
> 		pinmux-decode1 = "gpio";
> 	};
> 
> I remember in another thread you mentioned the possibility of building 
> some tables and embedding the binary data in the DT, but that has 
> potential problems with versioning of the structures.

Structure/binding versioning is easy.  If it really is necessary to
change the binding in an incompatible way, then change the compatible
value too.

g.

  parent reply	other threads:[~2011-08-09 20:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 21:42 Tegra pinmux Device Tree support Stephen Warren
2011-08-08 21:42 ` Stephen Warren
     [not found] ` <74CDBE0F657A3D45AFBB94109FB122FF049F17229E-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-08-09 17:34   ` Grant Likely
2011-08-09 17:34     ` Grant Likely
     [not found]     ` <20110809173428.GB32195-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-08-09 17:44       ` Olof Johansson
2011-08-09 17:44         ` Olof Johansson
     [not found]         ` <CAOesGMjH8hZSAXvDZ6ADO-dtFNecRYC5GsfRiAeV8KMRG=JTkQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-10  1:23           ` David Gibson
2011-08-10  1:23             ` David Gibson
2011-08-13 12:22           ` Shawn Guo
2011-08-13 12:22             ` Shawn Guo
2011-08-09 20:18       ` Jamie Iles
2011-08-09 20:18         ` Jamie Iles
     [not found]         ` <20110809201815.GA21684-apL1N+EY0C9YtYNIL7UdTEEOCMrvLtNR@public.gmane.org>
2011-08-09 20:43           ` Grant Likely [this message]
2011-08-09 20:43             ` Grant Likely
2011-08-09 17:35   ` Olof Johansson
2011-08-09 17:35     ` Olof Johansson
     [not found]     ` <CAOesGMgONkY2i+1H+zZ2MJSDnPmFT8AnSjDQxJGaQZvVCExm2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-09 18:33       ` Stephen Warren
2011-08-09 18:33         ` Stephen Warren
2011-08-10 20:03       ` Stephen Warren
2011-08-10 20:03         ` Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110809204343.GA11568@ponder.secretlab.ca \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.