5 ms·
Very good summary, though let me throw in some doubt: > it might just be possible to force a > reset of the bogus chip when a lockup is > detected
by mik3y 13y ago
Very good summary, though let me throw in some doubt:
> it might just be possible to force a
> reset of the bogus chip when a lockup is
> detected [..] There's usually a GPIO for
> that (if they wired it...).
Yes, if they wired it. In my experience, actual design with this best practice is frustratingly rare. It's as if the hardware designers think, "Oh, it's just I2C, what could go wrong."
If they didn't do it, the chips are probably only connected to a master board level reset, and you're basically screwed.
To find out whether it's the case on the affected devices, absent schematics or a scope, I'd grep around the kernel sources and look for definition of such a pin. (If sources aren't available, try symbols.)
- ansible 13y ago> Yes, if they wired it. In my experience, actual design with this best practice is frustratingly rare. Keep in mind how precious board space and GPIOs are in a modern phone. The boards are tiny, and even with 8 or 10 layers, they are still packed with traces on each layer. Add to that, that the processor itself doesn't have a lot of GPIOs left over for a design like this. There are soooo many peripherals these days. Sure, you could use a port extender, but that is (a) another chip, (b) extra board space, (c) extra cost. So that's not going to happen unless something really important needs it, like the audio subsystem.
- joezydeco 13y agoYou're being way too kind to these chips. Look at the datasheet for the BMP280 barometer chip, the AK8963 compass, and the MPU6500 accelerometer (close enough): http://datasheet.octopart.com/BMP280-Bosch-datasheet-13691204.pdf http://datasheet.octopart.com/BMP280-Bosch-datasheet-1369120... http://www.akm.com/akm/en/file/datasheet/AK8963.pdf http://www.akm.com/akm/en/file/datasheet/AK8963.pdf http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Components/General%20IC/PS-MPU-6000A.pdf http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Components/Ge... The compass (AK8963) has a reset line, the other two have no reset line at all. Your best bet is to drop VCC, but what are the chances the hardware guy just tied them to the power bus and left it at that?
- kosma 13y ago> The compass (AK8963) has a reset line, the other two have no reset line at all. Your best bet is to drop VCC, but what are the chances the hardware guy just tied them to the power bus and left it at that? That is, if you also have even more circuitry to disable the bus pullups; otherwise they will continue to power the device via clamping diodes, potentially calling further confusion. The hardware guys don't implement I2C slave power control for a reason: it gets bloody expensive real fast - both in terms of BOM cost and PCB estate. Having said that, the lack of a RESET line on many I2C slaves is just ridiculous. I have a sticker on my monitor that says "fix the hanging MMA8451Q bug"; it's been there for at least three months. The very thought of debugging I2C transactions makes me stop even trying.
- joezydeco 13y agoGood point about the pull-ups. Forgot about that.