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
|
From e56470876bda3751a1926aa5876495e3678e363f Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Fri, 16 Apr 2021 09:31:17 +0100
Subject: [PATCH] overlays: ghost-amp: Add DAC mute control
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
.../boot/dts/overlays/ghost-amp-overlay.dts | 28 +++++++++++--------
1 file changed, 17 insertions(+), 11 deletions(-)
--- a/arch/arm/boot/dts/overlays/ghost-amp-overlay.dts
+++ b/arch/arm/boot/dts/overlays/ghost-amp-overlay.dts
@@ -4,10 +4,11 @@
#include <dt-bindings/gpio/gpio-fsm.h>
-#define ENABLE GF_SW(0)
-#define FAULT GF_IP(0) // GPIO5
-#define RELAY1 GF_OP(0) // GPIO22
-#define RELAY2 GF_OP(1) // GPIO23
+#define ENABLE GF_SW(0)
+#define FAULT GF_IP(0) // GPIO5
+#define RELAY1 GF_OP(0) // GPIO22
+#define RELAY2 GF_OP(1) // GPIO23
+#define RELAYSSR GF_OP(2) // GPIO24
/ {
compatible = "brcm,bcm2835";
@@ -64,14 +65,16 @@
gpio-line-names = "enable";
input-gpios = <&gpio 5 1>; // FAULT (active low)
output-gpios = <&gpio 22 0>, // RELAY1
- <&gpio 23 0>; // RELAY2
+ <&gpio 23 0>, // RELAY2
+ <&gpio 24 0>; // RELAYSSR
shutdown-timeout-ms = <1000>;
amp_off {
start_state;
shutdown_state;
- set = <RELAY2 0>,
+ set = <RELAYSSR 0>,
+ <RELAY2 0>,
<RELAY1 0>;
amp_on_1 = <ENABLE 1>;
fault = <FAULT 1>;
@@ -85,12 +88,14 @@
};
amp_on {
- set = <RELAY2 1>;
+ set = <RELAY2 1>,
+ <RELAYSSR 1>;
amp_on_wait = <ENABLE 0>;
fault = <FAULT 1>;
};
amp_on_wait {
+ set = <RELAYSSR 0>;
amp_off_1 = <GF_DELAY (30*60*1000)>,
<GF_SHUTDOWN 0>;
amp_on = <ENABLE 1>;
@@ -107,7 +112,8 @@
// Keep this a distinct state to prevent
// changes and for the diagnostic output
fault {
- set = <RELAY2 0>,
+ set = <RELAYSSR 0>,
+ <RELAY2 0>,
<RELAY1 0>;
amp_off = <FAULT 0>;
shutdown_state;
@@ -120,9 +126,9 @@
target = <&gpio>;
__overlay__ {
ghost_amp_pins: ghost_amp_pins {
- brcm,pins = <5 22 23>;
- brcm,function = <0 1 1>; /* in out out */
- brcm,pull = <2 0 0>; /* up none none */
+ brcm,pins = <5 22 23 24>;
+ brcm,function = <0 1 1 1>; /* in out out out */
+ brcm,pull = <2 0 0 0>; /* up none none none */
};
};
};
|