a3700_pm.h 1017 B

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