How to change the IMX-6x pinmuxing at run time?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to change the IMX-6x pinmuxing at run time?

1,666 Views
bhupendrapawar
Contributor II

I know using dts files can modify the pin muxing statically, but want to do it at run time as below:

1. configure eSPI1 in spi mode zero as below in imx6x-qsdl.dtsi file

     MISO - pulled high

     CLOCK - pulled down

     MOSI - pulled down

     CS - pulled high

2. When SPI is not in used by any application or processor goes to standby pull down the CS and MISO lines

I tried to implement the logic provided in

https://www.kernel.org/doc/Documentation/pinctrl.txt

but api PIN_CONF_PACKED was not available for imx6x processor in kernel.

How one can achieve this in Linux kernel driver?

Any example would be good enough.

Thanks in advance for your kind help.

0 Kudos
2 Replies

942 Views
art
NXP Employee
NXP Employee

You have to use the IOMUX controller and GPIO control directly. For more information, refer to the IOMUX and GPIO sections of the Chapter 3 in the attached document.


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

942 Views
bhupendrapawar
Contributor II

Thanks Artur,

Do you have some Linux kernel code example.

Regards,

Bhupi

0 Kudos