]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.14.16/pinctrl-dra-dt-bindings-fix-pull-enable-disable.patch
drop queue-4.14/mips-make-sure-dt-memory-regions-are-valid.patch
[thirdparty/kernel/stable-queue.git] / releases / 3.14.16 / pinctrl-dra-dt-bindings-fix-pull-enable-disable.patch
1 From 23d9cec07c589276561c13b180577c0b87930140 Mon Sep 17 00:00:00 2001
2 From: Nishanth Menon <nm@ti.com>
3 Date: Tue, 22 Jul 2014 10:39:54 -0500
4 Subject: pinctrl: dra: dt-bindings: Fix pull enable/disable
5
6 From: Nishanth Menon <nm@ti.com>
7
8 commit 23d9cec07c589276561c13b180577c0b87930140 upstream.
9
10 The DRA74/72 control module pins have a weak pull up and pull down.
11 This is configured by bit offset 17. if BIT(17) is 1, a pull up is
12 selected, else a pull down is selected.
13
14 However, this pull resisstor is applied based on BIT(16) -
15 PULLUDENABLE - if BIT(18) is *0*, then pull as defined in BIT(17) is
16 applied, else no weak pulls are applied. We defined this in reverse.
17
18 Reference: Table 18-5 (Description of the pad configuration register
19 bits) in Technical Reference Manual Revision (DRA74x revision Q:
20 SPRUHI2Q Revised June 2014 and DRA72x revision F: SPRUHP2F - Revised
21 June 2014)
22
23 Fixes: 6e58b8f1daaf1a ("ARM: dts: DRA7: Add the dts files for dra7 SoC and dra7-evm board")
24 Signed-off-by: Nishanth Menon <nm@ti.com>
25 Tested-by: Felipe Balbi <balbi@ti.com>
26 Acked-by: Felipe Balbi <balbi@ti.com>
27 Signed-off-by: Tony Lindgren <tony@atomide.com>
28 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29
30 ---
31 include/dt-bindings/pinctrl/dra.h | 7 ++++---
32 1 file changed, 4 insertions(+), 3 deletions(-)
33
34 --- a/include/dt-bindings/pinctrl/dra.h
35 +++ b/include/dt-bindings/pinctrl/dra.h
36 @@ -30,7 +30,8 @@
37 #define MUX_MODE14 0xe
38 #define MUX_MODE15 0xf
39
40 -#define PULL_ENA (1 << 16)
41 +#define PULL_ENA (0 << 16)
42 +#define PULL_DIS (1 << 16)
43 #define PULL_UP (1 << 17)
44 #define INPUT_EN (1 << 18)
45 #define SLEWCONTROL (1 << 19)
46 @@ -38,10 +39,10 @@
47 #define WAKEUP_EVENT (1 << 25)
48
49 /* Active pin states */
50 -#define PIN_OUTPUT 0
51 +#define PIN_OUTPUT (0 | PULL_DIS)
52 #define PIN_OUTPUT_PULLUP (PIN_OUTPUT | PULL_ENA | PULL_UP)
53 #define PIN_OUTPUT_PULLDOWN (PIN_OUTPUT | PULL_ENA)
54 -#define PIN_INPUT INPUT_EN
55 +#define PIN_INPUT (INPUT_EN | PULL_DIS)
56 #define PIN_INPUT_SLEW (INPUT_EN | SLEWCONTROL)
57 #define PIN_INPUT_PULLUP (PULL_ENA | INPUT_EN | PULL_UP)
58 #define PIN_INPUT_PULLDOWN (PULL_ENA | INPUT_EN)