Overlays:Beaglebone AI-64 [I2C]

I’m trying use the I2C bus on the BB AI-64.

I installed the overlays for I2C

debian@BeagleBone:/opt/source/dtb-5.10-ti-arm64$ git pull
debian@BeagleBone:/opt/source/dtb-5.10-ti-arm64$ make
debian@BeagleBone:/opt/source/dtb-5.10-ti-arm64$ sudo make install

added the overlays to to extlinux.conf

debian@BeagleBone:/boot/firmware/extlinux$ cat extlinux.conf 
label Linux microSD
    kernel /Image
    append console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait net.ifnames=0
    fdtdir /
    fdtoverlays /overlays/BONE-I2C1.dtbo /overlays/BONE-I2C2.dtbo
    initrd /initrd.img

after reboot I can see that the overlays were loaded

debian@BeagleBone:~$ sudo beagle-version | grep UBOOT
UBOOT: Booted Device-Tree:[k3-j721e-beagleboneai64.dts]
UBOOT: Loaded Overlay:[BONE-I2C1.kernel]
UBOOT: Loaded Overlay:[BONE-I2C2.kernel]

the bone I2C 1 and 2 are present in the /dev

debian@BeagleBone:~$ ls /dev/bone/i2c/
1  2

When I try access the I2C device on the /dev/bone/i2c/1 or /dev/bone/i2c/2 from C code (I’m using the same code and conections as at the Visual Basic | MODBUS.PL which works without problems on BB Black) I’m not able to read/write the I2C device. The timeout error is triggered.

The bone I2Cs are not detected by the i2cdetect.

debian@BeagleBone:/dev/bone$ i2cdetect -l
i2c-3	i2c       	OMAP I2C adapter                	I2C adapter
i2c-1	i2c       	OMAP I2C adapter                	I2C adapter
i2c-6	i2c       	OMAP I2C adapter                	I2C adapter
i2c-4	i2c       	OMAP I2C adapter                	I2C adapter
i2c-2	i2c       	OMAP I2C adapter                	I2C adapter
i2c-0	i2c       	OMAP I2C adapter                	I2C adapter
i2c-5	i2c       	OMAP I2C adapter                	I2C adapter

Any ideas?

One more question. What is connected to I2C-2?

debian@BeagleBone:~$ i2cdetect -r 2
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n] 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- 48 49 4a 4b 4c 4d 4e 4f 
50: UU UU 52 53 54 55 56 57 -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

It’s just a symlink, retry with:

ls -alh /dev/bone/i2c/

It’ll point to the correct bus i2c-X…

Regards,

Many thanks,
It works!