All of lore.kernel.org
 help / color / mirror / Atom feed
* reason for Allwinner SoC specific pinctrl drivers?
@ 2016-01-04 11:02 ` Andre Przywara
  0 siblings, 0 replies; 19+ messages in thread
From: Andre Przywara @ 2016-01-04 11:02 UTC (permalink / raw)
  To: Maxime Ripard, Linus Walleij
  Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland

Hi,

while looking at the Allwinner A64 SoC support, I was wondering why we
would actually need a pinctrl driver (file) for each and every Allwinner
SoC that we support.
Looking at both the A20 and the A64 doc I don't see any differences in
the port controller implementation apart from the actual
muxval <-> subsystem assignment, which is just data, right?
Comparing the code files in drivers/pinctrl/sunxi seems to support this,
as those drivers only consist of the table and some boilerplate code.

Now I was wondering whether we could get away with one generic Allwinner
pinctrl driver and put the SoC specific pin assignments in DT instead.
It looks like adding an "allwinner,muxval" property in addition to the
existing "allwinner,function" in the SoC's .dtsi would give us all the
information we need. This could look like:

	uart0_pins_a: uart0@0 {
		allwinner,pins =   "PB22", "PB23";
+		allwinner,muxval = <0x02    0x02>;
		allwinner,function = "uart0";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};

Would it make sense that I sit down and prototype such a driver?

We should keep compatibility with older DTs by keeping the existing
drivers in (or maybe emulating the current behaviour by providing just
those tables as a fallback) , but newer SoCs (like the A64?) would not
need a SoC specific driver, but just go with that generic driver and
appropriate DT properties.

I appreciate any comments on this, especially if I missed something
which would render this approach impossible or tedious.

Cheers,
Andre.

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

end of thread, other threads:[~2016-01-07 10:06 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-04 11:02 reason for Allwinner SoC specific pinctrl drivers? Andre Przywara
2016-01-04 11:02 ` Andre Przywara
     [not found] ` <568A514D.7070102-5wv7dgnIgG8@public.gmane.org>
2016-01-04 17:27   ` Vishnu Patekar
     [not found]     ` <CAEzqOZu8wkPKLp6bZZ7JuiM07ixDksdD=U-WK=3kFPYJZMon4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-04 21:36       ` Michal Suchanek
2016-01-04 21:36         ` [linux-sunxi] " Michal Suchanek
     [not found]         ` <CAOMqctQL3nmWECpQgtVdxgzEfn2obu4cdj67W1ESONO=5EpQdQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-05 12:05           ` Andre Przywara
2016-01-05 12:05             ` [linux-sunxi] " Andre Przywara
2016-01-05 15:20             ` Michal Suchanek
2016-01-05 15:20               ` Michal Suchanek
2016-01-04 22:04   ` Julian Calaby
2016-01-04 22:04     ` [linux-sunxi] " Julian Calaby
     [not found]     ` <CAGRGNgUVNGoOUNqyySjYzkL4KfEWK8orYH-AMxoCX-9N0R80-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-05 12:24       ` Andre Przywara
2016-01-05 12:24         ` [linux-sunxi] " Andre Przywara
2016-01-05 13:10   ` Maxime Ripard
2016-01-05 13:10     ` Maxime Ripard
2016-01-07 10:06     ` Linus Walleij
2016-01-07 10:06       ` Linus Walleij
2016-01-05  2:21 ` [linux-sunxi] " Chen-Yu Tsai
2016-01-05  2:21   ` Chen-Yu Tsai

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.