Other Parts Discussed in Thread: SK-AM64B, SYSCONFIG
Hello,
I'm using the SK-AM64B EVM and I'm trying to get I2C working on the Raspberry PI header pin 3 (RPI_I2C2_SDA) and pin 5 (RPI_I2C2_SCL).
I'm using PROCESSOR-SDK-LINUX-RT-AM64 version 08.06.00.42.
All was looking good...
root@board1:~# i2cdetect -l
i2c-1 i2c OMAP I2C adapter I2C adapter
i2c-2 i2c OMAP I2C adapter I2C adapter
i2c-0 i2c OMAP I2C adapter I2C adapter
root@board1:~# dmesg | grep i2c
[ 0.814075] i2c /dev entries driver
[ 0.981803] omap_i2c 20000000.i2c: bus 0 rev0.12 at 100 kHz
[ 1.005999] omap_i2c 20010000.i2c: bus 1 rev0.12 at 400 kHz
[ 1.007588] omap_i2c 20020000.i2c: bus 2 rev0.12 at 100 kHz
root@board1:~# ls -al /dev/i2c*
crw------- 1 root root 89, 0 Dec 7 10:27 /dev/i2c-0
crw------- 1 root root 89, 1 Dec 7 10:27 /dev/i2c-1
crw------- 1 root root 89, 2 Dec 7 10:27 /dev/i2c-2
But no matter the i2cget, i2cdump, detect, I couldn't see any toggling of pin3/5. I confirmed the pull-ups were causing these pins to be high.
I tested with and without an i2c device attached.
In case it did require an update to device tree, I did update my .dts file to contain:
// in the main_pmx0 section:
main_i2c2_pins_default: main-i2c2-pins-default {
pinctrl-single,pins = <
AM64X_IOPAD(0x00b0, PIN_INPUT_PULLUP, 0) /* (P19) I2C2_SCL */
AM64X_IOPAD(0x00b4, PIN_INPUT_PULLUP, 0) /* (R21) I2C2_SDA */
>;
};
&main_i2c2 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c2_pins_default>;
clock-frequency = <400000>;
};
So with this change and a reboot, still not working, although it did change the I2C data rate!
root@labapps:~# dmesg | grep i2c
[ 0.813661] i2c /dev entries driver
[ 0.980639] omap_i2c 20000000.i2c: bus 0 rev0.12 at 100 kHz
[ 1.006164] omap_i2c 20010000.i2c: bus 1 rev0.12 at 400 kHz
[ 1.007741] omap_i2c 20020000.i2c: bus 2 rev0.12 at 400 kHz
For the record, from datasheet:
Thanks for the help.
73,
Timothy