How to set up da9063 watchdog for ConnectCore 6

The ConnectCore6 SBCs have three watchdogs, two on the imx6 chip (where one is reserved for TrustZone stuff, which I haven’t looked into) and one on the DA9063 PMIC. DA9063 has regulators that powers the IMX6, DRAM, peripherials, everything. It has a RTC, and it has a watchdog, which I would like to use. The reason for this choice, is that I have experienced that the IMX6 watchdog is not always able to reset the IMX6, or it may be that DA9063 have issues, so I want to reset it.

I have compiled da9063-watchdog driver, set up devicetree accordingly, and configured the watchdog daemon to use the da9063 watchdog driver. So

$ tail /var/log/messages

Mar 18 18:32:14 ccimx6sbc daemon.info watchdog[1137]: alive=/dev/watchdog1 heartbeat=[none] to=[none] no_act=no force=no
Mar 18 18:32:14 ccimx6sbc daemon.info watchdog[1137]: watchdog now set to 65 seconds
Mar 18 18:32:14 ccimx6sbc daemon.info watchdog[1137]: hardware watchdog identity: DA9063 Watchdog

Then by forcing a kernel panic by:

echo c > /proc/sysrq-trigger

Then, after 65 seconds, the DA9063 PMIC powers off. The power LED is off, and no current is drawn. Why? What is wrong?

Below are the DA9063 registers dumped from u-boot after a power cycle

=> pmic dump
PMIC 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
---------------------------------------------------
0x0000: 00 00 a0 06 00 02 d0 00 a0 3f 00 85 98 fe 03 00
0x0010: 94 00 04 00 10 cc ac 1a b5 18 b9 99 ff 80 89 00
0x0020: 09 09 09 09 01 01 00 01 81 01 81 00 01 00 00 00
0x0030: 01 3f 00 00 04 00 40 00 00 00 00 00 00 00 00 00
0x0040: 8f 00 00 01 01 00 00 00 00 01 31 00 0f 00 00 00
0x0050: – – – – – – – – – – – – – – – –
0x0060: – – – – – – – – – – – – – – – –
0x0070: – – – – – – – – – – – – – – – –
0x0080: 01 0e dd af f0 f0 fb ff 0e 33 96 86 ff ff ff ff
0x0090: ff ff 11 00 00 ed 0e 00 59 48 ff ff ff 81 81 99
0x00a0: 81 81 81 6c 6c 16 23 7d 7d 08 3c 78 50 2c 32 14
0x00b0: 32 32 32 28 3e 3e 16 23 7d 7d 08 3c 78 50 2c 32
0x00c0: 14 32 32 32 28 0e 00 00 00 e0 00 00 00 00 00 00
0x00d0: – – – – – – – – – – – – – – – –
0x00e0: – – – – – – – – – – – – – – – –
0x00f0: – – – – – – – – – – – – – – – –
0x0100: 02 – – – f7 b9 a4 1f 50 49 3f 04 56 70 05 ce
0x0110: 9f fe 00 00 88 00 00 00 00 00 00 00 00 00 00 00
0x0120: 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02
0x0140: – – – – – – – – – – – – – – – –
0x0150: – – – – – – – – – – – – – – – –
0x0160: – – – – – – – – – – – – – – – –
0x0170: – – – – – – – – – – – – – – – –
0x0180: 03 61 60 00 56

We tested PMIC watchdog and it was not working properly, so this is why it is not supported. We support the i.MX6 watchdog instead. You are probably facing the same issue.