Why can't I control EXP_GPIO_1 (GPIO1_5)

I have a ConnectCore 6UL Pro. I can control all of the GPIO’s that I need except for this one - GPIO1_IO05. I checked the device tree and it seems that this GPIO is in fact available on the pin. I’ve tried this on two boards with the same results. I’ve used both sysfs and C code. Sysfs shows the bit value toggling but the pin doesn’t change.
Perhaps I have interpreted the pin assignments improperly?

Are you are using stock images? If so please take a look at stock device tree:

it will link you to the actual file here:

Common hardware for ConnectCore 6UL SBC Pro


search for GPIO1_IO05 and at line 623 you will find a definition:

pinctrl_pwm4: pwm4grp {
fsl,pins = <
MX6UL_PAD_GPIO1_IO05__PWM4_OUT 0x110b0

As you can see - in the stock images this pin is configured as PWM and not GPIO. You’d have to build your own images commenting out this code.
You can probably verify my theory by trying to use this pin as PWM4 on stock images using instructions here:

The default muxing of the pads is specified in the i.MX6ul reference manual. Almost all of them default to GPIO. Off the top of my head, I remember the JTAG pads as the exception, those are configured as JTAG (not GPIO) by default. I think those are the only exception. So commenting out code above should be enough to restore that pin function back to GPIO.

However, it is still a good idea to explicitly define it as GPIO

/* General purpose pinctrl */
imx6ul-ccimx6ul {
pinctrl_hog: hoggrp {
fsl,pins = <

This way you will get a compile-time warning if you try to use the same pin twice.

1 Like

Thanks - as soon as I saw that the pin was in the pwm group, I got it. Thanks for such a quick response.