Hi,
Trying to understand how to map LSIO-GPIO (LSIO.GPIO0.IO28), tried to enable irq and pad for raising edge of this GPIO using below SCU API by polling the irq_status, which is all good.
/****************************/
sc_irq_enable(ipc_handle, 297U, SC_IRQ_GROUP_WAKE, SC_IRQ_PAD, SC_TRUE);
/* Enable GPIO pad wakeup */
sc_pad_set_wakeup(ipc_handle, 40U, 6U);//SC_PAD_WAKEUP_RISE_EDGE 6U
/* Query SCU wakeup event status */
#if 1
uInt32 status;
sc_irq_status(ipc_handle, 297U, SC_IRQ_GROUP_WAKE, &status);
/* Check for pad wakeup */
if (status & SC_IRQ_PAD)
{
/* Check for GPIO pad wakeup */
/* Note: SCFW updates pending pad wakeup config to SC_PAD_WAKEUP_OFF */
uInt8 gpio_wakeup;
//sc_pad_get_wakeup(ipc_handle, 40U, &gpio_wakeup);
if (gpio_wakeup == SC_PAD_WAKEUP_OFF) {
/* GPIO pad generated wake event */
print(DEBUG_PRINT_ALWAYS, "GPIO wakeup\r\n");
}
/******************************/
Since we have enabled only A53core0-3, once core goes to self suspend we have no means to poll for sc_irq_status, so need more inputs on enabling irqsteer and scu interrupt handling for this raising edge of gpio to wake up cores.
Hello,
You may refer to the sample code I have shared in your other post:
https://github.com/nxp-imx/imx-atf/blob/lf_v2.6/plat/imx/imx8qm/imx8qm_psci.c
Please refer to both the function imx_enable_irqstr_wakeup() and imx_domain_suspend ()
Best regards,
Aldo.