TX2 - i2c-4 request fails

Hi -

We’re using L4T R32.3.1. We’ve developed a custom TX2 carrier. It works well for just about everything. I have a EEPROM (24c02) on the PM I2C Bus (i2c-4, bpmp i2c bus). When I tried to make i2c requests on this bus, the request fails:

$> time sudo i2cget -y 4 0x57 0 b
Error: Read failed
real	0m0.109s
user	0m0.008s
sys	0m0.048s

In dmesg I see the following:

[ 5227.592568] i2c i2c-4: tegra_bpmp_i2c_req ret -5
[ 5227.597300] i2c i2c-4: --- message dump for debugging ---
[ 5227.603216] i2c i2c-4: addr 0x57 flags 0x0 len 1 data:
[ 5227.608463] i2c i2c-4:  00
[ 5227.611300] i2c i2c-4: 
[ 5227.613807] i2c i2c-4: addr 0x57 flags 0x1 len 1 data:
[ 5227.619025] i2c i2c-4:  00
[ 5227.621755] i2c i2c-4: 

So -5 = EIO or an IO error. I’ve monitored the I2C bus SDA/SCL pins and I see no activity.

I’ve tried this same thing on the devkit and I get the same problem. I note that there is an another i2c device on i2c-4 bus (spmic) but I’m not sure how to interact with it and I can’t tell if it is working.

$> cat /sys/kernel/debug/bpmp/debug/mail/stats
MRQ	count
0	6
7	1
8	4
19	25
20	100
21	536

Mailbox 21 is the mailbox to the i2c bus (see include/soc/tegra/bpmp_abi.h) and I see it increment when I send a message to the bpmp i2c.

As shown above the i2cget request completes in error almost immediately - there is no timeout or anything. It is almost as if the driver isn’t waiting for the bpmp to respond.

BPMP Firmware Version:

$> cat /sys/class/tegra-firmware/bpmp/version
bpmp: firmware tag 4208eb5c85fe47a2235fbc0b8eb87dca

I’ve checked the kernel configurations and confirmed that the BPMP driver is enabled in the kernel sources. I can access the bpmp via the /sys/kernel/debug/bpmp sysfs. But I’ve been unable to enable the trace mechanism. The /sys/kernel/debug/bpmp/trace file doesn’t generate any data.

I’ve monitored the PM I2C Bus on boot and I see it make I2C Requests - so I know that the pin mux seems OK at least on boot. I presume it continues to work afterwards but I don’t know how to make the SPMIC driver make a request.


  1. Has anyone successfully used the PM i2c bus? Is there a special enable that I need to use to make it work?
  2. Where can I find the source code of the bpmp so that I can figure out why it isn’t responding?

i2c4 is PMIC i2c and its advised to not put any other i2c on this bus. All the access to this bus is routed via BPMP SW. I believe you have not put your device on this bus and therefore you are seeing the error.
Source of BPMP FW is not available.
Let me know your problem with device you want to work on. And we will try to help

You can read the registers of 0x3c using
i2cget -f 4 0x3c 0 b

Thank you for the reply.

I can successfully run the i2cget request that you suggested:

$> sudo i2cget -y -f 4 0x3c 0 b

I don’t see any traffic on what I think is the PM i2c bus.

In the ‘OEM Product User Guide’, there is a table of pins in ‘Appendix E: Module Connector Pin Descriptions’. Pins A6 and B6 are listed as PM_I2C_CLK and PM_I2C_DAT, respectively. These are the pins that I think are the PM i2c bus from the bpmp.

It seems that these are not the PM i2c bus lines at all. I can make the request to here:

$> sudo i2cget -y -f 7 0x57 0 b

and I see the expected response from the EEPROM. So this i2c bus is not the PMIC i2c bus but is i2c@c250000 from the device tree.

So I guess the answer to the question is that the PMIC i2c bus and PM i2c bus are two separate i2c buses.

Thanks for your help.