[PATCH] ARM: bcm2835: Add Raspberry Pi's ACT LED to DT

Simon Arlott simon at fire.lp0.eu
Sun Apr 28 15:59:49 EDT 2013


On 26/04/13 18:45, Daniel Mack wrote:
> The Raspberry Pi board has one GPIO-controlled LED labeled "ACT". Add it
> to the DT via the gpio-leds driver, so users can control it from
> userspace. If CONFIG_LEDS_TRIGGER_HEARTBEAT is set, the LED will also
> signal some sign of life.
> 
> The GPIO circuitry is low-active.
> 
> Signed-off-by: Daniel Mack <zonque at gmail.com>
> ---
>  arch/arm/boot/dts/bcm2835-rpi-b.dts | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
> index aafda17..8b55c62 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
> @@ -8,6 +8,16 @@
>  	memory {
>  		reg = <0 0x10000000>;
>  	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		act {
> +			label = "ACT";
> +			gpios = <&gpio 16 1>;

You need this, because the LED is usually already on at power-up, but
gpio-leds will assume that it's off:
			default-state = "keep";

> +			linux,default-trigger = "heartbeat";
> +		};
> +	};
>  };
>  
>  &gpio {
> 


-- 
Simon Arlott



More information about the linux-rpi-kernel mailing list