diff options
author | Nishanth Menon <nm@ti.com> | 2024-02-20 12:39:51 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-03-04 11:49:24 -0500 |
commit | 1b61f76a876031b465314c0a09a37247a5544f88 (patch) | |
tree | 1647cc58b126df005f14c7373eb95b6ea7da5e07 | |
parent | 5c550d96ebd302803e898c6eb789130baa5bdc47 (diff) |
board: beagle: beagleplay: Configure debounce registers
Configure the debounce configuration that makes sense for BeaglePlay
usage model.
Signed-off-by: Nishanth Menon <nm@ti.com>
-rw-r--r-- | board/beagle/beagleplay/beagleplay.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/board/beagle/beagleplay/beagleplay.c b/board/beagle/beagleplay/beagleplay.c index 2adb2517ef0..fe1c4f92032 100644 --- a/board/beagle/beagleplay/beagleplay.c +++ b/board/beagle/beagleplay/beagleplay.c @@ -59,8 +59,32 @@ static void crystal_32k_enable(void) } } +static void debounce_configure(void) +{ + /* Configure debounce one time from R5 */ + if (IS_ENABLED(CONFIG_CPU_V7R)) { + /* + * Setup debounce time registers. + * arbitrary values. Times are approx + */ + /* 1.9ms debounce @ 32k */ + writel(0x1, CTRLMMR_DBOUNCE_CFG(1)); + /* 5ms debounce @ 32k */ + writel(0x5, CTRLMMR_DBOUNCE_CFG(2)); + /* 20ms debounce @ 32k */ + writel(0x14, CTRLMMR_DBOUNCE_CFG(3)); + /* 46ms debounce @ 32k */ + writel(0x18, CTRLMMR_DBOUNCE_CFG(4)); + /* 100ms debounce @ 32k */ + writel(0x1c, CTRLMMR_DBOUNCE_CFG(5)); + /* 156ms debounce @ 32k */ + writel(0x1f, CTRLMMR_DBOUNCE_CFG(6)); + } +} + void spl_board_init(void) { crystal_32k_enable(); + debounce_configure(); } #endif |