From owner-freebsd-arch@FreeBSD.ORG Tue Dec 4 22:10:21 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B545AA3 for ; Tue, 4 Dec 2012 22:10:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id C9A4A8FC18 for ; Tue, 4 Dec 2012 22:10:20 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id s9so10828996iec.27 for ; Tue, 04 Dec 2012 14:10:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=n2SdUNQaSxl/AUq9j05su1y+TN46zE3aC2IRjVpW7/8=; b=fgharY1q7BVsgxtf5R86bi3sGSNNNpl+2sFN2ukf548+PPwYo8RyGFHuumTXvnjjUl +vUUZPDwzObinsM0EzixyjLnH1BMGae9zt2OlLv/xG9ABmxcSgymxLzVenrPTH/tsHEp amuAk8GGEFEPkQz8a8JTX2f0Qm0QXMfMB6T/GuaXgpO7NVz7llzAeWWm9VBV72extzyy iLEgIIJZVdzeHzd+4q5kgFTe8NYL9try0RaCp3KoReOWRzTzW3YgxVWu7tsfqtnu12UM Ga/DnONgmux1GNvpl1AmwR7XorXlbFfwH9GbgvhClS+aGlpD6DMhr1duKqfKWokJe8aV IHHw== Received: by 10.50.104.232 with SMTP id gh8mr4376312igb.45.1354659019580; Tue, 04 Dec 2012 14:10:19 -0800 (PST) Received: from monkey-bot.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPS id uj6sm2159646igb.4.2012.12.04.14.10.17 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Dec 2012 14:10:18 -0800 (PST) Sender: Warner Losh Subject: Re: FDT Support for GPIO (gpiobus and friends) Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20121205.060056.592894859995638978.hrs@allbsd.org> Date: Tue, 4 Dec 2012 15:10:11 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <20121205.060056.592894859995638978.hrs@allbsd.org> To: Hiroki Sato X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQk7CRt5SEntVvbByY6b0DdNmH8R38ebSRHwT4mYeP/3pZPXCiP2KER+qC1PtHDXKzCGdMwe Cc: freebsd-arch@FreeBSD.org, loos.br@gmail.com X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2012 22:10:21 -0000 On Dec 4, 2012, at 2:00 PM, Hiroki Sato wrote: > Luiz Otavio O Souza wrote > in : > > lo> Hi, > lo> > lo> I've been playing with GPIO on RPi and found the missing support of > lo> FDT on gpiobus very annoying. > lo> > lo> The following patch (gpio-fdt.diff) adds FDT support to GPIO (gpiobus, > lo> gpioc, gpioled). > lo> > lo> The bcm2835_gpio.c.fdt.diff will add (a better) support of FDT on RPi > lo> GPIO controller and the bcm2835.dts.diff has my changes on the RPi dts > lo> for adding support of gpioled on 'ok' led (pin 16). > lo> > lo> Comments ? > > I like this idea, but it should be consistent with standard device > tree bindings. For example, > > + gpiobus { > + compatible = "gpiobus"; > + > + /* Ok led */ > + led { > + compatible = "gpioled"; > + label = "ok"; > + pins = <16>; > + }; > + }; Yes. This was the sort of thing that I didn't like... > should be something like the following: > > led { > compatible = "gpio-leds"; > ok { > gpios = <&foo 16 1>; > label = "ok"; > }; > }; > > A node using GPIOs must have gpios property for the gpio-controller > node and pin number. Yes, this conforms much better with the FTD standards. Warner