I2C reads/writes over 32 bytes cause cbb error on i2c 0

I think I’ve found a bug. Any i2c transaction on i2c controller 0 (i2c@3160000) with more than 32 bytes causes a CBB fault.
It doesnt seem to occur on the other i2c controllers. So far ive only tested with i2c1 (i2c@c240000)
The issue is caused by the DMA controller. removing dma, dma-names and dma-coherent properties from the device tree on fixes it.

Steps to reproduce:
sudo i2ctransfer -y 0 r33@0x50 → produces error
sudo i2ctransfer -y 0 r32@0x50 → does not produce error

Error produced by read:

[  585.819914] CPU:0, Error:cbb-fabric@0x13a00000, irq=21
[  585.820130] **************************************
[  585.820295] CPU:0, Error:cbb-fabric, Errmon:8
[  585.820453]    Error Code            : FIREWALL_ERR
[  585.820586] 
[  585.820642]    Error Code            : FIREWALL_ERR
[  585.820781]    MASTER_ID             : GPCDMA_P
[  585.820900]    Address               : 0x3160054
[  585.821016]    Cache                 : 0x0 -- Device Non-Bufferable
[  585.821188]    Protection            : 0x2 -- Unprivileged, Non-Secure, Data Access
[  585.821395]    Access_Type           : Read
[  585.821503]    Access_ID             : 0x1
[  585.821506]    Fabric                : cbb-fabric
[  585.821710]    Slave_Id              : 0x35
[  585.821807]    Burst_length          : 0x0
[  585.821910]    Burst_type            : 0x0
[  585.822013]    Beat_size             : 0x2
[  585.822109]    VQC                   : 0x2
[  585.822198]    GRPSEC                : 0x7e
[  585.822293]    FALCONSEC             : 0x0
[  585.822818]    Slave                 : T234_CBB_SN_AXI2APB_35
[  585.823613]  **************************************

There is a device on my carrier board that I can write to as well. It produces a similar error, but the transaction times out.
sudo i2ctransfer -y 0 w35@0x48 0x07 0xFF=
Error: Sending messages failed: Connection timed out

[  694.692335] CPU:0, Error:cbb-fabric@0x13a00000, irq=21
[  694.692538] **************************************
[  694.692694] CPU:0, Error:cbb-fabric, Errmon:8
[  694.692852]    Error Code            : FIREWALL_ERR
[  694.692990] 
[  694.693044]    Error Code            : FIREWALL_ERR
[  694.693195]    MASTER_ID             : GPCDMA_P
[  694.693313]    Address               : 0x3160050
[  694.693430]    Cache                 : 0x0 -- Device Non-Bufferable
[  694.693603]    Protection            : 0x2 -- Unprivileged, Non-Secure, Data Access
[  694.693833]    Access_Type           : Write
[  694.693952]    Access_ID             : 0x2
[  694.693955]    Fabric                : cbb-fabric
[  694.694166]    Slave_Id              : 0x35
[  694.694266]    Burst_length          : 0x3
[  694.694366]    Burst_type            : 0x0
[  694.694470]    Beat_size             : 0x2
[  694.694565]    VQC                   : 0x2
[  694.694656]    GRPSEC                : 0x7e
[  694.694753]    FALCONSEC             : 0x0
[  694.695259]    Slave                 : T234_CBB_SN_AXI2APB_35
[  694.696053]  **************************************
[  694.803044] tegra-i2c 3160000.i2c: I2C transfer timed out

I have the following in my system device tree as a work around:

	i2c@3160000 {
		/* Disable DMA on i2c0. Causes CBB errors when programming MSP430 for unknown reason */
		/delete-property/ dmas;
		/delete-property/ dma-names;
		/delete-property/ dma-coherent;
	};

Please modify the …/Linux_for_Tegra/bootloader/t186ref/BCT/tegra234-firewall-config-base.dtsi
And reflash the system to verify.

diff --git a/firewall/tegra234-firewall-config-base.dtsi b/firewall/tegra234-firewall-config-base.dtsi
index 0aae3fb..88e9173 100644
--- a/firewall/tegra234-firewall-config-base.dtsi
+++ b/firewall/tegra234-firewall-config-base.dtsi
@@ -21123,12 +21123,12 @@

         reg@4220 { /* CBB_CENTRAL_CBB_FIREWALL_I2C1_BLF, READ_CTL */
             exclusion-info = <2>;
-            value = <0x00004002>;
+            value = <0x00004042>;
         };

         reg@4221 { /* CBB_CENTRAL_CBB_FIREWALL_I2C1_BLF, WRITE_CTL */
             exclusion-info = <2>;
-            value = <0x00004002>;
+            value = <0x00004042>;
         };

         reg@4222 { /* CBB_CENTRAL_CBB_FIREWALL_I2C1_BLF, CTL_SETTING */
@@ -21183,12 +21183,12 @@

         reg@4232 { /* CBB_CENTRAL_CBB_FIREWALL_I2C4_BLF, READ_CTL */
             exclusion-info = <4>;
-            value = <0xffffffff>;
+            value = <0x00004042>;
         };

         reg@4233 { /* CBB_CENTRAL_CBB_FIREWALL_I2C4_BLF, WRITE_CTL */
             exclusion-info = <4>;
-            value = <0xffffffff>;
+            value = <0x00004042>;
         };

         reg@4234 { /* CBB_CENTRAL_CBB_FIREWALL_I2C4_BLF, CTL_SETTING */
@@ -21303,12 +21303,12 @@

         reg@4256 { /* CBB_CENTRAL_CBB_FIREWALL_I2C9_BLF, READ_CTL */
             exclusion-info = <4>;
-            value = <0xffffffff>;
+            value = <0x00004042>;
         };

         reg@4257 { /* CBB_CENTRAL_CBB_FIREWALL_I2C9_BLF, WRITE_CTL */
             exclusion-info = <4>;
-            value = <0xffffffff>;
+            value = <0x00004042>;
         };

         reg@4258 { /* CBB_CENTRAL_CBB_FIREWALL_I2C9_BLF, CTL_SETTING */

I applied the patch and reflashed the QSPI. its still happening.
Is there a way I can verify it has had the fix applied? Which partition does this dts end up in? MB2-DTB?

Try below.

$ cd Linux_for_tegra
$ vi p3711-0000+p3701-0002.conf
comment out SCR_CONFIG
#SCR_CONFIG="tegra234-mb2-bct-firewall-si-p3701-0002-p3711-0000.dts";

$ vi p3701.conf.common
comment out SCR_CONFIG
#SCR_CONFIG="tegra234-mb2-bct-scr-p3701-0000.dts";

$ sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.