iMx8QM: IRQSTEER mapping to interrupt

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

iMx8QM: IRQSTEER mapping to interrupt

481 Views
Lakshmi_AG
Contributor III

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.   

0 Kudos
Reply
1 Reply

460 Views
AldoG
NXP TechSupport
NXP TechSupport

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.

0 Kudos
Reply