1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __SOC_MEDIATEK_MT8173_PM_DOMAINS_H
4 #define __SOC_MEDIATEK_MT8173_PM_DOMAINS_H
6 #include "mtk-pm-domains.h"
7 #include <dt-bindings/power/mt8173-power.h>
10 * MT8173 power domain support
13 static const struct scpsys_domain_data scpsys_domain_data_mt8173
[] = {
14 [MT8173_POWER_DOMAIN_VDEC
] = {
16 .sta_mask
= PWR_STATUS_VDEC
,
17 .ctl_offs
= SPM_VDE_PWR_CON
,
18 .pwr_sta_offs
= SPM_PWR_STATUS
,
19 .pwr_sta2nd_offs
= SPM_PWR_STATUS_2ND
,
20 .sram_pdn_bits
= GENMASK(11, 8),
21 .sram_pdn_ack_bits
= GENMASK(12, 12),
23 [MT8173_POWER_DOMAIN_VENC
] = {
25 .sta_mask
= PWR_STATUS_VENC
,
26 .ctl_offs
= SPM_VEN_PWR_CON
,
27 .pwr_sta_offs
= SPM_PWR_STATUS
,
28 .pwr_sta2nd_offs
= SPM_PWR_STATUS_2ND
,
29 .sram_pdn_bits
= GENMASK(11, 8),
30 .sram_pdn_ack_bits
= GENMASK(15, 12),
32 [MT8173_POWER_DOMAIN_ISP
] = {
34 .sta_mask
= PWR_STATUS_ISP
,
35 .ctl_offs
= SPM_ISP_PWR_CON
,
36 .pwr_sta_offs
= SPM_PWR_STATUS
,
37 .pwr_sta2nd_offs
= SPM_PWR_STATUS_2ND
,
38 .sram_pdn_bits
= GENMASK(11, 8),
39 .sram_pdn_ack_bits
= GENMASK(13, 12),
41 [MT8173_POWER_DOMAIN_MM
] = {
43 .sta_mask
= PWR_STATUS_DISP
,
44 .ctl_offs
= SPM_DIS_PWR_CON
,
45 .pwr_sta_offs
= SPM_PWR_STATUS
,
46 .pwr_sta2nd_offs
= SPM_PWR_STATUS_2ND
,
47 .sram_pdn_bits
= GENMASK(11, 8),
48 .sram_pdn_ack_bits
= GENMASK(12, 12),
50 BUS_PROT_INFRA_UPDATE_TOPAXI(MT8173_TOP_AXI_PROT_EN_MM_M0
|
51 MT8173_TOP_AXI_PROT_EN_MM_M1
),
54 [MT8173_POWER_DOMAIN_VENC_LT
] = {
56 .sta_mask
= PWR_STATUS_VENC_LT
,
57 .ctl_offs
= SPM_VEN2_PWR_CON
,
58 .pwr_sta_offs
= SPM_PWR_STATUS
,
59 .pwr_sta2nd_offs
= SPM_PWR_STATUS_2ND
,
60 .sram_pdn_bits
= GENMASK(11, 8),
61 .sram_pdn_ack_bits
= GENMASK(15, 12),
63 [MT8173_POWER_DOMAIN_AUDIO
] = {
65 .sta_mask
= PWR_STATUS_AUDIO
,
66 .ctl_offs
= SPM_AUDIO_PWR_CON
,
67 .pwr_sta_offs
= SPM_PWR_STATUS
,
68 .pwr_sta2nd_offs
= SPM_PWR_STATUS_2ND
,
69 .sram_pdn_bits
= GENMASK(11, 8),
70 .sram_pdn_ack_bits
= GENMASK(15, 12),
72 [MT8173_POWER_DOMAIN_USB
] = {
74 .sta_mask
= PWR_STATUS_USB
,
75 .ctl_offs
= SPM_USB_PWR_CON
,
76 .pwr_sta_offs
= SPM_PWR_STATUS
,
77 .pwr_sta2nd_offs
= SPM_PWR_STATUS_2ND
,
78 .sram_pdn_bits
= GENMASK(11, 8),
79 .sram_pdn_ack_bits
= GENMASK(15, 12),
80 .caps
= MTK_SCPD_ACTIVE_WAKEUP
,
82 [MT8173_POWER_DOMAIN_MFG_ASYNC
] = {
84 .sta_mask
= PWR_STATUS_MFG_ASYNC
,
85 .ctl_offs
= SPM_MFG_ASYNC_PWR_CON
,
86 .pwr_sta_offs
= SPM_PWR_STATUS
,
87 .pwr_sta2nd_offs
= SPM_PWR_STATUS_2ND
,
88 .sram_pdn_bits
= GENMASK(11, 8),
89 .sram_pdn_ack_bits
= 0,
90 .caps
= MTK_SCPD_DOMAIN_SUPPLY
,
92 [MT8173_POWER_DOMAIN_MFG_2D
] = {
94 .sta_mask
= PWR_STATUS_MFG_2D
,
95 .ctl_offs
= SPM_MFG_2D_PWR_CON
,
96 .pwr_sta_offs
= SPM_PWR_STATUS
,
97 .pwr_sta2nd_offs
= SPM_PWR_STATUS_2ND
,
98 .sram_pdn_bits
= GENMASK(11, 8),
99 .sram_pdn_ack_bits
= GENMASK(13, 12),
101 [MT8173_POWER_DOMAIN_MFG
] = {
103 .sta_mask
= PWR_STATUS_MFG
,
104 .ctl_offs
= SPM_MFG_PWR_CON
,
105 .pwr_sta_offs
= SPM_PWR_STATUS
,
106 .pwr_sta2nd_offs
= SPM_PWR_STATUS_2ND
,
107 .sram_pdn_bits
= GENMASK(13, 8),
108 .sram_pdn_ack_bits
= GENMASK(21, 16),
110 BUS_PROT_INFRA_UPDATE_TOPAXI(MT8173_TOP_AXI_PROT_EN_MFG_S
|
111 MT8173_TOP_AXI_PROT_EN_MFG_M0
|
112 MT8173_TOP_AXI_PROT_EN_MFG_M1
|
113 MT8173_TOP_AXI_PROT_EN_MFG_SNOOP_OUT
),
118 static const struct scpsys_soc_data mt8173_scpsys_data
= {
119 .domains_data
= scpsys_domain_data_mt8173
,
120 .num_domains
= ARRAY_SIZE(scpsys_domain_data_mt8173
),
123 #endif /* __SOC_MEDIATEK_MT8173_PM_DOMAINS_H */