Hi all,
Our HW department has produced a cape for the AI64 that has an rtc (i2c), a lon-interface (spi) and four rs485 ports.
However, they have not considered the standard overlays that are available per default. They have looked at Connectors — BeagleBoard Documentation and chosen buses from that list. The result is:
RTC hooked up to I2C3: P8-13(2) and P9-21B(2)
LON-SPI hooked up to SPI1: P8-35B(0), P9-18B(0), P9-24A(0) and P9-26A(0)
I got the SPI bus working by adding to k3-j721e-beagleboneai64-buses.dtsi:
BONE_PIN(P8_35, spi, P8_35B(PIN_INPUT, 0)) /* spi1_cs0 */
BONE_PIN(P9_18, spi, P9_18B(PIN_INPUT, 0)) /* spi1_d1 */
BONE_PIN(P9_24, spi, P9_24A(PIN_OUTPUT, 0)) /* spi1_d0 */
BONE_PIN(P9_26, spi, P9_26A(PIN_INPUT, 0)) /* spi1_clk */
For the I2C3, I have added:
BONE_PIN(P8_13, i2c, P8_13(PIN_INPUT, 2)) /* i2c3_scl */
BONE_PIN(P9_21, i2c, P9_21B(PIN_OUTPUT, 4)) /* i2c3_sda */
But the i2c-bus keeps getting timeout errors when probing:
root@beaglebone-ai64:~# dmesg | grep i2c
[ 0.747719] i2c /dev entries driver
[ 0.853214] omap_i2c 40b00000.i2c: bus 0 rev0.12 at 100 kHz
[ 0.853740] omap_i2c 40b10000.i2c: bus 1 rev0.12 at 100 kHz
[ 0.877804] omap_i2c 42120000.i2c: bus 2 rev0.12 at 400 kHz
[ 0.878450] omap_i2c 2000000.i2c: bus 3 rev0.12 at 400 kHz
[ 0.879454] omap_i2c 2010000.i2c: bus 4 rev0.12 at 400 kHz
[ 0.880059] omap_i2c 2020000.i2c: bus 5 rev0.12 at 100 kHz
[ 1.921709] omap_i2c 2030000.i2c: controller timed out
[ 1.921810] omap_i2c 2030000.i2c: bus 6 rev0.12 at 100 kHz <-- Probed twice?
[ 1.922665] omap_i2c 2040000.i2c: bus 7 rev0.12 at 100 kHz
[ 1.923170] omap_i2c 2050000.i2c: bus 8 rev0.12 at 400 kHz
[ 1.923606] omap_i2c 2060000.i2c: bus 9 rev0.12 at 100 kHz
and
root@beaglebone-ai64:~# i2cdetect -y -r 6
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: [ 494.017639] omap_i2c 2030000.i2c: controller timed out
-- [ 495.073641] omap_i2c 2030000.i2c: controller timed out
-- [ 496.129645] omap_i2c 2030000.i2c: controller timed out
-- [ 497.185644] omap_i2c 2030000.i2c: controller timed out
-- [ 498.241644] omap_i2c 2030000.i2c: controller timed out
-- [ 499.297638] omap_i2c 2030000.i2c: controller timed out
...
I have made sure that no other pinmux is touching the pins so I don’t really know what the issue could be. Before this, I have succesfully connected the RTC to the “standard” i2c-bus using jumper wires and the overlay BONE-I2C3.dts (connected to main_i2c4, confusing, I know), so I know that the RTC itself is working, but connecting it to main_i2c3 doesn’t seem to work.
Is main_i2c3 unavailable to us?
Thanks,
/Bo