bcm27xx: switch to 5.15
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.10 / 950-0519-overlays-ghost-amp-Minor-tweaks.patch
1 From e88444a73ef7bc16869e60ad1e392129a07a9f2c Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Wed, 3 Mar 2021 10:31:13 +0000
4 Subject: [PATCH] overlays: ghost-amp: Minor tweaks
5
6 1. Reduce the delay between RELAY1 and RELAY2 to 1000ms.
7 2. Rename the states to simplify LED control by an external script.
8 3. Claim all the required GPIOs, enabling pull-ups on the input.
9
10 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
11 ---
12 .../boot/dts/overlays/ghost-amp-overlay.dts | 20 ++++++++++++++++---
13 1 file changed, 17 insertions(+), 3 deletions(-)
14
15 --- a/arch/arm/boot/dts/overlays/ghost-amp-overlay.dts
16 +++ b/arch/arm/boot/dts/overlays/ghost-amp-overlay.dts
17 @@ -54,6 +54,8 @@
18 __overlay__ {
19 amp: ghost-amp {
20 compatible = "rpi,gpio-fsm";
21 + pinctrl-names = "default";
22 + pinctrl-0 = <&ghost_amp_pins>;
23
24 debug = <0>;
25 gpio-controller;
26 @@ -77,18 +79,18 @@
27
28 amp_on_1 {
29 set = <RELAY1 1>;
30 - amp_on = <GF_DELAY 1500>;
31 + amp_on = <GF_DELAY 1000>;
32 amp_off = <ENABLE 0>;
33 fault = <FAULT 1>;
34 };
35
36 amp_on {
37 set = <RELAY2 1>;
38 - amp_off_wait = <ENABLE 0>;
39 + amp_on_wait = <ENABLE 0>;
40 fault = <FAULT 1>;
41 };
42
43 - amp_off_wait {
44 + amp_on_wait {
45 amp_off_1 = <GF_DELAY (30*60*1000)>,
46 <GF_SHUTDOWN 0>;
47 amp_on = <ENABLE 1>;
48 @@ -107,11 +109,23 @@
49 fault {
50 set = <RELAY2 0>,
51 <RELAY1 0>;
52 + amp_off = <FAULT 0>;
53 shutdown_state;
54 };
55 };
56 };
57 };
58 +
59 + fragment@4 {
60 + target = <&gpio>;
61 + __overlay__ {
62 + ghost_amp_pins: ghost_amp_pins {
63 + brcm,pins = <5 22 23>;
64 + brcm,function = <0 1 1>; /* in out out */
65 + brcm,pull = <2 0 0>; /* up none none */
66 + };
67 + };
68 + };
69
70 __overrides__ {
71 fsm_debug = <&amp>,"debug:0";