This is a cache of https://discuss.96boards.org/t/i2c-1-ls-expansion-bus-is-supported/267. It is a snapshot of the page at 2024-09-19T03:01:23.912+0000.
<strong>i2c</strong>-1 LS Expansion Bus is supported? - DragonBoard410c - 96Boards Forum

i2c-1 LS Expansion Bus is supported?

I am using the current 15.09 release

I connected an i2c sensor on i2c-1 bus on the LS Expansion connector.

When I run sudo i2cdetect -r 1, my Sensor is not enumerating the address. Is i2c Bus 1 is supported on Latest 15.09
release?

Thanks,
~Karthik

The logic level of i2c/SPI/GPIO on LS connector is 1.8V.

Contrary most of the devices such as i2c sensors works only on 3.3V and/or 5V.
So you need to have Logic level shifting chip between the pins on the LS connector and your i2c sensor.

We are planning to have Mezzanine board which has a level shifting chips to convert 1.8V to 3.3/5V but not ready at the moment.

I have not tried by myself but at the mean time adding level shifting chips on the i2c lines by yourself might work.
I searched the Google for such boards and found this one.

I can not guarantee whether the above will work for you without any modification or tweaking but I just listed for explaining what kind of work needed to attach i2c devices on LS connector.

Trying out adding Logic level converter by yourself might fun and good chance to play and study.
Also you could wait for the such Mezzanine board to be sold.

Thank you for pointing out critical information about LS connector.

Thanks for the reply.

I have Temp sensor which works on 1.8V. Which works fine on i2c-0 bus. But when I connect it to i2c-1, Sudo i2cdetect -r 1 is not detecting the sensor. I mean It is not enumerating the address of the sensor.

Basically my question is

Is i2c-1 Bus is supported on Linaro flavor on DragonBoard 410C? I am not getting waveform in i2c-1 Bus.

thanks,
~Karthik

Hi Karthik,
AFAIK, both the i2cs on LS expansion are functional.
You might be actually using wrong bus in your tests. i2c0 bus on LS is mapped to i2c-0 on linux side and i2c1 bus on LS is mapped to i2c-2 on linux side.
Am in a process to fix correctly to match with naming on schematics. But for now you can use bus 2 for test till it gets fixed properly.

Here is the log from my board to confirm it works.

root@linaro-alip:~# i2cdetect -l
i2c-0 i2c QUP i2c adapter i2c adapter
i2c-1 i2c QUP i2c adapter i2c adapter
i2c-2 i2c QUP i2c adapter i2c adapter
root@linaro-alip:~# i2cdetect -r 2 0x70 0x70
WARNING! This program can confuse your i2c bus, cause data loss and worse!
I will probe file /dev/i2c-2 using read byte commands.
I will probe address range 0x70-0x70.
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:
70: 70
root@linaro-alip:~#

Thanks,
srini

Hi Karhik,
This patch should fix the issue of matching bus numbers from schematics to linux:

I will make sure that this patch would appear in next release.

------------------------------------cut-----------------------------------------
commit fe99f84e6609c7e2753052364faf959dc0ebdde9
Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Mon Nov 16 09:53:30 2015 +0000

arm64: dts: fix the i2c aliasing to match to schematics.

This patch fixes the i2c bus number aliasing so that it matches with the
schematics bus naming.

Without this patch the user might would get bus numbers depending on
the order the devices are probed.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 6b895b2…bc9760f 100644
— a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -22,6 +22,9 @@
aliases {
serial0 = &blsp1_uart2;
serial1 = &blsp1_uart1;

  •           i2c0    = &amp;blsp_i2c2;
    
  •           i2c1    = &amp;blsp_i2c6;
    
  •           i2c3    = &amp;blsp_i2c4;
      };
    
      chosen {
    

------------------------------------cut-----------------------------------------

thanks,
srini