Support was added to FreeBSD 11 for an x86 boards GPIO pins. PC Engines -APU1 using the Nuvoton NCT5104D with a driver named nctgpio.c
I could not find instructions so here is what is needed:
To check pin status:
To set the first 3 pins for output and push/pull usage:
J19 GPIO HEADER TO NCTGPIO PIN TRANSLATION
pin 1, pin 2, pin 19 and pin 20 marked on board.
APU1 PIN 1--NEGATIVE
APU1 PIN 2--POSITIVE 3.3V-DC
APU1 PIN 3--GPIOCTL 00
APU1 PIN 4--GPIOCTL 01
APU1 PIN 5--GPIOCTL 02
APU1 PIN 6--GPIOCTL 03
APU1 PIN 7--GPIOCTL 04
APU1 PIN 8--GPIOCTL 05
APU1 PIN 9--GPIOCTL 06
APU1 PIN10--GPIOCTL 07
APU1 PIN11--GPIOCTL 08
APU1 PIN12--GPIOCTL 09
APU1 PIN13--GPIOCTL 10
APU1 PIN14--GPIOCTL 11
APU1 PIN15--GPIOCTL 12
APU1 PIN16--GPIOCTL 13
APU1 PIN17--GPIOCTL 14
APU1 PIN18--GPIOCTL 15
APU1 PIN19--NEGATIVE
APU1 PIN20--POSITIVE 5V-DC
I could not find instructions so here is what is needed:
kldload nctgpio
or nctgpio_load="YES"
in /boot/loader.confTo check pin status:
gpioctl -lv
To set the first 3 pins for output and push/pull usage:
gpioctl -c 00 OUT PP
gpioctl -c 01 OUT PP
gpioctl -c 02 OUT PP
J19 GPIO HEADER TO NCTGPIO PIN TRANSLATION
pin 1, pin 2, pin 19 and pin 20 marked on board.
APU1 PIN 1--NEGATIVE
APU1 PIN 2--POSITIVE 3.3V-DC
APU1 PIN 3--GPIOCTL 00
APU1 PIN 4--GPIOCTL 01
APU1 PIN 5--GPIOCTL 02
APU1 PIN 6--GPIOCTL 03
APU1 PIN 7--GPIOCTL 04
APU1 PIN 8--GPIOCTL 05
APU1 PIN 9--GPIOCTL 06
APU1 PIN10--GPIOCTL 07
APU1 PIN11--GPIOCTL 08
APU1 PIN12--GPIOCTL 09
APU1 PIN13--GPIOCTL 10
APU1 PIN14--GPIOCTL 11
APU1 PIN15--GPIOCTL 12
APU1 PIN16--GPIOCTL 13
APU1 PIN17--GPIOCTL 14
APU1 PIN18--GPIOCTL 15
APU1 PIN19--NEGATIVE
APU1 PIN20--POSITIVE 5V-DC