From owner-freebsd-arm@FreeBSD.ORG Sat Oct 30 17:00:44 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62F5B106566B for ; Sat, 30 Oct 2010 17:00:44 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from loki.netlab.sk (ns3.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id 25C1E8FC17 for ; Sat, 30 Oct 2010 17:00:43 +0000 (UTC) Received: from door.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: PLAIN milan, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by loki.netlab.sk with esmtp; Sat, 30 Oct 2010 19:01:13 +0200 id 00033C07.4CCC4F59.000127C2 From: Milan Obuch To: Rafal Jaworowski Date: Sat, 30 Oct 2010 19:00:35 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.5.2; i386; ; ) References: <201010300037.03374.freebsd-arm@dino.sk> <90B83E3E-C1CF-4233-8813-1C652ACEF252@semihalf.com> In-Reply-To: <90B83E3E-C1CF-4233-8813-1C652ACEF252@semihalf.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010301900.36922.freebsd-arm@dino.sk> Cc: freebsd-arm@freebsd.org Subject: Re: Guruplug gpio X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2010 17:00:44 -0000 On Saturday 30 October 2010 15:18:54 Rafal Jaworowski wrote: > On 2010-10-30, at 00:37, Milan Obuch wrote: > > Hi, > > > > after solving mge1 problem I decided to work a bit with Guruplug's gpio. > > There are some of them accessible via u-snap connector and some of them > > are used to controll status LEDs. > > As mentioned in another email, Marvell GPIO driver does not get hooks for > the new framework, so this needs to be provided first before you'd be able > to controll LEDs from userspace etc. > I see. I am going to investigate how this could be done. I did some work with GPIO based on some older work, so I just need to check the infrastructure for GPIO (gpiobus, gpio properties etc). > > there is some description in file bindings-gpio.txt, but I did not find > > something used in dts files, so I only guessed gpios could be defined the > > following way: > > > > GPIO: gpio@10100 > > {#gpio-cells = <3>; > > > > compatible = "mrvl,gpio"; > > reg = <0x10100 0x20>; > > gpio-controller; > > interrupts = <35 36 37 38 39 40 41>; > > interrupt-parent = <&PIC>; > > gpios = > > > > <&GPIO 46 2 0x00000000 /* GPIO[46]: OUT */ > > > > &GPIO 47 2 0x00000000 /* GPIO[47]: OUT */ > > &GPIO 48 2 0x00000000 /* GPIO[48]: OUT */ > > &GPIO 49 2 0x00000000 /* GPIO[49]: OUT */ > >> > >> ; > > > > }; > > The "gpios" property cannot be part of the GPIO controller node -- it > belongs to the node, which is a consumer of GPIO lines which belong to > some GPIO controller. For example, when PCI IRQs are routed through GPIO > lines: it is the PCI node that should contain the "gpios" prop referencing > their parent GPIO controller and specifying which GPIO lines are used and > how they are configured (polarity, trigger and other attributes). > Could you provide an example dts? I did not find any with gpios, so this was basically a guesswork. Regards, Milan