Problem setting GPIO PTC19 as output on a i.MX7ULP custom board

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

Problem setting GPIO PTC19 as output on a i.MX7ULP custom board

跳至解决方案
839 次查看
Alexandre50000
Contributor II

Hello,

I am using a custom board with the i.MX7ulp with Yocto Linux 5.15. I enabled the Pin 19 on the device tree that i have attached. The problem is I don't receive a signal when I set it to High as an output. I can receive signals as input with no problem but when I try to set it to 1 using sysfs or with gpioset on linux, I don't see a signal using a voltmeter. Does anyone know what else I can do?

I also tried to set it as pull-up or as a FlexIO but it does not seem to work.

标签 (3)
0 项奖励
回复
1 解答
720 次查看
Alexandre50000
Contributor II
I had already tested that but it seems I found the problem. SOmething is overwriting the control register as anything I set in the dts is not implemented. When I check the control register in linux thanks to devmem2, it shows up as 0000000. When I manually seet it to 20100, it works without any issues. If anyone has any idea what could cause this, be my guest. For now at least we have a solution, thanks for your help.

在原帖中查看解决方案

4 回复数
813 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Is this happening only on PTC19 or also on other GPIOs of gpio_misc?

Best regards.

0 项奖励
回复
804 次查看
Alexandre50000
Contributor II

Hi,

Yes only on PTC19, I have a LED connected on PTC5 that I set as a GPIO and it works fine. Also have power delivery for a usb hub on PTC12 that works aswell.

Thanks

0 项奖励
回复
741 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Could you please try with next value recommended by Config Tools for i.MX.

JorgeCas_0-1711419849897.png

pinctrl_gpio_misc: gpio_misc {
		fsl,pins = <
			IMX7ULP_PAD_PTC5__PTC5		0x20100 /* Debug LED */
			IMX7ULP_PAD_PTC12__PTC12	0x20100 /* USB HUB RST */
			IMX7ULP_PAD_PTC16__PTC16	0x20100 /* RGB LED */
			IMX7ULP_PAD_PTC19__PTC19        0x00000100
		>;
	};

Best regards.

0 项奖励
回复
721 次查看
Alexandre50000
Contributor II
I had already tested that but it seems I found the problem. SOmething is overwriting the control register as anything I set in the dts is not implemented. When I check the control register in linux thanks to devmem2, it shows up as 0000000. When I manually seet it to 20100, it works without any issues. If anyone has any idea what could cause this, be my guest. For now at least we have a solution, thanks for your help.