IMX7D V1.1A EMMC Custom board, i2c atomic patch causes PMIC to not reset

Hello Toradex,

On Linux 4.14 branch we had some issues where the PMIC didn’t reboot all the time, most of the time it waited for the watchdog to restart the board. We were investigating the issue when we stumbled on the toradex_5.4-2.1.x-imx that didn’t have the issue. And now the Tempmon driver is fixed by the CPU freq we happily tested that version.

But since the “i2c: imx: implement master_xfer_atomic callback” was added the reboot stuck waiting for watchdog bug is back. Now consistently, knowing its the i2c communication to the PMIC is the root cause we connected a logic analyzer. When the patch is not applied the last messages that are sent is the reboot command (0x0E 0 | 0x0E 1). When we do apply the patch the last message is (0x0B 7) which is the watchdog.

We created a reverse patch for that specific modification and added that the the buildroot kernel build parameters and now the latest version is working again with tempmon, making sure we didn’t miss anything else.

We don’t have any extra i2c devices currently in design. We connected the logic analyzer to the I2c to the pads on the module next to the sound chip.

alt text

If you need more info please let me know. Hope you guys find a solution for the issue. Keep up the good work.

Kind regards,
Michaël

Hi,

but NAND i.MX7D V1.1C is fine with this patch and not fine without it, issues on reboot. If watchdog part is broken, perhaps that watchdog shouldn’t be used? As I understand it PMIC is there on this Colibri to serve power supply solution, isn’t it? i.MX7D has built in watchdog. Is that one broken or not enough to have just built in watchdog?

@Edward
Thank you for response, sorry mine took so long.

My issue is that the reset command isn’t sent when the patch is enabled. There is no problem with the watchdog. Its just the thing that makes the board reset evenalty after x time because the board wasn’t reset by the pmic. This is undesirable.

The CONFIG_RN5T618_WATCHDOG is enabled in the defconfig. So we expected this to be supported, we can switch to te internal watchdog. The first logic analyzer picture only shows the watchdog as it was the last arbitrary package that was captured. If we switch to the internal watchdog that i2c message won’t be sent anymore. It will then capture an other arbitrary package (propably the init of the PMIC).

If it does work on the NAND version that is interesting. I can’t verify that as I only have a EMMC version.

I have never heard of any such issue and do know that at least in the upcoming BSP 5.1 release this all works as expected. I suspect that you altered the Linux kernel configuration around that PMIC and/or watchdog area in a way which is not really recommended as there is at least one known errata from NXP (sorry, would have to dig out the details again). Could you please explain your modifications and why exactly you would want to mess with any of that?

Hi @remotenerd,

Sorry for delay, had no time for iMX7D.
Does your u-boot report the same PMIC version PMIC: RN5T567 LSIVER=0x01 OTPVER=0x0d? Perhaps there are different PMIC versions which behave differently. In my case atomic I2C calls are must-haves for crashless iMX7D reboot with toradex_5.4-2.1.x-imx, Colibri iMX7 Dual 512MB V1.1C.

Edward