Low power demo on i.MX8MM.
9/28/2020:
Attachments updated.
1. Fix a bug in 5.4.24 kernel that system can only wakeup once.
2. Remove 0x104 from atf patch. On 5.4.24, tested OK without PLL2.
9/8/2020:
Attachments updated.
Add patches for 5.4.24 kernel.
We use it to test power consumption on i.MX8MM EVK.
Usage:
1. Kernel:
echo "mem" > /sys/power/state
2. M4:
Select a power mode from menu and wait for wakeup.
Default wakeup method is GPT.
Add more patches, which will add functions for the case:
1. M core RUN and A core in suspend with DDR OFF.
2. M core wakeup A core without DDR support.
Descriptions:
back, RDC need to reload the memory regions config into the
MRCs, so PCIE, DDR, GPU bus related clock must on to make sure RDC MRCs can be successfully reloaded."
Note that this patch will keep PCIE, DDR and GPU clock on, which will increase the power. An optimization will be decrease PCIE, DDR and GPU clock before entering DSM.
Power measurement:
Supply Domain |
Voltage(V) |
I(mA) |
P(mW) |
|||
peak |
avg |
peak |
avg |
peak |
avg |
|
VDD_ARM(L6) |
1.010029 |
1.009513 |
1.109 |
1.030 |
1.120 |
1.039 |
VDD_SOC(L5) |
0.855199 |
0.854857 |
190.110 |
189.973 |
162.582 |
162.400 |
VDD_GPU_VPU_DRAM(L10) |
0.977240 |
0.977050 |
19.865 |
19.800 |
19.413 |
19.346 |
NVCC_DRAM(L15) |
1.094407 |
1.094168 |
2.059 |
1.984 |
2.253 |
2.171 |
Total |
|
|
|
|
185.367 |
184.956 |
Notes:
hi terry_lr, i am trying to do the M4 wakeup A53 part. I understand that only patch "0001-iMX8MM-GIR-wakeup.patch" is needed for this. But i am on 5.4.24 kernel on my imx8mm, so looks like there are many changes and i dont see any irq/isr code there under imx_rpmsg.c.
Will you help to understand what i need to enable this functionality on 5.4.24 kernel on imx8mm. Also i suppose the other patches are not needed for M4 wakeup A53, am i right?
i am trying this on 4.14.98 kernel. I could not get the M4 wakeup A53 work on imx8mm.
can you attach the freertos_hello bin which needs to be loaded in M4 at u-boot for this demo? i understand this will work only with this freertos_hello bin, and not the pingpong or echo bin images
Hi Siva,
The freertos_hello.bin is loaded at u-boot.
The patch "0001-iMX8MM-GIR-wakeup.patch" need to work with ATF patches and freertos_hello binary.
Normally, user should need 3 patches:
1. freertos_hello.c. Use MU_TriggerInterrupts(MUB, kMU_GenInt0InterruptTrigger); to do wakeup.
2. atf patch: Allow A53 to enter fast-wakeup stop when M4 RUN. Also avoid bypass of some plls, which is important to make M4 RUN when A53 enters suspend.
3. 0001-iMX8MM-GIR-wakeup.patch: GIR wakeup patch for kernel. Need kernel to use fsl-imx8mm-evk-m4.dtb.
Patch 4 is optional and this change won't have a big change in power.
Patch 5 is for user that need to access RDC after wakeup.
I've attached M4 binary. Please try it.
Thanks!
Regards
Terry
hello Terry,
Thanks a lot for the image and the details. It worked for me. (4.14)
Now i am wondering why the imx rpmsg driver changed a lot on 5.4 kernel where i am unable to correlate these patch changes, as before i tried on yocto imx zeus branch which is on 5.4.24. Do you have any idea about it?
Hi Siva,
5.4.24 kernel is using mailbox. So
Thanks!
Regards
Terry
Thanks, and how about the ATF patch?
Hi Siva,
#define MAX_PLL_NUM 10
struct pll_override pll[MAX_PLL_NUM] = {
{.reg = 0x0, .override_mask = (1 << 12) | (1 << 8), },
{.reg = 0x14, .override_mask = (1 << 12) | (1 << 8), },
{.reg = 0x28, .override_mask = (1 << 12) | (1 << 8), },
{.reg = 0x50, .override_mask = (1 << 12) | (1 << 8), },
{.reg = 0x64, .override_mask = (1 << 10) | (1 << 8), },
{.reg = 0x74, .override_mask = (1 << 10) | (1 << 8), },
{.reg = 0x84, .override_mask = (1 << 10) | (1 << 8), },
{.reg = 0x94, .override_mask = 0x5555500, },
{.reg = 0x104, .override_mask = 0x5555500, },
{.reg = 0x114, .override_mask = 0x500, },
};
to:
#define MAX_PLL_NUM 7
struct pll_override pll[MAX_PLL_NUM] = {
{.reg = 0x0, .override_mask = (1 << 12) | (1 << 8), },
{.reg = 0x14, .override_mask = (1 << 12) | (1 << 8), },
{.reg = 0x28, .override_mask = (1 << 12) | (1 << 8), },
{.reg = 0x50, .override_mask = (1 << 12) | (1 << 8), },
{.reg = 0x64, .override_mask = (1 << 10) | (1 << 8), },
{.reg = 0x74, .override_mask = (1 << 10) | (1 << 8), },
{.reg = 0x114, .override_mask = 0x500, },
Sorry for the late reply. The new community seems not stable here and I can't reply yesterday.
Thanks!
Regards
Terry
Hi Siva,
The attachment is updated. Patches for 5.4.24 kernel is uploaded.
Tested OK.
Thanks!
Regard
Terry
Hi Terry,
Is the similar feature supported in iMX8MP EVK board?
@terry_lv Please help to provide patches for Cortex M7 example with A53 suspend/resume functionalities using 6.6 Kernel version and 2.16 SDK.
Best Regards,
Prashanth Kumar K
Hi Prashanth,
The similar feature can be supported on i.MX8MP EVK board.
But as 6.6 kernel and 2.16 SDK are too different from 5.4.24 kernel, I'm afraid additional efforts might be needed.
If such example is required by customer, could you create a support ticket in community for this?
Thanks!
Regards
Terry