Using fru-device with 16 Bit EEPROM

James Feist james.feist at
Sat Jul 20 02:21:15 AEST 2019

On 7/18/19 11:50 PM, Phil Eichinger wrote:
> 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?

This is a known issue, Amithash was looking into it, but don't think 
we've reached a solution that works well with both 8bit and 16bit eeproms:

> 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)?

It's meant to discover devices without explicitly knowing they are 
available, for things like add in cards, psus, etc you might want to 
discover they are available instead of depending on device tree. This 
way you don't have to add support for all components to all platforms, 
they can just be discovered automatically.

> Cheers,
> Phil

More information about the openbmc mailing list