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

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

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

Jump to solution
291 Views
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.

Labels (3)
0 Kudos
1 Solution
172 Views
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.

View solution in original post

4 Replies
265 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

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

Best regards.

0 Kudos
256 Views
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 Kudos
193 Views
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 Kudos
173 Views
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.