Good day.
I’ll say right away that I read similar topics on the forum, took all the suggestions from there, but never achieved the result.
What I’m trying to do is implement GPIO interrupts for the M7 while the A53 is running Linux on the IMX8MP. My current points:
- Yocto multimedia image.
- I’m using RPMSG for intercore communication, so I need to run M7 firmware from u-boot for intercore communication registration.
- I also need a lot of memory for firmware, so we are using DDR space (MIMX8ML8xxxxx_cm7_ddr_ram.ld).
- I disabled whole GPIO in Linux DTS:
&gpio3 {
status = “disabled”;
};
- Then I need to use RDC for correct recourses sharing. And I used an example from SDK - \evkmimx8mp\driver_examples\rdc, modified it - added interrupt for button and output msg. by UART.
After this there are several possible options:
- I load the u-boot, start debugging the firmware via JTAG and continue loading Linux. In this case, the M7 firmware starts, but freezes at a certain point after loading Linux.
- I load Linux and after that I start debugging the firmware via JTAG - in this case, the interruption for M7 works in parallel with Linux (but RPMSG does not work, since the firmware was loaded after Linux was loaded)
- If the same firmware is loaded using u-boot at system startup (m7boot=ext4load mmc 2:2 ${loadaddr} ${m7image}; cp.b ${loadaddr} 0x80000000 ${m7image_size}; dcache flush; bootaux 0x80000000), all firmware works, interrupts do not work.
- When loading an ELF file through a remoteproc, a crash occurs (I haven’t figured this out much yet)
In the example for the DRC, it is indicated that resource management does not work under u-boot and for the DDR version. I did the same for MIMX8ML8xxxxx_cm7_ram.ld - the result is the same. It is possible that from the u-boot level this will not work at all - what to do with RPMSG in this case?(
But I also found on the NXP forum an indication that you need to manually register the RDC in the u-boot:
into imx_rdc_cfg in imx8mp_bl31_setup.c:
RDC_PDAPn(RDC_PDAP_GPIO3, D1R | D1W)
But before it’s necessary to build the ARM trusted firmware - the ATF/TF-A Branch is lf_v2.6 and add RDC resources there.
Will this help or not and what could be the problem?
Regards, Stanislav.