1e2ad626fSUlf Hansson /* SPDX-License-Identifier: GPL-2.0-only */ 2e2ad626fSUlf Hansson 3e2ad626fSUlf Hansson #ifndef __SOC_MEDIATEK_MT8173_PM_DOMAINS_H 4e2ad626fSUlf Hansson #define __SOC_MEDIATEK_MT8173_PM_DOMAINS_H 5e2ad626fSUlf Hansson 6e2ad626fSUlf Hansson #include "mtk-pm-domains.h" 7e2ad626fSUlf Hansson #include <dt-bindings/power/mt8173-power.h> 8e2ad626fSUlf Hansson 9e2ad626fSUlf Hansson /* 10e2ad626fSUlf Hansson * MT8173 power domain support 11e2ad626fSUlf Hansson */ 12e2ad626fSUlf Hansson 13e2ad626fSUlf Hansson static const struct scpsys_domain_data scpsys_domain_data_mt8173[] = { 14e2ad626fSUlf Hansson [MT8173_POWER_DOMAIN_VDEC] = { 15e2ad626fSUlf Hansson .name = "vdec", 16e2ad626fSUlf Hansson .sta_mask = PWR_STATUS_VDEC, 17e2ad626fSUlf Hansson .ctl_offs = SPM_VDE_PWR_CON, 18e2ad626fSUlf Hansson .pwr_sta_offs = SPM_PWR_STATUS, 19e2ad626fSUlf Hansson .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 20e2ad626fSUlf Hansson .sram_pdn_bits = GENMASK(11, 8), 21e2ad626fSUlf Hansson .sram_pdn_ack_bits = GENMASK(12, 12), 22e2ad626fSUlf Hansson }, 23e2ad626fSUlf Hansson [MT8173_POWER_DOMAIN_VENC] = { 24e2ad626fSUlf Hansson .name = "venc", 25e2ad626fSUlf Hansson .sta_mask = PWR_STATUS_VENC, 26e2ad626fSUlf Hansson .ctl_offs = SPM_VEN_PWR_CON, 27e2ad626fSUlf Hansson .pwr_sta_offs = SPM_PWR_STATUS, 28e2ad626fSUlf Hansson .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 29e2ad626fSUlf Hansson .sram_pdn_bits = GENMASK(11, 8), 30e2ad626fSUlf Hansson .sram_pdn_ack_bits = GENMASK(15, 12), 31e2ad626fSUlf Hansson }, 32e2ad626fSUlf Hansson [MT8173_POWER_DOMAIN_ISP] = { 33e2ad626fSUlf Hansson .name = "isp", 34e2ad626fSUlf Hansson .sta_mask = PWR_STATUS_ISP, 35e2ad626fSUlf Hansson .ctl_offs = SPM_ISP_PWR_CON, 36e2ad626fSUlf Hansson .pwr_sta_offs = SPM_PWR_STATUS, 37e2ad626fSUlf Hansson .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 38e2ad626fSUlf Hansson .sram_pdn_bits = GENMASK(11, 8), 39e2ad626fSUlf Hansson .sram_pdn_ack_bits = GENMASK(13, 12), 40e2ad626fSUlf Hansson }, 41e2ad626fSUlf Hansson [MT8173_POWER_DOMAIN_MM] = { 42e2ad626fSUlf Hansson .name = "mm", 43e2ad626fSUlf Hansson .sta_mask = PWR_STATUS_DISP, 44e2ad626fSUlf Hansson .ctl_offs = SPM_DIS_PWR_CON, 45e2ad626fSUlf Hansson .pwr_sta_offs = SPM_PWR_STATUS, 46e2ad626fSUlf Hansson .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 47e2ad626fSUlf Hansson .sram_pdn_bits = GENMASK(11, 8), 48e2ad626fSUlf Hansson .sram_pdn_ack_bits = GENMASK(12, 12), 49*151bd6c5SMarkus Schneider-Pargmann .bp_cfg = { 50*151bd6c5SMarkus Schneider-Pargmann BUS_PROT_INFRA_UPDATE_TOPAXI(MT8173_TOP_AXI_PROT_EN_MM_M0 | 51e2ad626fSUlf Hansson MT8173_TOP_AXI_PROT_EN_MM_M1), 52e2ad626fSUlf Hansson }, 53e2ad626fSUlf Hansson }, 54e2ad626fSUlf Hansson [MT8173_POWER_DOMAIN_VENC_LT] = { 55e2ad626fSUlf Hansson .name = "venc_lt", 56e2ad626fSUlf Hansson .sta_mask = PWR_STATUS_VENC_LT, 57e2ad626fSUlf Hansson .ctl_offs = SPM_VEN2_PWR_CON, 58e2ad626fSUlf Hansson .pwr_sta_offs = SPM_PWR_STATUS, 59e2ad626fSUlf Hansson .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 60e2ad626fSUlf Hansson .sram_pdn_bits = GENMASK(11, 8), 61e2ad626fSUlf Hansson .sram_pdn_ack_bits = GENMASK(15, 12), 62e2ad626fSUlf Hansson }, 63e2ad626fSUlf Hansson [MT8173_POWER_DOMAIN_AUDIO] = { 64e2ad626fSUlf Hansson .name = "audio", 65e2ad626fSUlf Hansson .sta_mask = PWR_STATUS_AUDIO, 66e2ad626fSUlf Hansson .ctl_offs = SPM_AUDIO_PWR_CON, 67e2ad626fSUlf Hansson .pwr_sta_offs = SPM_PWR_STATUS, 68e2ad626fSUlf Hansson .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 69e2ad626fSUlf Hansson .sram_pdn_bits = GENMASK(11, 8), 70e2ad626fSUlf Hansson .sram_pdn_ack_bits = GENMASK(15, 12), 71e2ad626fSUlf Hansson }, 72e2ad626fSUlf Hansson [MT8173_POWER_DOMAIN_USB] = { 73e2ad626fSUlf Hansson .name = "usb", 74e2ad626fSUlf Hansson .sta_mask = PWR_STATUS_USB, 75e2ad626fSUlf Hansson .ctl_offs = SPM_USB_PWR_CON, 76e2ad626fSUlf Hansson .pwr_sta_offs = SPM_PWR_STATUS, 77e2ad626fSUlf Hansson .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 78e2ad626fSUlf Hansson .sram_pdn_bits = GENMASK(11, 8), 79e2ad626fSUlf Hansson .sram_pdn_ack_bits = GENMASK(15, 12), 80e2ad626fSUlf Hansson .caps = MTK_SCPD_ACTIVE_WAKEUP, 81e2ad626fSUlf Hansson }, 82e2ad626fSUlf Hansson [MT8173_POWER_DOMAIN_MFG_ASYNC] = { 83e2ad626fSUlf Hansson .name = "mfg_async", 84e2ad626fSUlf Hansson .sta_mask = PWR_STATUS_MFG_ASYNC, 85e2ad626fSUlf Hansson .ctl_offs = SPM_MFG_ASYNC_PWR_CON, 86e2ad626fSUlf Hansson .pwr_sta_offs = SPM_PWR_STATUS, 87e2ad626fSUlf Hansson .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 88e2ad626fSUlf Hansson .sram_pdn_bits = GENMASK(11, 8), 89e2ad626fSUlf Hansson .sram_pdn_ack_bits = 0, 90e2ad626fSUlf Hansson .caps = MTK_SCPD_DOMAIN_SUPPLY, 91e2ad626fSUlf Hansson }, 92e2ad626fSUlf Hansson [MT8173_POWER_DOMAIN_MFG_2D] = { 93e2ad626fSUlf Hansson .name = "mfg_2d", 94e2ad626fSUlf Hansson .sta_mask = PWR_STATUS_MFG_2D, 95e2ad626fSUlf Hansson .ctl_offs = SPM_MFG_2D_PWR_CON, 96e2ad626fSUlf Hansson .pwr_sta_offs = SPM_PWR_STATUS, 97e2ad626fSUlf Hansson .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 98e2ad626fSUlf Hansson .sram_pdn_bits = GENMASK(11, 8), 99e2ad626fSUlf Hansson .sram_pdn_ack_bits = GENMASK(13, 12), 100e2ad626fSUlf Hansson }, 101e2ad626fSUlf Hansson [MT8173_POWER_DOMAIN_MFG] = { 102e2ad626fSUlf Hansson .name = "mfg", 103e2ad626fSUlf Hansson .sta_mask = PWR_STATUS_MFG, 104e2ad626fSUlf Hansson .ctl_offs = SPM_MFG_PWR_CON, 105e2ad626fSUlf Hansson .pwr_sta_offs = SPM_PWR_STATUS, 106e2ad626fSUlf Hansson .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 107e2ad626fSUlf Hansson .sram_pdn_bits = GENMASK(13, 8), 108e2ad626fSUlf Hansson .sram_pdn_ack_bits = GENMASK(21, 16), 109*151bd6c5SMarkus Schneider-Pargmann .bp_cfg = { 110*151bd6c5SMarkus Schneider-Pargmann BUS_PROT_INFRA_UPDATE_TOPAXI(MT8173_TOP_AXI_PROT_EN_MFG_S | 111e2ad626fSUlf Hansson MT8173_TOP_AXI_PROT_EN_MFG_M0 | 112e2ad626fSUlf Hansson MT8173_TOP_AXI_PROT_EN_MFG_M1 | 113e2ad626fSUlf Hansson MT8173_TOP_AXI_PROT_EN_MFG_SNOOP_OUT), 114e2ad626fSUlf Hansson }, 115e2ad626fSUlf Hansson }, 116e2ad626fSUlf Hansson }; 117e2ad626fSUlf Hansson 118e2ad626fSUlf Hansson static const struct scpsys_soc_data mt8173_scpsys_data = { 119e2ad626fSUlf Hansson .domains_data = scpsys_domain_data_mt8173, 120e2ad626fSUlf Hansson .num_domains = ARRAY_SIZE(scpsys_domain_data_mt8173), 121e2ad626fSUlf Hansson }; 122e2ad626fSUlf Hansson 123e2ad626fSUlf Hansson #endif /* __SOC_MEDIATEK_MT8173_PM_DOMAINS_H */ 124