]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: ti: k3-pinctrl: Enable Schmitt Trigger by default
authorAlexander Sverdlin <alexander.sverdlin@siemens.com>
Tue, 1 Jul 2025 10:54:35 +0000 (12:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:30:56 +0000 (16:30 +0200)
commit 5b272127884bded21576a6ddceca13725a351c63 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: fe49f2d776f7 ("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>
arch/arm64/boot/dts/ti/k3-pinctrl.h

index 22b8d73cfd3264735ddf91874e60a0c5fc7ade5b..04bbedb56b58380bc6b1b65343455b57ad239c22 100644 (file)
@@ -8,11 +8,16 @@
 #ifndef DTS_ARM64_TI_K3_PINCTRL_H
 #define DTS_ARM64_TI_K3_PINCTRL_H
 
+#define ST_EN_SHIFT            (14)
 #define PULLUDEN_SHIFT         (16)
 #define PULLTYPESEL_SHIFT      (17)
 #define RXACTIVE_SHIFT         (18)
 #define DEBOUNCE_SHIFT         (11)
 
+/* Schmitt trigger configuration */
+#define ST_DISABLE             (0 << ST_EN_SHIFT)
+#define ST_ENABLE              (1 << ST_EN_SHIFT)
+
 #define PULL_DISABLE           (1 << PULLUDEN_SHIFT)
 #define PULL_ENABLE            (0 << PULLUDEN_SHIFT)
 
 #define PIN_OUTPUT             (INPUT_DISABLE | PULL_DISABLE)
 #define PIN_OUTPUT_PULLUP      (INPUT_DISABLE | PULL_UP)
 #define PIN_OUTPUT_PULLDOWN    (INPUT_DISABLE | PULL_DOWN)
-#define PIN_INPUT              (INPUT_EN | PULL_DISABLE)
-#define PIN_INPUT_PULLUP       (INPUT_EN | PULL_UP)
-#define PIN_INPUT_PULLDOWN     (INPUT_EN | PULL_DOWN)
+#define PIN_INPUT              (INPUT_EN | ST_ENABLE | PULL_DISABLE)
+#define PIN_INPUT_PULLUP       (INPUT_EN | ST_ENABLE | PULL_UP)
+#define PIN_INPUT_PULLDOWN     (INPUT_EN | ST_ENABLE | PULL_DOWN)
+/* Input configurations with Schmitt Trigger disabled */
+#define PIN_INPUT_NOST         (INPUT_EN | PULL_DISABLE)
+#define PIN_INPUT_PULLUP_NOST  (INPUT_EN | PULL_UP)
+#define PIN_INPUT_PULLDOWN_NOST        (INPUT_EN | PULL_DOWN)
 
 #define PIN_DEBOUNCE_DISABLE   (0 << DEBOUNCE_SHIFT)
 #define PIN_DEBOUNCE_CONF1     (1 << DEBOUNCE_SHIFT)