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.
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!
-----------------------------------------------------------------------------------------------------------------------
Thanks Artur,
Do you have some Linux kernel code example.
Regards,
Bhupi