[U-Boot] [U-Boot, v2, 5/6] dm: sunxi: Modify the GPIO driver to support driver model

Maxime Ripard maxime.ripard at free-electrons.com
Tue Oct 28 15:30:35 CET 2014


Hi,

On Tue, Oct 28, 2014 at 11:39:07AM +0800, Chen-Yu Tsai wrote:
> Hi,
> >>> When everything is moved to driver model I suppose we can be more clever.
> >>>
> >>>>
> >>>> Our "gpio-pin-numbers" are based on a sparse numbering
> >>>> scheme assuming 32 pins / bank, and there are assumptions this is
> >>>> the case in various places, so we cannot fix this until we've
> >>>> fully gone dm for all gpio usage. But here it would be nice
> >>>> to have the actual numbers of pins.
> >>>>
> >>>> Doing so requires at least one table with bank -> number of gpio-s
> >>>> mapping. And I think it may also differ on SoC type in some cases
> >>>> (I would need to take a look at the datasheets)
> >>>
> >>> Hoping this can be in the device tree. Do you have a binding for it?
> >>
> >> This is in the (kernel) driver, not the device tree bindings.
> >> So we would need to at least add a table for that.
> >>
> >> I don't see any pinmux related stuff in this patch. Does the gpio
> >> dm handle that?
> >
> > No, or at least not yet. Does sunxi have kernel support for pinctrl?
> > We could perhaps use that binding if it exists. Otherwise I think the
> > current code is our best bet - we can select the correct serial port
> > based on static configuration (CONFIG) for now.
> 
> It does. But the bindings are based on strings for function descriptions,
> which implies a whole lookup table in the driver. Not sure this would be
> great for SPL.
> 
> Also Linus Walleij (pinctrl maintainer) proposed some new generic
> bindings, though I don't know if we will ever switch over.
> CCing Maxime Ripard (sunxi maintainer) on this.

I'm not planning to move to the new bindings any time soon, and no one
is actively working on that to my knowledge either.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141028/922e8e47/attachment.pgp>


More information about the U-Boot mailing list