AR7 Board - GPIO Support



I tried to use the GPIOs on the AR7554 (AR7 EvalBoard) as described in the document:
Accessing GPIO from Linux / AirPrime AR755x,AR865x,WP710x.

First I assigned / allocated the GPIOs on the Modem (AT Interface). As you see the pins 6, 7 and 10 are assigned to function 16 = Legato / Linux:

+WIOCFG: 1,0,0,0,1,0,0                                                          
+WIOCFG: 2,0,0,0,1,0,0                                                          
+WIOCFG: 3,0,0,0,1,0,0                                                          
+WIOCFG: 4,0,0,0,1,0,0                                                          
+WIOCFG: 5,3,0,0,1,768,0                                                        
+WIOCFG: 6,16,0,0,1,0,0                                                         
+WIOCFG: 7,16,0,0,1,0,0                                                         
+WIOCFG: 8,0,0,0,1,0,0                                                          
+WIOCFG: 9,0,0,0,1,0,0                                                          
+WIOCFG: 10,16,0,0,1,0,0                                                        

Now I try to export the corresponding GPIO on Linux console to the filesystem side with the command:

Independent which GPIO is used, I always get the negative response:

How to declare the GPIO pin to be used from Linux side?




this topic can be closed. It was neccessary to restart the device after allocating the GPIOs, before using them on Linux side.
Once the GPIO has been allocated for the Linux, the operation will only get active if a restart has taken place.



Hello! I’m trying to control the GPIO through Linux, just as you did.

First of all, do you know the AT+WIOCFG syntax? I’m having problems finding documentation about WP7104 AT commands and I have not found the documentation you mentioned (“Accessing GPIO from Linux / AirPrime AR755x,AR865x,WP710x.”).

Second, after copying your AT+WIOCFG configuration for GPIO10,

I was able to do

echo 10 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio10/direction

successfully, but nothing changed when I set values to it :angry:

[code]echo 0 > /sys/class/gpio/gpio10/value
echo 1 > /sys/class/gpio/gpio10/value

No change[/code]

All motherboard’s jumpers that connects peripherals to this GPIO were opened, so I’m sure GPIO10 is connected only to WP7104.
I also tryied this with GPIO4. No success so far :frowning:

Am I missing something?



Mistake found! All the steps described are correct, the only mistake I made was to assume board’s labels are equal to the Linux GPIO ID. Here is the GPIO ID table for those who don’t know:

GPIO ID (Linux) - AR7 Label
gpio1 - GPIO13
gpio2 - GPIO12
gpio3 - GPIO8
gpio4 - GPIO7
gpio5 - GPIO10
gpio6 - GPIO11
gpio7 - GPIO6
gpio8 - GPIO5
gpio9 - GPIO9
gpio10 - GPIO4