Hello,
I’m trying to apply cm32181(light sensor) via I2C#5 on Xavier.
I’ve done the following works and I now can see the node under /proc/device-tree/i2c@31b0000/cm32181
But currently I’m still failed to find my device by command i2cdetect or /sys/bus/iio/devices/iio:device*
-
Pin-to-Pin connect from Xavier to CM32181.
SDA pin connect to Expansion Header Pin 3 (I2C_GP5_DTA_3V3)
SCL pin connect to Expansion Header Pin 5 (I2C_GP5_CLK_3V3)
INT pin connect to Expansion Header Pin 16(GPIO8_AO_DMIC_IN_DAT)
GND pin connect to Expansion Header Pin 6 (GND)
VDD pin connect to Expansion Header Pin 1 (VDD_3V3) -
Apply cm32181 node on tegra194-p2888-0001-p2822-0000.dts.
31b0000 is the address of I2C#5 that I got from Pinmux table.
i2c@31b0000 {
cm32181@31b0000 {
compatible = "capella,cm32181";
reg = <0x10>;
interrupt-parent = <&tegra_aon_gpio>;
// GPIO8_AO_DMIC_IN_DAT is GPIO3_PBB.00.
interrupts = <TEGRA194_AON_GPIO(BB, 0) IRQ_TYPE_LEVEL_LOW>;
capella,intrpin-gpios = <&tegra_aon_gpio TEGRA194_AON_GPIO(BB, 0) 0>;
capella,ALS_slave_address = <0x10>;
};
};
-
Enable cm32181 flag in Kconfig.
And I can see “CONFIG_CM32181=y” is applying on .config. -
I fail to see my device on system
nvidia@jetson-0423318029512:~$ sudo i2cdetect -l
i2c-3 i2c 3190000.i2c I2C adapter
i2c-1 i2c c240000.i2c I2C adapter
i2c-8 i2c 31e0000.i2c I2C adapter
i2c-6 i2c 31c0000.i2c I2C adapter
i2c-4 i2c Tegra BPMP I2C adapter I2C adapter
i2c-2 i2c 3180000.i2c I2C adapter
i2c-0 i2c 3160000.i2c I2C adapter
i2c-7 i2c c250000.i2c I2C adapter
i2c-5 i2c 31b0000.i2c I2C adapter
nvidia@jetson-0423318029512:~$ sudo i2cdetect -y 5
Warning: Can’t use SMBus Quick Write command, will skip some addresses
0 1 2 3 4 5 6 7 8 9 a b c d e f
00:
10:
20:
30: – – – – – – – –
40:
50: – – – – – – – – – – – – – – – –
60:
70:
nvidia@jetson-0423318029512:~$ ll /sys/bus/iio/devices/
total 0
drwxr-xr-x 2 root root 0 Oct 26 08:40 ./
drwxr-xr-x 4 root root 0 Oct 26 02:45 …/
lrwxrwxrwx 1 root root 0 Oct 26 02:45 iio:device0 → …/…/…/devices/c240000.i2c/i2c-1/1-0040/iio:device0/
lrwxrwxrwx 1 root root 0 Oct 26 02:45 iio:device1 → …/…/…/devices/c240000.i2c/i2c-1/1-0041/iio:device1/
nvidia@jetson-0423318029512:~$
Thanks a lot.