I2C Transfer Timeout on Custom Carrier Board Using I2C7 (DP0_AUX_CH_N/P)

Hi nvidia,

We are working with a custom carrier board based on the NVIDIA Jetson AGX Orin. We’re trying to use I2C7, which is mapped to the following pins:

  • DP0_AUX_CH_N

  • DP0_AUX_CH_P

To enable this I2C bus, we modified the following file during flashing:

File: Linux_for_Tegra/bootloader/tegra234-mb1-bct-gpio-p3701-0000.dtsi

dp_aux_ch2_p_pn5 {
nvidia,pins = “dp_aux_ch2_p_pn5”;
nvidia,function = “i2c7”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};

dp_aux_ch2_n_pn6 {
nvidia,pins = “dp_aux_ch2_n_pn6”;
nvidia,function = “i2c7”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};

We also enabled the I2C controller in the device tree:

i2c@31c0000 {
status = “okay”;
clock-frequency = <100000>;

tca9539@20 {
    compatible = "ti,tca9539";
    reg = <0x20>;
    status = "okay";
    interrupt-parent = <&gpio>;
    interrupts = <TEGRA234_MAIN_GPIO(H, 1) GPIO_ACTIVE_LOW>;
    vcc-supply = <&vdd_3v3_ao>;
    #gpio-cells = <2>;
    gpio-controller;
};

};

However, when we run i2cdetect on bus 6 (which should correspond to I2C7), we get no devices detected:

nvidia@tegra-ubuntu:~$ sudo i2cdetect -y -r 6

And the kernel log shows repeated timeout errors:

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, it appears that you are working with a custom carrier board based on the NVIDIA Jetson platform, specifically the Jetson AGX Orin module. You are trying to enable an I2C bus on your custom carrier board, which is mapped to specific pins.

To enable the I2C bus, you modified a file during flashing, but the specific file is not mentioned in your question. However, based on the context, it is likely that you modified a device tree file or a configuration file related to the I2C bus.

Here are some general steps and considerations for enabling an I2C bus on a custom carrier board based on the Jetson AGX Orin module:

  1. Device Tree: The device tree is a data structure that describes the hardware components of your system. To enable an I2C bus, you need to modify the device tree file to include the I2C bus and its corresponding pins. You can use the jetson-agx-orin-devkit.conf file as a reference to modify the device tree file.
  2. Pinmux: The pinmux (pin multiplexing) configuration determines how the pins on the Jetson module are used. You need to configure the pinmux to assign the correct pins to the I2C bus. You can use the jetson-agx-orin-devkit.conf file as a reference to modify the pinmux configuration.
  3. I2C Bus Configuration: You need to configure the I2C bus to use the correct pins and settings. This can be done by modifying the i2c node in the device tree file or by using a configuration file specific to the I2C bus.
  4. Flashing: After modifying the device tree file and pinmux configuration, you need to flash the new configuration to the Jetson module. This can be done using the flash.sh script or by using a custom flashing tool.

Some important considerations when enabling an I2C bus on a custom carrier board:

  • Pin Compatibility: Make sure that the pins you are using for the I2C bus are compatible with the Jetson AGX Orin module. You can refer to the Jetson AGX Orin module’s datasheet or the NVIDIA Jetson Linux Developer Guide for more information on pin compatibility.
  • I2C Bus Speed: The I2C bus speed needs to be configured correctly to ensure proper communication between devices on the bus. You can refer to the I2C bus specification or the device tree file for more information on configuring the I2C bus speed.
  • Device Tree Overlay: If you are using a device tree overlay to enable the I2C bus, make sure that the overlay is correctly configured and applied during the boot process.

In comparison to other Jetson modules, the Jetson AGX Orin module has a similar process for enabling an I2C bus. However, the specific pinmux configuration and device tree file may differ depending on the module and carrier board design.

For example, the Jetson Orin NX module has a similar process for enabling an I2C bus, but the pinmux configuration and device tree file may differ due to the different pinout and hardware components.

In summary, to enable an I2C bus on a custom carrier board based on the Jetson AGX Orin module, you need to modify the device tree file, pinmux configuration, and I2C bus configuration, and then flash the new configuration to the Jetson module. Make sure to consider pin compatibility, I2C bus speed, and device tree overlay configuration to ensure proper communication between devices on the bus.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Please have scope to probe the signal while run the i2cdetect command.

And dump the REG to confirm the pin config.

PADCTL_EDP_DP_AUX_CH2_P_0 : 0x02440060
PADCTL_EDP_DP_AUX_CH2_N_0 : 0x02440068

Thanks

Hi ShanceCCC,

  1. Read the following two registers, with values as shown below:
    It looks like the i2c7 configuration is not taking effect.

  2. We are using a 64GB AGX Orin without EEPROM on the carrier board. During flashing, modify the following file
    Linux_for_Tegra/bootloader/tegra234-mb2-bct-common.dtsi

  3. Question: To modify pinmux, can we directly edit the following two files?
    Linux_for_Tegra/bootloader/tegra234-mb1-bct-gpio-p3701-0000.dtsi
    Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-pinmux-p3701-0000.dtsi

How can we make the pinmux configuration for i2c7 take effect?

[    3.858411] tegra-i2c 31c0000.i2c: I2C transfer timed out
[    3.859687] pca953x 6-0020: failed writing register
[    3.859845] pca953x: probe of 6-0020 failed with error -110

Dump the device tree to confirm the dp_aux_ch2_n_* are declare correctly.

Thanks

Hi ShaneCCC,

tegra234-p3737-0000+p3701-0005-nv.dts.txt (314.0 KB)

What I mean is below pins confug.

dp_aux_ch2_p_pn5 {
nvidia,pins = “dp_aux_ch2_p_pn5”;
nvidia,function = “i2c7”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};

dp_aux_ch2_n_pn6 {
nvidia,pins = “dp_aux_ch2_n_pn6”;
nvidia,function = “i2c7”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};

Hi ShaneCCC,

  1. Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-pinmux-p3701-0000.dtsi

tegra234-mb1-bct-pinmux-p3701-0000.dtsi.txt (64.2 KB)

  1. /proc/device-tree

No dp_aux_ch2_n_* entries found in /proc/device-tree

extracted_proc.dts.txt (392.9 KB)

Just to clarify. Your change is happened in MB1. Not kernel device tree.
/proc/device-tree won’t show you anything for a MB1 setting.

/sys/kernel/debug/pinctrl/2430000.pinmux/pinmux-functions shall tell you the funciton.

Hello WayneWWW,

pinmux-functions.txt (12.9 KB)

function 14: i2c7, groups = [ dp_aux_ch2_p_pn5 dp_aux_ch2_n_pn6 ]

Loos like pinmux is already set. Did you remember to disable display node in the device tree to avoid and intervene?

WayneWWW,

However, they are also used in the following functions:

function 56: rsvd1, groups = [...... dp_aux_ch2_p_pn5 dp_aux_ch2_n_pn6 ...... ]
function 72: rsvd2, groups = [...... dp_aux_ch2_p_pn5 dp_aux_ch2_n_pn6 ...... ]

Can you tell me how to disable display node ?

could you dump /sys/kernel/debug/pinctrl/2430000.pinmux# cat pinconf-groups with pin 12 and 13 status?

Hi WayneWWW,

13 (dp_aux_ch2_p_pn5): 
	pull=1
	tristate=1
	enable-input=0
	open-drain=1
	io-reset=1
	rcv-sel=1
	io-hv=1
	schmitt=1
	pull-down-strength=31
	pull-up-strength=0
	drive-type=0
	gpio-mode=1
	function=rsvd1
14 (dp_aux_ch2_n_pn6): 
	pull=1
	tristate=1
	enable-input=0
	open-drain=1
	io-reset=1
	rcv-sel=1
	io-hv=1
	schmitt=0
	pull-down-strength=31
	pull-up-strength=0
	drive-type=0
	gpio-mode=1
	function=rsvd1

tegra234-mb1-bct-pinmux-p3701-0000.dtsi

Are you sure this is the file got flashed to your board? Your flash log shall tell that.

May be this pinmux file, i will try it.

Hi WayneWWW,

It’s fixed, thanks.