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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

3,102件の閲覧回数
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 件の賞賛
返信
2 返答(返信)

2,378件の閲覧回数
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!
-----------------------------------------------------------------------------------------------------------------------

2,378件の閲覧回数
bhupendrapawar
Contributor II

Thanks Artur,

Do you have some Linux kernel code example.

Regards,

Bhupi

0 件の賞賛
返信