Activate BBAI I2C pins

Hi, I’m trying to configure the other I2C pins of the BBAI, but I tried all the codes on the internet and it didn’t work. Can someone explain to me how I can activate the other I2C devices, please?

What image are you running?

uname -r?

Regards,

debian@beaglebone:~$ uname -r
4.19.94-ti-r73

I need to activate the I2C device for 17 and 18 pins

This should work, In /boot/uEnv.txt, add:

uboot_overlay_addr4=BONE-I2C1.dtbo

if it doesn’t, please install:

sudo apt update ; sudo apt install bb-beagle-version

and then run:

sudo beagle-version

So we can debug it…

Regards,

I tried the first one adding this to the code and it did not work,
uboot_overlay_addr4=BONE-I2C1.dtbo
uboot_overlay_addr5=BONE-I2C2.dtbo

and then i did the second part but when i scan the i2c devices and could not see the new device, i see the same thing,

debian@beaglebone:~$ i2cdetect -r 1
Error: Could not open file /dev/i2c-1' or /dev/i2c/1’: No such file or directory
debian@beaglebone:~$ i2cdetect -r 2
Error: Could not open file /dev/i2c-2' or /dev/i2c/2’: No such file or directory
debian@beaglebone:~$ i2cdetect -r 3
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-3 using receive byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – 69 – – – – – –
70: – – – – – – – –

Please install:

sudo apt update ; sudo apt install bb-beagle-version

and then run:

sudo beagle-version

Regards,

I did that but I can olny see the I2C-3

debian@beaglebone:~$ i2cdetect -r 3
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-3 using receive byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – 69 – – – – – –
70: – – – – – – – –
debian@beaglebone:~$ i2cdetect -r 2
Error: Could not open file /dev/i2c-2' or /dev/i2c/2’: No such file or directory
debian@beaglebone:~$ i2cdetect -r 1
Error: Could not open file /dev/i2c-1' or /dev/i2c/1’: No such file or directory
debian@beaglebone:~$

do you thing that I am doing something wrong?

Best,

Please share the output of:

sudo beagle-version

Otherwise i can’t help you…

Here is the output:

debian@beaglebone:/var/lib/cloud9$ sudo beagle-version
[sudo] password for debian:
model:[BeagleBoard.org_BeagleBone_AI]
dogtag:[BeagleBoard.org Debian Buster IoT TIDL Image 2020-04-06]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2019.07-rc4-00001-g607b5b738b (Jul 06 2019 - 21:01:15 -0500)]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am5729-beagleboneai.dts]
UBOOT: Loaded Overlay:[BONE-CAN0]
UBOOT: Loaded Overlay:[BONE-CAN1]
kernel:[4.19.94-ti-r73]
nodejs:[v10.24.0]
/boot/uEnv.txt Settings:
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20210821.0-0~buster+20210821]
pkg:[bb-customizations]:[1.20221108.0-0~buster+20221108]
pkg:[bb-usb-gadgets]:[1.20220816.0-0~buster+20220816]
pkg:[bb-wl18xx-firmware]:[1.20221201.0-0~buster+20221201]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~buster+20200716]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal bluetooth netdev i2c gpio pwm eqep remoteproc admin spi iio docker tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyS0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet]
dmesg | grep remote
[   13.455884] remoteproc remoteproc0: 58820000.ipu is available
[   13.496510] remoteproc remoteproc1: 55020000.ipu is available
[   13.497595] remoteproc remoteproc2: 40800000.dsp is available
[   13.499053] remoteproc remoteproc3: 41000000.dsp is available
[   13.704811] remoteproc remoteproc0: powering up 58820000.ipu
[   13.704859] remoteproc remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 7051536
[   13.714786] Modules linked in: omap_remoteproc virtio_rpmsg_bus remoteproc cmemk(O) virtio virtio_ring uio_pdrv_genirq uio gpio_pisosr
[   13.723671] Modules linked in: omap_remoteproc virtio_rpmsg_bus remoteproc cmemk(O) virtio virtio_ring uio_pdrv_genirq uio gpio_pisosr
[   14.181752] [<c0851e1c>] (iommu_attach_device) from [<bf055808>] (rproc_boot+0x380/0x6ec [remoteproc])
[   14.191221] [<bf055808>] (rproc_boot [remoteproc]) from [<bf055b94>] (rproc_auto_boot_callback+0x20/0x2c [remoteproc])
[   14.202039] [<bf055b94>] (rproc_auto_boot_callback [remoteproc]) from [<c08f4c3c>] (request_firmware_work_func+0x60/0x9c)
[   14.457354] remoteproc remoteproc1: powering up 55020000.ipu
[   14.483524] remoteproc remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3751356
[   15.293062] remoteproc remoteproc2: powering up 40800000.dsp
[   15.322912] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 21014532
[   15.344918] remoteproc remoteproc3: powering up 41000000.dsp
[   15.387804] remoteproc remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 21014532
[   16.107356] remoteproc remoteproc2: registered virtio0 (type 7)
[   16.123827] remoteproc remoteproc2: remote processor 40800000.dsp is now up
[   16.143940] remoteproc remoteproc3: registered virtio1 (type 7)
[   16.173206] remoteproc remoteproc3: remote processor 41000000.dsp is now up
[   16.300021] remoteproc remoteproc1: registered virtio2 (type 7)
[   16.319804] remoteproc remoteproc1: remote processor 55020000.ipu is now up
[   40.019439] remoteproc remoteproc4: 4b234000.pru is available
[   40.090936] remoteproc remoteproc5: 4b238000.pru is available
[   40.151900] remoteproc remoteproc6: 4b2b4000.pru is available
[   40.198205] remoteproc remoteproc7: 4b2b8000.pru is available
dmesg | grep pru
[   33.340306] pruss_uio_shmem 4b200000.pruss_shmem: Allocating gdev
[   33.418940] pruss_uio_shmem 4b200000.pruss_shmem: Allocating info
[   33.487801] pruss_uio_shmem 4b200000.pruss_shmem: Requesting resource
[   33.613929] pruss_uio_shmem 4b200000.pruss_shmem: Mapping resource
[   33.818971] pruss_uio_shmem 4b200000.pruss_shmem: Registering with uio driver
[   34.019988] pruss_uio_shmem 4b200000.pruss_shmem: Saving platform data
[   34.124343] pruss_uio_shmem 4b280000.pruss_shmem: Allocating gdev
[   34.168312] pruss_uio_shmem 4b280000.pruss_shmem: Allocating info
[   34.244109] pruss_uio_shmem 4b280000.pruss_shmem: Requesting resource
[   34.405939] pruss_uio_shmem 4b280000.pruss_shmem: Mapping resource
[   34.460658] pruss_uio_shmem 4b280000.pruss_shmem: Registering with uio driver
[   34.473839] pruss_uio_shmem 4b280000.pruss_shmem: Saving platform data
[   40.019439] remoteproc remoteproc4: 4b234000.pru is available
[   40.065724] pru-rproc 4b234000.pru: PRU rproc node pru@4b234000 probed successfully
[   40.090936] remoteproc remoteproc5: 4b238000.pru is available
[   40.098441] pru-rproc 4b238000.pru: PRU rproc node pru@4b238000 probed successfully
[   40.151900] remoteproc remoteproc6: 4b2b4000.pru is available
[   40.161948] pru-rproc 4b2b4000.pru: PRU rproc node pru@4b2b4000 probed successfully
[   40.198205] remoteproc remoteproc7: 4b2b8000.pru is available
[   40.209939] pru-rproc 4b2b8000.pru: PRU rproc node pru@4b2b8000 probed successfully
dmesg | grep pinctrl-single
[    1.024921] pinctrl-single 4a003400.pinmux: 282 pins, size 1128
dmesg | grep gpio-of-helper
[    1.036942] gpio-of-helper 44000000.ocp:cape-universal: ready
dmesg | grep wlcore
lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END`Texto preformateado`

You’ve already enabled BONE-CAN0/BONE-CAN1 in /boot/uEnv.txt, you need to also enable

BONE-I2C1.dtbo and BONE-I2C2.dtbo

Post your /boot/uEnv.txt

Regards,

and How can I enable these two?

Best,

And this is what I have in the uEnv.txt file:

#Docs: Beagleboard:U-boot partitioning layout 2.0 - eLinux.org

uname_r=4.19.94-ti-r73
#uuid=
#dtb=
cmdline=coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

##enable Generic eMMC Flasher:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3-no-eeprom.sh

enable_uboot_overlays=1
uboot_overlay_addr4=/lib/firmware/BONE-CAN0.dtbo
uboot_overlay_addr5=/lib/firmware/BONE-CAN1.dtbo

uboot_overlay_addr4=BONE-I2C1.dtbo
uboot_overlay_addr5=BONE-I2C2.dtbo

#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

You’ve defined the uboot_overlay_addr4 and uboot_overlay_addr5 variables twice…

I’d do:

uboot_overlay_addr4=BONE-CAN0.dtbo
uboot_overlay_addr5=BONE-CAN1.dtbo
uboot_overlay_addr6=BONE-I2C1.dtbo
uboot_overlay_addr7=BONE-I2C2.dtbo

make sure u-boot is up-to date…

sudo apt update ; sudo apt install bb-u-boot-am57xx-evm
sudo /opt/u-boot/bb-u-boot-am57xx-evm/install-mmcblk1.sh

Regards,

Thank you for your help, it works.

Best,