@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%7Csort: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?

On Wednesday, October 31, 2018 at 12:14:23 PM UTC-4, Graham Haddock wrote:
>
> Detailed discussion on Apr 17 2017.
>
> --- Graham
>
> ==
>
> On Wed, Oct 31, 2018 at 10:15 AM Graham Haddock <[email protected] 
> <javascript:>> wrote:
>
>> 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
>>
>> ==
>>
>>
>> On Wed, Oct 31, 2018 at 10:01 AM MG <[email protected] <javascript:>> 
>> wrote:
>>
>>> @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?
>>>
>>> On Tuesday, October 30, 2018 at 11:14:50 PM UTC-4, [email protected] 
>>> wrote:
>>>>
>>>> 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 a topic in the 
>>> Google Groups "BeagleBoard" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/beagleboard/r_cnUtBakj4/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> [email protected] <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/beagleboard/5152cbd8-5ca5-499c-b93f-d57ee2a85c79%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/beagleboard/5152cbd8-5ca5-499c-b93f-d57ee2a85c79%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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/9ad0fb51-dcef-4f8a-9ae2-6a17e2d98ddd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to