[ALPS04810678] interconnect: mediatek: Add mt6761 intercoonect

add mt6761 interconnect support

MTK-Commit-Id: 8e90bdddd7ad7f78aed9c4c34d9ef8358e9c5a7c

Change-Id: Ic7169665c07e0bab15e4e3aae5c287dc8ae1262a
Signed-off-by: Arvin Wang <arvin.wang@mediatek.com>
CR-Id: ALPS04810678
Feature: VCORE DVFS
This commit is contained in:
Arvin Wang
2021-01-28 13:46:07 +08:00
parent 7867a6505a
commit 582c695d37

View File

@@ -4,6 +4,7 @@
*/
#include <dt-bindings/interconnect/mtk,mt6779-emi.h>
#include <dt-bindings/interconnect/mtk,mt6761-emi.h>
#include <linux/device.h>
#include <linux/interconnect-provider.h>
#include <linux/module.h>
@@ -113,6 +114,26 @@ static struct mtk_icc_desc mt6779_icc = {
.num_nodes = ARRAY_SIZE(mt6779_icc_nodes),
};
static struct mtk_icc_node *mt6761_icc_nodes[] = {
[MT6761_SLAVE_DDR_EMI] = &ddr_emi,
[MT6761_MASTER_MCUSYS] = &mcusys,
[MT6761_MASTER_GPUSYS] = &gpu,
[MT6761_MASTER_MMSYS] = &mmsys,
[MT6761_MASTER_MM_VPU] = &mm_vpu,
[MT6761_MASTER_MM_DISP] = &mm_disp,
[MT6761_MASTER_MM_VDEC] = &mm_vdec,
[MT6761_MASTER_MM_VENC] = &mm_venc,
[MT6761_MASTER_MM_CAM] = &mm_cam,
[MT6761_MASTER_MM_IMG] = &mm_img,
[MT6761_MASTER_MM_MDP] = &mm_mdp,
[MT6761_MASTER_DEBUGSYS] = &debugsys,
};
static struct mtk_icc_desc mt6761_icc = {
.nodes = mt6761_icc_nodes,
.num_nodes = ARRAY_SIZE(mt6761_icc_nodes),
};
static int emi_icc_aggregate(struct icc_node *node, u32 avg_bw,
u32 peak_bw, u32 *agg_avg, u32 *agg_peak)
{
@@ -237,6 +258,7 @@ static int emi_icc_remove(struct platform_device *pdev)
static const struct of_device_id emi_icc_of_match[] = {
{ .compatible = "mediatek,dvfsrc-mt6779-emi", .data = &mt6779_icc },
{ .compatible = "mediatek,dvfsrc-mt6761-emi", .data = &mt6761_icc },
{ },
};
MODULE_DEVICE_TABLE(of, emi_icc_of_match);