Bela compatibility

Hi everyone i am trying to hookup the midipi to a bela mini multichannel. I am confused about pins. 3.3 v, ground, SDA, SCL, i am ok with that.

RESET and Additionally, one of the following pins is used, as selected by the sel rotary switch, for the Data Ready line: on the rpi : do they have a compatible pins in the belamini?
Here is a link to the bela mini multichannel pin diagram
https://learn.bela.io/pin-diagram/
Software should be ok , being bela os aDebian based.
Thanks in advance for your help.

Here’s some general information, applicable to any alternative SBC solution:

You’ll need to get the kernel module built and installed. The main source code location for it is in Raspberry Pi’s Linux kernel repository:

pimidi.c should require no changes at all. The Device Tree overlay lists the GPIO pins and I²C bus used, this might require host board specific adjustments to select different values, if they are not 1:1 compatible (usually Raspberry Pi clones try to be 1:1 compatible, but might still be off by not having some required pin alternative function at the same location)

If all the pins as listed in Detailed Specs - Pimidi Documentation are connected (SDA, SCL, Reset, Data Ready, 5V, 3V3, GND) are connected to functionally compatible pins on Bela, Pimidi should be able to work.

Use pinout.xyz for referencing Raspberry Pi pinout to figure out where essential pins of Pimidi are located at.

Hi Giedrius, i am following this project
ezsound-6x8 Pi5 multichannel soundcard | Hackaday.io.
I asked the guy if i can stack the pimidi hat on top of his card, and he answered that is using the pin 23 on the rpi. He told that would be possible to modify your overlay to use a different pin. Do you think that is a viable solution? I have no idea how to do that. I read in your detailed specs of the pimidi that pins could be shared. The ezsound card is not in my possession yet, but you think it is safe just to plug the two hats on top of each other and give it a try, or doing it will damage the hardware? Rpi 5+ pimidi+ ezsound is expensive stuff. Thanks in advance for your consideration, cheers.

See Changing the Address & Data Pin - simply use any other sel option than the default 0 one. You have to rotate the rotary switch on Pimidi using some flat tool like a screw driver, and adjust your dtoverlay line to indicate which sel position you used.

Hi , sorry i mistyped the number!!! It is using the GPIO22 on rpi.
Quote from the email
“unfortunately, from what I can see at
Detailed Specs - Pimidi Documentation , it uses the GPIO22 pin, which
conflicts with my soundcard (since that’s one of the I2S pins).
It should be possible to modify their DT overlay so that the pimidi uses
a different pin. It would mean you cannot stack the pimidi directly on
top of the Pi - you’d need to connect it with jumpers or a breakout
board instead.”
Sorry again, cheers.

Are you planning to use Bela or Pi 5?

If you hook up Pimidi using wires yourself, you could wire it up alternatively, in that case, you would have to customize the overlay accordingly. The Pimidi’s DT overlay was linked in my first reply here.

To build it, you should follow the Raspberry Pi’s kernel building guide: https://www.raspberrypi.com/documentation/computers/linux_kernel.html

You can make a full build (easiest to get it right, takes a little while), but in your case in particular, as you’re only interested in the .dtb file, follow all of the defconfig steps leading up to the Build, and run these commands:

make -j6 dtbs

sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/firmware/
sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/firmware/overlays/
sudo cp arch/arm64/boot/dts/overlays/README /boot/firmware/overlays/

This will only build and install the DT overlays from the kernel source tree.

You have to modify your local copy of the .dts file under arch/arm/boot/dts/overlays/pimidi-overlay.dts before building. Rerunning the above commands will build only the modified files and install the overlays again.

Thanks a lot!!! That will be a rpi5. Now just waiting the ezsound.

1 Like

Keep in mind that you have to pick any free GPIO on Raspberry Pi header, but hook up with the original location on Pimidi.