build/patch/kernel/archive/odroidxu4-5.12/0076-ODROID-HC4-arm64-dts-add-red-power-led-this-is-in-ad.patch

43 lines
1.3 KiB
Diff
Raw Normal View History

From 8a4c5fa7e64107390ac22dd352ac4b7bd99e6a5c Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <ricardo@pardini.net>
Date: Sun, 17 Jan 2021 00:14:18 +0100
Subject: [PATCH 076/109] ODROID-HC4: arm64/dts: add red power led this is in
addition to the blue led in the C4.
Defaults mode of the RED led is always-on, but its mode can be changed,
$ echo rc-feedback | sudo tee /sys/class/leds/red:power/trigger
Or can be turned off,
$ echo 0 | sudo tee /sys/class/leds/red:power/brightness
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
Change-Id: Ia508724908e6af90d4c3dbc24d156c86d5b08c98
---
arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
index bf15700c4b15..2d4745950bb2 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
@@ -47,6 +47,16 @@ led-red {
sound {
model = "ODROID-HC4";
};
+
+ leds {
+ compatible = "gpio-leds";
+ led-red {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_POWER;
+ gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "default-on";
+ };
+ };
};
&cpu_thermal {
--
2.25.1