How to set GPIO state in the dts or in platform

Ayman El-Khashab ayman at elkhashab.com
Wed Jan 6 15:17:32 EST 2010


I've got a custom board akin to the walnut.  I've successfully got u-boot,
the kernel, and a working filesystem.  The only thing I lack is a clear idea
of how to set a GPIO. 

I have the PHY reset connected to GPIO 3.  I've got it setup in u-boot
correctly, but by the time linux boots, it has touched the GPIOs and now the
PHY is held in reset.  I tried to follow how to adjust my device tree, 
but I
haven't been able to get it to work yet.  My kernel (circa mid 2008) 
doesn't
have the "keep" property of the GPIO node, so I can't use that. 

Based on what I've read it seems that I might need to add a node to the dts
and then a custom piece of code in the platform directory for my board.  I
am just not sure how to proceed there.

thanks
ayman



More information about the Linuxppc-dev mailing list