FDT Support for GPIO (gpiobus and friends)

Hiroki Sato hrs at FreeBSD.org
Tue Dec 4 21:01:35 UTC 2012


Luiz Otavio O Souza <loos.br at gmail.com> wrote
  in <BEB9A0F8-560B-4937-8707-653988A26D85 at gmail.com>:

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>;
+				};
+			};

 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.

-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20121205/4df44388/attachment.sig>


More information about the freebsd-arch mailing list