Vim4 i2c A and i2c F not working

I am in the process of moving applications from a raspberry pi 4 to the vim4. On the raspberry pi I have a working i2c servo controller but when installed on the vim4 either i2c A (Pins 25 and 26) or i2c F (pins 22 and 23) the servo controller is not found. I have installed the following operating systems using oowow:




According to the vim4 documentation i2c A is setup for 0 (i2cdetect -r -y 0) and i2c F is setup for 5 (i2cdetect -r -y 5).

When doing a ls /dev/i2c* on all three operating systems the following is returned:

/dev/i2c-1, /dev/i2c-2, /dev/ic2-3 and /dev/i2c-6.

Also the command sudo i2cdetect -l returns the following:

i2c-1 i2c meson i2c adapter i2cadapter

i2c-2 i2c meson i2c adapter i2c adapter

i2c-3 i2c meson i2c adapter i2c adapter

i2c-6 i2c meson i2c adapter i2c adapter

So I tired all of the i2c devices listed in the i2cdetect -l command

i2cdetect -r -y 1, i2cdetect -r -y 2, i2cdetect -r -y 3 and i2cdetect -r -y 6

none of the i2cdetects found the servo controller.

I also tried i2cdetect -r -y 0 and i2cdetect -r -y 5 and both returned the following error:

error: could not open file /dev/i2c-0 for the i2cdetect -r -y 0 command and error: could not open file /dev/i2c-5 for the i2cdetect -r -y 5 command.

So the question is: How do I get either i2c A or i2c F working on the VIM4, keep in mind that the servo controller works on the raspberry pi 4.

Hello @pmaiorana85

The I2C function is disabled by default, you can use latest image vim4-ubuntu-22.04-server-linux-5.4-fenix-1.1-220721.img.xz and follow the steps below to enable I2C-A and I2C-F.

Edit file /boot/dtb/amlogic/kvim4.dtb.overlay.env add i2cm_a and i2cm_f to node fdt_overlays=, save and reboot.

You will find the I2C node below:

I2CM F (PIN22 & PIN23) - /dev/i2c-5
I2CM A (PIN25 & PIN26) - /dev/i2c-0

Thanks Khadas support team, this did correct the issue.

I changed the kvim4,dtb,overlay.env file to this:
fdt_overlays=i2cm_a i2cm_f
saved the file and rebooted the system.
I did an ls -la on /dev/i2c* and now have /dev/i2c-0 and /dev/i2c-5.
I was then able to run the i2cdetect -r -y 0 command and my servo controller is identified.

I do have one suggestion: Please add this information to your I2C documentation for the VIM4.

Thanks again for your help.

Thanks for your suggestions, actually we already have such documentations in our new documentation framework, and will release soon.