]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: dts: am335x-baltos: add LED support
authorYegor Yefremov <yegorslists@googlemail.com>
Tue, 28 Mar 2017 13:09:16 +0000 (15:09 +0200)
committerTony Lindgren <tony@atomide.com>
Tue, 28 Mar 2017 16:06:43 +0000 (09:06 -0700)
All three devices provide GPIO based LEDs named power,
wlan and app.

Place LEDs definition into a separate dtsi file as not all
devices including am335x-baltos.dtsi have the same LED layout.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/am335x-baltos-ir2110.dts
arch/arm/boot/dts/am335x-baltos-ir3220.dts
arch/arm/boot/dts/am335x-baltos-ir5221.dts
arch/arm/boot/dts/am335x-baltos-leds.dtsi [new file with mode: 0644]

index 501c7527121b284d46883a3eab88e7085496745d..75de1e723303752eedccedd24fe0da637f0d2e37 100644 (file)
@@ -14,6 +14,7 @@
 /dts-v1/;
 
 #include "am335x-baltos.dtsi"
+#include "am335x-baltos-leds.dtsi"
 
 / {
        model = "OnRISC Baltos iR 2110";
index 19f53b8569e1c9411dc43b7639d61e080ec40438..46df1b22022c75d811fe7d3af920a3fef95f6af6 100644 (file)
@@ -14,6 +14,7 @@
 /dts-v1/;
 
 #include "am335x-baltos.dtsi"
+#include "am335x-baltos-leds.dtsi"
 
 / {
        model = "OnRISC Baltos iR 3220";
index 2b9d7f4db23f0fa44c14e867f197db5034ae9261..5d56355ba04067acb1f772f3e79048fb21cd87f3 100644 (file)
@@ -14,6 +14,7 @@
 /dts-v1/;
 
 #include "am335x-baltos.dtsi"
+#include "am335x-baltos-leds.dtsi"
 
 / {
        model = "OnRISC Baltos iR 5221";
diff --git a/arch/arm/boot/dts/am335x-baltos-leds.dtsi b/arch/arm/boot/dts/am335x-baltos-leds.dtsi
new file mode 100644 (file)
index 0000000..3ab1767
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * VScom OnRISC
+ * http://www.vscom.de
+ */
+
+/*#include "am33xx.dtsi"*/
+
+/ {
+       leds {
+               pinctrl-names = "default";
+               pinctrl-0 = <&user_leds>;
+
+               compatible = "gpio-leds";
+
+               power {
+                       label = "onrisc:red:power";
+                       linux,default-trigger = "default-on";
+                       gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+                       default-state = "on";
+               };
+               wlan {
+                       label = "onrisc:blue:wlan";
+                       gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+               app {
+                       label = "onrisc:green:app";
+                       gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+       };
+};
+
+&am33xx_pinmux {
+       user_leds: pinmux_user_leds {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x908, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* mii1_col.gpio3_0 PWR LED */
+                       AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* mii1_txd3.gpio0_16 WLAN LED */
+                       AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* mii1_txd2.gpio0_17 APP LED */
+               >;
+       };
+};