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.
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=1dtb_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 0840P8_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:
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?
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.
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
};