Thread (1 message) 1 message, 1 author, 2013-11-08

[PATCH v6 4/8] ARM: dts: imx27 pinctrl

From: Markus Pargmann <hidden>
Date: 2013-11-08 13:56:01
Also in: linux-devicetree

On Fri, Nov 08, 2013 at 10:45:01AM +0100, Linus Walleij wrote:
On Wed, Nov 6, 2013 at 11:43 PM, Matt Sealey [off-list ref] wrote:
quoted
On Mon, Oct 28, 2013 at 4:00 AM, Markus Pargmann [off-list ref] wrote:
quoted
+                       iomuxc: iomuxc at 10015000 {
+                               compatible = "fsl,imx27-iomuxc";
+                               reg = <0x10015000 0x600>;
+
+                       };
+
                        gpio1: gpio at 10015000 {
                                compatible = "fsl,imx27-gpio", "fsl,imx21-gpio";
                                reg = <0x10015000 0x100>;
Linus,

Case in point, you can't have two nodes which overlap registers.

Probably the most reasonable way to effect this is to keep the GPIO
bindings, put pinctrl definitions in there (there's no reason pinctrl
and gpio drivers can't probe the same compatible property) and use
regmap internally on that single node.
If the I/O region is tightly coupled across two subsystems like
that we usually merge the driver into one combined
pinctrl+gpio driver and put it into drivers/pinctrl/*.
The gpio module does not necessarily include a pinctrl module. Most of
the imx SoCs have the same gpio function registers but without pinctrl.
They all use the same gpio driver.
This often solves more problems and make the code
simpler too.

An alternative if address 0x10015000- 0x100150ff is
really only used for GPIO is to map the pinctrl like
that:

reg = <0x10015100 0x500>

and rewrite all the base offset handling in the driver.
There are 6 gpio modules in the memory region from 0x10015000 to
0x100155ff. pinctrl is in the same memory region.

I could change the bindings back to that from v1 [1]. One pinmux
controller over the full memory range (0x10015000 0x600) and the gpio
modules as subnodes using 0x100 each. This would preserve the currently
used references to the gpio nodes.

Regards,

Markus Pargmann


[1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/257180/focus=257184


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help