kernel icon indicating copy to clipboard operation
kernel copied to clipboard

videocore: failed to open the mailbox to the GPU: open /dev/vcio: no such file or directory

Open mpictor opened this issue 3 years ago • 3 comments

I'm able to toggle GPIOs on and off, but when I try PWM I get this error:

bcm283x-gpio (GPIO20): videocore: failed to open the mailbox to the GPU: open /dev/vcio: no such file or directory

some googling led me to https://github.com/raspberrypi/linux/issues/4620, so applying the linked patches may fix it. These look to be the latest from pelwell: vcio driver https://github.com/raspberrypi/linux/commit/ac4fd05f963167f9c839a7239ad16002528c4085 dts https://github.com/raspberrypi/linux/commit/aa901b436bc944de18b90226180c8756fba461bb

On rpi3b+

mpictor avatar May 08 '22 04:05 mpictor

AFAICT, the vcio driver is not upstreamed to Linux, and only available in the Raspberry Pi Foundation’s linux kernel fork.

gokrazy uses the upstream Linux kernel, and I’m not sure if there is a way to use PWM with it. Are you using periph.io, or which library are you using to use GPIOs?

If you want to use the Raspberry Pi foundation kernel instead of gokrazy’s kernel, there is a community-supported repository for it: https://gokrazy.org/platforms/#community-supported-raspberry-pi-os-32-bit-kernelfirmware

stapelberg avatar May 08 '22 09:05 stapelberg

I am using periph.io - specifically, bcm283x.Pin.PWM() from periph.io/x/host/v3 v3.7.2

I'd tried a while back to add a patch for vcio, but couldn't get its device to show up. It hadn't occurred to me that the device tree would also need updating, as device trees aren't something I've done much with.

I'll try to find and update that patch, and figure out what files are needed for dt. I hope I can just copy over the bcm*-rpi* dts files without breaking anything...

mpictor avatar May 08 '22 22:05 mpictor

@mpictor Were you ever able to get PWM working with the standard gokrazy kernel?

willgorman avatar Dec 24 '23 17:12 willgorman