svn commit: r287316 - in head/sys: arm/conf boot/fdt/dts/arm

Luiz Otavio O Souza loos at FreeBSD.org
Sun Aug 30 23:20:02 UTC 2015


Author: loos
Date: Sun Aug 30 23:20:00 2015
New Revision: 287316
URL: https://svnweb.freebsd.org/changeset/base/287316

Log:
  Add the LED definitions from vendor's DTS.
  
  Add gpioled support to A20 kernel.
  
  While here rename the gpio phandle to match the one used in the vendor's
  DTS.

Modified:
  head/sys/arm/conf/A20
  head/sys/boot/fdt/dts/arm/bananapi.dts
  head/sys/boot/fdt/dts/arm/cubieboard2.dts
  head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi

Modified: head/sys/arm/conf/A20
==============================================================================
--- head/sys/arm/conf/A20	Sun Aug 30 22:38:06 2015	(r287315)
+++ head/sys/arm/conf/A20	Sun Aug 30 23:20:00 2015	(r287316)
@@ -78,6 +78,7 @@ device		random			# Entropy device
 
 # GPIO
 device		gpio
+device		gpioled
 
 device		scbus			# SCSI bus (required for ATA/SCSI)
 device		da			# Direct Access (disks)

Modified: head/sys/boot/fdt/dts/arm/bananapi.dts
==============================================================================
--- head/sys/boot/fdt/dts/arm/bananapi.dts	Sun Aug 30 22:38:06 2015	(r287315)
+++ head/sys/boot/fdt/dts/arm/bananapi.dts	Sun Aug 30 23:20:00 2015	(r287316)
@@ -30,6 +30,8 @@
 
 /include/ "sun7i-a20.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
 	model = "LeMaker Banana Pi";
 	compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
@@ -72,6 +74,15 @@
 		};
 	};
 
+	leds {
+		compatible = "gpio-leds";
+
+		green {
+			label = "bananapi:green:usr";
+			gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
 	chosen {
 		bootargs = "-v";
 		stdin = "UART0";

Modified: head/sys/boot/fdt/dts/arm/cubieboard2.dts
==============================================================================
--- head/sys/boot/fdt/dts/arm/cubieboard2.dts	Sun Aug 30 22:38:06 2015	(r287315)
+++ head/sys/boot/fdt/dts/arm/cubieboard2.dts	Sun Aug 30 23:20:00 2015	(r287316)
@@ -30,6 +30,8 @@
 
 /include/ "sun7i-a20.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
 	model = "Cubietech Cubieboard2";
 
@@ -70,6 +72,20 @@
 		};
 	};
 
+	leds {
+		compatible = "gpio-leds";
+
+		blue {
+			label = "cubieboard2:blue:usr";
+			gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
+		};
+
+		green {
+			label = "cubieboard2:green:usr";
+			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
 	chosen {
 		bootargs = "-v";
 		stdin = "UART0";

Modified: head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi	Sun Aug 30 22:38:06 2015	(r287315)
+++ head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi	Sun Aug 30 23:20:00 2015	(r287316)
@@ -86,7 +86,7 @@
 			reg = <0x01c20c90 0x10>;
 		};
 
-		GPIO: gpio at 01c20800 {
+		pio: gpio at 01c20800 {
 			#gpio-cells = <3>;
 			compatible = "allwinner,sun4i-gpio";
 			gpio-controller;


More information about the svn-src-head mailing list