This is regarding GPIO configuration in HLK-7688A.
We need to configure 2 pins as GPIO pins (GPIO20 as input and GPIO21 as output).
We tried to configure GPIO pin 20 as an output pin using sysfs driver for testing and was driving the pin HIGH, but GPIO20 didn’t reflect it on probing it with multimeter.
The steps followed for configuring are:
ls /sys/class/gpio/
This command lists out the gpiochips. We got one of the gpiochips as gpiochip416@
echo 436 >/sys/class/gpio/export
This command registers gpio436 (416 base + 20) and its reflecting on giving the ls command.
echo out >/sys/class/gpio/gpio436/direction
echo 1 >/sys/class/gpio/gpio436/value
We tried to configure this pin as input pin but that also didn’t work.
Our end objective is to configure one GPIO pin as an input pin which is interrupt based and one pin as an output pin.
Any help will be appreciated.
Thanks in advance.
I compiled and updated the HLK-7688a, then configured the GPIO pins and changed the values, but the voltage on the pin remains stable at 1.5V for high and low
root@OpenWrt:~# cat /sys/kernel/debug/gpio
gpiochip2: GPIOs 416-447, parent: platform/10000600.gpio, 10000600.gpio-bank2:
gpio-436 ( |sysfs ) out hi
gpio-437 ( |sysfs ) out hi
gpiochip1: GPIOs 448-479, parent: platform/10000600.gpio, 10000600.gpio-bank1:
gpio-454 ( |reset ) in hi IRQ ACTIVE LOW
gpio-460 ( |green:wlan ) out lo ACTIVE LOW
gpiochip0: GPIOs 480-511, parent: platform/10000600.gpio, 10000600.gpio-bank0:
root@OpenWrt:~#
Is there another file or line that I need to modify? or setting to activate?
This is the chipset I have. I made the pinmap with the documentation I found.
Hi,
I am also working on the same function, build on the same version - OpenWrt 21.02.2. I tried what was suggested above and made sure that firmware binary are correct on both HLK-7628N and HLK-7688A. Are there any additional information on this one? Voltage on the pin does not reflect what is being registered using gpioctl and sysfs commands.