]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: ti: k3-pinctrl: Define a generic GPIO MUX Mode
authorNishanth Menon <nm@ti.com>
Thu, 27 Jun 2024 16:25:37 +0000 (11:25 -0500)
committerVignesh Raghavendra <vigneshr@ti.com>
Mon, 1 Jul 2024 16:06:07 +0000 (21:36 +0530)
Introduce a GPIO mux mode macro for easier readability. All K3 devices
use mux mode 7 to switch to GPIO mux and this allows the gpio-ranges to
be defined for pinctrl-single clearly.

Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20240627162539.691223-2-nm@ti.com
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
arch/arm64/boot/dts/ti/k3-pinctrl.h

index 4cd2df467d0b41dad2925836d13e0e970f7abd42..22b8d73cfd3264735ddf91874e60a0c5fc7ade5b 100644 (file)
@@ -38,6 +38,9 @@
 #define PIN_DEBOUNCE_CONF5     (5 << DEBOUNCE_SHIFT)
 #define PIN_DEBOUNCE_CONF6     (6 << DEBOUNCE_SHIFT)
 
+/* Default mux configuration for gpio-ranges to use with pinctrl */
+#define PIN_GPIO_RANGE_IOPAD   (PIN_INPUT | 7)
+
 #define AM62AX_IOPAD(pa, val, muxmode)         (((pa) & 0x1fff)) ((val) | (muxmode))
 #define AM62AX_MCU_IOPAD(pa, val, muxmode)     (((pa) & 0x1fff)) ((val) | (muxmode))