Kernel panic at power off [SOLVED]

Moderators: Oren.R, Eran.M

pierrelgcb
Posts: 33
Joined: Wed Dec 09, 2015 9:40 am

Kernel panic at power off [SOLVED]

Postby pierrelgcb » Mon Sep 04, 2017 11:54 am

Hello,

Working on VAR-SOM-DUAL with Android Nougat N7.1.1_1.0.0(kernel 4.1.15).

I use a button to power off the device. On short press, device goes to standby. On long press, Android asks to power off or reboot the device.

When I power off the device, it falls in kernel panic, which reboot the device.

Code: Select all

imx2-wdt 20bc000.wdog: Device shutdown: Expect reboot!
reboot: Power down
Unable to poweroff system
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000

Rebooting in 5 seconds..


The button use the input gpio3_25, configured in imx6qdl-var-solocb-buttons.dtsi :
power {
label = "Power";
gpios = <&gpio3 25 1>;
linux,code = <KEY_POWER>;
gpio-key,wakeup;
};

To clear power supply, I need to clear gpio5_13. It will electrically power off the device. How can I link gpio5_13 to power off sequence ?

Best regards, Pierre
Attachments
log_poweroff_kernel_panic.log
(79.33 KiB) Downloaded 312 times

pierrelgcb
Posts: 33
Joined: Wed Dec 09, 2015 9:40 am

Re: Kernel panic at power off

Postby pierrelgcb » Fri Sep 08, 2017 9:01 am

Hello,

Does PMIC_ON_REQ pin is available on VAR-SOM-DUAL ?

Regards,
Pierre

varigigi
Posts: 52
Joined: Tue Nov 01, 2016 10:25 am

Re: Kernel panic at power off

Postby varigigi » Fri Sep 08, 2017 10:35 am

Hi Pierre,
software power down is supported by VAR-SOM-MX6 and DART-MX6, but not by VAR-SOM-SOLO/DUAL.

During power down, if the SoMs does not power down, the system forces a kernel panic in 1 second and the watchdog causes the reset in 5 seconds.

If you need it using VAR-SOM-SOLO/DUAL, you need to implement your own HW/SW shutdown procedure.
A possible solution is in the following steps:
1) notify the shutdown
setting the value of a dedicated pin in syscon_poweroff function of drivers/power/reset/syscon-poweroff.c file, before the mdelay
2) implement your HW mechanism
when the above pin is set, remove the power to the whole board.

BR
Pier

pierrelgcb
Posts: 33
Joined: Wed Dec 09, 2015 9:40 am

Re: Kernel panic at power off

Postby pierrelgcb » Fri Sep 08, 2017 2:27 pm

Pier,

I would like to use device tree, but I didn't find solution. So I used gpio_set_value(141, 0); in syscon-poweroff.c. Now it works.

Thanks,
Pierre


Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest