Cannot set gpio pin value


I dig into this link and did what it says but no success to configure the pins as I wanted.

1) I export the pin

echo 40 > /sys/class/gpio/export  (Succeed) 

2) Then I try to change the value

echo high > /sys/class/gpio/gpio40/direction (Failed)


echo 1 > /sys/class/gpio/gpio40/value (Failed)

3 ) Then I looked at the result

cat /sys/kernel/debug/gpio

gpio-40 (sysfs                ) out lo

4 ) Then I try to change the direction

  echo in > /sys/class/gpio/gpio40/direction (Succeed)

  The result is 

  gpio-40 (sysfs                ) in hi

5 ) Then try to change the direction out high, it just change the direction not the value

   echo high > /sys/class/gpio/gpio40/direction 

   gpio-40 (sysfs                ) out lo

Other pins are also behave same. Whats the problem ?

Can you share the SODIMM pin or pin on extension connector of Iris which you are checking for GPIO 40? I checked using Colibri Evaluation board, with our recent 2.6 Beta image, GPIO 40 viz. SODIMM 104 is functioning correctly as GPIO. However note that on Iris board, SODIMM 104 goes to UART control line and is not accessible on the extension connector of Iris. Please check page number 3 and 12 of Iris datasheet.

Depending on the particular SODIMM pin in question, one might have to multiplex it to GPIO before using it as GPIO. See the article here. Also note that GPIO 40 does not directly correspond to SODIMM pin 40. Please have a look at the mapping.