setting GPIO

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

setting GPIO

1,277件の閲覧回数
ddeyo1
Contributor I

I am using an iMX8mm SOM from Boundary that initially had gpio2 configured for usdhc1  emmc interface and usdhc2 for the sdcard.  We are using emmc but not sdcard.

I have been able to reconfigure all of my other gpio ports and pins and all of them work except for all of the usdhc2 pins.  I've removed the usdhc2 node from my device tree and I no longer get a clock on SD2_CLK.

However when I export gpio 45 (gpio2 13), change the direction to output and set the value to 1, my pin stays low.

Is there anything that would prevent a pin mux change for usdhc?

 

I should add that I have also added gpio14 and gpio15 and my pinctrl settings are the same as my working pins.  None of the usdhc2 pins can be changed.

0 件の賞賛
6 返答(返信)

1,142件の閲覧回数
Kecy
Contributor I

ddeyo1

I have the same problem, have you solved it

0 件の賞賛

1,132件の閲覧回数
ddeyo1
Contributor I

Yes, I solved it. I think it was in uboot.  I think I had to enable hog on the CONFIG for uboot.

file:  configs/nitrogen8mm_4g_defconfig b/configs/nitrogen8mm_4g_defconfig

change:  CONFIG_GPIO_HOG=y

I was told this was off by default.

 

Then, of course, I had to include the pinctrl settings for my pins in a hog node in my uboot dts file.

0 件の賞賛

1,129件の閲覧回数
ddeyo1
Contributor I

This is my added node that goes under &iomuxc:

pinctrl_hog: hoggrp {
fsl,pins = <
MX8MMN(IOMUXC_SD2_CD_B_GPIO2_IO12, 0x16)
MX8MMN(IOMUXC_SD2_CLK_GPIO2_IO13, 0x16)
MX8MMN(IOMUXC_SD2_CMD_GPIO2_IO14, 0x16)
MX8MMN(IOMUXC_SD2_DATA0_GPIO2_IO15, 0x16)
MX8MMN(IOMUXC_SD2_RESET_B_GPIO2_IO19, 0x16)
MX8MMN(IOMUXC_NAND_ALE_GPIO3_IO0, 0x16)
MX8MMN(IOMUXC_ECSPI2_SS0_GPIO5_IO13, 0x16)
>;
};

0 件の賞賛

1,240件の閲覧回数
disheng
Contributor III

Probably the pins are also configured in the uboot, there is a .c file for your board initialization, you can take a look there.

タグ(1)
0 件の賞賛

1,262件の閲覧回数
josephzhou1
Contributor V

.

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 件の賞賛

1,258件の閲覧回数
ddeyo1
Contributor I

Did you have a question or answer?

-dwd

0 件の賞賛