Using fru-device with 16 Bit EEPROM

Phil Eichinger phil at zankapfel.net
Fri Jul 19 16:50:57 AEST 2019


Hi *,

I was wondering if anyone is using fru-device from entity-manager with
EEPROMs that have 16 Bit addressing.
Initially I got an off-by-one error, I dumped the read header bytes and
they looked like they came from address 0x01.
I dug in a little deeper and I think there is an issue with the read
function - read_block_data() - for 16 Bit addressing.
I haven't verified it on a scope but I think the i2c_smbus API yields an
I2C transmission for every API call?

My EEPROM (Microchip 24C128) requires for random reads a 2 Byte write
with the higher address byte first - current implementation has it
vice-versa and split over 2 transactions.
>From then on I can use the continuous read with auto address increment.

Is the current implementation written for a different EEPROM requiring
reading this way or is it just broken? In case of the latter I can send
a patch.

Why is there basically a user space driver for reading/writing EEPROMs
instead of using the interface in sysfs (ie.
/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus at 1e78a000/1e78a100.i2c-bus/i2c-3/3-0050/eeprom)?

Cheers,

Phil
-- 


More information about the openbmc mailing list