
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