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 forplatform/f000000.pinctrl (gpiochip4). For IQ-8275, the base is 560.

Control GPIOs via sysfs
1
Export the GPIO
2
Configure direction and value
3
Unexport when done
GPIO Code Examples
- C
- Python
Sets pin 5 as output, pin 7 as input, and loops to check the level of pin 7.
1
Compile
2
Connect pins and run
Short pin 5 and pin 7 with a Dupont wire.
UART
Pins 5 and 7 are configured for UART by default (GPIO lines 54 and 55, mapping touart12 = qup1_se5 (0xa98000)).
Follow the Modify serial engine node procedure to enable the UART interface. After enabling, the device node appears at /dev/ttyHS3.
- Shell
1
Connect pins
Short pin 5 and pin 7 with a Dupont wire.
2
Configure UART
3
Open two SSH terminals
Terminal 1 (RX):
sudo cat /dev/ttyHS3Terminal 2 (TX): echo "hello world!" > /dev/ttyHS3I2C
Pins 8 and 10 are configured for I2C by default (GPIO lines 32 and 33, mapping toi2c4 = 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 tospi10 = qup1_se3 (0xa8c000)).
Follow the Modify serial engine node procedure to enable the SPI interface.

