Skip to content

Commit 4328686

Browse files
ccpalexgregkh
authored andcommitted
arm64: dts: ti: k3-pinctrl: Enable Schmitt Trigger by default
commit 5b27212 upstream. Switch Schmitt Trigger functions for PIN_INPUT* macros by default. This is HW PoR configuration, the slew rate requirements without ST enabled are pretty tough for these devices. We've noticed spurious GPIO interrupts even with noise-free edges but not meeting slew rate requirements (3.3E+6 V/s for 3.3v LVCMOS). It's not obvious why one might want to disable the PoR-enabled ST on any pin. Just enable it by default. As it's not possible to provide OR-able macros to disable the ST, shall anyone require it, provide a set of new macros with _NOST suffix. Fixes: fe49f2d ("arm64: dts: ti: Use local header for pinctrl register values") Cc: stable@vger.kernel.org Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Link: https://lore.kernel.org/r/20250701105437.3539924-1-alexander.sverdlin@siemens.com [vigneshr@ti.com: Add Fixes tag] Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8c164d6 commit 4328686

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

arch/arm64/boot/dts/ti/k3-pinctrl.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#ifndef DTS_ARM64_TI_K3_PINCTRL_H
99
#define DTS_ARM64_TI_K3_PINCTRL_H
1010

11+
#define ST_EN_SHIFT (14)
1112
#define PULLUDEN_SHIFT (16)
1213
#define PULLTYPESEL_SHIFT (17)
1314
#define RXACTIVE_SHIFT (18)
@@ -19,6 +20,10 @@
1920
#define DS_PULLUD_EN_SHIFT (27)
2021
#define DS_PULLTYPE_SEL_SHIFT (28)
2122

23+
/* Schmitt trigger configuration */
24+
#define ST_DISABLE (0 << ST_EN_SHIFT)
25+
#define ST_ENABLE (1 << ST_EN_SHIFT)
26+
2227
#define PULL_DISABLE (1 << PULLUDEN_SHIFT)
2328
#define PULL_ENABLE (0 << PULLUDEN_SHIFT)
2429

@@ -32,9 +37,13 @@
3237
#define PIN_OUTPUT (INPUT_DISABLE | PULL_DISABLE)
3338
#define PIN_OUTPUT_PULLUP (INPUT_DISABLE | PULL_UP)
3439
#define PIN_OUTPUT_PULLDOWN (INPUT_DISABLE | PULL_DOWN)
35-
#define PIN_INPUT (INPUT_EN | PULL_DISABLE)
36-
#define PIN_INPUT_PULLUP (INPUT_EN | PULL_UP)
37-
#define PIN_INPUT_PULLDOWN (INPUT_EN | PULL_DOWN)
40+
#define PIN_INPUT (INPUT_EN | ST_ENABLE | PULL_DISABLE)
41+
#define PIN_INPUT_PULLUP (INPUT_EN | ST_ENABLE | PULL_UP)
42+
#define PIN_INPUT_PULLDOWN (INPUT_EN | ST_ENABLE | PULL_DOWN)
43+
/* Input configurations with Schmitt Trigger disabled */
44+
#define PIN_INPUT_NOST (INPUT_EN | PULL_DISABLE)
45+
#define PIN_INPUT_PULLUP_NOST (INPUT_EN | PULL_UP)
46+
#define PIN_INPUT_PULLDOWN_NOST (INPUT_EN | PULL_DOWN)
3847

3948
#define PIN_DEBOUNCE_DISABLE (0 << DEBOUNCE_SHIFT)
4049
#define PIN_DEBOUNCE_CONF1 (1 << DEBOUNCE_SHIFT)

0 commit comments

Comments
 (0)