From owner-svn-src-head@FreeBSD.ORG Wed Mar 5 04:22:08 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0549D7AC; Wed, 5 Mar 2014 04:22:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB5E1C73; Wed, 5 Mar 2014 04:22:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s254M7De093370; Wed, 5 Mar 2014 04:22:07 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s254M77l093369; Wed, 5 Mar 2014 04:22:07 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201403050422.s254M77l093369@svn.freebsd.org> From: Sean Bruno Date: Wed, 5 Mar 2014 04:22:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262778 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 04:22:08 -0000 Author: sbruno Date: Wed Mar 5 04:22:07 2014 New Revision: 262778 URL: http://svnweb.freebsd.org/changeset/base/262778 Log: Populate the GPIO pins and GPIOLED configs Modified: head/sys/mips/conf/DIR-825B1.hints Modified: head/sys/mips/conf/DIR-825B1.hints ============================================================================== --- head/sys/mips/conf/DIR-825B1.hints Wed Mar 5 04:19:52 2014 (r262777) +++ head/sys/mips/conf/DIR-825B1.hints Wed Mar 5 04:22:07 2014 (r262778) @@ -28,14 +28,13 @@ hint.pcib.0.bus.0.18.0.ath_fixup_size=40 hint.ath.0.eeprom_firmware="pcib.0.bus.0.17.0.eeprom_firmware" hint.ath.1.eeprom_firmware="pcib.0.bus.0.18.0.eeprom_firmware" -# TODO: gpio LEDs - # Geom MAP # The DIR-825B1 has an 8MB flash part - HOWEVER, the 64k caldata isn't # at the end of the flash. It's ~ 6MB into the flash image. -# mtdparts=ar7100-nor0:256k(uboot),64k(Config),1024k(vmlinux),5184k(rootfs),64k(caldata) +# mtdparts=ar7100-nor0:256k(uboot),64k(Config),1024k(vmlinux),5184k(rootfs), +# 64k(caldata) hint.map.0.at="flash/spi0" hint.map.0.start=0x00000000 @@ -69,3 +68,73 @@ hint.map.4.end=0x00670000 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=0x000009ff + +# Pin 1 - USB (LED blue) --> works +# Pin 2 - Power (LED orange) --> works +# Pin 3 - Power (LED blue) --> works +# Pin 4 - Button (RESET) --> works +# Pin 5 - WPS (LED blue) --> works +# Pin 6 - RTL8366RB switch data line +# Pin 7 - Planet (LED orange)--> works +# Pin 8 - RTL8366RB switch clock line +# Pin 9 - Button (WPS) --> works after set to high +# Pin 10 - N/C +# Pin 11 - N/C +# Pin 12 - Planet (LED blue) --> works + +# LEDs are configured separately and driven by the LED device +# usb tested good +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="usb-blue" +hint.gpioled.0.pins=0x0001 + +# no orange power led? +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.name="power-orange" +hint.gpioled.1.pins=0x0002 + +# blue power tested good +hint.gpioled.2.at="gpiobus0" +hint.gpioled.2.name="power-blue" +hint.gpioled.2.pins=0x0004 + +# wps tested good +hint.gpioled.3.at="gpiobus0" +hint.gpioled.3.name="wps-blue" +hint.gpioled.3.pins=0x0010 + +# orage globe tested good +hint.gpioled.4.at="gpiobus0" +hint.gpioled.4.name="planet-orange" +hint.gpioled.4.pins=0x0040 + +# no blue planet LED on this unit +hint.gpioled.5.at="gpiobus0" +hint.gpioled.5.name="planet-blue" +hint.gpioled.5.pins=0x0800 + +# GPIO I2C bus +hint.gpioiic.0.at="gpiobus0" +hint.gpioiic.0.pins=0x00a0 +hint.gpioiic.0.sda=0 +hint.gpioiic.0.scl=1 + +# I2C bus +# Don't be strict about I2C protocol - the relaxed semantics are required +# by the realtek switch PHY. +hint.iicbus.0.strict=0 + +# Bit bang bus - override default delay +#hint.iicbb.0.udelay=3 +