Hi,
How we can keep a particular clock enabled during suspend state, take an example of gpio6 or sai2 clk i want to keep it enabled during suspend mode. As per datasheet we have to use CCGR register for the same. Does anyone make it working, any suggestion example how to do it will be very helpful.
To make me able to accurately answer your question, please specify what exactly i.MX family processor do you mean. The reason of the question is that the clock gating mechanism differs for e.g. i.MX6 and i.MX7 series of processors.
Have a great day,
Artur
Hi sorry for not making it clear.
It is IMX7 series.
Please refer to the Section 5.2 "Clock Control Module (CCM)", especially, to the sub-sections 5.2.4 "Clock Tree", 5.2.7.3 "CCGR Interface" and 5.2.8 "CCM Memory Map/Register Definition", of the i.MX7 Reference Manual document. As it can be
seen, each particular clock in the clock tree has its own Clock Control and Gating Register (CCGM). Each register contains 4 identical 2-bit fields that control the particular clock gating depending on the particular power mode, as defined in the Table 5-17. Each of the 4 fields is dedicated to the corresponding Resource Domain, as defined in the Resource Domain Controller module, refer to the Section 3.2 "Resource Domain Controller (RDC)" of the document above for more details. For simplicity, it is possible to assign the equal clock resources to all power domains, i.e. write all 4 fields of a single CCGR equally. So, for particular clock, write the following values to the CCGR fields depending on the clock gating requirements.
00 clock is always gated
01 clock runs in Run mode only
10 clock runs in Run and Wait modes
11 clock always runs regardless of the power mode
The mapping of a CCGR registers to a particular clocks is listed in the Table 5-19 of the document above.
Have a great day,
Artur
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------