# How to read/write i.MX8MP SOM's EEPROM?

**URL:** <https://community.solid-run.com/t/how-to-read-write-i-mx8mp-soms-eeprom/706>\
**Category:** NXP i.MX8M Plus\
**Tags:** iMX8M-plus\
**Created:** [August 21, 2023, 12:44pm UTC](https://community.solid-run.com/t/how-to-read-write-i-mx8mp-soms-eeprom/706 "2023-08-21T12:44:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pflander](https://avatars.discourse-cdn.com/v4/letter/p/35a633/32.png) [@pflander](https://community.solid-run.com/u/pflander)\
**Post date:** [August 21, 2023, 12:44pm UTC](https://community.solid-run.com/t/how-to-read-write-i-mx8mp-soms-eeprom/706/1 "2023-08-21T12:44:12Z")

</div>

I am using Hummingboard Pulse evaluation board + IMX8MP SOM with Yocto Kirkstone.

I can see EEPROM IC on i2c address 0x50 and a binary file with it’s content on path:  
sys/class/i2c-dev/i2c-0/device/0-0050/eeprom.

Binary file content:  
b’TlvInfo\x00\x01\x00\x8e!\x1ci.MX8M Plus System on Module"\x17SRMP8QDWB1D02GE008V12C0#\x10IP00041223700071%\x132022-10-20 03:15:22&\x01\x00'\x011(\x0bi.MX8M Plus\*\x02\x00\x01+\x03IMI,\x02PH-\x08SolidRun\xfe\x04P\xe0\\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00’

I can’t find a way how to parse it’s contents to readable format. I checked the TLV info format:  
[https://opencomputeproject.github.io/onie/design-spec/hw\_requirements.html#board-eeprom-information-format](https://opencomputeproject.github.io/onie/design-spec/hw_requirements.html#board-eeprom-information-format)

I can’t find any of the code values in the binary file:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/solid_run/original/1X/320ac3d4a5000a83c848fb12d12f23dff0784a20.png)

Is there a API or any other user friendly way to read/write the values from EEPROM? We would like to write our own serial number into SOM’s EEPROM and read it at runtime.

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [August 21, 2023, 3:12pm UTC](https://community.solid-run.com/t/how-to-read-write-i-mx8mp-soms-eeprom/706/2 "2023-08-21T15:12:09Z")

</div>

it is not as simple as reading the binary data from the eeprom. You can verify the data in u-boot with the tlv\_eeprom command. Alternatively you would need to adapt onie’s patches for i2c-tools, or reference something like Sonic’s python module to parse the data from eeprom, [https://github.com/sonic-net/sonic-platform-common/tree/master/sonic\_platform\_base/sonic\_eeprom](https://github.com/sonic-net/sonic-platform-common/tree/master/sonic_platform_base/sonic_eeprom)
