AnsweredAssumed Answered

Using the GPIOs on iMX535.

Question asked by Dimitar Dyakoff on Feb 27, 2013
Latest reply on Feb 27, 2013 by RodBorras

The set up:

I have i.MX53 module mounted on a custom board. On the custom board there are peripherals such as GPS, GPSR module, LEDs etc. It is running Linux


The goal is to start the GPS module. To do so I have to set logical high on certain pins (GPIO2_31 and USER_UI2).

Under the directory /sys/class/gpio/ I have:









As I understand from the from the documentation the number after gpiochip is determined by the formula "<GPIO Instance – 1> × 32 + <GPIO Port number>" What is  "Instance", the actual pin on the chip? And how to determine the "Port number"?


Lets say that i have configured the GPIO pin. In the documentations is writtren "echo 0 > /sys/class/gpio/gpio199/value" to set the value of the pin.
But this is the result:

root@freescale /$ echo 1 > /sys/class/gpio/gpiochip64/value

-sh: /sys/class/gpio/gpiochip64/value: No such file or directory

Under the /sys/class/gpio/gpiochip64/ directory there is only this:


-r--r--r--1 root root      4096 Jan  1 02:50 base
-r--r--r--1 root root      4096 Jan  1 02:50 label
-r--r--r--1 root root      4096 Jan  1 02:50 ngpio
drwxr-xr-x2 root root         0 Jan  1 02:50 power
lrwxrwxrwx1 root root         0 Jan  1 02:50 subsystem -> ../../../../class/gpio
-rw-r--r--1 root root      4096 Jan  1 00:00 uevent

What am I doing wrong? Any other documentation or example to read?



i.MX53 System Development User’s Guide (MX53UG Rev.1 3/2011)

P.S. I am new to embedded linux development, any help would be appreciated.