blob: cc6cf436ab5d5c81470f3299d869fc0f491f6f8e [file] [log] [blame]
Konstantin Porotchkine7be6e22018-10-08 16:53:09 +03001/*
2 * Copyright (C) 2016 Marvell International Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 * https://spdx.org/licenses
6 */
7
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00008#ifndef A3700_PM_H
9#define A3700_PM_H
Konstantin Porotchkine7be6e22018-10-08 16:53:09 +030010
11#include <stdint.h>
12
13/* supported wake up sources */
14enum pm_wake_up_src_type {
15 WAKE_UP_SRC_GPIO,
16 /* FOLLOWING SRC NOT SUPPORTED YET */
17 WAKE_UP_SRC_TIMER,
18 WAKE_UP_SRC_UART0,
19 WAKE_UP_SRC_UART1,
20 WAKE_UP_SRC_MAX,
21};
22
23struct pm_gpio_data {
24 /*
25 * bank 0: North bridge GPIO
26 * bank 1: South bridge GPIO
27 */
28 uint32_t bank_num;
29 uint32_t gpio_num;
30};
31
32union pm_wake_up_src_data {
33 struct pm_gpio_data gpio_data;
34 /* delay in seconds */
35 uint32_t timer_delay;
36};
37
38struct pm_wake_up_src {
39 enum pm_wake_up_src_type wake_up_src_type;
40
41 union pm_wake_up_src_data wake_up_data;
42};
43
44struct pm_wake_up_src_config {
45 uint32_t wake_up_src_num;
46 struct pm_wake_up_src wake_up_src[WAKE_UP_SRC_MAX];
47};
48
49struct pm_wake_up_src_config *mv_wake_up_src_config_get(void);
50
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000051#endif /* A3700_PM_H */