From owner-freebsd-embedded@FreeBSD.ORG Fri Sep 6 18:31:18 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 16ACDF7A; Fri, 6 Sep 2013 18:31:18 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85A9B258B; Fri, 6 Sep 2013 18:31:17 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id n12so868386wgh.3 for ; Fri, 06 Sep 2013 11:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Yaj8oJwCGSaI4I1kY9MVKSRMb3h1mo+GY7kMzFdMkqs=; b=PNpBT6rT3aRDsj6JjhCtM4bgrywWv9nJrZEIjyYtIO4cX2HShlDa6Ko2cAbqE1ixYK xTwRAkKfnNcJm0S7XzWaJ8z7POEkG/CftvfgcFWiMMStX1zCa5VMEstDp2UQASzoTZHT 62iO/OLas0Av6AnLvVSByjKVR8CQ1NzHxROyzshVH39C1QBcCxi1ssbjwntbc/WRBt8K VOJmmKJ6+zsLVx6oD4ebCYUlR6ouXb0vnO3VHR1/Lsmxrq7gCyZUDRhUcxjYUmOOyu6s UpW7/crdZgDw5NA9b921+yEBkZuHDVcypvanKyqtTrA61WDOyjFlTDf2aKC2dDo83Iv7 xRvw== MIME-Version: 1.0 X-Received: by 10.194.122.99 with SMTP id lr3mr3140599wjb.21.1378492275990; Fri, 06 Sep 2013 11:31:15 -0700 (PDT) Received: by 10.216.75.140 with HTTP; Fri, 6 Sep 2013 11:31:15 -0700 (PDT) In-Reply-To: <1378488150.1637.5.camel@localhost> References: <1378488150.1637.5.camel@localhost> Date: Fri, 6 Sep 2013 15:31:15 -0300 Message-ID: Subject: Re: GPIO hint meanings From: Luiz Otavio O Souza To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 18:31:18 -0000 On 6 September 2013 14:22, Sean Bruno wrote: > I think I have a fairly firm grasp on what some of the mips/gpio hints > mean, e.g.: > > hint.gpio.0.pinmask > hint.gpioled.0.at > hint.gpioled.0.name > hint.gpioled.0.pins > > Fairly straightforward. > > Now, what do these mean/do: > > hint.gpio.0.function_set > hint.gpio.0.function_clear > > ? > > Sean > > p.s. I think I'll take this and thrash together a gpioled(4) and gpio(4) > man page if I can understand better. > Hi Sean, Some of the GPIO pins on this SoC family (ar724x, ar71xx and ar9xxx) can be set between GPIO and an alternate function. So adding a pin to function_set enables this alternate function and the function_clear disables it (sometimes the bootloader doesn't initialize properly those pins). Each SoC has its own set of pins and functions. For ar71xx the pins 0 and 1 can be used as additional SPI chip select outputs, pins 9 and 10 are used for UART and there are also reserved pins for a SLIC/I2S interface. Luiz