Part Number: AM5716
Tool/software: Linux
This is a follow up to this question: e2e.ti.com/.../819724
We have an issue with timers configured and used by IPU (M4) core when Linux is running on A15.
Timers are configured in Linux device tree as no idle (otherwise they can't be initialized from M4 core being in suspended state):
&timer4 {
ti,no-idle;
ti,timer-alwon;
};
Now we configure it from M4 core as follows:
/*
** Timer4 PRCM configuration. This will explicitly enable the Timer4 module.
*/
static void TimerPRCMConfigure(void)
{
HW_WR_REG32(SOC_L4PER_CM_CORE_BASE + CM_L4PER_TIMER4_CLKCTRL, 0x2);
while ((HW_RD_REG32(SOC_L4PER_CM_CORE_BASE + CM_L4PER_TIMER4_CLKCTRL) & (0x00030000)) != 0x0) ;
}
This code hangs since it reads 0x20000, IDLEST(16,17) = 2. TRM says: 0x2: Module is in Idle mode (only OCP part). It is functional if using separate functional clock.
As far as I understand, the timer is not fully functional in this mode. We have issues with timer interrupts routed to M4 core. Looks like it misses some interrupts, or after entering ISR we see no flag bits set. Looks like some other core also processed the interrupt and cleared those bits. But perhaps, it is the consequence of IDLEST = 0x2.
Important: when only U-Boot is running, there is no issue. It only happens when Linux is runnning on A15 core. So Linux is somehow involved.
Could you give an idea why IDLEST bits are not 0, what should we do in Linux to keep it away from touching the timer (including suspend modes and power domains). I thought that the device tree quoted above is sufficient, but it seems no.