PocketBeagle [AM3358 version]: putting P1.33 and P1.35 into GPIO mode

Hi all,

I’m trying to get a PocketBeagle (original AM3358 version, NOT a PocketBeagle2) set up as a packet radio node with DireWolf, I have a USB sound interface and wish to use two pins, P1.33 and P1.35 as GPIOs for the “data carrier detect” LED and PTT control signal, respectively. I am running kernel version 6.18.45-bone48. The image is the minimal Debian 13 2026-07-24 image.

For testing purposes, I’m using the sysfs interface to see if I can manually control those LEDs. he board was made years ago (back in 2018) to expose these two pins as well as P1.31 and P1.29 for future use. These are the pins I intend to use, and according to the documentation, I should be able to use them.

System Reference Manual · beagleboard/pocketbeagle Wiki · GitHub shows the 4 pins in question on the bottom left of the diagram, by default they are associated with the PRUs, and apparently this is the mode used by default.

The GPIO numbering appears to have changed: the Linux kernel now numbers them from 512, but also the GPIO chips themselves seem to have been re-arranged… in the old currency that this diagram shows, the pins in question were called GPIO 88 and GPIO 111… and with the 512 offset, would be 600 and 623 respectively.

I tried exporting 600 and 623 and wiggling those but saw nothing on the pins.

show-pins is no help:

Died at /usr/local/sbin/show-pins line 101, <> line 57.

Manually looking through /sys/kernel/debug/gpio, I see the GPIO numbers I need are 56 and 79; which with the 512 offset is now 568 and 591.

I tried exporting those pins via sysfs, and again, wiggling them shows nothing.

Old documentation refers to a config-pin command, sadly this does not seem to exist on the image I used.

I’ve had a hunt around through the device tree overlays, nothing jumps out at me as being the “disable PRU” overlay. I’ve also tried commenting out the uboot_pru_overlay= line so no PRU lines are selected… no dice.

How do I get the PRUs to release these pins back to being plain GPIOs?

The mux is probably your missing step, not the GPIO number. In the PocketBeagle device tree P1_33 and P1_35 default to pruin, so an exported GPIO is not connected to the pin at all. On the bone kernel each header pin has a pinmux state file: echo gpio > /sys/devices/platform/ocp/ocp:P1_33_pinmux/state (and the same for P1_35) switches it back to plain GPIO. That is also what config-pin does under the hood (bb.org-overlays repo); on the minimal Debian 13 image it seems that tool is simply not installed.
After the mux is set to gpio, the classic numbering from the SRM (P1.33 = GPIO 111, P1.35 = GPIO 88, i.e. 623 and 600 with the 512 base) should wiggle as expected.

I am at a complete loss as to how and why you guys keep coming up with
all of those long outdated “documentation” on how-to-not-do-it-on-current-era kernels.

I’m not trying to scold anyone; merely trying to understand how people keep
finding all of that no-longer-valid information and maybe weed out some of the chaff.

@jkridner, your thoughts?

@sjlongland, you’re right: config-pin and sysfs have long been deprecated in favor
of device-tree and libgpiod on current era kernels.

I’m not miffed at people for “doing it wrong”; I am miffed because people keep
getting led astray, and that’s not good for any of us…

In python3, try sudo apt install python3-libgpiod. Other bindings are available too. C/C++ and I think another…

I could check. Break time. Oh… Rust too.

I think the current 6.18.x kernels from beagleboard.org have a specific v2 of gpiod. I usually try to install them all if they are not already installed.

Also and this may find some insight to all who venture to the DOCS.

I used sysfs because it was “simple”, but I also tried with gpioset and got nowhere with that either. The problem in my case is lower-level.

As far as I know, direwolf uses libgpio so should be using the /dev/gpioportX character devices. It still wants a GPIO “number” though, so I need to figure out which one the pin I’m after is mapped to.

Yeah, my aim isn’t to ultimately write the code that will toggle the pins.

That code exists. I use sysfs as a quick test that should have worked.

I thought as much… I had a look, there is no /sys/devices/platform/ocp/ocp:P1_33_pinmux directory on this kernel (6.18.45-bone48)… but it sounds like I’m going to have to make another DeviceTree overlay to release those pins.

@sjlongland , hey there. The kernel 6.18.x should have the gpiod v2 type built in to the kernel for use.

So, when researching, look at C/C++ for gpiod v2 and I am sure that should shed some light on the v1 against v2 types of gpiod and using the source code.

Yes, the problem isn’t the GPIO interface, it’s the pin mux.

Okay, in lieu of being able to get the PRUs to yield control of those pins, I’ve just disabled them for now:

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2026 Stuart Longland <me@vk4msl.com>
 * Copyright (C) 2015 Robert Nelson <robertcnelson@gmail.com>
 */

/dts-v1/;
/plugin/;

#include <dt-bindings/pinctrl/am33xx.h>
#include <dt-bindings/gpio/gpio.h>

/*
 * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
 */
&{/chosen} {
	overlays {
		BB-NO-PRUS.kernel = __TIMESTAMP__;
	};
};

/* Disable PRUSS in the device tree */
&pruss_tm {
	status = "disabled";
};

&pru0 {
	status = "disabled";
};

&pru1 {
	status = "disabled";
};

That gets me control on GPIOs 568 and 591. Since we don’t actually need the PRUs, as an interim solution this will work.

I believe what you’re looking for is gpioinfo and gpiofind.

Most of the time, Robert adds the P numbers.