[BBB] Custom PinMux (PRU/GPIO) and I2C-1 completely failing on Debian 12 Bookworm Base (Kernel 6.18)

Hi everyone,

I am currently migrating my project to the latest Debian 12 Bookworm Base image on a BeagleBone Black. However, I’m facing severe issues with PinMuxing via Device Tree Overlays. Since the traditional config-pin utility is missing in this base image, I have been trying to set pins statically at boot, but the overlays seem to be ignored.

Environment:

  • Board: BeagleBone Black Rev D

  • OS: BeagleBoard.org Debian Bookworm Base Image 2026-03-17

  • Kernel: 6.18.21-bone26

Issue 1: Custom PinMux for PRU and GPIO is ignored I need to route P8_16 to PRU Input (Mode 6) for an anemometer, and P8_46 to GPIO Output (Mode 7). I wrote a custom DTS using the Kernel 6.x 3-cell pinctrl format (offset, config, mode) and compiled it to /boot/dtbs/6.18.21-bone26/BB-CUSTOM-PINS.dtbo.

I added it to /boot/uEnv.txt using: enable_uboot_overlays=1 dtb_overlay=BB-CUSTOM-PINS.dtbo

However, when I check the pinctrl debugfs after reboot: cat /sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pins | grep 0840 P8_16 remains stuck at 00000027 (Mode 7, default) instead of the expected 00000026. The custom pin mapping completely fails to apply.

Issue 2: I2C-1 is not working Similarly, standard overlays like I2C-1 are failing. Having uboot_overlay_addr4=BB-I2C1-FAST-00A0.dtbo in uEnv.txt does not initialize the I2C-1 bus properly. Interestingly, the BB-MAX14830-00A0.dtbo via SPI1 seems to be the only one loading and functioning correctly.

My Questions:

  1. What is the officially recommended way to statically configure custom PinMux (specifically PRU and pure GPIO) at boot on the Bookworm Base 6.18 image, given the absence of cape-universal and config-pin?

  2. Are there any known issues or specific requirements in uEnv.txt overlay parsing for Kernel 6.18 that would cause dtb_overlay or standard I2C-1 overlays to be silently ignored?

Any guidance, workarounds, or reference DTS examples for this specific kernel version would be highly appreciated.

Thank you!

So BB-I2C1-FAST-00A0.dtbo only increases the i2c frequency, it should have been enabled..

Please share the output of sudo beagle-version

Regards,

i haven’t figured out how to do this in a .dtbo on more recent Debian images either. But I noticed the two I2C1 pins clash with SPI0.

I haven’t seen a good answer to this pin mux’ing problem on the latest kernels. I solved my issue here https://forum.beagleboard.org/t/compiling-custom-linux-kernel-for-beaglebone-black-industrial-6-18-16-bone23. All I was trying to do was pull up a few pins. Your problem seems much more complex. I will be following this thread for solutions.

I got I2C1 working on P9_17 & 18, on a Debian Trixie 6.18.x image from February! I have only tested this:
i) with enable_uboot_overlays=1, video, audio and emmc disabled, uboot_overlay_pru=AM335X-PRU-UIO-00A0.dtbo, Cape Universal deactivated #enable_uboot_cape_universal=1, and no other overlays loaded, in /boot/uEnv.txt (the normal console=ttyS0,115200n8 and cmdline=fsck.repair=yes ... lines were unchanged),
ii) together with a bunch of stuff for other purposes that I’ve deleted (but this extract should hopefully contain everything needed):

BB-I2C1.dtso

/dts-v1/;
/plugin/;


#include <gpio.h>
#include <am33xx.h>


/*
 * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
 * Use a semver instead of a  __TIMESTAMP__ to make the binary reproducible.
 */

&{/chosen} {
   overlays {
        BB-I2C1.dtso.kernel = "v0.0.0";
    };
};

&ocp {
    P9_17_pinmux { status = "disabled"; };
    P9_18_pinmux { status = "disabled"; };
};


&am33xx_pinmux {

    i2c1_pins: pinmux_P9_I2C1_pins {
        pinctrl-single,pins = <
            AM33XX_PADCONF(AM335X_PIN_SPI0_CS0, PIN_INPUT_PULLUP, MUX_MODE2)     // P9_17:  SCL1 I2C1
            AM33XX_PADCONF(AM335X_PIN_SPI0_D1, PIN_INPUT_PULLUP, MUX_MODE2)      // P9_18:  SDA1 I2C1
        >;
    };

&i2c1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&i2c1_pins>;

    clock-frequency = <100000>;
};

&{/} {
  // nothing needed for I2C1
};

Build with headers e.g. using: BeagleBoard-DeviceTrees/Makefile at v6.18.x · beagleboard/BeagleBoard-DeviceTrees · GitHub

Thanks for looking into this… merged in… Commits · beagleboard/BeagleBoard-DeviceTrees · GitHub

1 Like