How to switch EIM control pin to GPIO mode?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to switch EIM control pin to GPIO mode?

1,699 次查看
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 项奖励
回复
2 回复数

1,533 次查看
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 项奖励
回复

1,533 次查看
longh
Contributor III

Thank you very much!

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

0 项奖励
回复