Skip to main content
The Dragonwing IQ8-EVK contains one low-speed connector (JLS1) that provides access to various GPIOs, CAN, QUPs, and other interfaces.

Pinout

The figure below shows the default functions of the IQ-8275 EVK 40-pin LS connector.

GPIOs

The following commands require root privileges. Use sudo su to switch to the root user.

Identify GPIO Subsystem Numbers

Identify the base GPIO number by running the following command and looking for platform/f000000.pinctrl (gpiochip4).
LS1 Connector GPIO
GPIOOddEvenGPIO
GND12GND
5234CAN_H
5456CAN_L
557832
5391033
44111234
45131435
961516107
951718106
1001920109
992122108
402324105
41252643
422728SAIL59
PME 112930SAIL42
1403132SAIL46
IO EXP3 73334SAIL50
3.3V3536SYS PWR
5V3738SYS PWR
GND3940GND

Configure GPIOs from User Space

Use the libgpiod library from user space to control the GPIOs for better performance.
1

Install the Arm64 toolchain

2

Download and extract libgpiod

3

Configure the sources for static linking

4

Compile the library

Compiling creates linked binaries.
5

Build the statically linked binaries

6

Push the binaries to the device

7

List GPIO chips on the device

Run gpiodetect to list the GPIO chips.
Example output:
8

Display GPIO line information

Run gpioinfo to view the lines for a specific chip.
Example output:
9

Set a GPIO value

To set GPIO line 54 on gpiochip4, run:
Example output:
10

Read a GPIO value

To read GPIO line 0 on gpiochip4, run:
Example output:
After reading the value, gpioinfo shows the line returned to input mode.
Example output:

UART

Pins 5 and 7 are configured for UART by default (GPIO lines 54 and 55, mapping to uart12 = qup1_se5 (0xa98000)). Follow the Modify serial engine node procedure to enable the UART interface. After enabling, the device node appears at /dev/ttyHS3.
1

Connect pins

Short pin 5 and pin 7 with a Dupont wire.
Do not short power and ground pins.
2

Configure UART

3

Open two SSH terminals

Terminal 1 (RX): cat /dev/ttyHS3Terminal 2 (TX): echo "hello world!" > /dev/ttyHS3

I2C

Pins 8 and 10 are configured for I2C by default (GPIO lines 32 and 33, mapping to i2c4 = qup0_se4 (0x990000)). Follow the Modify serial engine node procedure to enable the I2C interface.

SPI

Pins 11 and 13 are configured for SPI by default (GPIO lines 44 and 45, mapping to spi10 = qup1_se3 (0xa8c000)). Follow the Modify serial engine node procedure to enable the SPI interface.