Skip to content

Commit

Permalink
Fix the activity LED in DT mode
Browse files Browse the repository at this point in the history
Add a "leds" node to the base DTBs, and a subnode for the activity
LED. You can change the LED function like this:

  dtparam=act_led_trigger=heartbeat

Add aliases for the other main nodes (soc, intc).

Issue: linux #757
  • Loading branch information
Phil Elwell authored and popcornmix committed May 18, 2015
1 parent edb77c8 commit a026d17
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
18 changes: 14 additions & 4 deletions arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
model = "Raspberry Pi Model B+";

aliases {
soc = &soc;
spi0 = &spi0;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2s = &i2s;
gpio = &gpio;
intc = &intc;
leds = &leds;
sound = &sound;
};

Expand Down Expand Up @@ -80,12 +83,19 @@
pinctrl-0 = <&i2s_pins>;
};

&act_led {
gpios = <&gpio 47 0>;
};

/ {
__overrides__ {
i2s = <&i2s>,"status";
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
i2c1 = <&i2c1>,"status";
i2s = <&i2s>,"status";
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
i2c1 = <&i2c1>,"status";

act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
act_led_trigger = <&act_led>,"linux,default-trigger";
};
};
18 changes: 14 additions & 4 deletions arch/arm/boot/dts/bcm2708-rpi-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
model = "Raspberry Pi Model B";

aliases {
soc = &soc;
spi0 = &spi0;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2s = &i2s;
gpio = &gpio;
intc = &intc;
leds = &leds;
sound = &sound;
};

Expand Down Expand Up @@ -80,12 +83,19 @@
pinctrl-0 = <&i2s_pins>;
};

&act_led {
gpios = <&gpio 16 1>;
};

/ {
__overrides__ {
i2s = <&i2s>,"status";
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
i2c1 = <&i2c1>,"status";
i2s = <&i2s>,"status";
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
i2c1 = <&i2c1>,"status";

act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
act_led_trigger = <&act_led>,"linux,default-trigger";
};
};
11 changes: 10 additions & 1 deletion arch/arm/boot/dts/bcm2708.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
bootargs = "";
};

soc {
soc: soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
Expand Down Expand Up @@ -76,6 +76,15 @@
#size-cells = <0>;
status = "disabled";
};

leds: leds {
compatible = "gpio-leds";

act_led: act {
label = "ACT";
linux,default-trigger = "mmc0";
};
};
};

clocks {
Expand Down

0 comments on commit a026d17

Please sign in to comment.