Set up Cape's EEPROM i2c-2 BeagleBoneBlack Rev-C

The BeagleBoneBlack comes with an “internal” EEPROM connected to i2c-0 line. I can see that clearly when I do i2cdetect:

debian@beaglebone:~$ i2cdetect -y -r 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- UU – -- – -- – -- – -- – -- –
30: – -- – -- UU – -- – -- – -- – -- – -- –
40: – -- – -- – -- – -- – -- – -- – -- – --
50: UU – -- – -- – -- – -- – -- – -- – -- –
60: – -- – -- – -- – -- – -- – -- – -- – --
70: UU – -- – -- – -- –

It is showing under address 0x50. When I try to do ahexdump I get the following values with no issue:

sudo hexdump -C /sys/class/i2c-dev/i2c-0/device/0-0050/eeprom | head -5
00000000 aa 55 33 ee 41 33 33 35 42 4e 4c 54 30 30 30 43 |.U3.A335BNLT000C|
00000010 31 38 33 37 42 42 42 47 30 36 32 32 ff ff ff ff |1837BBBG0622…|
00000020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |…|

Those addresses at 0x54-0x57 are reserved by the kernel driver.

Unless you have some capes with those EEPROMS populated, there is nothing actually there.

— Graham

@Graham I do have a cape with EEPROM at address 0x57 but the EEPROM is wiped with nothing on it so I guess that is why the board doesn’t populate that address by default. How can I fix that?

I think there is a detailed discussion as to what is supposed to be inside the cape EEPROMs in the
“BeagleBone Black System Reference Manual”

It looks like there is a live Wiki version at
https://github.com/beagleboard/beaglebone-black/wiki/System-Reference-Manual

But since that address has already been reserved by the kernel, for the cape manager,
you will not be able to read/write it from user space.

If you want to access that address from user space on a BBB, you need to stop the cape manager.
Google “BBB without reserved I2C addresses” on this forum.
and look at “am335x-bone-common-no-capemgr.dtsi”

— Graham

Detailed discussion on Apr 17 2017.

— Graham

@Graham

Thank you very much for your response. I went back to the (BBB without reserved I2C addresses)[https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!searchin/beagleboard/BBB$20without$20reserved$20i2c$20addresses|sort:date/beagleboard/NG8cDWuv2Y0/XGzZ3SJIBQAJ] and followed @RobertCNelson’s post, switched to branch 4.4-ti, changed the include at line 11 to “am335x-bone-common-no-capemgr.dtsi”. make and then make install and finally reboot. All compiled and got installed but when I boot back into my BB i still am seeing the U under the addresses 0x54-0x57 for i2c-2.

debian@beaglebone:~$ i2cdetect -y -r 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- UU UU UU UU – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

when I check the dmesg I can see that cape manger is still enabled (uboot_capemgr_enabled=1):

debian@beaglebone:~$ dmesg | grep cape
[ 0.000000] Kernel command line: console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet
[ 1.138635] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0
[ 1.138782] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1
[ 1.138793] gpio-of-helper ocp:cape-universal: ready

I know I’m missing something here to make it all work and be able to access EEPROM @ 0x57 but do not know where else I need to disable it?

Following the instructions from that Apr 17 2017 discussion resulted in the cape manager disabled and no I2C addresses reserved for the capes.

I have not made the changes on recent OS releases, and there have been a lot of changes in the cape manager, so perhaps best to have Robert comment.

— Graham

I had an eeprom at address 0x54 and was not able to read it. I use 0x50 now.