Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/soc/pmc.h
3694 views
1
/*
2
* Copyright (c) 2018 naehrwert
3
* Copyright (c) 2018 st4rk
4
* Copyright (c) 2018-2026 CTCaer
5
*
6
* This program is free software; you can redistribute it and/or modify it
7
* under the terms and conditions of the GNU General Public License,
8
* version 2, as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
* more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef _PMC_H_
20
#define _PMC_H_
21
22
#include <utils/types.h>
23
#include <soc/pmc_t210.h>
24
25
typedef enum _pmc_sec_lock_t
26
{
27
PMC_SEC_LOCK_MISC = BIT(0),
28
PMC_SEC_LOCK_LP0_PARAMS = BIT(1),
29
PMC_SEC_LOCK_RST_VECTOR = BIT(2),
30
PMC_SEC_LOCK_CARVEOUTS = BIT(3),
31
PMC_SEC_LOCK_TZ_CMAC_W = BIT(4),
32
PMC_SEC_LOCK_TZ_CMAC_R = BIT(5),
33
PMC_SEC_LOCK_TZ_KEK_W = BIT(6),
34
PMC_SEC_LOCK_TZ_KEK_R = BIT(7),
35
PMC_SEC_LOCK_SE_SRK = BIT(8),
36
PMC_SEC_LOCK_SE2_SRK_B01 = BIT(9),
37
PMC_SEC_LOCK_MISC_B01 = BIT(10),
38
PMC_SEC_LOCK_CARVEOUTS_L4T = BIT(11),
39
PMC_SEC_LOCK_LP0_PARAMS_B01 = BIT(12),
40
} pmc_sec_lock_t;
41
42
typedef enum _pmc_power_rail_t
43
{
44
POWER_RAIL_CRAIL = 0,
45
POWER_RAIL_VE = 2,
46
POWER_RAIL_PCIE = 3,
47
POWER_RAIL_NVENC = 6,
48
POWER_RAIL_SATA = 8,
49
POWER_RAIL_CE1 = 9,
50
POWER_RAIL_CE2 = 10,
51
POWER_RAIL_CE3 = 11,
52
POWER_RAIL_CELP = 12,
53
POWER_RAIL_CE0 = 14,
54
POWER_RAIL_C0NC = 15,
55
POWER_RAIL_C1NC = 16,
56
POWER_RAIL_SOR = 17,
57
POWER_RAIL_DIS = 18,
58
POWER_RAIL_DISB = 19,
59
POWER_RAIL_XUSBA = 20,
60
POWER_RAIL_XUSBB = 21,
61
POWER_RAIL_XUSBC = 22,
62
POWER_RAIL_VIC = 23,
63
POWER_RAIL_IRAM = 24,
64
POWER_RAIL_NVDEC = 25,
65
POWER_RAIL_NVJPG = 26,
66
POWER_RAIL_AUD = 27,
67
POWER_RAIL_DFD = 28,
68
POWER_RAIL_VE2 = 29
69
} pmc_power_rail_t;
70
71
void pmc_scratch_lock(pmc_sec_lock_t lock_mask);
72
int pmc_domain_pwrgate_set(pmc_power_rail_t part, u32 enable);
73
74
#endif
75
76