System Controller API in IMX8QM-MEK

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

System Controller API in IMX8QM-MEK

2,484 Views
vinothkumars
Senior Contributor IV

Hi All,

I am working on Power Management - IMX8QM MEK board. I have to integrate system controller API to put system low power mode.

I integrated successfully and I got the following response,

M4F and A53, A72 is OFF
                       sc_pm_set_sys_power_mode(ipc_handle, SC_PM_PW_MODE_OFF)
Board Reboot
                        sc_pm_set_sys_power_mode(ipc_handle, SC_PM_PW_MODE_STBY)
No response
                       sc_pm_set_resource_power_mode(ipc_handle, SC_R_A53_0, SC_PM_PW_MODE_OFF)                 
                       sc_pm_set_resource_power_mode(ipc_handle, SC_R_A53_0, SC_PM_PW_MODE_STBY)     
 
I don't the perfect the perfect API to suspend resume the A53, A72 CPU's
I am following the following reference,
              https://community.nxp.com/docs/DOC-345249 
Will you please provide proper SCU API for control Application Processor in Suspend and Wakeup from MCU.
Thanks & Regards,
VinothS,
Regards,
Vinothkumar Sekar
0 Kudos
Reply
7 Replies

2,328 Views
vinothkumars
Senior Contributor IV

Solution here,

IMX8QM-MEK Power Management difference between Linux and Android 

Regards,

VinothS.

Regards,
Vinothkumar Sekar
0 Kudos
Reply

2,329 Views
vinothkumars
Senior Contributor IV

Hi,

When I execute I got the error for the API,

err = sc_pm_set_resource_power_mode(ipc_handle, SC_R_A53_0, SC_PM_PW_MODE_OFF)                 
err = sc_pm_set_resource_power_mode(ipc_handle, SC_R_A53_0, SC_PM_PW_MODE_STBY)     
SC_ERR_NOACCESS     
#define SC_ERR_NOACCESS     4U      /*!< Permission error (no access) */
How to resolve the this error?
Thanks & Regards,
VinothS,
Regards,
Vinothkumar Sekar
0 Kudos
Reply

2,329 Views
igorpadykov
NXP Employee
NXP Employee

Hi VinothS

additional examples can be found in linux sources, one can look at

sect.2.5.1 Low Level Power Management (PM) Linux Manual

in Linux 5.4.3_1.0.0 Documentation

atf sources:

imx\plat - imx-atf - i.MX ARM Trusted firmware 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

2,329 Views
vinothkumars
Senior Contributor IV

Thank you Igor for the reply.

I am following same API for Suspend the CPU-A35 and CPU-A72. But, I don't know my implementation is not giving any effect.

This is my implementation for power off CPU's from M4 MCU,

RTN_ERR(sc_pm_req_low_power_mode(ipc_handle, SC_R_A53, SC_PM_PW_MODE_OFF));
RTN_ERR(sc_pm_req_low_power_mode(ipc_handle, SC_R_A53_0, SC_PM_PW_MODE_OFF));
RTN_ERR(sc_pm_req_low_power_mode(ipc_handle, SC_R_A53_1, SC_PM_PW_MODE_OFF));
RTN_ERR(sc_pm_req_low_power_mode(ipc_handle, SC_R_A53_2, SC_PM_PW_MODE_OFF));
RTN_ERR(sc_pm_req_low_power_mode(ipc_handle, SC_R_A53_3, SC_PM_PW_MODE_OFF));
RTN_ERR(sc_pm_req_low_power_mode(ipc_handle, SC_R_A53_0, SC_PM_PW_MODE_OFF));
RTN_ERR(sc_pm_req_low_power_mode(ipc_handle, SC_R_A72, SC_PM_PW_MODE_OFF));
RTN_ERR(sc_pm_req_low_power_mode(ipc_handle, SC_R_A72_0, SC_PM_PW_MODE_OFF));
RTN_ERR(sc_pm_req_low_power_mode(ipc_handle, SC_R_A72_1, SC_PM_PW_MODE_OFF));
RTN_ERR(sc_pm_req_cpu_low_power_mode(ipc_handle, SC_R_A53, SC_PM_PW_MODE_OFF, SC_PM_WAKE_SRC_NONE));
RTN_ERR(sc_pm_req_cpu_low_power_mode(ipc_handle, SC_R_A53_0, SC_PM_PW_MODE_OFF, SC_PM_WAKE_SRC_NONE));
RTN_ERR(sc_pm_req_cpu_low_power_mode(ipc_handle, SC_R_A53_1, SC_PM_PW_MODE_OFF, SC_PM_WAKE_SRC_NONE));
RTN_ERR(sc_pm_req_cpu_low_power_mode(ipc_handle, SC_R_A53_2, SC_PM_PW_MODE_OFF, SC_PM_WAKE_SRC_NONE));
RTN_ERR(sc_pm_req_cpu_low_power_mode(ipc_handle, SC_R_A53_3, SC_PM_PW_MODE_OFF, SC_PM_WAKE_SRC_NONE));
RTN_ERR(sc_pm_req_cpu_low_power_mode(ipc_handle, SC_R_A72, SC_PM_PW_MODE_OFF, SC_PM_WAKE_SRC_NONE));

RTN_ERR(sc_pm_req_cpu_low_power_mode(ipc_handle, SC_R_A72_0, SC_PM_PW_MODE_OFF, SC_PM_WAKE_SRC_NONE));

RTN_ERR(sc_pm_req_cpu_low_power_mode(ipc_handle, SC_R_A72_1, SC_PM_PW_MODE_OFF, SC_PM_WAKE_SRC_NONE));

Thanks & Regards,

VinothS,

Regards,
Vinothkumar Sekar
0 Kudos
Reply

2,329 Views
igorpadykov
NXP Employee
NXP Employee

one can look at imx_pwr_domain_off() in

imx8qm_psci.c\imx8qm\imx\plat - imx-atf - i.MX ARM Trusted firmware 

Best regards
igor

0 Kudos
Reply

2,329 Views
vinothkumars
Senior Contributor IV

Hi Igor,

from this document,

System Controller Firmware 101 - Power management service 

A cores and GPUs are the only ones with a dedicated external power supplies

So, I unable to handle the power mode of A cores by using SCF API.

Thanks & Regards,

VinothS,

Regards,
Vinothkumar Sekar
0 Kudos
Reply

2,329 Views
vinothkumars
Senior Contributor IV

Hi Igor,

Yes I am using the same API (sc_pm_req_low_power_mode, sc_pm_req_cpu_low_power_mode) only.

Thanks & Regards,

VinothS,

Regards,
Vinothkumar Sekar
0 Kudos
Reply