Hi, new to the forum. Going through various threads through the years on enabling SPI but I thought I would simply ask here what are the current instructions for current distros? Do I need to disable video and audio? I uncommented uEnv.txt those lines but that didn’t work. It looked like there are three distros to choose from (6.17x, 6.12x and 5.10-ti) and I chose 6.17x not knowing any better. Any thoughts and/or pointers is appreciated; thank you. Chris
There are two spidev overlays:
BB-SPIDEV0-00A0.dtbo
and
BB-SPIDEV1-00A0.dtbo
One conflicts with hdmi audio… So update /boot/uEnv.txt with:
enable_uboot_overlays=1
uboot_overlay_addr4=BB-SPIDEV0-00A0.dtbo
uboot_overlay_addr5=BB-SPIDEV1-00A0.dtbo
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
You can verify with sudo beagle-version
voodoo@PB2UBOOT:~$ sudo beagle-version
eeprom:[A335BNLT00D0BBB215050010]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Trixie Base Image 2025-09-05]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot SPL 2022.04-gb4b56c73 (Oct 28 2025 - 17:45:28 +0000)]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2022.04-gb4b56c73 (Oct 28 2025 - 17:45:28 +0000)]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot.dts]
UBOOT: Loaded Overlay:[BB-ADC-00A0.kernel]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0.kernel]
UBOOT: Loaded Overlay:[BB-SPIDEV0-00A0.kernel]
UBOOT: Loaded Overlay:[BB-SPIDEV1-00A0.kernel]
kernel:[6.18.0-rc5-bone6]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=BB-SPIDEV0-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr5=BB-SPIDEV1-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[enable_uboot_cape_universal=1]
Regards,
Worked like a charm; thank you ![]()
Hi,
So I can see my 2 SPI devices under /dev and was able to ask Google AI to produce code to interface an AS5147P using SP0 which actually worked. I did a little tweaking of the code and can run 2000 interations (arbitrary) and measure a magnet that is rotating underneath the device and can measure the rotational speed which on the low setting of the motor I have is around 700 rpm and the top speed is about 4,200 rpm. This motor was a simple fan purchased from Amazon that has a speed control. I made a 3d print of a plate that attaches to the fan enclosure and another part that attaches to this plate and is centered on the fan and is directly on a 3rd plate that is glued to the fan rotor. Good and cheap set-up to verify the AS5147P operation. But I have a couple of more questions if I may :
- I want to move this code to one of the PRUs but it appears this release is missing some packages to develop this code? So far I haven’t been able to get all the stuff needed onto my BBB to test the PRU.
- Of the three images that are on the BB download page, is there one that has all the stuff needed to do development of PRU code? I see (on 10/29/2025) v6.17, v6.12 amd v5.10-ti. What are the differences between them? Maybe one of them is the correct one to do development work and the others are for other purposes?
Thank you,
Chris
Here is the linux version I am using :
~$ uname -a
Linux BeagleBone 6.12.91-bone60 #1 PREEMPT Thu Jun 4 12:48:13 CEST 2026 armv7l GNU/Linux
With the updated uEnv.txt, I indeed see 4 spi devices :
$ ls /dev/spidev*
/dev/spidev0.0 /dev/spidev0.1 /dev/spidev1.0 /dev/spidev1.1
But beagle_version isn’t available :
~$ sudo beagle-version
sudo: beagle-version: command not found
Is it only available in 6.18 ?
you find it here:
sudo apt update
sudo apt-get install bb-beagle-version
Regards,
Since my bbb can’t see internet currently, I got repos-arm64/bb-beagle-version/suite/trixie/debian/beagle-version at main · beagleboard/repos-arm64 · GitHub and pushed it on target. Correct ?
Do you have a command which allows to check TDA1998 TX/RX on spi1 ? Like the following but with a valid answer :
alcea@BeagleBone:~$ sudo spidev_test -D /dev/spidev1.0 -s 1000000 -p "\x10\x00" -v
spi mode: 0x0
bits per word: 8
max speed: 1000000 Hz (1000 kHz)
TX | 10 00 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ |..|
RX | 00 00 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ |..|
We are using a board (derived from BeagleBone Black) on which we are using spi1 on the following pins :
E16 UART0_TXD/SPI1_CS1/DCAN0_RX/I2C2_SCL/ECAP1_IN_PWM1_OUT/PR1_PRU1_PRU_R30_15/PR1_PRU1_PRU_R31_15/GPIO1_11
E15 UART0_RXD/SPI1_CS0/DCAN0_TX/I2C2_SDA/ECAP2_IN_PWM2_OUT/PR1_PRU1_PRU_R30_14/PR1_PRU1_PRU_R31_14/GPIO1_10
E18 UART0_CTSN/UART4_RXD/DCAN1_TX/I2C1_SDA/SPI1_D0/TIMER7/PR1_EDC_SYNC0_OUT/GPIO1_8
E17 UART0_RTSN/UART4_TXD/DCAN1_RX/I2C1_SCL/SPI1_D1/SPI1_CS0/PR1_EDC_SYNC1_OUT/GPIO1_9
instead of
A13 MCASP0_ACLKX/EHRPWM0A//SPI1_SCLK/MMC0_SDCD/PR1_PRU0_PRU_R30_0/PR1_PRU0_PRU_R31_0/GPIO3_14
B13 MCASP0_FSX/EHRPWM0B//SPI1_D0/MMC1_SDCD/PR1_PRU0_PRU_R30_1/PR1_PRU0_PRU_R31_1/GPIO3_15
D12 MCASP0_AXR0/EHRPWM0_TRIPZONE_INPUT//SPI1_D1/MMC2_SDCD/PR1_PRU0_PRU_R30_2/PR1_PRU0_PRU_R31_2/GPIO3_16
C12 MCASP0_AHCLKR/EHRPWM0_SYNCI_O/MCASP0_AXR2/SPI1_CS0/ECAP2_IN_PWM2_OUT/PR1_PRU0_PRU_R30_3/PR1_PRU0_PRU_R31_3/GPIO3_17
C18 ECAP0_IN_PWM0_OUT/UART3_TXD/SPI1_CS1/PR1_ECAP0_ECAP_CAPIN_APWM_O/SPI1_SCLK/MMC0_SDWP/XDMA_EVENT_INTR2/GPIO0_7
for BBB
This is working fine with kernel 4.4 without using dtso
We would like to move to kernel 6.12.
Here is the kernel dtso we are using :
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2013 CircuitCo
* Virtual cape for SPI1 on connector pins P9.29 P9.31 P9.30 P9.28
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
#include <dt-bindings/interrupt-controller/irq.h>
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
BB-SPIDEV1-00A0_BOARD_REV11.kernel = __TIMESTAMP__;
};
};
/*
* Free up the pins used by the cape from the pinmux helpers.
*/
&ocp {
P9_28_pinmux { status = "disabled"; }; /* P9_28 (C12) mcasp0_ahclkr.spi1_cs0 */
P9_30_pinmux { status = "disabled"; }; /* P9_30 (D12) mcasp0_axr0.spi1_d1 */
P9_29_pinmux { status = "disabled"; }; /* P9_29 (B13) mcasp0_fsx.spi1_d0 */
P9_42_pinmux { status = "disabled"; }; /* P9_42 (C18) mcasp0_aclkx.spi1_sclk */
};
&am33xx_pinmux {
bb_spi1_pins: pinmux_bb_spi1_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_ECAP0_IN_PWM0_OUT, PIN_OUTPUT, MUX_MODE4) /* P9_42 (C18) mcasp0_aclkx.spi1_sclk */
AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT, MUX_MODE4) /* P9_29 (E18) spi1_d0 il faut disabled PRU-ICSS */
AM33XX_PADCONF(AM335X_PIN_UART0_RTSN, PIN_INPUT, MUX_MODE4) /* P9_30 (E17) spi1_d1 l faut disabled PRU-ICSS */
AM33XX_PADCONF(AM335X_PIN_UART0_RXD, PIN_OUTPUT, MUX_MODE1) /* P9_28 (E15) spi1_cs0 */
// BEAGLE AM33XX_PADCONF(AM335X_PIN_MCASP0_FSX, PIN_OUTPUT, MUX_MODE3) /* P9_29 (B13) mcap0_fsx.spi1_d0 */
// BEAGLE AM33XX_PADCONF(AM335X_PIN_MCASP0_AXR0, PIN_INPUT, MUX_MODE3) /* P9_30 (D12) mcasp0_axr0.spi1_d1 */
// BEAGLE AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKR, PIN_OUTPUT, MUX_MODE3) /* P9_28 (C12) spi1_cs0 */
AM33XX_PADCONF(AM335X_PIN_UART0_TXD, PIN_OUTPUT, MUX_MODE1) /* P9_31 (E16) mcasp0_ahclkr.spi1_cs1 */
>;
};
};
&spi1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bb_spi1_pins>;
/*
* Select the D0 pin as output and D1 as
* input. The default is D0 as input and
* D1 as output.
*/
ti,pindir-d0-out-d1-in;
channel@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "rohm,dh2228fv";
symlink = "bone/spi/1.0";
reg = <0>;
spi-max-frequency = <16000000>;
spi-cpha;
};
channel@1 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "rohm,dh2228fv";
symlink = "bone/spi/1.1";
reg = <1>;
spi-max-frequency = <16000000>;
};
};
Here is the pinmux conflict log we see :
[ 4.911428] pinctrl-single 44e10800.pinmux: pin PIN90 already requested by 4a101000.mdio; cannot claim for 481a0000.spi
[ 4.922381] sdhci-omap 48060000.mmc: Got CD GPIO
[ 4.927358] sdhci-omap 48060000.mmc: supply pbias not found, using dummy regulator
[ 4.935030] pinctrl-single 44e10800.pinmux: error -EINVAL: pin-90 (481a0000.spi)
[ 4.942494] pinctrl-single 44e10800.pinmux: error -EINVAL: could not request pin 90 (PIN90) from group pinmux_bb_spi1_pins on device pinctrl-single
This conflict disappears only if we remove line UART0_CTSN in dtso.
Do you know if the way we want to use the spi1 is possible on a config close to bbb+kernel 6.12 ? If yes, how ?
Look at the mdio section, your sharing a pin that newer designs use as reset, so double check your schematic. And disable the mdio test pin.
Side note, am335x has spi hardware bug, set sclk as input… Really all 4 pins as input to work around the bug BeagleBoard-DeviceTrees/src/arm/overlays/BB-SPIDEV0-00A0.dtso at 7fde129939cb543a1f8efc8bbdb3e68c8d1fb6ec · beagleboard/BeagleBoard-DeviceTrees · GitHub