diff options
Diffstat (limited to 'zephyr/projects/intelrvp/src/intelrvp.c')
-rw-r--r-- | zephyr/projects/intelrvp/src/intelrvp.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/zephyr/projects/intelrvp/src/intelrvp.c b/zephyr/projects/intelrvp/src/intelrvp.c new file mode 100644 index 0000000000..7098f26cbf --- /dev/null +++ b/zephyr/projects/intelrvp/src/intelrvp.c @@ -0,0 +1,25 @@ +/* Copyright 2022 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* TODO: b/218904113: Convert to using Zephyr GPIOs */ +#include "gpio.h" +#include "hooks.h" + +static void board_init(void) +{ + /* Enable SOC SPI */ + gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(ec_spi_oe_mecc), 1); +} +DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_LAST); + +__override void intel_x86_sys_reset_delay(void) +{ + /* + * From MAX6818 Data sheet, Range of 'Debounce Duaration' is + * Minimum - 20 ms, Typical - 40 ms, Maximum - 80 ms. + * See b/153128296. + */ + udelay(60 * MSEC); +} |