I received my pocketbeagle2 today, flashed the PocketBeagle 2 Debian 12.10 2025-03-18 Minimal.
The board is working fine, I just don’t know how to enable the SPI devices - I tried to load the spidev module, loading the module I’m not seen any spi devices.
How can I enable the spi bus ?
And then there is the whole thing of figuring out SoC pads that share the same board header pins. For example with the AI64 you got P9_22a and P9_22b. It’s best you figure out these conflicts and disable the SoC pads that conflict/share board header pins with what you want. Most of the time you cant probably just skip this step, and live with what TI SYSCONFIG gives you. TI SYSCONFIG assumes you don’t have SoC pads sharing header pins…which is not always the case.
There are not many overlays at all for the PB2. Here’s one I made for spidev on McSPI2, which I made by hand based on older ones. For some reason it shows up as /dev/spidev0.0 instead of /dev/spidev2.0 , but it works well for me.
This uses <&P1_06_E19_spi>, <&P1_08_spi>, <&P1_10_B19_spi>, <&P1_12_A19_spi>
To use it, cd to the folder /opt/source/dtb-* matching your kernel version, then place this in src/arm64/overlays and do sudo ./build_n_install.sh. Then edit extlinux.conf to load this.
Is this supposed to have any effects on /dev/spidev numbering? As a user, I would prefer that numbering to match main_spiX numbering, or to be able to set or at least see those mappings explicitly, rather than adding an additional layer of abstraction ‘this should be spidev0 because it used to be like this in some old board which you may have never seen before’.
This can get very confusing. When I refer to spi0, am I referring to MCSPI0 or MCSPI2? I argue it’s best to force people to change their code when switching between boards.
based on your dtso and @giuliomoro I create a file with the spi0.
I could create the spi0.0 but not the spi0.1
this is what I wrote
&main_spi0 {
pinctrl-names = “default”;
pinctrl-0 = <&P2_25_A14_spi>,<&P2_27_B13_spi>,<&P2_29_B14_spi>,<&P2_31_A13_spi>,<&P2_36_C13_spi>;
status = “okay”; #address-cells = <1>; #size-cells = <0>;
num-chipselects = <2>;
But I’m having this on the syslog:
dmesg |grep spi
[ 1.469883] SPI driver tps6594 has no spi_device_id for ti,tps6594-q1
[ 1.469902] SPI driver tps6594 has no spi_device_id for ti,tps6593-q1
[ 1.469906] SPI driver tps6594 has no spi_device_id for ti,lp8764-q1
[ 1.469910] SPI driver tps6594 has no spi_device_id for ti,tps65224-q1
[ 1.779295] omap2_mcspi 20100000.spi: cs1 >= max 1
[ 1.779316] spi_master spi0: spi_device register error /bus@f0000/spi@20100000/channel@1
[ 1.779345] spi_master spi0: Failed to create SPI device for /bus@f0000/spi@20100000/channel@1
What I’m doing wrong? My idea is to use the spi0 with 2 CS to connect 2 sensors.
hi guys,
I’m facing another problem.
I’m using a ICM20948 and BMP280 - imu and baro.
With pocketbeagle2 the reading is not happening, and the same sensors in bbb is working fine.
There is a difference between the dts, in bbb I’m using in the dts for spi compatible = “spidev”; meanwhile in the pocketbeagle2 I’m using compatible = “rohm,dh2228fv”;
This can cause this difference ? any clue of what can be happening?
You’re probably also using a much older kernel. If you look at spidev.c with Blame On, you can see when they decided on the change. The new kernel wants to move away from the generic spidev in device-tree.