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 == On Tuesday, October 30, 2018 at 7:01:27 PM UTC-5, MG wrote: > > 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 > |................| > * > 00001000 aa 55 33 ee 41 33 33 35 42 4e 4c 54 30 30 30 43 > |.U3.A335BNLT000C| > > Now I want to add another EEPROM (with cape) on i2c-2 line which is > supported according to [BBB SRM]( > https://cdn-shop.adafruit.com/datasheets/BBB_SRM.pdf) section 8.2. It is > the CAT24C256 as mentioned in the SRM. The allowable address range for the > expansion cards is 0x54-0x57. When I do i2cdetect I can see the following: > > debian@beaglebone:~$ i2cdetect -r -y 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: -- -- -- -- -- -- -- -- > > I can see the addresses 0x54-0x57 showing, but when I try hex dump I get > an error: > > hexdump: /sys/class/i2c-dev/i2c-2/device/2-0054/eeprom: Connection > timed out > > Questions: > > 1. Why are they showing as U's not actual address numbers? I know U stands > for used resource? > 2. Why am I failing to read from that EEPROM? I have tried all addreses > from 0x54-0x57 with no luck. I can confirm that those addresses are showing > in /sys/class/i2c-dev/i2c-2/device and the each dir has the following in it: > > debian@beaglebone:~$ ls /sys/class/i2c-dev/i2c-2/device/2-0054/ > -la > total 0 > drwxr-xr-x 4 root root 0 Oct 26 19:46 . > drwxr-xr-x 8 root root 0 Oct 26 19:46 .. > drwxr-xr-x 3 root root 0 Oct 26 19:47 2-00540 > lrwxrwxrwx 1 root root 0 Oct 26 19:47 driver -> > ../../../../../../bus/i2c/drivers/at24 > -rw------- 1 root root 32768 Oct 26 19:47 eeprom > -r--r--r-- 1 root root 4096 Oct 26 19:47 modalias > -r--r--r-- 1 root root 4096 Oct 26 19:47 name > lrwxrwxrwx 1 root root 0 Oct 26 19:47 of_node -> > ../../../../../../firmware/devicetree/base/ocp/i2c@4819c000/cape_eeprom0@54 > drwxr-xr-x 2 root root 0 Oct 26 19:47 power > lrwxrwxrwx 1 root root 0 Oct 26 19:47 subsystem -> > ../../../../../../bus/i2c > -rw-r--r-- 1 root root 4096 Oct 26 19:47 uevent > > I can see the addresses mapping into the kernel but when I try to hexdump > eeprom it doesn't work at all. I though this was supposed to be setup by > kernel since it is mentioned in BeagleBone SRM. Am I going to need an > overlay to add to uboot for this? It doesn't make sense since i2c-2 is > already set up by default i.e. when I connect another device at address > aside from 0x54-0x57 it shows up fine and I'm able to interface to it? > > All I'm trying to do is read from the EEPROM like I did with the > "internal" one to confirm it is working. What am I doing wrong? > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/4ed266b6-3dcb-46b3-9b5b-4b1407e97578%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
