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.
Questions:
- Has anyone successfully used the PM i2c bus? Is there a special enable that I need to use to make it work?
- Where can I find the source code of the bpmp so that I can figure out why it isn’t responding?