aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-0585-ARM-dts-bcm2711-rpi-400-Restore-the-ACT-LED.patch
blob: 1e3ef094a72971bfff13f073dbd8622bafb220c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From 11289568f8c1530a16721c9aeaae3ae1668eacbb Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Fri, 10 Mar 2023 11:22:24 +0000
Subject: [PATCH] ARM: dts: bcm2711-rpi-400: Restore the ACT LED

Pi 400 doesn't have an ACT LED, only a green PWR LED, but a user may
wish to remap the ACT functionality to a GPIO on the 40-pin header.
Restore the ACT LED declaration, but leave it disabled in order to
prevent a GPIO being claimed until either the act_led_gpio dtparam
or the act-led overlay is used.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 arch/arm/boot/dts/bcm2711-rpi-400.dts          | 12 ++++++++----
 arch/arm/boot/dts/overlays/act-led-overlay.dts |  3 ++-
 2 files changed, 10 insertions(+), 5 deletions(-)

--- a/arch/arm/boot/dts/bcm2711-rpi-400.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
@@ -512,16 +512,19 @@
 };
 
 &leds {
+	// Declare the LED but leave it disabled, in case a user wants to map it
+	// to a GPIO on the header
 	act_led: led-act {
 		default-state = "off";
-		linux,default-trigger = "default-on";
-		gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
+		linux,default-trigger = "mmc0";
+		gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+		status = "disabled";
 	};
 
 	pwr_led: led-pwr {
 		default-state = "off";
 		linux,default-trigger = "default-on";
-		gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
+		gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
 	};
 };
 
@@ -542,7 +545,8 @@
 	__overrides__ {
 		audio = <&chosen>,"bootargs{on='snd_bcm2835.enable_hdmi=1',off='snd_bcm2835.enable_hdmi=0'}";
 
-		act_led_gpio = <&act_led>,"gpios:4";
+		act_led_gpio = <&act_led>,"gpios:4",
+			       <&act_led>,"status=okay";
 		act_led_activelow = <&act_led>,"gpios:8";
 		act_led_trigger = <&act_led>,"linux,default-trigger";
 
--- a/arch/arm/boot/dts/overlays/act-led-overlay.dts
+++ b/arch/arm/boot/dts/overlays/act-led-overlay.dts
@@ -21,7 +21,8 @@
 	};
 
 	__overrides__ {
-		gpio = <&frag0>,"gpios:4";
+		gpio = <&frag0>,"gpios:4",
+		       <&frag0>,"status=okay";
 		activelow = <&frag0>,"gpios:8";
 	};
 };