1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-20 14:38:20 +02:00
openwrt/target/linux/bcm27xx/patches-5.10/950-0536-overlays-ghost-amp-Add-DAC-mute-control.patch
Álvaro Fernández Rojas 8299d1f057 bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted
patches, wireless patches and defconfig patches.

bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 4B v1.1 4G
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-08-21 19:07:07 +02:00

87 lines
2.3 KiB
Diff

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 */
};
};
};