Skip to content

Commit

Permalink
arm64: dts: ti: k3-pinctrl: Introduce debounce select mux macros
Browse files Browse the repository at this point in the history
Introduce the debounce select mux macros to allow folks to setup
debounce configuration for pins. Each configuration selected maps
to a specific timing register as documented in appropriate Technical
Reference Manual (example:[1]).

[1] AM625x TRM (section 6.1.2.2): https://www.ti.com/lit/pdf/spruiv7

Reviewed-by: Vignesh Raghavendra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Nishanth Menon <[email protected]>
  • Loading branch information
nmenon committed Aug 2, 2023
1 parent b573bf3 commit 0bec3d7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/arm64/boot/dts/ti/k3-pinctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define PULLUDEN_SHIFT (16)
#define PULLTYPESEL_SHIFT (17)
#define RXACTIVE_SHIFT (18)
#define DEBOUNCE_SHIFT (11)

#define PULL_DISABLE (1 << PULLUDEN_SHIFT)
#define PULL_ENABLE (0 << PULLUDEN_SHIFT)
Expand All @@ -29,6 +30,14 @@
#define PIN_INPUT_PULLUP (INPUT_EN | PULL_UP)
#define PIN_INPUT_PULLDOWN (INPUT_EN | PULL_DOWN)

#define PIN_DEBOUNCE_DISABLE (0 << DEBOUNCE_SHIFT)
#define PIN_DEBOUNCE_CONF1 (1 << DEBOUNCE_SHIFT)
#define PIN_DEBOUNCE_CONF2 (2 << DEBOUNCE_SHIFT)
#define PIN_DEBOUNCE_CONF3 (3 << DEBOUNCE_SHIFT)
#define PIN_DEBOUNCE_CONF4 (4 << DEBOUNCE_SHIFT)
#define PIN_DEBOUNCE_CONF5 (5 << DEBOUNCE_SHIFT)
#define PIN_DEBOUNCE_CONF6 (6 << DEBOUNCE_SHIFT)

#define AM62AX_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
#define AM62AX_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))

Expand Down

0 comments on commit 0bec3d7

Please sign in to comment.