Beaglebone Black mount debugfs on Debian

Beaglebone Black mount debugfs on Debian

debugfs not mounted by default on Debian.

For those of you like myself who watched Derek Molloy’s youtube video Introduction to GPIO’s using device tree overlays You may have been disappointed to find that some of the commands he walks through using do not work on Debian as they do on Angstrom. Fixing this is actually quite simple once you know what needs to be fixed. Thanks to a user on IRC who gave me a clue as to why this was not working, I was finally able ( very easily ) to get /sys/kernel/debug working the way I expected.

To get this working, we need to simply issue the command:

mount -t debugfs none /sys/kernel/debug/

Now when we issue the following command:

cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins

Which will give us output similar to:

Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
pin 0 (44e10800): mmc.5 (GPIO UNCLAIMED) function pinmux_emmc2_pins group pinmux_emmc2_pins
pin 1 (44e10804): mmc.5 (GPIO UNCLAIMED) function pinmux_emmc2_pins group pinmux_emmc2_pins
pin 2 (44e10808): mmc.5 (GPIO UNCLAIMED) function pinmux_emmc2_pins group pinmux_emmc2_pins
pin 3 (44e1080c): mmc.5 (GPIO UNCLAIMED) function pinmux_emmc2_pins group pinmux_emmc2_pins

. . .

pin 138 (44e10a28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 139 (44e10a2c): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 140 (44e10a30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 141 (44e10a34): (MUX UNCLAIMED) (GPIO UNCLAIMED)

Which of course is useful for determining which pins are in use, and those that which are not. Also, all of the other commands shown in the above mentioned video should work as well. Commands such as:

cat /sys/kernel/debug/gpio

also seems to be a useful. Try it out.

Beaglebone Black mount debugfs on Debian
Tagged on: