Hello Andre, This is something we can do for future SOCs. On 4 Jan 2016 19:02, "Andre Przywara" wrote: > > 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 = ; > allwinner,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. AFAIK, there are lot of holes in pin conf registers. This will complicate the dtsi configuration. The current pinctrl driver is best possible solution with respect to time and availability of limited people working on sunxi with the cost of increase in code size. It's better to give it a shot to make it generic driver for future SOCs atleast. Like A83, A64, etc. Possible solution will always be examined by experts Linus, Maxine, etc. Regards, Vishnu > > Cheers, > Andre. > > -- > You received this message because you are subscribed to the Google Groups "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout.