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;
};