]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
eXMeritus HWW-1U-1A: Add support for the AT24C128N I2C EEPROM
authorKyle Moffett <Kyle.D.Moffett@boeing.com>
Fri, 16 Dec 2011 03:26:52 +0000 (22:26 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 11 Jan 2012 19:57:53 +0000 (13:57 -0600)
commit0ecb55132bcb6292f642657bbbd9b58749b8e303
treef4f51a08814a40772e646d4a82d9e09e80d0a68a
parent7985f7e3ff51ad8024d69a209893f68a2a5d3983
eXMeritus HWW-1U-1A: Add support for the AT24C128N I2C EEPROM

This EEPROM is hardware-write-protected and used to persist key
information such as the serial number and MAC addresses even if the
primary environment sector in NOR FLASH is overwritten.

During manufacturing, the environment is initialized from Linux and then
the key parameters copied to the EEPROM via U-Boot:

  env export -c -s 0x2000 $loadaddr serial# macaddr mac1addr mac2addr
  eeprom write $loadaddr 0x0000 0x2000

The chip is then locked via hardware for delivery.

When doing a field U-Boot upgrade, the environment is erased and reset
to the defaults to avoid problems with "hwconfig" changes, etc.  After
loading the new U-Boot image, the hardware data is reloaded:

  i2c dev 0
  eeprom read $loadaddr 0x0000 0x2000
  env import -c $loadaddr 0x2000
  saveenv

The first three commands are saved in the "restore_eeprom" variable for
user convenience.  (EG: "run restore_eeprom && saveenv")

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Andy Fleming <afleming@gmail.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
include/configs/HWW1U1A.h