Hello,
I am working on the i.MX95 (9596) using an evaluation board from NXP. For timing measurements in an application implementing the RPMSG protocol between Zephyr (running on M7) and Linux (on the A55 cores), I need to use GPIOs. However, there are no free GPIOs available on the board, so I decided to repurpose the ones from USDHC2.
The goal is to use USDHC2's DATA0 and DATA1 as GPIOs controlled by Zephyr, and DATA2 and DATA3 as GPIOs controlled by Linux.
I configured the System Manager (SM) to grant access to M7, M33, and A55 for GPIO3, which controls the USDHC2 DATA0–DATA3 lines. I verified that all of them have access to this memory region by successfully reading and writing to it.
On the Linux side, I disabled USDHC2 in the device tree and remuxed the required pins to GPIO mode. I then configured them in my driver application, and I can confirm via oscilloscope that they change state as expected.
On the Zephyr side, I did the same: I updated the device tree to configure the pins as GPIOs. However, since CONFIG_GPIO is not implemented for i.MX95 in Zephyr, I interact with the GPIOs by directly writing to the memory-mapped registers.
The problem is: When Linux is not booted, Zephyr and M33 can control the GPIOs correctly. But once Linux boots, Zephyr can no longer control the GPIOs—only the pins configured under Linux work.
Therefore, I suspect that Linux is doing something (perhaps reinitializing or remuxing the pins) that overrides Zephyr’s configuration, making GPIO writes from Zephyr ineffective.
Is anyone familiar with what might be causing this behavior and how I could modify the setup to allow shared GPIO control between Zephyr and Linux when both are running?
Thank you for your help.