GPIOs on emCON-RZ/G1x 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.

 

If the used kernel is compiled with CONFIG_DEBUG_FS you can get a list of the GPIOs with the command:

cat /sys/kernel/debug/gpio

Remark: emtrion compiles the Linux Kernel 4.x for emCON-RZ/G1x boards with CONFIG_DEBUG_FS.

 

 

emCON-RZ/G1E on Avari

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

 

ConnectorPinSignalSignal on RZ/G1EBank and pinGPIO Number
J278GPIO_1GPIO_10-1993
J2710GPIO_2GPIO_20-2994
J2712GPIO_3GPIO_35-4846
J2714GPIO_4GPIO_44-31901
J2716GPIO_5GPIO_54-26896
J2718GPIO_6GPIO_64-29899
J2720GPIO_7not connected  
J2722GPIO_8not connected  

 

emCON-RZ/G1M on Avari

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

 

ConnectorPinSignalSignal on RZ/G1MBank and pinGPIO Number
J278GPIO_1GP4_134-13883
J2710GPIO_2GP4_144-14884
J2712GPIO_3GP4_154-15885
J2714GPIO_4GP4_164-16886
J2716GPIO_5GP4_174-17887
J2718GPIO_6GP4_184-18888
J2720GPIO_7GP4_194-19889
J2722GPIO_8GP4_204-20890

 

emCON-RZ/G1H on Avari

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

 

ConnectorPinSignalSignal on RZ/G1HBank and pinGPIO Number
J278GPIO_1GP1_01-0960
J2710GPIO_2GP1_11-1961
J2712GPIO_3GP1_21-2962
J2714GPIO_4GP1_31-3963
J2716GPIO_5GP1_101-10970
J2718GPIO_6GP1_111-11971
J2720GPIO_7GP1_131-13973
J2722GPIO_8GP1_141-14974



Back