Beaglebone Rev C to Rev D Change Broke I2C in a specific way

Its widely advertised that if you set

disable_uboot_overlay_video=1

In uEnv.txt the new Rev D shouldn’t have any compatibility issues with older Kernel versions, however we’ve discovered that this broke our I2C-2 in a very specific way…

We use the Beaglebone Black Industrial in some products and one of those products has two Allegro ACS37800 current/voltage measurement chips. Those chips default to the I2C address by looking at DIO_0 and DIO_1 pins during start-up and depending on the level (which is analog), it will pick from a number of addresses. We had ours set up so that one chip appeared at 0x60 and the other chip appears at 0x63.

When we introduced a Rev D board, one of the chips (0x60) no longer “appeared” on the bus. The 0x63 chip was responding normally, and the 0x60 chips zero-crossing output was working normally as well, so the chip itself wasn’t dead. Moving resistors around on the 0x60 to try to get it to appear at ANY other address also didn’t have much of an effect until we changed the address of the 0x63 chip. Once we changed 0x63, a “new” chip appeared at 0x62 and the values that we were supposed to measure on the 0x60 chip showed up on the 0x63 chip.

This means that both ACS37800 chips somehow got the 0x63 address, a very fun one to find, especially since bus contention wasn’t enough of an issue such that the correct one still responded.

Now the only difference (other than eMMC) is supposed to be the framer driver, which we can see at the new address on I2C-0, but HDMI is disabled through uEnv.txt. It appears as though the start-up state of the HDMI pins (because DIO_0 on each ACS37800 goes to P8_27 and P8_28 respectively) is enough to drive the lines such that they get the wrong address.

We haven’t put a scope on the HDMI lines to compare start-up states against a Rev C board, but this is the only explanation we can deduce at this point. Just something for everybody out there to keep in mind that the new HDMI framer, if you use those pins for GPIO, may have different start-up states than the Rev C board.

BTW this is an older build of 5.10.162 using the TI Kernel and a Buildroot rootfs. Uboot 2022.04

Yes that sounds odd, I expect that there are several devices that use the i2c, and as you have noted with the change of some hardware on later versions of the bbb, yes I guess addresses can vary. I’ve not worked with i2c in the past - but my guess would be map out the devices on the i2c on rev C and D, either by scanning the bus, or looking at the schematics. Then come up with something that works for both.

Thanks for the reply however I don’t think this would help. The issue is that the new HDMI framer seems to start up with different pin levels than the Rev C board, and because this chips I2C address pins are shared with it’s I/O pins, this caused both chips to bootstrap the same address at power-on.

Mapping the addresses wouldn’t solve this as you can’t talk to two devices at the same address on the bus. Rev C worked fine and the devices would bootstrap at the correct address while Rev D caused an address conflict.

Uhm yea, I’ve always been a little dubious when it comes to devices
that depend on particular bus behavior at startup.

Also, I think that title of yours is borderline click-baity;
after all, the Rev. D isn’t broken or doing anything illegal.

That being said, did you try a PCA9514 or similar to
partition your bus away from the one on the Beagle?

Perhaps being on the other side could alleviate your problem?
Could be worth a try…

I’m 100% sure that using something to separate the pins on start up so the ACS chips can bootstrap correctly would fix this, however we couldn’t do a hardware change since this problem wasn’t discovered until we ran out of Rev C board stock.

Ultimately the fix isn’t too difficult, the ACS chips can be programmed to a fixed address regardless of the DIO pins, it just requires extra steps in the build process (programming it without the P8_27 or P8_28 pins connected).

Sorry about the “click bait” title, it wasn’t intended. Just wanted to point out to others that the new framer on the Rev D boards isn’t plug and play with the Rev C boards even if HDMI is disabled in uEnv in specific circumstances.

That’s very fortunate. Good find!

Yup, that has already been discussed at length here… :wink:

Sadly, in your case, the problem manifests waaay earlier than any
code is able to mitigate; hence why it has zero effect.

That kind of half-working address clash is nasty, since a bus scan can look almost believable. Disabling the overlay clearly doesn’t mean those HDMI-connected pins are electrically quiet at boot.