0a7187623b3e07e2bab695265556d91a3f37c849
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.10 / 950-0536-overlays-ghost-amp-Add-DAC-mute-control.patch
1 From e56470876bda3751a1926aa5876495e3678e363f Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Fri, 16 Apr 2021 09:31:17 +0100
4 Subject: [PATCH] overlays: ghost-amp: Add DAC mute control
5
6 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
7 ---
8 .../boot/dts/overlays/ghost-amp-overlay.dts | 28 +++++++++++--------
9 1 file changed, 17 insertions(+), 11 deletions(-)
10
11 --- a/arch/arm/boot/dts/overlays/ghost-amp-overlay.dts
12 +++ b/arch/arm/boot/dts/overlays/ghost-amp-overlay.dts
13 @@ -4,10 +4,11 @@
14
15 #include <dt-bindings/gpio/gpio-fsm.h>
16
17 -#define ENABLE GF_SW(0)
18 -#define FAULT GF_IP(0) // GPIO5
19 -#define RELAY1 GF_OP(0) // GPIO22
20 -#define RELAY2 GF_OP(1) // GPIO23
21 +#define ENABLE GF_SW(0)
22 +#define FAULT GF_IP(0) // GPIO5
23 +#define RELAY1 GF_OP(0) // GPIO22
24 +#define RELAY2 GF_OP(1) // GPIO23
25 +#define RELAYSSR GF_OP(2) // GPIO24
26
27 / {
28 compatible = "brcm,bcm2835";
29 @@ -64,14 +65,16 @@
30 gpio-line-names = "enable";
31 input-gpios = <&gpio 5 1>; // FAULT (active low)
32 output-gpios = <&gpio 22 0>, // RELAY1
33 - <&gpio 23 0>; // RELAY2
34 + <&gpio 23 0>, // RELAY2
35 + <&gpio 24 0>; // RELAYSSR
36 shutdown-timeout-ms = <1000>;
37
38 amp_off {
39 start_state;
40 shutdown_state;
41
42 - set = <RELAY2 0>,
43 + set = <RELAYSSR 0>,
44 + <RELAY2 0>,
45 <RELAY1 0>;
46 amp_on_1 = <ENABLE 1>;
47 fault = <FAULT 1>;
48 @@ -85,12 +88,14 @@
49 };
50
51 amp_on {
52 - set = <RELAY2 1>;
53 + set = <RELAY2 1>,
54 + <RELAYSSR 1>;
55 amp_on_wait = <ENABLE 0>;
56 fault = <FAULT 1>;
57 };
58
59 amp_on_wait {
60 + set = <RELAYSSR 0>;
61 amp_off_1 = <GF_DELAY (30*60*1000)>,
62 <GF_SHUTDOWN 0>;
63 amp_on = <ENABLE 1>;
64 @@ -107,7 +112,8 @@
65 // Keep this a distinct state to prevent
66 // changes and for the diagnostic output
67 fault {
68 - set = <RELAY2 0>,
69 + set = <RELAYSSR 0>,
70 + <RELAY2 0>,
71 <RELAY1 0>;
72 amp_off = <FAULT 0>;
73 shutdown_state;
74 @@ -120,9 +126,9 @@
75 target = <&gpio>;
76 __overlay__ {
77 ghost_amp_pins: ghost_amp_pins {
78 - brcm,pins = <5 22 23>;
79 - brcm,function = <0 1 1>; /* in out out */
80 - brcm,pull = <2 0 0>; /* up none none */
81 + brcm,pins = <5 22 23 24>;
82 + brcm,function = <0 1 1 1>; /* in out out out */
83 + brcm,pull = <2 0 0 0>; /* up none none none */
84 };
85 };
86 };