Disable PCIe on Apalis IMX6 BSP

I’ve changed from an old Boot2Qt Os image to the latest 6.4 BSP.
My program use some gpio and on the new architecture I belive one or more gpio are already occupied by the system.

My program use the old sysfs gpio and I dont want to change for now.
But from the ‘gpioinfo’ command I see:
“MXM3_15/GPIO7” “regulator-pcie-switch” output active-high [used]
and GPIO7 is one of the I/O I use in my program.

How can I disable it?

Hello @Pipe ,
Here you have a topic from a customer with a similar problem , but on TorizonCore. Hope that it helps.

Best regards,
Josep

Excuse me, I was not able to get the goal.

I’ve bitbaken the OS with Yocto so I can operate on recipes but I’m a newbie.
From reading on the Internet I know I’ve to set another gpio channel as “regulator-pcie-switch" or to disable the entire pcie support (on my system I don’t use wifi, bt).

If I could operate directly on the target Os files would be even better.

Thanks
Pipe

Hello @Pipe ,

could you explain the steps that you followed?

Best regards,
Josep

Hello Josep,

as I previously wrote, on Yocto I’m a newbie and in Linux I’m not such a genius.
So I followed Toradex tutorials to be able to bitbake the BSP (Torizon is not right for my project).
The target operating system was previously an already compiled Boot2Qt OS (where the MXM3_15/GPIO7 pin was free) and the target hardware uses an existent PCB with that pin wired.

In my target system there is no need of pcie wifi or bt so, if this does not impact on other functionalities, I can disable the entire pcie pack, thus not reserving the pin. I think I have to disable it into the BSP recipes but I’m not able to find where and how to.

As suggested in community the “good” way is to link the “regulator-pcie-switch” to another pin but again I’ve not found where I can do it.

Last I’ve tried to “unexport” the pin with the old sysfs gpio commands but that remains an invalid argument, because it is already managed by gpiod. I’ve no knowledge of the actual gpiod way of managing the gpios.
Yes, for future projects I will manage the gpios with the modern way but my goal now is to make the less modifications possible on software and on hardware.

Last but not least, the target will be produced in very few numbers, so I can customize each deployed OS, and so it’s not mandatory to operate on Yocto if I can gain the goal editing something on deployed systems.

Thanks for attention,
Pipe

Please someone can help me on this?

No solution got until now.
Nobody answering with suggesions, I made some tries:

  1. pass kernel parameter “pci=off” … no effects. I think this disable the automatic pcie device configuration only
  2. reading about disabling PCIE into the device tree I was not able to modify the Yocto Recipes in a good way.
  3. Directly into /layers/meta-toradex-bsp-common/recipes-kernel/linux/linux-toradex-mainline-git/defconfig set CONFIG_PCI_IMX6=n … nothing changes

At the end my goal is simply to have the MXM3_15/GPIO7 free for my use. On the Internet it’s plenty of people talking about modify Linux, Yocto recipes, device tree, dt overlays, etc… but I’would need long time to learn the things.
There at Toradex you don’t have ideas? I buy Toradex SOMs and I expect support on this!
If this is not the right place to ask support I apologize, but please point me to the right place.

Pipe
PS: excuse me for last words of mine, but I cannot get what I want and groping in the dark make me nervous.

Hi @Pipe ,

Sorry for the delay in answering. I see that you created a new topic in the community about this issue. I’ll reply you there in more detail if you don’t mind.

Best regards,
Lucas Akira