diff options
author | adrian <adrian@FreeBSD.org> | 2011-12-15 01:05:38 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-12-15 01:05:38 +0000 |
commit | 4b16f2dc46d161383f7be940faae768f8cb01438 (patch) | |
tree | 57822014f8fc5dc1b3964e648744b8f55bdc174b /sys/mips/conf | |
parent | 1af383c5f6fceadf05a48b89f197d7031db17f5f (diff) | |
download | FreeBSD-src-4b16f2dc46d161383f7be940faae768f8cb01438.zip FreeBSD-src-4b16f2dc46d161383f7be940faae768f8cb01438.tar.gz |
* Add in the gpio/gpioled drivers into AR91XX_BASE.
* Add in a default GPIO section for AR91XX_BASE.hints, which doesn't
define the GPIO function masks or any GPIO pines.
* Add in the GPIO line definitions for LEDs and GPIO pins for the
TP-WR1043nd.
I've verified the LEDs work fine using gpioset.
Diffstat (limited to 'sys/mips/conf')
-rw-r--r-- | sys/mips/conf/AR91XX_BASE | 2 | ||||
-rw-r--r-- | sys/mips/conf/AR91XX_BASE.hints | 6 | ||||
-rw-r--r-- | sys/mips/conf/TP-WN1043ND.hints | 41 |
3 files changed, 49 insertions, 0 deletions
diff --git a/sys/mips/conf/AR91XX_BASE b/sys/mips/conf/AR91XX_BASE index 71aaab0..a3686be 100644 --- a/sys/mips/conf/AR91XX_BASE +++ b/sys/mips/conf/AR91XX_BASE @@ -109,3 +109,5 @@ device md device bpf device random device if_bridge +device gpio +device gpioled diff --git a/sys/mips/conf/AR91XX_BASE.hints b/sys/mips/conf/AR91XX_BASE.hints index d6a4911..81442f3 100644 --- a/sys/mips/conf/AR91XX_BASE.hints +++ b/sys/mips/conf/AR91XX_BASE.hints @@ -51,3 +51,9 @@ hint.mx25l.0.cs=0 # Watchdog hint.ar71xx_wdog.0.at="nexus0" + +# The GPIO function and pin mask is configured per-board +hint.gpio.0.at="apb0" +hint.gpio.0.maddr=0x18040000 +hint.gpio.0.msize=0x1000 +hint.gpio.0.irq=2 diff --git a/sys/mips/conf/TP-WN1043ND.hints b/sys/mips/conf/TP-WN1043ND.hints index d438e43..dce3fea 100644 --- a/sys/mips/conf/TP-WN1043ND.hints +++ b/sys/mips/conf/TP-WN1043ND.hints @@ -75,3 +75,44 @@ hint.map.4.start=0x007f0000 hint.map.4.end=0x00800000 hint.map.4.name="art" hint.map.4.readonly=1 + +# GPIO specific configuration block + +# Don't flip on anything that isn't already enabled. +# This includes leaving the SPI CS1/CS2 pins as GPIO pins as they're +# not used here. +hint.gpio.0.function_set=0x00000000 +hint.gpio.0.function_clear=0x00000000 + +# These are the GPIO LEDs and buttons which can be software controlled. +hint.gpio.0.pinmask=0x001c02ae + +# pin 1 - USB (LED) +# pin 2 - System (LED) +# Pin 3 - Reset (input) +# Pin 5 - QSS (LED) +# Pin 7 - QSS Button (input) +# Pin 8 - wired into the chip reset line +# Pin 9 - WLAN +# Pin 10 - UART TX (not GPIO) +# Pin 13 - UART RX (not GPIO) +# Pin 18 - RTL8366RB switch data line +# Pin 19 - RTL8366RB switch clock line +# Pin 20 - "GPIO20" + +# LEDs are configured separately and driven by the LED device +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="usb" +hint.gpioled.0.pins=0x0002 + +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.name="system" +hint.gpioled.1.pins=0x0004 + +hint.gpioled.2.at="gpiobus0" +hint.gpioled.2.name="qss" +hint.gpioled.2.pins=0x0020 + +hint.gpioled.3.at="gpiobus0" +hint.gpioled.3.name="wlan" +hint.gpioled.3.pins=0x0200 |