Commit 342479c8 authored by Chun-Jie Chen's avatar Chun-Jie Chen Committed by Matthias Brugger

soc: mediatek: pm-domains: Add support for mt8195

Add domain control data including bus protection data size
change due to more protection steps in mt8195.
Signed-off-by: default avatarChun-Jie Chen <chun-jie.chen@mediatek.com>
Reviewed-by: default avatarChen-Yu Tsai <wenst@chromium.org>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220130012104.5292-6-chun-jie.chen@mediatek.comSigned-off-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
parent db2ca860
This diff is collapsed.
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "mt8173-pm-domains.h" #include "mt8173-pm-domains.h"
#include "mt8183-pm-domains.h" #include "mt8183-pm-domains.h"
#include "mt8192-pm-domains.h" #include "mt8192-pm-domains.h"
#include "mt8195-pm-domains.h"
#define MTK_POLL_DELAY_US 10 #define MTK_POLL_DELAY_US 10
#define MTK_POLL_TIMEOUT USEC_PER_SEC #define MTK_POLL_TIMEOUT USEC_PER_SEC
...@@ -569,6 +570,10 @@ static const struct of_device_id scpsys_of_match[] = { ...@@ -569,6 +570,10 @@ static const struct of_device_id scpsys_of_match[] = {
.compatible = "mediatek,mt8192-power-controller", .compatible = "mediatek,mt8192-power-controller",
.data = &mt8192_scpsys_data, .data = &mt8192_scpsys_data,
}, },
{
.compatible = "mediatek,mt8195-power-controller",
.data = &mt8195_scpsys_data,
},
{ } { }
}; };
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#define PWR_STATUS_AUDIO BIT(24) #define PWR_STATUS_AUDIO BIT(24)
#define PWR_STATUS_USB BIT(25) #define PWR_STATUS_USB BIT(25)
#define SPM_MAX_BUS_PROT_DATA 5 #define SPM_MAX_BUS_PROT_DATA 6
#define _BUS_PROT(_mask, _set, _clr, _sta, _update, _ignore) { \ #define _BUS_PROT(_mask, _set, _clr, _sta, _update, _ignore) { \
.bus_prot_mask = (_mask), \ .bus_prot_mask = (_mask), \
......
...@@ -2,6 +2,88 @@ ...@@ -2,6 +2,88 @@
#ifndef __SOC_MEDIATEK_INFRACFG_H #ifndef __SOC_MEDIATEK_INFRACFG_H
#define __SOC_MEDIATEK_INFRACFG_H #define __SOC_MEDIATEK_INFRACFG_H
#define MT8195_TOP_AXI_PROT_EN_STA1 0x228
#define MT8195_TOP_AXI_PROT_EN_1_STA1 0x258
#define MT8195_TOP_AXI_PROT_EN_SET 0x2a0
#define MT8195_TOP_AXI_PROT_EN_CLR 0x2a4
#define MT8195_TOP_AXI_PROT_EN_1_SET 0x2a8
#define MT8195_TOP_AXI_PROT_EN_1_CLR 0x2ac
#define MT8195_TOP_AXI_PROT_EN_MM_SET 0x2d4
#define MT8195_TOP_AXI_PROT_EN_MM_CLR 0x2d8
#define MT8195_TOP_AXI_PROT_EN_MM_STA1 0x2ec
#define MT8195_TOP_AXI_PROT_EN_2_SET 0x714
#define MT8195_TOP_AXI_PROT_EN_2_CLR 0x718
#define MT8195_TOP_AXI_PROT_EN_2_STA1 0x724
#define MT8195_TOP_AXI_PROT_EN_VDNR_SET 0xb84
#define MT8195_TOP_AXI_PROT_EN_VDNR_CLR 0xb88
#define MT8195_TOP_AXI_PROT_EN_VDNR_STA1 0xb90
#define MT8195_TOP_AXI_PROT_EN_VDNR_1_SET 0xba4
#define MT8195_TOP_AXI_PROT_EN_VDNR_1_CLR 0xba8
#define MT8195_TOP_AXI_PROT_EN_VDNR_1_STA1 0xbb0
#define MT8195_TOP_AXI_PROT_EN_VDNR_2_SET 0xbb8
#define MT8195_TOP_AXI_PROT_EN_VDNR_2_CLR 0xbbc
#define MT8195_TOP_AXI_PROT_EN_VDNR_2_STA1 0xbc4
#define MT8195_TOP_AXI_PROT_EN_SUB_INFRA_VDNR_SET 0xbcc
#define MT8195_TOP_AXI_PROT_EN_SUB_INFRA_VDNR_CLR 0xbd0
#define MT8195_TOP_AXI_PROT_EN_SUB_INFRA_VDNR_STA1 0xbd8
#define MT8195_TOP_AXI_PROT_EN_MM_2_SET 0xdcc
#define MT8195_TOP_AXI_PROT_EN_MM_2_CLR 0xdd0
#define MT8195_TOP_AXI_PROT_EN_MM_2_STA1 0xdd8
#define MT8195_TOP_AXI_PROT_EN_VDOSYS0 BIT(6)
#define MT8195_TOP_AXI_PROT_EN_VPPSYS0 BIT(10)
#define MT8195_TOP_AXI_PROT_EN_MFG1 BIT(11)
#define MT8195_TOP_AXI_PROT_EN_MFG1_2ND GENMASK(22, 21)
#define MT8195_TOP_AXI_PROT_EN_VPPSYS0_2ND BIT(23)
#define MT8195_TOP_AXI_PROT_EN_1_MFG1 GENMASK(20, 19)
#define MT8195_TOP_AXI_PROT_EN_1_CAM BIT(22)
#define MT8195_TOP_AXI_PROT_EN_2_CAM BIT(0)
#define MT8195_TOP_AXI_PROT_EN_2_MFG1_2ND GENMASK(6, 5)
#define MT8195_TOP_AXI_PROT_EN_2_MFG1 BIT(7)
#define MT8195_TOP_AXI_PROT_EN_2_AUDIO (BIT(9) | BIT(11))
#define MT8195_TOP_AXI_PROT_EN_2_ADSP (BIT(12) | GENMASK(16, 14))
#define MT8195_TOP_AXI_PROT_EN_MM_CAM (BIT(0) | BIT(2) | BIT(4))
#define MT8195_TOP_AXI_PROT_EN_MM_IPE BIT(1)
#define MT8195_TOP_AXI_PROT_EN_MM_IMG BIT(3)
#define MT8195_TOP_AXI_PROT_EN_MM_VDOSYS0 GENMASK(21, 17)
#define MT8195_TOP_AXI_PROT_EN_MM_VPPSYS1 GENMASK(8, 5)
#define MT8195_TOP_AXI_PROT_EN_MM_VENC (BIT(9) | BIT(11))
#define MT8195_TOP_AXI_PROT_EN_MM_VENC_CORE1 (BIT(10) | BIT(12))
#define MT8195_TOP_AXI_PROT_EN_MM_VDEC0 BIT(13)
#define MT8195_TOP_AXI_PROT_EN_MM_VDEC1 BIT(14)
#define MT8195_TOP_AXI_PROT_EN_MM_VDOSYS1_2ND BIT(22)
#define MT8195_TOP_AXI_PROT_EN_MM_VPPSYS1_2ND BIT(23)
#define MT8195_TOP_AXI_PROT_EN_MM_CAM_2ND BIT(24)
#define MT8195_TOP_AXI_PROT_EN_MM_IMG_2ND BIT(25)
#define MT8195_TOP_AXI_PROT_EN_MM_VENC_2ND BIT(26)
#define MT8195_TOP_AXI_PROT_EN_MM_WPESYS BIT(27)
#define MT8195_TOP_AXI_PROT_EN_MM_VDEC0_2ND BIT(28)
#define MT8195_TOP_AXI_PROT_EN_MM_VDEC1_2ND BIT(29)
#define MT8195_TOP_AXI_PROT_EN_MM_VDOSYS1 GENMASK(31, 30)
#define MT8195_TOP_AXI_PROT_EN_MM_2_VPPSYS0_2ND (GENMASK(1, 0) | BIT(4) | BIT(11))
#define MT8195_TOP_AXI_PROT_EN_MM_2_VENC BIT(2)
#define MT8195_TOP_AXI_PROT_EN_MM_2_VENC_CORE1 (BIT(3) | BIT(15))
#define MT8195_TOP_AXI_PROT_EN_MM_2_CAM (BIT(5) | BIT(17))
#define MT8195_TOP_AXI_PROT_EN_MM_2_VPPSYS1 (GENMASK(7, 6) | BIT(18))
#define MT8195_TOP_AXI_PROT_EN_MM_2_VPPSYS0 GENMASK(9, 8)
#define MT8195_TOP_AXI_PROT_EN_MM_2_VDOSYS1 BIT(10)
#define MT8195_TOP_AXI_PROT_EN_MM_2_VDEC2_2ND BIT(12)
#define MT8195_TOP_AXI_PROT_EN_MM_2_VDEC0_2ND BIT(13)
#define MT8195_TOP_AXI_PROT_EN_MM_2_WPESYS_2ND BIT(14)
#define MT8195_TOP_AXI_PROT_EN_MM_2_IPE BIT(16)
#define MT8195_TOP_AXI_PROT_EN_MM_2_VDEC2 BIT(21)
#define MT8195_TOP_AXI_PROT_EN_MM_2_VDEC0 BIT(22)
#define MT8195_TOP_AXI_PROT_EN_MM_2_WPESYS GENMASK(24, 23)
#define MT8195_TOP_AXI_PROT_EN_VDNR_1_EPD_TX BIT(1)
#define MT8195_TOP_AXI_PROT_EN_VDNR_1_DP_TX BIT(2)
#define MT8195_TOP_AXI_PROT_EN_VDNR_PCIE_MAC_P0 (BIT(11) | BIT(28))
#define MT8195_TOP_AXI_PROT_EN_VDNR_PCIE_MAC_P1 (BIT(12) | BIT(29))
#define MT8195_TOP_AXI_PROT_EN_VDNR_1_PCIE_MAC_P0 BIT(13)
#define MT8195_TOP_AXI_PROT_EN_VDNR_1_PCIE_MAC_P1 BIT(14)
#define MT8195_TOP_AXI_PROT_EN_SUB_INFRA_VDNR_MFG1 (BIT(17) | BIT(19))
#define MT8195_TOP_AXI_PROT_EN_SUB_INFRA_VDNR_VPPSYS0 BIT(20)
#define MT8195_TOP_AXI_PROT_EN_SUB_INFRA_VDNR_VDOSYS0 BIT(21)
#define MT8192_TOP_AXI_PROT_EN_STA1 0x228 #define MT8192_TOP_AXI_PROT_EN_STA1 0x228
#define MT8192_TOP_AXI_PROT_EN_1_STA1 0x258 #define MT8192_TOP_AXI_PROT_EN_1_STA1 0x258
#define MT8192_TOP_AXI_PROT_EN_SET 0x2a0 #define MT8192_TOP_AXI_PROT_EN_SET 0x2a0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment