From owner-freebsd-arm@FreeBSD.ORG Sat Oct 30 13:18:57 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 C70DD1065695 for ; Sat, 30 Oct 2010 13:18:57 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 6BB6F8FC17 for ; Sat, 30 Oct 2010 13:18:57 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id 37821C3BD9; Sat, 30 Oct 2010 15:18:56 +0200 (CEST) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id qctIGZLjBrbZ; Sat, 30 Oct 2010 15:18:55 +0200 (CEST) Received: from [192.168.133.14] (nat3-133.ghnet.pl [91.150.222.133]) by smtp.semihalf.com (Postfix) with ESMTPSA id 7F05CC3BB6; Sat, 30 Oct 2010 15:18:55 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Rafal Jaworowski In-Reply-To: <201010300037.03374.freebsd-arm@dino.sk> Date: Sat, 30 Oct 2010 15:18:54 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <90B83E3E-C1CF-4233-8813-1C652ACEF252@semihalf.com> References: <201010300037.03374.freebsd-arm@dino.sk> To: Milan Obuch X-Mailer: Apple Mail (2.1081) 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 13:18:57 -0000 On 2010-10-30, at 00:37, Milan Obuch wrote: > Hi, >=20 > after solving mge1 problem I decided to work a bit with Guruplug's = gpio. There=20 > are some of them accessible via u-snap connector and some of them are = used to=20 > 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. > there is some description in file bindings-gpio.txt, but I did not = find=20 > something used in dts files, so I only guessed gpios could be defined = the=20 > following way: >=20 > GPIO: gpio@10100 = = =20 > {#gpio-cells =3D <3>; > compatible =3D "mrvl,gpio"; > reg =3D <0x10100 0x20>; > gpio-controller; > interrupts =3D <35 36 37 38 39 40 41>; > interrupt-parent =3D <&PIC>; > gpios =3D > <&GPIO 46 2 0x00000000 /* GPIO[46]: OUT */ = =20= > &GPIO 47 2 0x00000000 /* GPIO[47]: OUT */ = =20= > &GPIO 48 2 0x00000000 /* GPIO[48]: OUT */ = =20= > &GPIO 49 2 0x00000000 /* GPIO[49]: OUT */ = =20= >> ; > }; 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). Rafal