From owner-freebsd-embedded@FreeBSD.ORG Fri Sep 6 19:42:35 2013 Return-Path: Delivered-To: freebsd-embedded@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 ESMTP id 4B5DC34E for ; Fri, 6 Sep 2013 19:42:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1344F2C6C for ; Fri, 6 Sep 2013 19:42:35 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id j10so4500839oah.27 for ; Fri, 06 Sep 2013 12:42:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=MdDRGaq755IgTIgkDIEBlcmSuGG19OJsCHAcv6YbBfY=; b=GU+8iULud4v2txVdzqEnUClUglhiDHmu0N0O2EwOBcbFlFqYz0DESloTQeZQPxsUPn 43WNGg/s59NTa+R1ry8n4NKnGcbu/KrYq+/oXwrR6YGEZsrRQB6BNGIXH4dT7odrFSIX iwJGKAMnWe87xmHedV05/8MrIk89wv3JuiF0/vSxy2n2a3eoRVTaenefVMyJfxSgBcjW oSkxou3wJKuyTiLqsyaROjzK4UVTTMHSnt9Ew6Vorq7xJ47TaaNTvC3WoKkMd+NKY8oW UKY+4iCsJViPg8Y/o2qkwiDSrLZ+rlZHUA6egOREhptCmnPzTwd6ac+/yUWhMe27dzcD TJ8Q== X-Gm-Message-State: ALoCoQlDLnOY065gd/YW6DuVp5Mqcc+TUzmF5n+4ODAcqHpupMhzW+/hXMHUxWYNLSMm8l0LWSWg X-Received: by 10.182.158.104 with SMTP id wt8mr3000256obb.95.1378496554160; Fri, 06 Sep 2013 12:42:34 -0700 (PDT) Received: from fusionlt2834a.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPSA id j9sm4249279oef.8.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Sep 2013 12:42:33 -0700 (PDT) Sender: Warner Losh Subject: Re: GPIO hint meanings Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Fri, 6 Sep 2013 13:42:31 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <097A9AFF-D291-4D9F-92CC-12E5E453F7C7@bsdimp.com> References: <1378488150.1637.5.camel@localhost> To: Luiz Otavio O Souza X-Mailer: Apple Mail (2.1085) 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 19:42:35 -0000 On Sep 6, 2013, at 12:31 PM, Luiz Otavio O Souza wrote: > On 6 September 2013 14:22, Sean Bruno wrote: >=20 >> I think I have a fairly firm grasp on what some of the mips/gpio = hints >> mean, e.g.: >>=20 >> hint.gpio.0.pinmask >> hint.gpioled.0.at >> hint.gpioled.0.name >> hint.gpioled.0.pins >>=20 >> Fairly straightforward. >>=20 >> Now, what do these mean/do: >>=20 >> hint.gpio.0.function_set >> hint.gpio.0.function_clear >>=20 >> ? >>=20 >> Sean >>=20 >> p.s. I think I'll take this and thrash together a gpioled(4) and = gpio(4) >> man page if I can understand better. >>=20 >=20 >=20 > Hi Sean, >=20 > 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). >=20 > Each SoC has its own set of pins and functions. >=20 > 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. We really need a pinmux/pinctl type interface for this which is standard = across drivers/platforms. Warner=