I2C4 and I2C6

Hi

I’m having trouble getting i2c4 and i2c6 working on the xavier. I think there is something wrong with the dts files / pinmux.

This is how I define the i2c buses in the dts:

	i2c3 {
      #address-cells = <1>;
      #size-cells = <0>;
      clock-frequency =<400000>;
	  status = "okay";
      sht4x@44 {
        compatible = "sensirion,sht4x";
        reg = <0x44>;
      };
    };

	i2c5 {
      #address-cells = <1>;
      #size-cells = <0>;
      clock-frequency =<400000>;
	  status = "okay";
      ina219@40 {
        compatible = "ti,ina219";
        reg = <0x40>;
        shunt-resistor = <1000>;
      };

And this is how I define the dpaux devices:

	host1x@13e00000 {

		dpaux0{
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <&dpaux_default>;
			dpaux_default: pinmux@0 {
				dpaux0_pins {
					pins = "dpaux-0";
					function = "i2c";
				};
			};
		};
		/*
		dpaux1{
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <&dpaux_default>;
			dpaux1_default: pinmux@0 {
				dpaux1_pins {
					pins = "dpaux-1";
					function = "i2c";
				};
			};
		};
		*/```

I know that dpaux 1 is commented, but I would not compile unless it was comented.

I dont get any response from any devices on i2c4 and i2c6. Could anybody please help me see what is wrong with my dts?

I have tried to read the pinmux registers using devmem and devmem2, however trying to do so crashes the entire OS causing it to reboot. Is there something special that needs to be done in order to read registers on the Jetson?

All help is appreciated

What’s the BSP version?

cat /etc/nv_tegra_release

$ 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

Could you dump the device tree to confirm the pin configure.

Thanks

Hi, thanks for helping me:)

Offcourse I can, see the attached file:

fdtdump.txt (325.3 KB)

Looks like your dpaux0/dpaux1 didn’t add to correct scope.
It should under the dpaux@155c0000 and dpaux@155D0000 scope.

Hi

I have changed them as you said, her is an exerpt from the flattend device tree:

        dpaux@155c0000 {
            status = "okay";
            compatible = "nvidia,tegra194-dpaux0-padctl";
            reg = <0x00000000 0x155c0000 0x00000000 0x00010000>;
            interrupts = <0x00000000 0x0000009f 0x00000004>;
            nvidia,dpaux-ctrlnum = <0x00000000>;
            clocks = <0x00000004 0x00000013>;
            clock-names = "dpaux";
            resets = <0x00000004 0x00000008>;
            reset-names = "dpaux";
            phandle = <0x00000049>;
            prod-settings {
                #prod-cells = <0x00000004>;
                prod_c_dpaux_hdmi {
                    prod = <0x00000000 0x00000124 0x000037fc 0x00000700>;
                };
                prod_c_dpaux_dp {
                    prod = <0x00000000 0x00000124 0x000037fe 0x000024b2>;
                };
            };
            pinmux@0 {
                phandle = <0x0000008d>;
                dpaux0_pins {
                    pins = "dpaux0-0";
                    function = "i2c";
                };
            };
        };
        dpaux@155D0000 {
            status = "okay";
            compatible = "nvidia,tegra194-dpaux1-padctl";
            reg = <0x00000000 0x155d0000 0x00000000 0x00010000>;
            interrupts = <0x00000000 0x000000a0 0x00000004>;
            nvidia,dpaux-ctrlnum = <0x00000001>;
            clocks = <0x00000004 0x00000014>;
            clock-names = "dpaux1";
            resets = <0x00000004 0x00000009>;
            reset-names = "dpaux1";
            phandle = <0x0000004a>;
            prod-settings {
                #prod-cells = <0x00000004>;
                prod_c_dpaux_hdmi {
                    prod = <0x00000000 0x00000124 0x000037fc 0x00000700>;
                };
                prod_c_dpaux_dp {
                    prod = <0x00000000 0x00000124 0x000037fe 0x000024b2>;
                };
            };
            pinmux@0 {
                phandle = <0x0000008e>;
                dpaux1_pins {
                    pins = "dpaux1-1";
                    function = "i2c";
                };
            };
        };
    i2c@03190000 {
        #address-cells = <0x00000001>;
        #size-cells = <0x00000000>;
        pinctrl-names = "default";
        pinctrl-0 = <0x0000008d>;
        clock-frequency = <0x00061a80>;
        status = "okay";
        sht4x@44 {
            compatible = "sensirion,sht4x";
            reg = <0x00000044>;
        };
    };
    i2c@031b0000 {
        #address-cells = <0x00000001>;
        #size-cells = <0x00000000>;
        pinctrl-names = "default";
        pinctrl-0 = <0x0000008e>;
        clock-frequency = <0x00061a80>;
        status = "okay";
        ina219@40 {
            compatible = "ti,ina219";
            reg = <0x00000040>;
            shunt-resistor = <0x000003e8>;
        };
        ina219@42 {
            compatible = "ti,ina219";
            reg = <0x00000042>;
            shunt-resistor = <0x00002710>;
        };
        ina219@45 {
            compatible = "ti,ina219";
            reg = <0x00000045>;
            shunt-resistor = <0x000003e8>;
        };
        ina219@46 {
            compatible = "ti,ina219";
            reg = <0x00000046>;
            shunt-resistor = <0x00002710>;
        };
        ina219@47 {
            compatible = "ti,ina219";
            reg = <0x00000047>;
            shunt-resistor = <0x00001388>;
        };
        ina219@4D {
            compatible = "ti,ina219";
            reg = <0x0000004d>;
            shunt-resistor = <0x00002710>;
        };
    };

I2c Detect still does not find any i2c devices on the buses. Do you see something else that isn’t correct?

Thanks

Have reference to below document.

Hi, I have tested with dts files corrected to be as in the tegra186-dpaux-pinctrl.txt. However the kernel will not boot anymore…

This is from the boot log on the uart console:

[ 5.951471] usb usb2: SerialNumber: 3610000.xhci
[ 5.957075] hub 2-0:1.0: USB hub found
[ 5.960192] hub 2-0:1.0: 4 ports detected
[ 5.995652] CPU:0, Error: cbb-noc@2300000, irq=15
[ 6.005881] **************************************
[ 6.006092] CPU:0, Error:cbb-noc
[ 6.006236] Error Logger : 0
[ 6.006349] ErrLog0 : 0x80030000
[ 6.006515] Transaction Type : RD - Read, Incrementing
[ 6.006694] Error Code : SLV
[ 6.006805] Error Source : Target
[ 6.006941] Error Description : Target error detected by CBB slave
[ 6.007160] AXI2APB_5 bridge error: RDFIFOF - Read Response FIFO Full interrupt
[ 6.009969] Packet header Lock : 0
[ 6.013578] Packet header Len1 : 3
[ 6.017040] NOC protocol version : version >= 2.7
[ 6.021684] ErrLog1 : 0x351620
[ 6.025356] ErrLog2 : 0x0
[ 6.028067] RouteId : 0x351620
[ 6.031047] InitFlow : ccroc_p2ps/I/ccroc_p2ps
[ 6.036292] Targflow : host1x_p2pm/T/host1x_p2pm
[ 6.040861] TargSubRange : 11
[ 6.044341] SeqId : 0
[ 6.046884] ErrLog3 : 0x10124
[ 6.050150] ErrLog4 : 0x0
[ 6.053273] Address accessed : 0x155d0124
[ 6.057551] ErrLog5 : 0x809f851
[ 6.060710] Non-Modify : 0x1
[ 6.064123] AXI ID : 0x10
[ 6.067529] Master ID : CCPLEX
[ 6.070629] Security Group(GRPSEC): 0x7e
[ 6.074799] Cache : 0x1 – Bufferable
[ 6.079254] Protection : 0x2 – Unprivileged, Non-Secure, Data Access
[ 6.086077] FALCONSEC : 0x0
[ 6.089228] Virtual Queuing Channel(VQC): 0x0
[ 6.093869] **************************************
[ 6.098749] ------------[ cut here ]------------
[ 6.103153] kernel BUG at drivers/soc/tegra/cbb/tegra194-cbb.c:2057!
[ 6.109980] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 6.115233] Modules linked in:
[ 6.118209] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.120-tegra #9
[ 6.124587] Hardware name: Unknown Jetson-AGXi/Jetson-AGXi, BIOS 4.1-33958178 08/01/2023

Fdtdump now is attached
fdtdump2.txt (318.5 KB)

I’m not sure what to do in order to get any further with this problem? Do you have any suggestions? @ShaneCCC ?