EEPROM
The Nagami SoM includes an Electrically Erasable Programmable Read-Only Memory (EEPROM) chip — a 24AA02E48 2Kb EEPROM with a pre-programmed EUI-48 MAC ID. This provides non-volatile memory that retains data even when power is off. The EEPROM is connected to the TWI3 bus, which is exposed as i2c-1 in Linux by default.
Information
The EEPROM contains the system's MAC address stored in the lower 1Kb (read-only) section. The upper 1Kb of the EEPROM memory is available for user write/read operations.
Checking if the EEPROM is Detected
To check if the EEPROM is detected and the driver loaded, you can query the device name via sysfs:
cat /sys/class/i2c-dev/i2c-1/device/1-0050/name
If detected correctly, the output should be:
24c02
Writing to the EEPROM
You can write data to the EEPROM using the kernel's built-in EEPROM driver by writing to the sysfs interface. For example, to write the string "Hello, EEPROM!" to the start of the EEPROM memory:
echo -n -e "Hello, EEPROM!" > /sys/class/i2c-dev/i2c-1/device/1-0050/eeprom
This command writes the string directly to the beginning of the EEPROM.
Reading from the EEPROM
To read data back from the EEPROM, simply read the corresponding sysfs file:
cat /sys/class/i2c-dev/i2c-1/device/1-0050/eeprom
This will output the contents of the EEPROM starting at the beginning, such as the string written earlier.
Summary
The EEPROM on Nagami is accessible on the TWI3 bus (i2c-1) at address 0x50. The lower half contains the factory MAC address (read-only), while the upper half can be used for custom data storage using standard Linux sysfs interfaces.
No external tools are needed — reading and writing can be done directly via sysfs.