2025-11-12 7:15 AM
Hello.
Is there any way to exclude some GPIOs from Linux, when I control them from M4 core and I don't want to give an ability to control them from Linux apps? I would like to exclude e.g. PG12. I tried this, which should be exactly for such use:
&gpiog {
gpio-reserved-ranges = <12 1>; /* Reserve PG12 for M4 */
};
But it doesn't help, still the GPIO is listed and possible to control under Linux.
We use OpenSTLinux custom Yocto build with kernel 5.15.67
Thanks
2025-11-19 3:27 AM
Hi @Bennny,
Have you tried m4_reserved_gpios ?
m4_reserved_gpios {
compatible = "st,m4-reserved-gpios";
gpio-reserved-ranges = <...>;
};
Bear in mind that OpenSTLinux 5.15 is not anymore supported, if possible please point to the latest OSTL release.
Regards,
Olivier
2025-11-19 3:41 AM
Thanks for the reply.
I tried to find any info about the m4-reserved-gpios, but I didn't find any definition of it in docs, source code nor google.
Also the gpio-reserved-ranges = <...>; is in such case counted from GPIOA 0 (so PG12 is 108)?
2025-12-03 5:07 AM
Could you please provide the description/documentation of the m4_reserved_gpios and the gpio-reserved-ranges calculation?