I2C Issue on AOSP Android 11

I try to write I2C device driver on Android 11, I am a beginner.

Device_SCL <-> PIN_22 I2C_M3_SCL
Device_SDA <-> PIN_23 I2C_M3_SDA
Device_VDD <-> PIN_11 1.8V
Device_GND <-> PIN_24 GND
Device address is 0x45

First, use “VIM3_Pie_V210128” image
https://dl.khadas.com/Firmware/VIM3/Android/VIM3_Pie_V210128.7z
The device 0x45 was found correctly.

But, after build AOSP Android 11
https://source.android.com/setup/build/devices#vim3_and_vim3l_boards
The device 0x45 was not found, and device 0x30 was appeared oddly.

Update:
I use the I2C_AO(Pin 25&26), the device 0x45 can be found correctly.

What is wrong?
Should I modify some file?

Screenshot

Thanks

I2C_AO(Pin 25&26) instead of I2C_M3, the device 0x45 can be found correctly.
I donwnload kernel source code from google.
git clone https://android.googlesource.com/kernel/hikey-linaro -b android-amlogic-bmeson-4.19

Add my device in i2c_AO node, but the driver wasn’t loaded.
[ 6.758406] ueventd: LoadWithAliases was unable to load of:NsensorT<NULL>Cironmouse,testname

How to load driver correctly?
Which device tree file shoud I modify?

Kernel-4.19-Path/hikey-linaro/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
2021-03-01_064001

Thanks

1 Like