Is possible to configure i2c sensor to to the M4 (freertos) in the A7 (linux)?
I think the answer to the question is true. But I think that I must use the RDC like examples freeRtos.
But in linux I do not see an implementation of the rdc.
How should I proceed ?
Have you got an example to configure i2c sensor to the M4 (freertos) in the A7 (linux)?
I recently worked on a project using the iMX8MQ and iMX8M Mini, where we controlled many devices on the M4 and some others on the Linux side.
We did not use the RDC, though planned to for safety prior to production.
The trick is to disable in the Linux device tree the buses you wish to dedicate to the M4, so that Linux basically does not know they exist. As a result, the M4 side can freely use them. This means you would need to start with NXP's Yocto distribution for your processor, modify and rebuild the device tree and install it on your board. It wouldn't hurt to rebuild the whole thing (kernel, kernel modules, root fs) so they all definitely match each other.
Another trick relates to GPIO pin interrupts. Each side (Linux and M4) can set up and receive interrupts, but only when they are properly allocated in separate 16 bit GPIO blocks. The reason being, that there is only a single hardware interrupt line per 16 GPIOs (e.g., GPIO4 pins 0-15; GPIO1 pins 16-31; etc.). As long as the hardware is correctly designed, the M4 can also use these without fear. If you are using an NXP dev kit, you probably can't change much in this regard so would need to work within the limitations of that design.
This advice should apply to your i.MX7 Dual as well, I believe.
I have already read these examples but it seems to me that in linux nothing is done in devices to manage the RDC. I didn't seen examples in linux that use the RDC. Have you got example in linux that use the RDC?