I2c detect problem

Hello, we are making a custom board based on xiver and using it well.

But there is a problem.

We used the i2c utility (i2cdetect) to change the register value of the switch chip.

By the way, the following situation occurs when using i2cdetect.

==============================================================
root@ubuntu:/home/nvidia# 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:
[ 8760.037359] tegra-i2c 31b0000.i2c: pio timed out addr: 0x30 tlen:12 rlen:4
[ 8760.037615] tegra-i2c 31b0000.i2c: — register dump for debugging ----
[ 8760.037855] tegra-i2c 31b0000.i2c: I2C_CNFG - 0x22c00
[ 8760.037968] tegra-i2c 31b0000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[ 8760.038113] tegra-i2c 31b0000.i2c: I2C_FIFO_CONTROL - 0x0
[ 8760.038296] tegra-i2c 31b0000.i2c: I2C_FIFO_STATUS - 0x800080
[ 8760.038420] tegra-i2c 31b0000.i2c: I2C_MST_FIFO_CONTROL - 0x70000
[ 8760.038549] tegra-i2c 31b0000.i2c: I2C_MST_FIFO_STATUS - 0x800000
[ 8760.038678] tegra-i2c 31b0000.i2c: I2C_MST_PACKET_TRANSFER_CNT - 0x0
[ 8760.038811] tegra-i2c 31b0000.i2c: I2C_INT_MASK - 0x7d
[ 8760.038920] tegra-i2c 31b0000.i2c: I2C_INT_STATUS - 0x2
[ 8760.039034] tegra-i2c 31b0000.i2c: i2c transfer timed out addr: 0x30

root@ubuntu:/home/nvidia# i2cdetect -y 1
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: [ 9747.335316] tegra-i2c c240000.i2c: no acknowledge from address 0x30
– [ 9747.336239] tegra-i2c c240000.i2c: no acknowledge from address 0x31
– [ 9747.336850] tegra-i2c c240000.i2c: no acknowledge from address 0x32
– [ 9747.337320] tegra-i2c c240000.i2c: no acknowledge from address 0x33
– [ 9747.337811] tegra-i2c c240000.i2c: no acknowledge from address 0x34
– [ 9747.338258] tegra-i2c c240000.i2c: no acknowledge from address 0x35
– [ 9747.340276] tegra-i2c c240000.i2c: no acknowledge from address 0x36
– [ 9747.340762] tegra-i2c c240000.i2c: no acknowledge from address 0x37

Is it an h/w problem? Please advise :-)

Hi @gbpark ,

Are you using the jetson through the serial interface?
This kind of messages are normal when no devices are detected on each address

 tegra-i2c c240000.i2c: no acknowledge from address 0x31

When you are connected through the serial interface usually you will see all this messages redirected to this output. However, if you connect through ssh or on the board with a monitor you will see an output as the following:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --  

Also please try to use the i2cdetect command with the -r option. For example:

i2cdetect -r -y 1

Regards,
Fabian
www.ridgerun.com

Thanks for your answer. But it happens the same.
root@ubuntu:~# i2cdetect -r -y 5

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:
[ 36.437908] tegra-i2c 31b0000.i2c: pio timed out addr: 0x3 tlen:12 rlen:4
[ 36.438197] tegra-i2c 31b0000.i2c: — register dump for debugging ----
[ 36.438347] tegra-i2c 31b0000.i2c: I2C_CNFG - 0x22c00
[ 36.438531] tegra-i2c 31b0000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[ 36.438667] tegra-i2c 31b0000.i2c: I2C_FIFO_CONTROL - 0x0
[ 36.438791] tegra-i2c 31b0000.i2c: I2C_FIFO_STATUS - 0x800080
[ 36.438912] tegra-i2c 31b0000.i2c: I2C_MST_FIFO_CONTROL - 0x70000
[ 36.439084] tegra-i2c 31b0000.i2c: I2C_MST_FIFO_STATUS - 0x800000
[ 36.439214] tegra-i2c 31b0000.i2c: I2C_MST_PACKET_TRANSFER_CNT - 0x0
[ 36.439345] tegra-i2c 31b0000.i2c: I2C_INT_MASK - 0x7d
[ 36.439453] tegra-i2c 31b0000.i2c: I2C_INT_STATUS - 0x2
[ 36.439634] tegra-i2c 31b0000.i2c: i2c transfer timed out addr: 0x3
– ^C[ 46.677871] tegra-i2c 31b0000.i2c: pio timed out addr: 0x4 tlen:12 rlen:4
[ 46.678103] tegra-i2c 31b0000.i2c: — register dump for debugging ----
[ 46.678247] tegra-i2c 31b0000.i2c: I2C_CNFG - 0x22c00
[ 46.678422] tegra-i2c 31b0000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[ 46.678557] tegra-i2c 31b0000.i2c: I2C_FIFO_CONTROL - 0x0
[ 46.678669] tegra-i2c 31b0000.i2c: I2C_FIFO_STATUS - 0x800080
[ 46.678788] tegra-i2c 31b0000.i2c: I2C_MST_FIFO_CONTROL - 0x70000
[ 46.678911] tegra-i2c 31b0000.i2c: I2C_MST_FIFO_STATUS - 0x800000
[ 46.679077] tegra-i2c 31b0000.i2c: I2C_MST_PACKET_TRANSFER_CNT - 0x0
[ 46.679213] tegra-i2c 31b0000.i2c: I2C_INT_MASK - 0x7d
[ 46.679339] tegra-i2c 31b0000.i2c: I2C_INT_STATUS - 0x2
[ 46.679457] tegra-i2c 31b0000.i2c: i2c transfer timed out addr: 0x4

For i2c5 pins that are using in dpaux, please try to add these in DT. Otherwise use others i2c bus instead of bus 5.

i2c@31b0000 {
pinctrl-names = “default”;
pinctrl-0 = <&dpaux_default>;
};

host1x {
    dpaux@155c0000 {
        status = "okay";
        compatible = "nvidia,tegra186-dpaux-padctl";
        dpaux_default: pinmux@0 {
            dpaux_pins {
                pins = "dpaux-0";
                function = "i2c";
            };
        };
    };

dpaux0 {
    compatible = "nvidia,tegra186-dpaux-pinctrl";
    status = "okay";
};

Also dpaux0 is a hardcode property that would be used by driver (kernel/nvidia/drivers/pinctrl/pinctrl-tegra186-dpaux.c)

The dpaux0 node is necessary for suspend and resume functionalities. It is added to avoid unwanted results if the system goes to a suspend state and resumed for any i2c transactions
If you are sure that the system will not go into a suspend state, you can remove the dpaux0 node

Regarding the power domain node, this is used for power gating. Removing them(/delete property/ power-domains) is ensuring that the power gating driver is not shutting the power for the controller and hence it is working. power domain is a legacy feature that is present by default.

Thank you for answer.
We are using the i2c pin 5 connected to the switch chipset.
I added it to the path below and it happens the same.

path: hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2888-0000-a00.dtsi

i2c @ 31b0000 {
pinctrl-names = “default”;
pinctrl-0 = <& dpaux_default>;
};

Please advise me.