summaryrefslogtreecommitdiff
path: root/target/linux/brcm2708/patches-3.18/0069-Fix-the-activity-LED-in-DT-mode.patch
blob: 5a4d65ca68c72ea8d1c286eddf0f309f67bc7b58 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
From 31b85ba13aa394c98f2d6955b55f3f9a0623c14d Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 6 Jan 2015 12:06:55 +0000
Subject: [PATCH 069/114] Fix the activity LED in DT mode

Add a "leds" node to the base DTBs, and a subnode for the activity
LED. You can change the LED function like this:

  dtparam=act_led_trigger=heartbeat

Add aliases for the other main nodes (soc, intc).

Issue: linux #757
---
 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 18 ++++++++++++++----
 arch/arm/boot/dts/bcm2708-rpi-b.dts      | 18 ++++++++++++++----
 arch/arm/boot/dts/bcm2708.dtsi           | 11 ++++++++++-
 3 files changed, 38 insertions(+), 9 deletions(-)

--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
@@ -7,11 +7,14 @@
 	model = "Raspberry Pi Model B+";
 
 	aliases {
+		soc = &soc;
 		spi0 = &spi0;
 		i2c0 = &i2c0;
 		i2c1 = &i2c1;
 		i2s  = &i2s;
 		gpio = &gpio;
+		intc = &intc;
+		leds = &leds;
 		sound = &sound;
 	};
 
@@ -80,12 +83,19 @@
 	pinctrl-0 = <&i2s_pins>;
 };
 
+&act_led {
+	gpios = <&gpio 47 0>;
+};
 
 / {
 	__overrides__ {
-		    i2s = <&i2s>,"status";
-		    spi = <&spi0>,"status";
-		    i2c0 = <&i2c0>,"status";
-		    i2c1 = <&i2c1>,"status";
+		i2s = <&i2s>,"status";
+		spi = <&spi0>,"status";
+		i2c0 = <&i2c0>,"status";
+		i2c1 = <&i2c1>,"status";
+
+		act_led_gpio = <&act_led>,"gpios:4";
+		act_led_activelow = <&act_led>,"gpios:8";
+		act_led_trigger = <&act_led>,"linux,default-trigger";
 	};
 };
--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
@@ -7,11 +7,14 @@
 	model = "Raspberry Pi Model B";
 
 	aliases {
+		soc = &soc;
 		spi0 = &spi0;
 		i2c0 = &i2c0;
 		i2c1 = &i2c1;
 		i2s  = &i2s;
 		gpio = &gpio;
+		intc = &intc;
+		leds = &leds;
 		sound = &sound;
 	};
 
@@ -80,12 +83,19 @@
 	pinctrl-0 = <&i2s_pins>;
 };
 
+&act_led {
+	gpios = <&gpio 16 1>;
+};
 
 / {
 	__overrides__ {
-		    i2s = <&i2s>,"status";
-		    spi = <&spi0>,"status";
-		    i2c0 = <&i2c0>,"status";
-		    i2c1 = <&i2c1>,"status";
+		i2s = <&i2s>,"status";
+		spi = <&spi0>,"status";
+		i2c0 = <&i2c0>,"status";
+		i2c1 = <&i2c1>,"status";
+
+		act_led_gpio = <&act_led>,"gpios:4";
+		act_led_activelow = <&act_led>,"gpios:8";
+		act_led_trigger = <&act_led>,"linux,default-trigger";
 	};
 };
--- a/arch/arm/boot/dts/bcm2708.dtsi
+++ b/arch/arm/boot/dts/bcm2708.dtsi
@@ -11,7 +11,7 @@
 		bootargs = "";
 	};
 
-	soc {
+	soc: soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -76,6 +76,15 @@
 			#size-cells = <0>;
 			status = "disabled";
 		};
+
+		leds: leds {
+			compatible = "gpio-leds";
+
+			act_led: act {
+				label = "ACT";
+				linux,default-trigger = "mmc0";
+			};
+		};
 	};
 
 	clocks {