1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #ifndef MOD_SYNQUACER_SYSTEM_H
9 #define MOD_SYNQUACER_SYSTEM_H
10 
11 #include <mod_power_domain.h>
12 #include <mod_timer.h>
13 
14 /*!
15  * \addtogroup GroupSYNQUACERModule SYNQUACER Product Modules
16  * \{
17  */
18 
19 /*!
20  * \defgroup GroupSYNQUACERSystem SYNQUACER System Support
21  *
22  * \brief SynQuacer System module.
23  *
24  * \details This module implements a SynQuacer system driver
25  *
26  * \{
27  */
28 
29 /*!
30  * \brief Additional SYNQUACER system power states.
31  */
32 enum mod_synquacer_system_power_states {
33     MOD_SYNQUACER_SYSTEM_POWER_STATE_SLEEP0 = MOD_PD_STATE_COUNT,
34     MOD_SYNQUACER_SYSTEM_POWER_STATE_SLEEP1,
35     MOD_SYNQUACER_SYSTEM_POWER_STATE_COUNT
36 };
37 
38 /*!
39  * \brief System power state masks.
40  */
41 enum mod_synquacer_system_power_state_masks {
42     MOD_SYNQUACER_SYSTEM_POWER_STATE_SLEEP0_MASK =
43         (1 << MOD_SYNQUACER_SYSTEM_POWER_STATE_SLEEP0),
44     MOD_SYNQUACER_SYSTEM_POWER_STATE_SLEEP1_MASK =
45         (1 << MOD_SYNQUACER_SYSTEM_POWER_STATE_SLEEP1),
46 };
47 
48 /*!
49  * \brief Indices of the interfaces exposed by the module.
50  */
51 enum mod_synquacer_system_api_idx {
52     /*! API index for the driver interface of the SYSTEM POWER module */
53     MOD_SYNQUACER_SYSTEM_API_IDX_SYSTEM_POWER_DRIVER,
54 
55     /*! Number of exposed interfaces */
56     MOD_SYNQUACER_SYSTEM_API_COUNT
57 };
58 
59 /*!
60  * \brief Module Context
61  */
62 struct synquacer_system_ctx {
63     /*! pointer to the power domain module. */
64     const struct mod_pd_restricted_api *mod_pd_restricted_api;
65 
66     /*! pointer to the ccn512 module. */
67     const struct mod_ccn512_api *ccn512_api;
68 
69     /*! pointer to the f_i2c module. */
70     const struct mod_f_i2c_api *f_i2c_api;
71 
72     /*! pointer to the nor module. */
73     const struct mod_nor_api *nor_api;
74 
75     /*! pointer to the hsspi module. */
76     const struct qspi_api *qspi_api;
77 
78     /*! pointer to the hsspi module. */
79     const struct mod_timer_api *timer_api;
80 };
81 
82 /*!
83  * \brief SynQuacer System Module Context
84  */
85 extern struct synquacer_system_ctx synquacer_system_ctx;
86 
87 /*!
88  * \}
89  */
90 
91 /*!
92  * \}
93  */
94 
95 #endif /* MOD_SYNQUACER_SYSTEM_H */
96