How to correctly configure GPIO on imx6sx SABRE?

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

How to correctly configure GPIO on imx6sx SABRE?

ソリューションへジャンプ
853件の閲覧回数
itsemast
Contributor II

I couldn't find any ready to be used GPIO pins on MCIMX6SX-SDB, so I decided to break out some pins from SD2 connector which I am not currently using. What changes to the device tree do I need to make in order to use SD2_CMD, SD2_CLK, SD2_DATA0, SD2_DATA1, SD2_DATA2, SD2_DATA3 as GPIO?

I have already removed these sections from imx6sx-sdb.dtsi:

&usdhc2 {
       pinctrl-names = "default";
       pinctrl-0 = <&pinctrl_usdhc2>;
       non-removable;
       no-1-8-v;
       keep-power-in-suspend;
       wakeup-source;
       status = "okay";
};
		pinctrl_usdhc2: usdhc2grp {
			fsl,pins = <
				MX6SX_PAD_SD2_CMD__USDHC2_CMD		0x17059
				MX6SX_PAD_SD2_CLK__USDHC2_CLK		0x10059
				MX6SX_PAD_SD2_DATA0__USDHC2_DATA0	0x17059
				MX6SX_PAD_SD2_DATA1__USDHC2_DATA1	0x17059
				MX6SX_PAD_SD2_DATA2__USDHC2_DATA2	0x17059
				MX6SX_PAD_SD2_DATA3__USDHC2_DATA3	0x17059
			>;
		};

I suppose now I need to add the definitions for the following pads:

  • MX6SX_PAD_SD2_CMD__GPIO6_IO_7
  • MX6SX_PAD_SD2_CLK__GPIO6_IO_6
  • MX6SX_PAD_SD2_DATA0__GPIO6_IO_8
  • MX6SX_PAD_SD2_DATA1__GPIO6_IO_9
  • MX6SX_PAD_SD2_DATA2__GPIO6_IO_10
  • MX6SX_PAD_SD2_DATA3__GPIO6_IO_11

But I'm not quite sure exactly how to do it. Could you please point me in the right direction?

ラベル(3)
タグ(1)
0 件の賞賛
1 解決策
845件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Dima

 

one can try the same steps as for i.MX6UL

https://community.nxp.com/t5/i-MX-Processors/Simple-GPIO-Example-quandry/m-p/458731

 

Best regards
igor

 

元の投稿で解決策を見る

2 返答(返信)
833件の閲覧回数
itsemast
Contributor II

Thank you very much for your answer, in my case the configuration value of 0x80000000 was sufficient, but GPIO on IMX processors is very flexible, I might return to this thread one day.

0 件の賞賛
846件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Dima

 

one can try the same steps as for i.MX6UL

https://community.nxp.com/t5/i-MX-Processors/Simple-GPIO-Example-quandry/m-p/458731

 

Best regards
igor