I need help enabling more GPIO

Which system do you use? Android, Ubuntu, OOWOW or others?

Android 11, Khadas/Oowow image

Which version of system do you use? Please provide the version of the system here:

VIM4 + MX2 Expansion Board w/ LTE modem and NVME

Please describe your issue below:

I have only been able to find one pin on the 40 pin GPIO header that I can use (pin #35, GPIO 492). Looking over the docs and other forum posts, it would appear there are methods to release other pins.

I would like to use 3 pins for GPIO, however moving forward is unclear to me. Do I need to setup an android build environment and build a custom image to accomplish this? Or is there a clever way to enable these pins from the adb shell?

Thanks in advance for any help you can provide.

@rpkish There are exactly 3 GPIO ports available. Please refer to the link below.

IM4:/ # echo 465  > /sys/class/gpio/export
VIM4:/ # echo 464  > /sys/class/gpio/export
VIM4:/ # echo 492  > /sys/class/gpio/export
VIM4:/ # ls /sys/class/gpio
export  gpio464  gpio465  gpio492  gpiochip355  unexport
VIM4:/ #

Hi Goenjoy,

I am able to enable the GPIO’s for 464/465, but they dont seem to be operable as 492 is. Example:

VIM4:/sys/class/gpio $ echo 465 > /sys/class/gpio/export
VIM4:/sys/class/gpio $ cat /sys/class/gpio/gpio465/value

if I su to root, I can pass 0 to the device:
VIM4:/sys/class/gpio # echo 0 > /sys/class/gpio/gpio465/value

the value does not change:
VIM4:/sys/class/gpio # cat /sys/class/gpio/gpio465/value

lastly, If I connect the GPIO pin (#37 / 465) to ground, the value remains 1.

I can probably get by with the single working GPIO, but I am still holding hope to access one or two more.