Skip to content

Commit

Permalink
barreleye: Add gpio LEDs to device tree
Browse files Browse the repository at this point in the history
This change exposes the LEDs (which are connected to GPIOs) on
barreleye and palmetto machines as led-class devices. This allows
us to use the full trigger support.

Signed-off-by: Jeremy Kerr <[email protected]>
  • Loading branch information
jk-ozlabs committed Dec 15, 2015
1 parent 6da1b0f commit 7663dc5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
19 changes: 19 additions & 0 deletions arch/arm/boot/dts/aspeed-bmc-opp-barreleye.dts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/dts-v1/;

#include "ast2400.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
model = "Barrelye BMC";
Expand Down Expand Up @@ -38,5 +39,23 @@
};
};
};


leds {
compatible = "gpio-leds";

heartbeat {
gpios = <&gpio 140 GPIO_ACTIVE_LOW>;
};

power {
gpios = <&gpio 141 GPIO_ACTIVE_LOW>;
};

identify {
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};

};
};

18 changes: 18 additions & 0 deletions arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/dts-v1/;

#include "ast2400.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
model = "Palmetto BMC";
Expand Down Expand Up @@ -31,4 +32,21 @@
};
};
};

leds {
compatible = "gpio-leds";

heartbeat {
gpios = <&gpio 140 GPIO_ACTIVE_LOW>;
};

power {
gpios = <&gpio 141 GPIO_ACTIVE_LOW>;
};

identify {
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};

};
};
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/ast2400.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@
};

gpio: gpio@1e780000 {
#gpio-cells = <2>;
gpio-controller;
compatible = "aspeed,ast2400-gpio";
reg = <0x1e780000 0x1000>;
interrupts = <20>;
Expand Down

0 comments on commit 7663dc5

Please sign in to comment.