ppc405ex GPIO mapping

Lada Podivin lada.podivin at gmail.com
Tue Jun 23 02:48:34 EST 2009


Hi,

I have the same board and I had a similar problem. I use 2.6.30, so I don't
know whether 2.6.25 supports the following - however, here's my suggestion.
Set these options in your kernel config: CONFIG_GPIOLIB=y and
CONFIG_PPC4xx_GPIO=y. Before compilation do "export
KCPPFLAGS=-DARCH_NR_GPIOS=32" - you have to let the kernel know, that your
GPIO has 32 pins (default value is 255) and compile the kernel.

Then change the line

compatible = "ibm,gpio-405ex";

to

compatible = "ibm,ppc4xx-gpio";

Ok! After this long journey you shoul be able to work with your GPIO pins
with functions like gpio_set_value() - from include/linux/gpio.h.
Documentation of these functions can be seen at
http://www.mjmwired.net/kernel/Documentation/gpio.txt

So, this is my solution. Maybe there are better ones, but this works well
for me :)

Best,
Lada Podivin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090622/6a370ce1/attachment.htm>


More information about the Linuxppc-dev mailing list