xref: /rk3399_ARM-atf/drivers/ti/common/pm/include/ti_pm_types.h (revision a28114d66a6d43db4accef5fd5d6dab6c059e584)
1 /*
2  * Copyright (c) 2025-2026 Texas Instruments Incorporated - https://www.ti.com
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /*
8  * TI Power Management Types
9  *
10  * This header defines core power management type definitions for power
11  * domains, LPSC modules, PSC controllers, clocks, and device clock indexes
12  * used throughout the TI platform firmware.
13  */
14 
15 #ifndef TI_PM_TYPES_H
16 #define TI_PM_TYPES_H
17 
18 #include <stdbool.h>
19 #include <stdint.h>
20 
21 /*
22  * Index of a power domain within a PSC.
23  *
24  * The PSC register layout supports up to 32 power domains.
25  */
26 typedef uint8_t ti_pd_idx_t;
27 
28 /*
29  * Index of an LPSC module within a PSC.
30  *
31  * The PSC register layout supports up to 128 modules.
32  */
33 typedef uint8_t ti_lpsc_idx_t;
34 
35 /*
36  * Index of a PSC controller within the SoC.
37  *
38  * Each SoC can have multiple PSC controllers. Special values:
39  * - 6: TI_PSC_DEV_MULTIPLE - IP is associated with domains in multiple PSCs
40  * - 7: TI_PSC_DEV_NONE - IP is not associated with any PSC
41  */
42 typedef uint8_t ti_psc_idx_t;
43 
44 /*
45  * Index of a clock within the SoC clock tree.
46  *
47  * Each SoC clock has a unique index used for internal clock management.
48  */
49 typedef uint16_t ti_clk_idx_t;
50 
51 /*
52  * Index of a clock connection to a device IP block.
53  *
54  * Device clocks are exported for external use and correspond to the clock
55  * field in device clock management messages.
56  */
57 typedef uint16_t ti_dev_clk_idx_t;
58 
59 /*
60  * Index of a device within the SoC device table.
61  *
62  * Each device managed by the firmware has a unique index used for
63  * internal device management and TISCI communication.
64  */
65 typedef uint8_t ti_dev_idx_t;
66 
67 #endif /* TI_PM_TYPES_H */
68