how to activate LED on BB xM using gpio?

in an embedded linux class i was teaching last week, the students
were all using beagle xMs (rev C), and we decided to experiment with
playing with the LEDs from user space.

  using the LED files under /sys/class/leds worked fine -- changing
the brightness, trigger and so on. but using this article as a basis:

we simply couldn't control the very same LED via gpio. we followed the
article, tried changing the LED trigger and so on, but nothing worked.

  can anyone with a BB xM (Rev C) verify whether or not that article
works for them? let me know which LED you pick, the GPIO pin number
you use, whether you need to change the trigger, etc. i'm sure i'm
missing something trivial, i'd just like to figure out what it is.

  p.s. using robert nelson's debian build here:


I don't have a BB xM, but which LEDs are you using? If you are trying
to use the on-board LEDs that are assigned to things like CPU load and
SD card access, you can't export the GPIO controlling that LED to user
space because it's already "claimed" by the kernel. If you really want
to drive the on-board LEDs, you need to edit the device tree so the GPIO
is not claimed and the LEDs will disappear from /sys/class/leds/

The article uses a pin from the expansion connector, and from what I can
tell the instructions should work assuming you use the proper GPIO pin

Hey Robert,

With device tree on the beagle/beagle-xm I've only enabled the i2c
functionality on the expansion bus. I need to also enable spidev..

but looking at page 109:

For the other pins, what pinmux would you want for your class? (should
we enable the other uart?)


Hello RobertCNelson Sir,
I am stuck at same problem…please help on activating GPIO in mode 7 so that I can connect one of them to some Leds.
I only knows that It is possible by editing dtb file…for omap3-beagle-xm.dtb
I decompile the dtb file with device-tree-compiler…Now it available for editing…