i.MX8MP power down USB interface from U-Boot

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

i.MX8MP power down USB interface from U-Boot

186 Views
gunnarsson
Contributor II

We would like to be able to put our IMX8MPLUS into suspend from command in u-boot like

 

void cb_suspend(void)

{

}

 

int do_suspend(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])

{

                             do_psci_probe();

 

                             disable_interrupts();

 

                             /* Put code here to power down devices. */

                             /* No need to store the states of devices and drivers */

 

                             invoke_psci_fn(PSCI_1_0_FN_SYSTEM_, cb_suspend, 0, 0);

 

                             return CMD_RET_FAILURE;

}

 

U_BOOT_CMD(

                             Suspend, 1 ,0, do_suspend,

                             “Perform suspend of the device”

                             “”

);

 

The code above puts the CPU in suspend but we are not able to shutdown devices, such as the USB interfaces, as described in comments above.

Is it possible to receive a code example that shuts down devices in the correct order? Or is there an application note that describes how the Clock Control Module (CCM), General Power Controller (GPC), System Reset Controller (SRC) is supposed be interfaces. Any such documentation would be greatly appreciated.

We are aware Linux support this functionality but it can unfortunately not be used and extract relevant code from Linux implementation is a bit complicated.

Labels (1)
0 Kudos
1 Reply

146 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

You may refer to the uboot documentation for this:

https://github.com/nxp-imx/uboot-imx/blob/lf_v2022.04/doc/imx/clk/ccf.txt

Also, as I think this some kind of low power application you want to achieve, you may refer to the following AN:

https://www.nxp.com/docs/en/application-note/AN13400.pdf


Best regards/Saludos,
Aldo.

0 Kudos