I'm trying to enable headers pins P9_24 & P9_26 for I2C communication with my SL030 StrongLink RFID reader.
>From the documentation P9_24 & P9_26 are I2C-1 in Mode 3. By default the pin names are UART1_TXD & UART1_RXD respectively. >From this source <http://datko.net/2013/11/03/bbb_i2c/>, I2C-1 is at address *0x4802_A000*. In the command line I try the following to scan available I2C mappings: > *# ls -l /sys/bus/i2c/devices/i2c-** lrwxrwxrwx 1 root root 0 Jan 1 2000 /sys/bus/i2c/devices/i2c-0 -> > ../../../devices/ocp.3/44e0b000.i2c/i2c-0 > lrwxrwxrwx 1 root root 0 Jan 1 2000 /sys/bus/i2c/devices/i2c-1 -> > ../../../devices/ocp.3/4819c000.i2c/i2c-1 It's clear I2C at address 0x4802_A000 isn't enabled. So, according to this source <http://datko.net/2013/11/03/bbb_i2c/>, I can use the following command to enable the third I2C bus: > *# echo BB-I2C1 > /sys/devices/bone_capemgr.9/slots* Scanning the I2C mappings again produces the following: > * # ls -l /sys/bus/i2c/devices/i2c-** > lrwxrwxrwx 1 root root 0 Jan 1 2000 /sys/bus/i2c/devices/i2c-0 -> > ../../../devices/ocp.3/44e0b000.i2c/i2c-0 > lrwxrwxrwx 1 root root 0 Jan 1 2000 /sys/bus/i2c/devices/i2c-1 -> > ../../../devices/ocp.3/4819c000.i2c/i2c-1 > lrwxrwxrwx 1 root root 0 Sep 30 01:51 /sys/bus/i2c/devices/i2c-2 -> > ../../../devices/ocp.3/4802a000.i2c/i2c-2 Ok, great. It looks like I2C at address 0x4802_A000 is now enabled, mapped as I2C-2. *Question: After rebooting Linux I2C-2 disables again. How can I make the change permanent?* Using i2cdetect tool, my SL030 RFID Reader still doesn't show up when probing I2C-2: > * # i2cdetect -y -r 2* All addresses are displayed in a grid as '--'. I did a little more searching around about the SL030 over I2C bus and came across a comment in this python code <http://skpang.co.uk/dl/rfid.py> mentioning that a baud rate at 100k won't work with the SL030 RFID Reader, and should be changed to 200k. Then I ran this command to find out the I2C baud rate: > *# dmesg | grep i2cdmesg | grep i2c* [ 0.130912] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz > [ 0.131827] input: tps65217_pwr_but as > /devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0 > [ 0.140210] omap_i2c 44e0b000.i2c: unable to select pin group > [ 0.140729] omap_i2c 4819c000.i2c: bus 1 rev0.11 at 100 kHz > [ 0.142049] omap_i2c 4819c000.i2c: unable to select pin group > [ 0.753827] i2c /dev entries driver > [ 55.628003] omap_i2c 4802a000.i2c: bus 2 rev0.11 at 100 kHz > [ 55.628066] omap_i2c 4802a000.i2c: unable to select pin group It's clear to see that I2C 4802_A000 is running at 100 kHz. *Question: How can I change the baud rate to 200 kHz?* I assume all of my step above are correct when trying to enable P9_24 & P9_26. If not, please do correct me. This is my first time usage of Linux & I2C. Thank you very much for your time. All help is greatly appreciated. Please note I am a newbie to Linux, so step by step guides are very welcome! -- 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]. For more options, visit https://groups.google.com/d/optout.
