How to switch EIM control pin to GPIO mode?

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

How to switch EIM control pin to GPIO mode?

958 Views
longh
Contributor III

Hello everyone!
      Now I can use EIM and FPGA communication in normal use of imx6sx. the bsp is 4.14.98.CS pin and other control pins are used in EIM.

      As the pins are relatively tight now, I want to switch the CS pins and others used by these EIM to GPIO mode when upgrading FPGA firmware, and then control this pin in the driver. How should we operate to achieve such a function?

      I refer to the pinctrl_select_state() function used in sdhci-eshdc-imx..c to switch SDIO pin speed, but an error is reported when I @ using devm_pinctrl_get() to apply for pinctrl.

0 Kudos
2 Replies

792 Views
igorpadykov
NXP Employee
NXP Employee

Hi long

one can try to write to iomux registers directly, use as example memtool:

memtool\test - imx-test - i.MX Driver Test Application Software 

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

0 Kudos

792 Views
longh
Contributor III

Thank you very much!

I will try this way. Can Linux API achieve the same function?

0 Kudos