Issue with stmpe-i2c kernel driver init

We have made our own carrier board and using the analog inputs for critical functions. However we have a problem where randomly (or on some boards always) the i2c bus driving the stmpe driver is unable to setup properly and results in no analog channel being available.

# cat /var/log/messages | grep i2c
Nov 12 15:04:24 Signel user.info kernel: [    0.148005] i2c-gpio i2c.14: using pins 109 (SDA) and 108 (SCL)
Nov 12 15:04:24 Signel user.err kernel: [    0.150048] stmpe-i2c 1-0041: failed to read regs 0x0: -5
Nov 12 15:04:24 Signel user.warn kernel: [    0.150095] stmpe-i2c: probe of 1-0041 failed with error -5
Nov 12 15:04:24 Signel user.info kernel: [    0.150136] i2c i2c-1: IMX I2C adapter registered
Nov 12 15:04:24 Signel user.info kernel: [    0.150988] i2c i2c-2: IMX I2C adapter registered
Nov 12 15:04:24 Signel user.info kernel: [    1.411579] i2c /dev entries driver
Nov 12 15:04:24 Signel user.warn kernel: [    1.416391] i2c-core: driver [mag3110] using legacy suspend method
Nov 12 15:04:24 Signel user.warn kernel: [    1.422604] i2c-core: driver [mag3110] using legacy resume method

However the same kernel loads fine 100% of the time on a Viola Carrier.

The engineer who designed the custom carrier is no longer with us and we are not seeing ay difference beside the i2c channel on X1 192,194 not being pulled up.

Would someone have a place to start looking for a cause to this i2c issue.

I can provide full boot log if required and whatever data is required to help us

regards

The engineer who designed the custom carrier is no longer with us and we are not seeing ay difference beside the i2c channel on X1 192,194 not being pulled up.

The I2C lines are to be pulled-up. For example, on the Viola Carrier Board, the lines have been pulled up with 4.7K resistance. Check Page 9 of Viola 1.2 schematics downloadable from Design Resources section here.

Hi

If you mean the STMPE811 which is assembled on the Colbri module then that one is on a separate I2C bus only used on the module (and pulled correctly). Then X1 192,194 would be not relevant.

Please have a look at this community question. I think that you have voltages applied to AD[0-3] resulting in the STMPE811 going into SPI mode.

Max

Hi max, excuse my lack of understanding here but what do you mean by having voltages applied to AD[0-3], What else are we suppose to apply to an AD converter?. We do monitor the batteries voltage at AD3 and light intensity at AD0.

The same circuits connected to the Viola carrier do not cause the STMPE811 driver to fail and failure is random. sometime it will start, some time it wont. problem is it wont most of the time on our latest carrier revision.

If you could elaborate I would appreciate

Thanks

Sorry I had missed the link in your post, I have sent the link to my friend that understands all this and hopefully he can help us.

Regards

Hi,

Since this thread started we have switch our design and use a Viola and interface to it instead of connecting directly to the colibri. We still do have issues with analog driver not loading. Have you got any new info on this problem.

Regards

hi @marc

Could you share your schematic in a private message?
Please share your kernel .config and devicetree files too?

Thanks and best regards,
Jaski