From 4ab421b81d383c127135716f56a1e18337575516 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thibaut=20VAR=C3=88NE?= Date: Tue, 14 Jun 2022 15:54:48 +0200 Subject: [PATCH] qoriq: define leds for Firebox M300 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch provides support for the Firebox M300 only user-controllable bi-color LED, and makes the green "shield" LED act as the typical OpenWrt status led. Signed-off-by: Thibaut VARÈNE --- .../boot/dts/fsl/watchguard-firebox-m300.dts | 21 +++++++++++++++++++ target/linux/qoriq/image/generic.mk | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts b/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts index 54f7e06bc5..4ba30a3c0f 100644 --- a/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts +++ b/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts @@ -7,6 +7,8 @@ * Copyright 2020 - 2021 Stijn Tintel */ +#include + /include/ "t208xsi-pre.dtsi" /include/ "t208xqds.dtsi" @@ -31,6 +33,11 @@ ethernet2 = &enet1; ethernet3 = &enet2; ethernet4 = &enet3; + + led-boot = &led_shield; + led-failsafe = &led_shield; + led-running = &led_shield; + led-upgrade = &led_shield; }; }; @@ -325,4 +332,18 @@ status = "disabled"; }; }; + + leds { + compatible = "gpio-leds"; + + shield-red { + label = "red:shield"; + gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; + }; + + led_shield: shield-green { + label = "green:shield"; + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; + }; + }; }; diff --git a/target/linux/qoriq/image/generic.mk b/target/linux/qoriq/image/generic.mk index b8ffc69ba0..b2689850b3 100644 --- a/target/linux/qoriq/image/generic.mk +++ b/target/linux/qoriq/image/generic.mk @@ -6,7 +6,7 @@ define Device/watchguard_firebox-m300 DEVICE_COMPAT_VERSION := 1.1 DEVICE_DTS_DIR := $(DTS_DIR)/fsl DEVICE_PACKAGES := \ - kmod-hwmon-w83793 kmod-ptp-qoriq kmod-rtc-rs5c372a kmod-tpm-i2c-atmel + kmod-hwmon-w83793 kmod-leds-gpio kmod-ptp-qoriq kmod-rtc-rs5c372a kmod-tpm-i2c-atmel KERNEL := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb KERNEL_SUFFIX := -fit-uImage.itb IMAGES := sdcard.img.gz sysupgrade.img.gz -- 2.30.2