From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 13 10:30:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C23B3876 for ; Sat, 13 Apr 2013 10:30:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 90060BEF for ; Sat, 13 Apr 2013 10:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DAU0GH040226 for ; Sat, 13 Apr 2013 10:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3DAU0ZZ040225; Sat, 13 Apr 2013 10:30:00 GMT (envelope-from gnats) Resent-Date: Sat, 13 Apr 2013 10:30:00 GMT Resent-Message-Id: <201304131030.r3DAU0ZZ040225@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Petko Bordjukov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 787EA764 for ; Sat, 13 Apr 2013 10:24:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 6B66AB65 for ; Sat, 13 Apr 2013 10:24:37 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r3DAOaK9051679 for ; Sat, 13 Apr 2013 10:24:36 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r3DAOal0051678; Sat, 13 Apr 2013 10:24:36 GMT (envelope-from nobody) Message-Id: <201304131024.r3DAOal0051678@red.freebsd.org> Date: Sat, 13 Apr 2013 10:24:36 GMT From: Petko Bordjukov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/177832: [mips] [gpio] GPIO and RF LED do not function on UBNT Routerstation X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 10:30:00 -0000 >Number: 177832 >Category: kern >Synopsis: [mips] [gpio] GPIO and RF LED do not function on UBNT Routerstation >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 13 10:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Petko Bordjukov >Release: 10.0-CURRENT >Organization: >Environment: FreeBSD rtrf3n 10.0-CURRENT FreeBSD 10.0-CURRENT #39 r249144M: Fri Apr 5 14:04:07 EEST 2013 root@virtbsd10:/usr/obj/mips.mips/usr/src/sys/ROUTERSTATION mips >Description: The current configuration of the kernel for the UBNT Routerstation does not allow proper GPIO control. >How-To-Repeat: # echo 1 > /dev/led/rf or # gpioctl -f /dev/gpioc0 -l >Fix: Copy over to ROUTERSTATION.hints the portion of RSPRO.hints that remedies this issue. Patch attached with submission follows: Index: ROUTERSTATION.hints =================================================================== --- ROUTERSTATION.hints (revision 249406) +++ ROUTERSTATION.hints (working copy) @@ -12,6 +12,24 @@ # Uncomment this hint for RS (not PRO) hint.arge.1.phymask=0x30000 +# 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=0x000000ff + +# GPIO 0: Pin 1 +# GPIO 1: Pin 2 +# GPIO 2: RF LED +# GPIO 3: Pin 3 +# GPIO 4: Pin 4 +# GPIO 5: Pin 5 +# GPIO 6: Pin 6 +# GPIO 7: Pin 7 + # RF led hint.gpioled.0.at="gpiobus0" hint.gpioled.0.name="rf" >Release-Note: >Audit-Trail: >Unformatted: