svn commit: r228519 - head/sys/mips/conf
Adrian Chadd
adrian at FreeBSD.org
Thu Dec 15 01:05:38 UTC 2011
Author: adrian
Date: Thu Dec 15 01:05:38 2011
New Revision: 228519
URL: http://svn.freebsd.org/changeset/base/228519
Log:
* 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.
Modified:
head/sys/mips/conf/AR91XX_BASE
head/sys/mips/conf/AR91XX_BASE.hints
head/sys/mips/conf/TP-WN1043ND.hints
Modified: head/sys/mips/conf/AR91XX_BASE
==============================================================================
--- head/sys/mips/conf/AR91XX_BASE Thu Dec 15 01:03:49 2011 (r228518)
+++ head/sys/mips/conf/AR91XX_BASE Thu Dec 15 01:05:38 2011 (r228519)
@@ -109,3 +109,5 @@ device md
device bpf
device random
device if_bridge
+device gpio
+device gpioled
Modified: head/sys/mips/conf/AR91XX_BASE.hints
==============================================================================
--- head/sys/mips/conf/AR91XX_BASE.hints Thu Dec 15 01:03:49 2011 (r228518)
+++ head/sys/mips/conf/AR91XX_BASE.hints Thu Dec 15 01:05:38 2011 (r228519)
@@ -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
Modified: head/sys/mips/conf/TP-WN1043ND.hints
==============================================================================
--- head/sys/mips/conf/TP-WN1043ND.hints Thu Dec 15 01:03:49 2011 (r228518)
+++ head/sys/mips/conf/TP-WN1043ND.hints Thu Dec 15 01:05:38 2011 (r228519)
@@ -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
More information about the svn-src-head
mailing list