Rooney
Posts: 4
Joined: Sun Nov 26, 2017 9:48 am

dtoverlay=i2c-gpio stops booting new Raspberry Os image kernel

Tue Jun 02, 2020 9:25 pm

Hello,

if dtoverlay=i2c-gpio,i2c_gpio_sda=2,i2c_gpio_scl=3,bus=3 is set in config.txt the kernel included in Raspberry OS image 2020-05-27 does not boot anymore.
Any idea?

Regards,
Rooney

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3260
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: dtoverlay=i2c-gpio stops booting new Raspberry Os image kernel

Tue Jun 02, 2020 9:32 pm

A number of users have stumbled over this - it was a change to the overlay, intended to remove some warnings by the Device Tree compiler, that accidentally caused it to break the main DTB when it was applied. The problem was fixed in the source tree at the start of May, but the image snapshot must have been taken earlier.

You can download a fixed version of the overlay from here: https://github.com/raspberrypi/firmware ... -gpio.dtbo

Rooney
Posts: 4
Joined: Sun Nov 26, 2017 9:48 am

Re: dtoverlay=i2c-gpio stops booting new Raspberry Os image kernel

Wed Jun 03, 2020 5:19 pm

Hello!

Thanks for the reply.

The Pi is booting again, but I2C GPIO is still not working.
If I use "i2cdetect -y 3" no I2C devices will be listed.
If I copy an older i2c-gpio.dtbo to /boot/overlays everthing work as expected. So what might be the issue with the overlay you've provided? Any idea?

Regards,
Rooney

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3260
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: dtoverlay=i2c-gpio stops booting new Raspberry Os image kernel

Wed Jun 03, 2020 5:30 pm

It's one of two puzzles I'm working on when I get a moment. In the meantime, stick with the old version that works. You can follow any progress on this GitHub issue: https://github.com/raspberrypi/firmware/issues/1401

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3260
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: dtoverlay=i2c-gpio stops booting new Raspberry Os image kernel

Fri Jun 05, 2020 4:45 pm

This is now understood and fixed. To copy from the GitHub issue:
There are two forms of open-drain marking that the i2c-gpio overlay can use: the first is a flag to the i2c-gpio driver that says "this is really an open-drain GPIO, but you can drive it as normal", and the second is a flag on the GPIO declaration saying "I would like this GPIO to be used in open-drain mode". Both of these have the effect of silencing the warning - however, with the latter, gpiolib is capable of using open-drain emulation for devices that don't really have open-drain outputs (such as BCM283x/BCM2711), whereas the former disables this emulation.

Testing didn't show any problems with the first attempt, but probing the pins as analogue voltages rather than as digital logic levels shows contention on the lines - a setup where the I2C device had lower drive strengths would probably have failed.
The new version is available to download here: https://drive.google.com/file/d/1-4vyUf ... sp=sharing

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3260
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: dtoverlay=i2c-gpio stops booting new Raspberry Os image kernel

Fri Jun 12, 2020 7:54 pm

The fixed overlay is in the latest rpi-update release.

Return to “Device Tree”