GPIOs on emCON-MX6 under Linux

Please see the following table for the translation from baseboard pin to CPU pin:

 

Under Linux you can use sysfs to access gpios.

To get access to an GPIO pin, first write the GPIO number to /sys/class/gpio/export

echo 34 > /sys/class/gpio/export

Now you should find a directory in /sys/class/gpio to access your GPIO pin. Write in or out to direction to change the direction of the pin:

echo out > /sys/class/gpio/gpio34/direction

The value (0 for off, 1 for on) of the pin is in the value file. To read or change it, read the file or write to it.

echo 1 > /sys/class/gpio/gpio34/valuecat /sys/class/gpio/gpio34/value

The list of GPIO numbers can be found below.

 

Avari

There are 8 GPIOs on J27 with a signal level of 3.3V.

 

ConnectorPinSignalSignal on MX6Bank and pinGPIO Number
J278GPIO_1GPIO_12-032
J2710GPIO_2GPIO_22-133
J2712GPIO_3GPIO_32-234
J2714GPIO_4GPIO_42-335
J2716GPIO_5GPIO_52-436
J2718GPIO_6GPIO_62-537
J2720GPIO_7GPIO_72-638
J2722GPIO_8GPIO_82-739

 

Bvari

There are 8 GPIOs on J14 with a signal level of 3.3V.

 

ConnectorPinSignalSignal on MX6Bank and pinGPIO Number
J148GPIO_1GPIO_12-032
J1410GPIO_2GPIO_22-133
J1412GPIO_3GPIO_32-234
J1414GPIO_4GPIO_42-335
J1416GPIO_5GPIO_52-436
J1418GPIO_6GPIO_62-537
J1420GPIO_7GPIO_72-638
J1422GPIO_8GPIO_82-739



Back