Correct way to pinctrl main peripherals for M-core?

My current mental state is burnt out at work. I’m trying to do this as a hobby.

I’m trying to use main_uart3 from the M4F-core. The problem is pinctrl. Is it possible to configure main pinmux from the M-core?

Currently, I got it working by enabling main_uart3 and pinmuxing in linux devicetree. This let me use it from zephyr, but it also let me use it from the A-cores. And when linux used it, it configured it again and changed the baudrate.

I tried having the main_uart3 as status reserved, but the pinmux didn’t seem to get initialized.

If anyone can tell me how this should be done or point me to the resources, I would appreciate it.

I have yocto setup and running zephyr on the M-core.

It seems that main domain pinctrl is currently absent from m4 zephyr dt. Will test if I can access it.