brcm2708: update to latest patches from the RPi foundation
[openwrt/staging/lynxis.git] / target / linux / brcm2708 / patches-4.19 / 950-0291-gpio-ir-change-default-pull-configuration-to-up.patch
1 From 92ac07c588df68c6cbc6c7965b679ba02d3c994b Mon Sep 17 00:00:00 2001
2 From: Matthias Reichl <hias@horus.com>
3 Date: Wed, 9 Jan 2019 14:51:01 +0100
4 Subject: [PATCH 291/725] gpio-ir: change default pull configuration to up
5
6 IR receivers like the TSOP series from Vishay and compatible ones
7 have active-low open collector outputs with an internal pull up of
8 about 30k (according to the TSOP datasheets).
9
10 Activating a pull-down resistor on the GPIO will make it work against
11 the pull-up in the IR receiver and brings the idle input voltage down
12 to about 1.9V (measured on a RPi3B+ with a TSOP4438). While that's
13 usually enough to make the RPi see a high signal it's certainly not
14 optimal and may even fail when using an IR receiver with a weaker pull-up.
15
16 Switching the default GPIO pull to "up" results in an input voltage
17 level of about 3.3V and ensures that an idle state (high signal) will
18 be detected if no IR receiver is attached.
19
20 Signed-off-by: Matthias Reichl <hias@horus.com>
21 ---
22 arch/arm/boot/dts/overlays/README | 2 +-
23 arch/arm/boot/dts/overlays/gpio-ir-overlay.dts | 2 +-
24 2 files changed, 2 insertions(+), 2 deletions(-)
25
26 --- a/arch/arm/boot/dts/overlays/README
27 +++ b/arch/arm/boot/dts/overlays/README
28 @@ -611,7 +611,7 @@ Load: dtoverlay=gpio-ir,<param>=<val>
29 Params: gpio_pin Input pin number. Default is 18.
30
31 gpio_pull Desired pull-up/down state (off, down, up)
32 - Default is "down".
33 + Default is "up".
34
35 rc-map-name Default rc keymap (can also be changed by
36 ir-keytable), defaults to "rc-rc6-mce"
37 --- a/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts
38 +++ b/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts
39 @@ -30,7 +30,7 @@
40 gpio_ir_pins: gpio_ir_pins@12 {
41 brcm,pins = <18>; // pin 18
42 brcm,function = <0>; // in
43 - brcm,pull = <1>; // down
44 + brcm,pull = <2>; // up
45 };
46 };
47 };