reboot after running “poweroff” command on imx8mm with Linux5.10.72

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

reboot after running “poweroff” command on imx8mm with Linux5.10.72

Jump to solution
2,495 Views
Eddy1
Contributor V

Hi:

At present, I am testing the "poweroff" function, but after executing the "poweoff" command, the system will automatically restart.Can you give me some suggestions?

Eddy1_0-1661421355765.png

 

Labels (1)
0 Kudos
Reply
1 Solution
2,487 Views
Eddy1
Contributor V

Hi:

I have solved this problem.There are some bugs in the latest ATF. Make the following modifications:


diff --git a/plat/imx/imx8m/imx8m_psci_common.c b/plat/imx/imx8m/imx8m_psci_common.c
index 018ec3f3e..17933e661 100644
--- a/plat/imx/imx8m/imx8m_psci_common.c
+++ b/plat/imx/imx8m/imx8m_psci_common.c
@@ -203,8 +203,10 @@ void __dead2 imx_system_reset(void)
void __dead2 imx_system_off(void)
{
mmio_write_32(IMX_SNVS_BASE + SNVS_LPCR, SNVS_LPCR_SRTC_ENV |
- SNVS_LPCR_DP_EN | SNVS_LPCR_TOP | SNVS_LPCR_LPTA_EN | SNVS_LPCR_LPWUI_EN);
+ SNVS_LPCR_DP_EN | SNVS_LPCR_TOP);
+ //SNVS_LPCR_DP_EN | SNVS_LPCR_TOP | SNVS_LPCR_LPTA_EN | SNVS_LPCR_LPWUI_EN);

+ INFO("poweroff\n");
while (1)
;
}

View solution in original post

3 Replies
2,112 Views
Eximius
Contributor III

Hello! 

Same problem in the latest lf_v2.6 branch with the IMX8MP. This commit is to blame: https://github.com/nxp-imx/imx-atf/commit/cc5f3575c801897eeda40e486de3f9a517a1b460

Could perhaps someone from NXP take care of this?

Thanks!

Regards,

Ian

0 Kudos
Reply
2,488 Views
Eddy1
Contributor V

Hi:

I have solved this problem.There are some bugs in the latest ATF. Make the following modifications:


diff --git a/plat/imx/imx8m/imx8m_psci_common.c b/plat/imx/imx8m/imx8m_psci_common.c
index 018ec3f3e..17933e661 100644
--- a/plat/imx/imx8m/imx8m_psci_common.c
+++ b/plat/imx/imx8m/imx8m_psci_common.c
@@ -203,8 +203,10 @@ void __dead2 imx_system_reset(void)
void __dead2 imx_system_off(void)
{
mmio_write_32(IMX_SNVS_BASE + SNVS_LPCR, SNVS_LPCR_SRTC_ENV |
- SNVS_LPCR_DP_EN | SNVS_LPCR_TOP | SNVS_LPCR_LPTA_EN | SNVS_LPCR_LPWUI_EN);
+ SNVS_LPCR_DP_EN | SNVS_LPCR_TOP);
+ //SNVS_LPCR_DP_EN | SNVS_LPCR_TOP | SNVS_LPCR_LPTA_EN | SNVS_LPCR_LPWUI_EN);

+ INFO("poweroff\n");
while (1)
;
}

2,388 Views
oprata
Contributor II

Hi!

It's work for u-boot-imx but when I trying to use the poweroff from linux console it doesn't work. The system still reboot.

Any idea how to fix it?

Thanks in advance.

0 Kudos
Reply