Could I change i2c on Jetson Expansion Headers on nano

I want to use the command ‘sudo /opt/nvidia/jetson-io/jetson-io.py’ to change i2c2 to i2c1 on PIN 27 28. For I2C2 , I2C9, I2C10 are used by camera i2c. But I couldn’t change i2c in jetson-io.py gui.

My device information is :

cat /etc/nv_boot_control.conf
TNSPEC 3767-300-0003-P.1-1-1-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3767–0003–1–jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE nvme0n1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
root@yt8-desktop:/home/yt8# cat /etc/nv_tegra_release

R35 (release), REVISION: 4.1, GCID: 33958178, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug 1 19:57:35 UTC 2023

i2c bus 1 could be used on pin 27 28, i2c bus 7 could be used on pin 3 5 in fact. Do you know how to check the mapping relationship. There is no description in dts. My dts is hdr40-pin38 {
nvidia,enable-input = <0x00>;
nvidia,tristate = <0x01>;
nvidia,function = “rsvd3”;
nvidia,pins = “soc_gpio43_pi1”;
};

	hdr40-pin37 {
		nvidia,enable-input = <0x01>;
		nvidia,tristate = <0x00>;
		nvidia,function = "spi3";
		nvidia,pins = "spi3_mosi_py2";
	};

	hdr40-pin36 {
		nvidia,enable-input = <0x00>;
		nvidia,tristate = <0x01>;
		nvidia,function = "rsvd3";
		nvidia,pins = "uart1_cts_pr5";
	};

	hdr40-pin35 {
		nvidia,enable-input = <0x00>;
		nvidia,tristate = <0x01>;
		nvidia,function = "rsvd3";
		nvidia,pins = "soc_gpio44_pi2";
	};

	hdr40-pin26 {
		nvidia,enable-input = <0x01>;
		nvidia,tristate = <0x00>;
		nvidia,function = "spi1";
		nvidia,pins = "spi1_cs1_pz7";
	};

	hdr40-pin24 {
		nvidia,enable-input = <0x01>;
		nvidia,tristate = <0x00>;
		nvidia,function = "spi1";
		nvidia,pins = "spi1_cs0_pz6";
	};

	hdr40-pin23 {
		nvidia,enable-input = <0x01>;
		nvidia,tristate = <0x00>;
		nvidia,function = "spi1";
		nvidia,pins = "spi1_sck_pz3";
	};

	hdr40-pin22 {
		nvidia,enable-input = <0x01>;
		nvidia,tristate = <0x00>;
		nvidia,function = "spi3";
		nvidia,pins = "spi3_miso_py1";
	};

	hdr40-pin21 {
		nvidia,enable-input = <0x01>;
		nvidia,tristate = <0x00>;
		nvidia,function = "spi1";
		nvidia,pins = "spi1_miso_pz4";
	};

	hdr40-pin19 {
		nvidia,enable-input = <0x01>;
		nvidia,tristate = <0x00>;
		nvidia,function = "spi1";
		nvidia,pins = "spi1_mosi_pz5";
	};

	hdr40-pin18 {
		nvidia,enable-input = <0x01>;
		nvidia,tristate = <0x00>;
		nvidia,function = "spi3";
		nvidia,pins = "spi3_cs0_py3";
	};

	hdr40-pin16 {
		nvidia,enable-input = <0x01>;
		nvidia,tristate = <0x00>;
		nvidia,function = "spi3";
		nvidia,pins = "spi3_cs1_py4";
	};

	hdr40-pin13 {
		nvidia,enable-input = <0x01>;
		nvidia,tristate = <0x00>;
		nvidia,function = "spi3";
		nvidia,pins = "spi3_sck_py0";
	};

	hdr40-pin12 {
		nvidia,enable-input = <0x00>;
		nvidia,tristate = <0x01>;
		nvidia,function = "rsvd3";
		nvidia,pins = "soc_gpio41_ph7";
	};

	hdr40-pin11 {
		nvidia,enable-input = <0x00>;
		nvidia,tristate = <0x01>;
		nvidia,function = "rsvd3";
		nvidia,pins = "uart1_rts_pr4";
	};
};

hello szcszc123,

let me have confirmation, did you want to change i2c bus 2 for using bus1 instead?
you may see-also device tree for I2C mappings.
for instance,
$public_sources/kernel_src/hardware/nvidia/t23x/nv-public/nv-soc/tegra234-base-overlay.dtsi

        aliases {
                i2c0 = "/bus@0/i2c@3160000";
                i2c1 = "/bus@0/i2c@c240000";
                i2c2 = "/bus@0/i2c@3180000";
                i2c3 = "/bus@0/i2c@3190000";

I want to know which i2c buses are mapping on pin 3/5 or on pin 27/28. Looks like jetson-io.py doesn’t show the right i2c. And I don’t find the mapping relationship between i2c and pin in dts. Could I get the mapping relationship between i2c and pin in dts?

Note: Synthesized with AI assistance.

Hi szcszc123,

To clarify the mapping between the 40-pin expansion header pins and the I2C bus numbers/device tree nodes on the Jetson Orin Nano:

1. Header Pin to I2C Bus Mapping

  • Pins 3 (SDA) & 5 (SCL): Correspond to I2C Bus 7.

  • Pins 27 (SDA) & 28 (SCL): Correspond to I2C Bus 1.

2. Finding the Mapping in the Device Tree (.dts)

  • Controller Base Addresses: In the kernel device tree source files, each I2C controller is defined by its hardware physical address (e.g., i2c@3160000, i2c@c240000, etc.).

  • Bus Number Aliases: The logical numbering visible in userspace (such as /dev/i2c-1 or /dev/i2c-7) is assigned via the aliases node in the root of the device tree:

    DTS

    aliases {
        i2c1 = &i2c1;
        i2c7 = &i2c7;
    };
    
    
  • Pinmux Configuration: The actual connection between the physical SoC pins and the I2C controller’s alternate functions (SFIO) is defined in the pinmux configuration files (e.g., tegra234-pinmux.dtsi and related pin-default files).

3. Why jetson-io.py might be restricted

jetson-io.py relies on pre-compiled device tree overlays bundled with the BSP. If a custom remapping (such as shifting pin functions across conflicting camera/expansion busses) isn’t exposed in the interactive GUI menu, you will need to manually edit the pinmux spreadsheet/source files and recompile the device tree binary (.dtb) rather than relying solely on the script.