[OpenWrt-Devel] Olimex Micro A20 Certain GPIO wont function on 18.0.06 but they worked on 17.0.1

Dost Muhammad Shah dost.mhd at kindows.net
Wed Oct 9 04:55:06 EDT 2019


I am using a A20 based *Olimex Micro A20* as a development board with *openwrt
18.0.6*. I face a strange issue that some of GPIO works perfectly others
will accept the commands to set as out put and set value *High* or *Low* but
physically the output will not change. I have a previous built image based
on lede17.0.1 and in that all these GPIOs work fine.

when I issue cat /sys/kernel/debug/gpio

This is the result

gpiochip0: GPIOs 0-287, parent: platform/1c20800.pinctrl, 1c20800.pinctrl:
 gpio-35  (                    |sysfs               ) in  lo
 gpio-36  (                    |sysfs               ) in  lo
 gpio-40  (                    |ahci-5v             ) out lo
 gpio-41  (                    |usb0-vbus           ) out hi
 gpio-80  (                    |sysfs               ) out lo
 gpio-81  (                    |sysfs               ) out lo
 gpio-82  (                    |sysfs               ) out lo
 gpio-87  (                    |sysfs               ) out lo
 gpio-96  (                    |sysfs               ) in  hi
 gpio-97  (                    |sysfs               ) in  hi
 gpio-98  (                    |sysfs               ) in  hi
 gpio-99  (                    |sysfs               ) in  hi
 gpio-100 (                    |sysfs               ) in  hi
 gpio-101 (                    |sysfs               ) in  hi
 gpio-102 (                    |sysfs               ) in  hi
 gpio-103 (                    |sysfs               ) in  hi
 gpio-104 (                    |sysfs               ) in  hi
 gpio-105 (                    |sysfs               ) in  hi
 gpio-106 (                    |sysfs               ) in  hi
 gpio-107 (                    |sysfs               ) in  hi
 gpio-108 (                    |sysfs               ) in  hi
 gpio-109 (                    |sysfs               ) in  hi
 gpio-110 (                    |sysfs               ) in  hi
 gpio-111 (                    |sysfs               ) in  hi
 gpio-113 (                    |sysfs               ) out hi
 gpio-114 (                    |sysfs               ) out lo
 gpio-115 (                    |sysfs               ) out hi
 gpio-117 (                    |sysfs               ) out lo
 gpio-128 (                    |sysfs               ) out lo
 gpio-129 (                    |sysfs               ) out hi
 gpio-130 (                    |sysfs               ) out lo
 gpio-132 (                    |sysfs               ) out lo
 gpio-133 (                    |sysfs               ) out lo
 gpio-134 (                    |sysfs               ) out lo
 gpio-135 (                    |sysfs               ) out lo
 gpio-136 (                    |sysfs               ) out lo
 gpio-137 (                    |sysfs               ) out lo
 gpio-138 (                    |sysfs               ) out lo
 gpio-139 (                    |sysfs               ) out lo
 gpio-202 (                    |sysfs               ) in  hi
 gpio-203 (                    |sysfs               ) in  hi
 gpio-225 (                    |cd                  ) in  lo IRQ
 gpio-226 (                    |a20-olinuxino-micro:) out lo
 gpio-227 (                    |usb2-vbus           ) out hi
 gpio-230 (                    |usb1-vbus           ) out hi
 gpio-231 (                    |sysfs               ) out lo
 gpio-235 (                    |cd                  ) in  hi IRQ
 gpio-256 (                    |sysfs               ) out hi
 gpio-257 (                    |sysfs               ) out lo
 gpio-258 (                    |sysfs               ) out hi
 gpio-259 (                    |sysfs               ) out hi
 gpio-266 (                    |sysfs               ) out lo
 gpio-267 (                    |sysfs               ) out lo
 gpio-270 (                    |sysfs               ) out hi
 gpio-271 (                    |sysfs               ) out hi
 gpio-273 (                    |sysfs               ) out hi
 gpio-275 (                    |sysfs               ) out hi

In this case *gpio257* for example would work properly while *gpio138* will
accept all the commands but physically the output will be same

ls /sys/class/gpio/
export        gpio109/      gpio128/      gpio139/      gpio270/      gpio96/
gpio100/      gpio110/      gpio129/      gpio202/      gpio271/      gpio97/
gpio101/      gpio111/      gpio130/      gpio203/      gpio273/      gpio98/
gpio102/      gpio113/      gpio132/      gpio231/      gpio275/      gpio99/
gpio103/      gpio114/      gpio133/      gpio256/      gpio35/       gpiochip0/
gpio104/      gpio115/      gpio134/      gpio257/      gpio36/
gpiochip413/
gpio105/      gpio116/      gpio135/      gpio258/      gpio80/       unexport
gpio106/      gpio117/      gpio136/      gpio259/      gpio81/
gpio107/      gpio118/      gpio137/      gpio266/      gpio82/
gpio108/      gpio119/      gpio138/      gpio267/      gpio87/

How can I solve this issue .

There are several such GPIO at least 8 -9 that I have encountered
I see that all the pins that have 130 -139 numbers wont work . Those with
250+ will work

The following are the pins I am interested in and all the pins in 200
series work as expected. The ones in 130-139 range wont work in the new
image but they were working in previous image

/bin/echo 0 > /sys/class/gpio/gpio257/value
/bin/echo 0 > /sys/class/gpio/gpio258/value
/bin/echo 0 > /sys/class/gpio/gpio259/value
/bin/echo 0 > /sys/class/gpio/gpio271/value
/bin/echo 0 > /sys/class/gpio/gpio270/value
/bin/echo 0 > /sys/class/gpio/gpio256/value
/bin/echo 0 > /sys/class/gpio/gpio138/value
/bin/echo 0 > /sys/class/gpio/gpio139/value
/bin/echo 0 > /sys/class/gpio/gpio135/value
/bin/echo 0 > /sys/class/gpio/gpio137/value
/bin/echo 0 > /sys/class/gpio/gpio134/value
/bin/echo 0 > /sys/class/gpio/gpio136/value
/bin/echo 0 > /sys/class/gpio/gpio133/value
/bin/echo 0 > /sys/class/gpio/gpio266/value
/bin/echo 0 > /sys/class/gpio/gpio267/value

/bin/echo 0 > /sys/class/gpio/gpio132/value

BEST REGARDS,


              <http://kindows.net/>

Dost Muhammad Shah /
dost.mhd at kindows.net /
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191009/caf0297d/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list