We have custom Am335x board with eeprom.We want to shape our eeprom like BeagleBone (I mean name,version,serial etc…).
I tried with U-Boot using I2C commands.You can see my logs below. Firstly i read my eeprom, then i tried to write byte by btye.Then i read again but nth happened.Then i tried to fill with 0xAA again it didnt succeed. How do you do it? By the way,I ported and used U-Boot 2011.09 for this purpose.I used i2c-tool over Linux but it says UU which means driver is used by Linux and it doesnt let me dump or anything else.
I wrote my EEPROM over Linux using Sysfs last night.
I dont remember exactly (I dont have my development board right now) but it did sth like that
cd sys/bus/i2c/devices/1-0050/
echo 12345678 >eeprom
In case, the value which you wrote above is ASCII so you will see 31:32:33:34:35:36:37:38 in your EEPROM. Here is converter .(http://www.dolcevie.com/js/converter.html)
I think U-Boot I2C commands have some problems.It also doesnt always read BeagleBone’s EEPROM correctly.(%50 sucessfully show BeagleBone’s header and magic number.) . Maybe it is about U-Boot version. I also looked with scope, it really sent data to EEPROM but I dont know exactly.
As a result my problem is solved but it is more logicial to write EEPROM over U-Boot.
Have seen similar problems. Sometimes U-Boot has problems reading I2C EEPROM, on Robert Nelson version it even gives exception when changing to I2C 2 bus
BTW it seems matter how you read the I2C, bytes, words, etc. I2C “Beagle” standard is 16 bits words and 16 bits addressing.
Note that on mainline U-Boot (which I assume Robert’s build is based on), there’s also the eeprom command that will batch write from DRAM to the EEPROM. So you could use ‘mw’ to setup an area of memory with the right contents or even hexedit a file on your host and then load the file to memory, write the memory to EEPROM.
I don’t understand the what you mean by “write b” or “write long”. Could you please give the exact statements to execute? I believe the header the bootloader is looking for is “0xEE3355AA”. Is that correct?
Hi Buğra AYDOĞAR,
you said “In case, the value which you wrote above is ASCII so you will see 31:32:33:34:35:36:37:38 in your EEPROM.”,but how I can see it
Yes the eeprom write in U-boot wont work as they might be 16 bit adressses or 16 bit data
Modify the i2c driver to make it work in U-boot or write a new Uboot command to access the eeprom