All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] pinmux: group and function definitions in the device tree
@ 2015-03-19 15:39 ` Ludovic Desroches
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Desroches @ 2015-03-19 15:39 UTC (permalink / raw)
  To: linux-arm-kernel, linux-gpio, devicetree
  Cc: linus.walleij, laurent.pinchart, swarren, s.hauer, tony, nicolas.ferre

Hi,

I would like to start a discussion about pinmuxing and device tree bindings.

I am currently writing a new pinmuxing driver using the generic pinconf.
My main concern is about defining functions and which pins belong to a
group.

At the moment, it seems that most drivers using the generic pinconf
define this stuff in a static way. The pinctrl-at91 driver covers many
devices, the new one should do the same for new Atmel devices. Having
the group and function definitions in the driver could involve a huge
file...
I am not sure it is a good thing to embed all these information into a
single zImage...

How can we achieved this? I was thinking about something like this:

pinctrl@fc06a000 {

	[...]

	pinctrl_defs {
		mci0 {
			mci0_ioset0_1bit_grp {
				at91,pins = <68 69 70>;
				at91,mux = <2>;
			};

			mci0_ioset0_4bit_grp {
				at91,pins = <68 69 70 71 72 73>;
				at91,mux = <2>;
			};

			mci0_ioset0_8bit_grp {
				at91,pins = <68 69 70 71 72 73 74 75 76 77>;
				at91,mux = <2>;
			};
		};
	};

	pinctrl_mci0_default: mci0_default {
		mux {
			function = "mci0";
			groups = &mci0_ioset0_8bit_grp;
		};

		conf {
			groups = &mci0_ioset0_8bit_grp;
			bias-pullup;
		};
	};
};

- A subnode for these definitions in order to not parse the whole
  pinctrl node to retrieve groups and functions.
- Using node names as function and group names.
- Can we get generic properties to define the groups? Of course a 'pins'
  property is mandatory. In my case I will need an extra one to tell the
  controller how to mux the pins (a same pin can have up to 7 muxing
  possibilities).


Thanks for your advices.

Ludovic

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2015-03-24  6:18 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-19 15:39 [RFC] pinmux: group and function definitions in the device tree Ludovic Desroches
2015-03-19 15:39 ` Ludovic Desroches
2015-03-19 18:56 ` Sascha Hauer
2015-03-19 18:56   ` Sascha Hauer
2015-03-20 15:06   ` Ludovic Desroches
2015-03-20 15:06     ` Ludovic Desroches
2015-03-23  6:44     ` Sascha Hauer
2015-03-23  6:44       ` Sascha Hauer
     [not found]       ` <20150323064424.GD9742-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-03-23  9:08         ` Ludovic Desroches
2015-03-23  9:08           ` Ludovic Desroches
2015-03-23 10:09           ` Sascha Hauer
2015-03-23 10:09             ` Sascha Hauer
2015-03-23 10:29             ` Jean-Christophe PLAGNIOL-VILLARD
2015-03-23 10:29               ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]               ` <37858913-F9BB-41D8-A380-7F8C44E08A4F-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
2015-03-23 14:00                 ` Ludovic Desroches
2015-03-23 14:00                   ` Ludovic Desroches
     [not found]             ` <20150323100913.GJ9742-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-03-23 11:49               ` Sascha Hauer
2015-03-23 11:49                 ` Sascha Hauer
2015-03-23 14:29               ` Ludovic Desroches
2015-03-23 14:29                 ` Ludovic Desroches
2015-03-24  6:18                 ` Sascha Hauer
2015-03-24  6:18                   ` Sascha Hauer

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.