seeing differing opinions online ... if you read this:
https://e2e.ti.com/support/arm/sitara_arm/f/791/t/233139
i should be able to display the first few bytes of the BBB's EEPROM
from u-boot using:
i2c md 0x50 0 16
but, for me, that just displays "ff" throughout, which is what *other*
people claim to see when they try it.
should this command work? do i need to initialize something first?
am i (theoretically) using the correct arguments?
rday
U-Boot# i2c probe
Valid chip addresses: 24 34 50
U-Boot# i2c md 0x24 0 16
0000: e2 3f 00 01 b1 80 b2 01 00 00 08 00 7f 0c 18 11 .?..............
0010: 09 06 09 38 26 3f ...8&?
U-Boot# i2c md 0x34 0 16
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0010: 00 00 00 00 00 00 ......
U-Boot# i2c md 0x50 0 16
0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
0010: ff ff ff ff ff ff ......
Regards,
ok, you're seeing what i'm seeing but shouldn't that last command
print the first 16 bytes of the EEPROM (header, board name, version)?
if i boot into linux, and:
# cd /sys/devices/ocp.3/44e0b000.i2c/i2c-0/0-0050
then i can certainly dump what corresponds to the EEPROM:
# hexdump -C eeprom | less
00000000 aa 55 33 ee 41 33 33 35 42 4e 4c 54 30 41 35 43 |.U3.A335BNLT0A5C|
00000010 32 37 31 33 42 42 42 4b 37 35 37 31 ff ff ff ff |2713BBBK7571....|
00000020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
... snip ...
so can i not do that from within u-boot?
rday
U-Boot# i2c md 0x50 0x0c.2
000c: 30 30 30 43 32 34 31 34 42 42 42 4b 30 31 30 33 000C2414BBBK0103
Regards,
ah, i overlooked the need for the ".2" suffix, to specify that
the chip uses 2 bytes for addresses. my bad. movin' on ...
rday
and just to clarify an earlier curiosity of mine, is it true that
u-boot's "eeprom" command has no relevance here? i've never used that
command but it seems that BBB EEPROM access must be done exclusively
via i2c, correct?
rday
Well, it is wired up:
204 #define CONFIG_CMD_EEPROM
205 #define CONFIG_ENV_EEPROM_IS_ON_I2C
206 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
207 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
208 #define CONFIG_SYS_I2C_MULTI_EEPROMS
and looking at:
http://lists.denx.de/pipermail/u-boot/2007-September/025043.html
The i2c md command is just more useful....
Regards,
Great way to reset the board. 
U-Boot# eeprom read 0x50 0 0 10
EEPROM @0x50 read: addr 00000000 off 0000 count 16 ... I2C read:
NULL pointer passed
done
U-Boot# md 0
00000000:data abort
pc : [<9ff8ac3c>] lr : [<9ff8ac10>]
reloc pc : [<8083ec3c>] lr : [<8083ec10>]
sp : 9ef2bce0 ip : 00000000 fp : 00000000
r10: 00000000 r9 : 9ef2bed8 r8 : 00000000
r7 : 00000004 r6 : 00000004 r5 : 00000004 r4 : 00000040
r3 : 44e09000 r2 : 44e09000 r1 : 9ef2bcf4 r0 : 00000009
Flags: nZCv IRQs off FIQs on Mode SVC_32
Resetting CPU ...
resetting ...
U-Boot SPL 2015.04-rc5-00002-g252073b (Apr 07 2015 - 10:00:16)
Regards,
ah, i never noticed that, good to know, thanks. i suspect i really
need to review all of my u-boot ...
rday
I wrote this C utility a while ago to read the BBB eeprom for the model & serial #s:
http://pastebin.com/p7XwKUGZ
It works on both Debian (Jessie) and FreeBSD! It uses ioctl()'s to read 28 bytes from slave addr 0x50 on i2c-0.
-W
The nice thing is that you don’t have to be root to use it – just a member of the i2c group. Reading from /sys/bus/i2c/devices/0-0050 can only be done by root.