[PATCH] mvebu: macchiatobin-singleshot: enable heartbeat LED

Alexandra Alth alexandra at alth.de
Fri Dec 4 07:59:06 EST 2020


Is this now approved and integrated in the nightly? tnx alexandra

> Am 25.11.2020 um 17:53 schrieb Tomasz Maciej Nowak <tmn505 at gmail.com>:
> 
> With board revision 1.3, SolidRun moved the power LED to the middle of
> the board. In old place of power LED a GPIO controllable heartbeat LED
> was added. This commit touches only Single Shot variant, because all
> have revision 1.3. Some boards could be placed in an enclosure, therefore
> the LED0 is enabled by default, since that'll be the only visible
> indicator that the board is operating.
> 
> Ref: http://wiki.macchiatobin.net/tiki-index.php?page=Schematics#Revision1.3_Electrical_Design_Changes
> Ref: http://macchiatobin.net/wp-content/uploads/2017/11/MACCHIATOBin-rev-1_3.pdf
> 
> Reported-by: Alexandra Alth <alexandra at alth.de>
> Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
> ---
> target/linux/mvebu/image/cortexa72.mk         |  2 +-
> ...s-mcbin-singleshot-add-heartbeat-LED.patch | 59 +++++++++++++++++++
> 2 files changed, 60 insertions(+), 1 deletion(-)
> create mode 100644 target/linux/mvebu/patches-5.4/100-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch
> 
> diff --git a/target/linux/mvebu/image/cortexa72.mk b/target/linux/mvebu/image/cortexa72.mk
> index 1440c07a0b5f..8bd4581766c2 100644
> --- a/target/linux/mvebu/image/cortexa72.mk
> +++ b/target/linux/mvebu/image/cortexa72.mk
> @@ -38,7 +38,7 @@ define Device/marvell_macchiatobin-singleshot
>   DEVICE_ALT0_VENDOR := SolidRun
>   DEVICE_ALT0_MODEL := Armada 8040 Community Board
>   DEVICE_ALT0_VARIANT := Single Shot
> -  DEVICE_PACKAGES += kmod-i2c-mux-pca954x
> +  DEVICE_PACKAGES += kmod-i2c-mux-pca954x kmod-ledtrig-heartbeat
>   DEVICE_DTS := armada-8040-mcbin-singleshot
>   SUPPORTED_DEVICES := marvell,armada8040-mcbin-singleshot
> endef
> diff --git a/target/linux/mvebu/patches-5.4/100-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch b/target/linux/mvebu/patches-5.4/100-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch
> new file mode 100644
> index 000000000000..a5f37461360b
> --- /dev/null
> +++ b/target/linux/mvebu/patches-5.4/100-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch
> @@ -0,0 +1,59 @@
> +From 310b7883b64993da355ad5cc3e45f515ac2bef2f Mon Sep 17 00:00:00 2001
> +From: Tomasz Maciej Nowak <tmn505 at gmail.com>
> +Date: Sat, 17 Oct 2020 16:53:20 +0200
> +Subject: [PATCH] arm64: dts: mcbin-singleshot: add heartbeat LED
> +
> +With board revision 1.3, SolidRun moved the power LED to the middle of
> +the board. In old place of power LED a GPIO controllable heartbeat LED
> +was added. This commit only touches Single Shot variant, since only this
> +variant is all revision 1.3.
> +
> +Reported-by: Alexandra Alth <alexandra at alth.de>
> +Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
> +---
> + .../marvell/armada-8040-mcbin-singleshot.dts  | 22 +++++++++++++++++++
> + 1 file changed, 22 insertions(+)
> +
> +--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
> ++++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
> +@@ -5,6 +5,8 @@
> +  * Device Tree file for MACCHIATOBin Armada 8040 community board platform
> +  */
> + 
> ++#include <dt-bindings/leds/common.h>
> ++
> + #include "armada-8040-mcbin.dtsi"
> + 
> + / {
> +@@ -12,6 +14,20 @@
> + 	compatible = "marvell,armada8040-mcbin-singleshot",
> + 			"marvell,armada8040-mcbin", "marvell,armada8040",
> + 			"marvell,armada-ap806-quad", "marvell,armada-ap806";
> ++
> ++	leds {
> ++		compatible = "gpio-leds";
> ++		pinctrl-0 = <&cp0_led18_pins>;
> ++		pinctrl-names = "default";
> ++
> ++		led18 {
> ++			gpios = <&cp0_gpio2 1 GPIO_ACTIVE_LOW>;
> ++			function = LED_FUNCTION_HEARTBEAT;
> ++			color = <LED_COLOR_ID_GREEN>;
> ++			linux,default-trigger = "heartbeat";
> ++			default-state = "on";
> ++		};
> ++	};
> + };
> + 
> + &cp0_eth0 {
> +@@ -27,3 +43,10 @@
> + 	managed = "in-band-status";
> + 	sfp = <&sfp_eth1>;
> + };
> ++
> ++&cp0_pinctrl {
> ++	cp0_led18_pins: led18-pins {
> ++		marvell,pins = "mpp33";
> ++		marvell,function = "gpio";
> ++	};
> ++};
> -- 
> 2.29.2
> 




More information about the openwrt-devel mailing list