# Baytrail GPIO



## Phishfry (Nov 5, 2016)

Gonzo has added Baytrail GPIO support.
This guy is truly a code master.
https://svnweb.freebsd.org/base/head/sys/dev/gpio/bytgpio.c?view=markup&pathrev=308295
This has been tested on the Turbot and should work with Intel Baytrail platforms that breakout the SOC GPIO's.

This has truly elevated FreeBSD to a capable embedded operating system.


----------



## Phishfry (Nov 6, 2016)

Gonzo's instructions:
To enable it in kernel you need add following lines to the kernel config:

```
device gpio
device bytgpio
```
Most of the GPIO pins exposed on Minnowboard belong to /dev/gpioc2, for instance D2 LED is controlled by pin 22 on /dev/gpioc2, to blink it you can use this command:

`gpioctl -f /dev/gpioc2 -t 22`

GPIOs on the Turbot low-speed expansion headers are pins 0, 1, 2, 3 on /dev/gpioc2.


----------

