Hello,
I have an extention board where I use d_can0 and d_can1.
To free Pin P9_19 and P9_20 for d_can0, I switched I2C-2 to P9_21 and P9_22 in mode 2
On these I2C-2 pins I have connected a RTC DS1307
My device overlay worked fine with Debian 9 and Kernel 4_14
Now I want to update to the current Debian11 image.
I will try to give a clear summary of what I tried yet
This is the overlay that I want to use
BB-I2C2-ALTERNATIVE-RTC-DS1307.dts (2,3 KB)
When I am only using this overlay, probe of rtc-ds1307 in overlay fails and I2C controller seems to be “blocked”.
[ 5.001137] omap_i2c 4819c000.i2c: controller timed out
[ 5.006636] rtc-ds1307: probe of 2-0068 failed with error -110
[ 6.057122] omap_i2c 4819c000.i2c: controller timed out
[ 7.113107] omap_i2c 4819c000.i2c: controller timed out
[ 8.169124] omap_i2c 4819c000.i2c: controller timed out
[ 9.225105] omap_i2c 4819c000.i2c: controller timed out
[ 10.281125] omap_i2c 4819c000.i2c: controller timed out
[ 11.337115] omap_i2c 4819c000.i2c: controller timed out
[ 12.393125] omap_i2c 4819c000.i2c: controller timed out
[ 13.449110] omap_i2c 4819c000.i2c: controller timed out
[ 13.467247] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
Also i2cdetect -r 2
is not able to find anything, it is only showing -- --
… for all address
When I combine this overlay with the BB-CAN0-00A0.dtbo
, than it still can not probe in boot sequence but i2cdetect -r 2
is now able to detect the 68 which is the address of the ds1307.
The OF_FULLNAME looks different compared to old linux.
With Kernel 5.10:
OF_NAME=ds1307
OF_FULLNAME=/ocp/interconnect@48000000/segment@100000/target-module@9c000/i2c@0/ds1307@68
With Kernel 4.14:
OF_FULLNAME=/ocp/i2c@4819c000/ds1307@68
When I run this on a standalone beaglebone black, than I can not see the “controller timed out” messages with dmesg
but as soon as I boot with connect extention board, these messages are there.
When I remove the ds1307 lines from the overlay (lines 67 and 100-102), than I am able to manually probe the ds1307
root@BeagleBone:/sys/class/i2c-dev/i2c-2/device# echo ds1307 0x68 > /sys/class/i2c-dev/i2c-2/device/new_device
root@BeagleBone:/sys/class/i2c-dev/i2c-2/device# dmesg | grep i2c
[ 7.840438] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[ 8.887850] i2c /dev entries driver
[ 9.114806] input: tps65217_pwr_but as /devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e0b000.target-module/44e0b000.i2c/i2c-0/0-0024/tps65217-pwrbutton/input/input0
[ 9.117005] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 10.154779] omap_i2c 4819c000.i2c: controller timed out
[ 11.210751] omap_i2c 4819c000.i2c: controller timed out
[ 12.266800] omap_i2c 4819c000.i2c: controller timed out
[ 13.322743] omap_i2c 4819c000.i2c: controller timed out
[ 14.378760] omap_i2c 4819c000.i2c: controller timed out
[ 15.434750] omap_i2c 4819c000.i2c: controller timed out
[ 16.490761] omap_i2c 4819c000.i2c: controller timed out
[ 17.546750] omap_i2c 4819c000.i2c: controller timed out
[ 17.564879] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[ 371.212227] i2c i2c-2: new_device: Instantiated device ds1307 at 0x68
Does anyone have an idea on how to solve it?
- Where is i2c2 initialized first? Is it possible to initialize it directly to P9_21 and P9_22?
- Why does reconfiguring take approx. 7sec?
- Why does reconfiguring seems to depend on initialyzing P9_19 and P9_20 to d_can0_rx/tx?
- Why there is a dependency whether the pins are free or the can transceiver and the ds1307 are connected?
- Is it possible to remove existing i2c2 before making the new device on the alternative pins?
- Is it possible to delay probing of ds1307 in overlay? 10sec additional time before ds1307 works does not matter for me
Many thanks
Martin