/Linux-x86-Platform

Documents for setup Linux x86 platform (Debian 10/CentOS 7.9/Ubuntu 20.04)

Primary LanguageShell

Linux-x86-Platform

Documents for setup Linux x86 platform

Products Page Links

Kaby Lake

DA-820C-KL
DA-682C-KL
DA-681C-KL
MC-1220-KL
V2406C-KL
V2403C-KL

Whiskey Lake

V2406C-WL

Tiger Lake

MC-3201-TL

Linux Distribution Setup

CentOS-7.9
Ubuntu-20.04
Ubuntu-20.04-HWE
Debian-9 (stretch)
Debian-10 (buster)
Debian-11 (bullseye)

How to export super IO (IT87 series) GPIO pin

  • Check drivers are loaded

    1. Ensure gpio_it87 driver is loaded on Linux OS
    2. Ensure it87_serial driver is loaded on Linux OS
  • Convert GPIO pin index to gpio sysfs:

    1. Check IT87 gpio chip index
    # cat /sys/class/gpio/gpiochip448/label
    gpio_it87
    # it means IT87 gpio chip base index is started from 448
    
    1. Convert GPIO pin index to gpio-sysfs index
      • GP[n][m] = base + (n - 1) * 8 + m
      • e.g.
        • GP35 on IT87 gpio chip base 448: gpio-sysfs index = 448 + (3 - 1) * 8 + 5 = 469
    2. Export gpio-sysfs index 469
    echo 469 > /sys/class/gpio/export
    
    1. Set GPIO value (high/low)
    # Set High value
    echo "high" > /sys/class/gpio/gpio469/direction
    # Set Low value
    echo "low" > /sys/class/gpio/gpio469/direction
    
    1. Get GPIO value
    cat /sys/class/gpio/gpio469/value
    # if return 0 = low
    # if return 1 = high
    
  • An example code for Set/Get gpio-sysfs value from GPIO pin

mx-gpio-ctl

- Set GP14 value as 0: `mx-gpio-ctl set 14 0`
- Get GP14 value: `mx-gpio-ctl get 14`