From owner-svn-src-all@FreeBSD.ORG Thu Dec 15 01:05:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94577106564A; Thu, 15 Dec 2011 01:05:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83B088FC1D; Thu, 15 Dec 2011 01:05:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBF15cF9022673; Thu, 15 Dec 2011 01:05:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBF15cYJ022669; Thu, 15 Dec 2011 01:05:38 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112150105.pBF15cYJ022669@svn.freebsd.org> From: Adrian Chadd Date: Thu, 15 Dec 2011 01:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228519 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2011 01:05:38 -0000 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