Utilite & Trim-Slice Users Forum
http://www.compulab.co.il/utilite-computer/forum/

Utilite Pro hangs on soft poweroff
http://www.compulab.co.il/utilite-computer/forum/viewtopic.php?f=62&t=2470
Page 1 of 1

Author:  ygrex [ Mon Feb 20, 2017 10:17 am ]
Post subject:  Utilite Pro hangs on soft poweroff

Hello,

after poweroff command it shuts all running services down as expected but freezes at the very end, I need to push power button and hold for a few seconds to switch it off

using 3.14 kernel with systemd

is there any working command to switch off a device?

Author:  chris [ Mon Feb 20, 2017 10:27 pm ]
Post subject:  Re: Utilite Pro hangs on soft poweroff

Hi,
ygrex wrote:
after poweroff command it shuts all running services down as expected but freezes at the very end, I need to push power button and hold for a few seconds to switch it off

My guess is that your kernel has no means of actually powering down the unit. So it just stops all tasks and "halts". The only posssibility to power down the cpu on the Utilite I know of is the so called "syscon poweroff". However, it is disabled by default for imx6 SoCs because it is preferred to use a power managment controller on the board for the shutdown (the Utilite lacks such a controller or at least it cannot be accessed by the kernel).

You can check if the syscon-poweroff "device" is enabled with the following command(s):
Code:
chris@snowflake ~ % find /sys/firmware/devicetree/ -iname "*poweroff*"
/sys/firmware/devicetree/base/soc/aips-bus@02000000/snvs@020cc000/snvs-poweroff
chris@snowflake ~ % cat /sys/firmware/devicetree/base/soc/aips-bus@02000000/snvs@020cc000/snvs-poweroff/status
okay

(I advice to use the "find" command because your devicetree might slightly differ from the upstream one which I am using; also beware the trailing /status in the cat command.)

If it is enabled the driver might not be enabled in the kernel config. I think the options
Code:
CONFIG_POWER_RESET_SYSCON=y
CONFIG_POWER_RESET_SYSCON_POWEROFF=y

are required.

Otherwise, if the devicetree node is not enabled then you can enable it via devicetree (i.e. build a new one). An example is given here in the upstream devicetree of the Utilite:
https://github.com/vcspth/linux/blob/ut ... 6.dts#L379

Alternatively, you can set the status property of the devicetree node to "okay" via the fdt command in U-Boot (after loading the fdt blob and (obviously) before starting the kernel).
ygrex wrote:
using 3.14 kernel with systemd

Out of curiosity: Is there any particular reason to stick with the 3.14 kernel? There was never "official" support for the Utilite based on Linux 3.14 and there seems to be at least another problem with it (due to your other posting).

CompuLab recently released a new kernel based on Linux 4.1 which can be downloaded from here:
http://www.compulab.co.il/products/comp ... x6/#devres
and the mainline kernel works quite well, too. You will still need a few devicetree patches on top of v4.10 and Wifi/Bt, the VPU, and suspend/resume don't work with the mainline kernel (yet). But if you don't need these features it's IMHO the best choice.

Cheers,
Christopher

Author:  ygrex [ Tue Feb 21, 2017 8:05 am ]
Post subject:  Re: Utilite Pro hangs on soft poweroff

thank you,

syscon is not enabled in my kernel, will try this, will update this post with results

3.14.60 is better than the officially supported 3.0.35 one, 4.1 is qute new, had no time to upgrade yet, no other reasons

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/