BeagleBone GPIO access in Debian Squeeze

In the Angstrom distro I am able to output to a GPIO port by multiplying the bank by 32 then adding the pin number. In the Debian Squeeze distro this did not seem to work and I am wondering how to output to GPIO in Debian so that I can simply turn on an LED. I am also curious as to how to determine what GPIO number to export in different distros.

Joe, see the discussion here:

https://groups.google.com/forum/?fromgroups#!topic/beagleboard/HyFyESfMvcA

Regards,

Thanks for the link that helped. I notice that BeagleBone does not have any pins that default to GPIO mode other than the user led’s. So do I actually need to edit beagle.h and recompile the distro? Or is there a way through software I can set up the mux because I did not find /sys/kernel/debug/omap_mux.

Thanks for the link that helped. I notice that BeagleBone does not have any pins that default to GPIO mode other than the user led’s. So do I actually need to edit beagle.h and recompile the distro? Or is there a way through software I can set up the mux because I did not find /sys/kernel/debug/omap_mux.

Probably a distro issue (that is, distro not setup to mount the debugfs automatically), not a kernel issue, so try to mount the debugfs with the following command manually:
mount -t debugfs none /sys/kernel/debug

I don’t know enough about the startup system in Debian to recommend where this should go in the startup process.

The mux settings has been done in software see that blog post in that link in my previous email…

So long as your kernel supports debugfs (CONFIG_DEBUG_FS=y in the
config), an /etc/fstab line in Debian will mount it properly at boot.
Something like this:

debugfs /sys/kernel/debug debugfs none 0 0

should work.

I have all the GPIO in /sys/kernel/debug/omap_mux in my Debian Squeeze
armel systems.

-Andrew

Thank you, that takes care of all my questions. I can blink LED’s now!