Failed to load '/BONE-PWM0.dtbo' overlay

I have installed Bookworm “bbai64-debian-12.6-xfce-arm64-2024-07-04-12gb.img.xz”. I have modified the “/boot/firmware/extlinux/extlinux.conf” file as follows:

label Linux microSD
kernel /Image
append root=/dev/mmcblk1p3 ro rootfstype=ext4 resume=/dev/mmcblk1p2 rootwait net.ifnames=0 quiet
fdtdir /
fdtoverlays /BONE-PWM0.dtbo
initrd /initrd.img

I get the following error during boot:

ound /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
207 bytes read in 9 ms (22.5 KiB/s)
1:Linux microSD
Retrieving file: /initrd.img
23179367 bytes read in 994 ms (22.2 MiB/s)
Retrieving file: /Image
33391104 bytes read in 1426 ms (22.3 MiB/s)
append: root=/dev/mmcblk1p3 ro rootfstype=ext4 resume=/dev/mmcblk1p2 rootwait net.ifnames=0 quiet
Retrieving file: /k3-j721e-beagleboneai64.dtb
103670 bytes read in 14 ms (7.1 MiB/s)
Retrieving file: /BONE-PWM0.dtbo
Failed to load ‘/BONE-PWM0.dtbo’
Failed loading overlay /BONE-PWM0.dtbo

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Ramdisk to 8e9e4000, end 8ffff067 … OK
Loading Device Tree to 000000008e9c7000, end 000000008e9e34f5 … OK

Starting kernel …

/overlays/BONE-PWM0.dtbo

Thanks stupid oversight.

ah-ha!

What I am having trouble with and which resulted in the incorrect overlay path is this:
Enter choice: 3:microSD (default)
Retrieving file: /Image
append: root=/dev/mmcblk1p3 ro rootfstype=ext4 resume=/dev/mmcblk1p2 rootwait net.ifnames=0 quiet
Retrieving file: /ti/k3-j721e-beagleboneai64.dtb
Retrieving file: /overlays/BONE-PWM0.dtbo
Failed loading overlay /overlays/BONE-PWM0.dtbo

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
Loading Device Tree to 000000008ffe3000, end 000000008ffff3ed … OK
Working FDT set to 8ffe3000

Starting kernel …

The PWM overlays for the bbai64 are:

BeagleBoard-DeviceTrees$ ls src/arm64/overlays/| grep beagleboneai64 | grep pwm
k3-j721e-beagleboneai64-pwm-epwm0-p8_13.dts
k3-j721e-beagleboneai64-pwm-epwm0-p8_13-p8_19.dts
k3-j721e-beagleboneai64-pwm-epwm0-p8_19.dts
k3-j721e-beagleboneai64-pwm-epwm2-p9_14.dts
k3-j721e-beagleboneai64-pwm-epwm2-p9_14-p9_16.dts
k3-j721e-beagleboneai64-pwm-epwm2-p9_16.dts

Then you can enable the pwm symlinks with:

sudo beagle-pwm-export --pin p8_13
tree /dev/beagle/pwm/

Regards,

I don’t have the same folder that you have. My src folder is: /opt/source/dtb-5.10-ti/src/overlays. Where should I look? I have installed this version: bbai64-debian-12.6-xfce-arm64-2024-07-04-12gb.

should have been 6.1.x

umame -r

Regards,

The image I have installed has dtb-6.1-Beagle, dtb-6.6-Beagle, and dtb-6.9. I don’t find any of the above files that you referenced. Should they be copied from my cloned repository to the:
/opt/sources/dtb-6.9/src/arm64/overlays folder, and remake?

sudo apt update
sudo apt-get dist-upgrade

They’ll be pre-installed under /boot/firmware/overlays/*.dtbo

you’ll also find them under:

cd /opt/source/dtb-6.1-Beagle/
git pull

Regards,

Almost there:
$ sudo beagle-version
UBOOT: Booted Device-Tree:[k3-j721e-beagleboneai64.dts]
UBOOT: Loaded Overlay:[k3-j721e-beagleboneai64-pwm-epwm0-p8_13.kernel]
kernel:[6.1.83-ti-arm64-r63]

Overlay loaded next question is this known as /dev/bone/pwm/1 or do I have to export within /sys/class/pwm/pwmchip0?

Just run:

sudo beagle-pwm-export --pin p8_13

And you’ll find an exported symlink under tree /dev/beagle/pwm/

Regards,

1 Like

Great like this better then the /sys/class/pwm route. Thanks for getting me back on track after the switch to Bookworm.

1 Like

With the respect to the overlay …BBORG_MOTOR.dtbo

I am not getting output on P8_19. Using $ sudo beagle-pwm-export --pin p8_19. The files “period=100000”, "duty_cycle=50000, and “enable=1” are set properly. p8_13 is set to indentical values and functioning properly. The symptoms on the scope act like the pin/pad are not connected.

No i’ve seen that too with the 6.1/6.6, on the dual port pwm, one pwm doesn’t work till you enable the other and so forth… got stuck on a different bug so i haven’t looked at it closer…

Regards,

2 Likes

I have enabled both with the same settings, still no output, just floating pin.
At least I haven’t done something stupid. I think I will check the other pins P9-21, P9-22, P9-14 and P9-16.

PS: P9-14, P9-16 operate as expected. As for P9-21, & P9-22 chip pwmchip1 is not available as an overlay. Possible assignment to SPI6.