We are using the imx6 Dual with Linux 3.0.5 that came with Jelly Bean 4.1 for SabreSD. We have customized portions of u-boot and the kernel. We boot into recovery mode and the system resets after 2 minutes. U-boot reports that it was caused by a POR. u-boot does not reboot by itself. Also, if we plug in a usb otg or tap the power-on-button (to get the menu) it also does not reboot. We have effectively eliminated the watchdog as the cause of the reset. Anyone have experience with a similar issue?
I noticed in the normal mode with Android running, the console suspends after 1 minute 14 seconds. Are these events related?
OK, now I think it is caused by explicitly restart by user, maybe the recovery is done, so they call reboot.
There is only two places that could reset system, one is wdog driver, the other is arch_reset which is called by kernel restart. From your stack, it is much like wdog driver.
You can try build out wdog driver and comment out arch_reset function to see whether it still reset. Or just try what I said before, change wdog pin to see whether the reset reason is changed from POR to WDOG.
I have discovered that a stock SabreSD (JB4.1.2) also reboots from recovery mode if USB OTG or the menu (button press) is not present. This is normal behavior. It isn't broken so we won't "fix" it. The kernel is waiting on the full wakelock so it never reboots. Close the OTG or don't access the menu and it will reboot. It has to be a kernel timer that counts down, then it calls the arch_reset directly.
I did one better than just changing a pin. I took the watchdog driver out of the kernel. That way the WD was guaranteed to no be configured to run.
Please realize this reboot is happening in recovery mode. Android PowerManager is not even running. I am investigating wake locks at the moment because I am sure the watchdog is not the problem.
If it is not watch dog that cause system reset, then I suggest you monitor the i.MX6's POR pin and PMIC's reset pin, this is to make sure which pin cause the reset. And if this issue happened everytime and with same interval, I meant if system reset everytime about 2 minute after recovery mode, then I can NOT think out any reason except a watchdog timer.
I am like you. I thought it is was the watchdog for almost a week and did everything I could to prove it. I changed the watchdog timeout. The reset still came at 2 minutes. I am investigating suspend activities now. I am just learning the Android/Linux/Freescale power management systems.
I was able to get a stack dump right before the reset. The dump_stack() was put in sys.c, kernel_restart(). This doesn't say much except that kernel_restart() is getting called explicitly.
SysRq : Emergency Remount R/O
Emergency Remount complete
[<c00a9984>] (unwind_backtrace+0x0/0x138) from [<c00f5354>] (kernel_restart+0xc/0x50)
[<c00f5354>] (kernel_restart+0xc/0x50) from [<c00f54ac>] (sys_reboot+0x10c/0x1c4)
[<c00f54ac>] (sys_reboot+0x10c/0x1c4) from [<c00a28c0>] (ret_fast_syscall+0x0/0x30)
imx2_wdt_shutdown
Restarting system....
Hi, James
If this is a POR reset, then I think you can try this to identify whether it is caused by WDOG, as from what you mentioned, it is most likely caused by a wdog reset, but you also said you have eliminated the watchdog. Can you try to disable watch dog's reset pin which is connected to PMIC reset pin. I attached the code change, you may need to have a try. And I think this issue is not related to the console suspend after some time when Android running. That is a low power mode which is to save power but not cause reset.
diff --git a/arch/arm/mach-mx6/board-mx6dl_sabresd.h b/arch/arm/mach-mx6/board-mx6dl_sabresd.h
index 7e6a261..fe278e8 100644
--- a/arch/arm/mach-mx6/board-mx6dl_sabresd.h
+++ b/arch/arm/mach-mx6/board-mx6dl_sabresd.h
@@ -263,8 +263,8 @@ static iomux_v3_cfg_t mx6dl_sabresd_pads[] = {
/* ACCL_INT_INT */
MX6DL_PAD_SD1_CMD__GPIO_1_18,
+ /* USR_DEF_GRN_LED */
+ MX6DL_PAD_GPIO_1__GPIO_1_1,
- /*WDOG_B to reset pmic*/
- MX6DL_PAD_GPIO_1__WDOG2_WDOG_B,
/* USR_DEF_RED_LED */
MX6DL_PAD_GPIO_2__GPIO_1_2,
};
diff --git a/arch/arm/mach-mx6/board-mx6q_sabresd.h b/arch/arm/mach-mx6/board-mx6q_sabresd.h
index da26cd9..a1f5cd9 100644
--- a/arch/arm/mach-mx6/board-mx6q_sabresd.h
+++ b/arch/arm/mach-mx6/board-mx6q_sabresd.h
@@ -30,7 +30,7 @@ static iomux_v3_cfg_t mx6q_sabresd_pads[] = {
/* CAN1 */
MX6Q_PAD_KEY_ROW2__HDMI_TX_CEC_LINE,
/* MX6Q_PAD_KEY_COL2__CAN1_TXCAN, */
+ MX6Q_PAD_GPIO_1__GPIO_1_1, /* user defiend green led */
- MX6Q_PAD_GPIO_1__WDOG2_WDOG_B, /*WDOG_B to reset pmic*/
MX6Q_PAD_GPIO_2__GPIO_1_2, /* user defined red led */
MX6Q_PAD_GPIO_7__GPIO_1_7, /* NERR */