drm/mediatek: Add support for Mediatek SoC MT8192
Add support for Mediatek SoC MT8192 Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
This commit is contained in:
parent
f4cca88efd
commit
01365f549c
|
@ -205,9 +205,15 @@ static const struct mtk_disp_ccorr_data mt8183_ccorr_driver_data = {
|
|||
.matrix_bits = 10,
|
||||
};
|
||||
|
||||
static const struct mtk_disp_ccorr_data mt8192_ccorr_driver_data = {
|
||||
.matrix_bits = 11,
|
||||
};
|
||||
|
||||
static const struct of_device_id mtk_disp_ccorr_driver_dt_match[] = {
|
||||
{ .compatible = "mediatek,mt8183-disp-ccorr",
|
||||
.data = &mt8183_ccorr_driver_data},
|
||||
{ .compatible = "mediatek,mt8192-disp-ccorr",
|
||||
.data = &mt8192_ccorr_driver_data},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, mtk_disp_ccorr_driver_dt_match);
|
||||
|
|
|
@ -456,6 +456,22 @@ static const struct mtk_disp_ovl_data mt8183_ovl_2l_driver_data = {
|
|||
.fmt_rgb565_is_0 = true,
|
||||
};
|
||||
|
||||
static const struct mtk_disp_ovl_data mt8192_ovl_driver_data = {
|
||||
.addr = DISP_REG_OVL_ADDR_MT8173,
|
||||
.gmc_bits = 10,
|
||||
.layer_nr = 4,
|
||||
.fmt_rgb565_is_0 = true,
|
||||
.smi_id_en = true,
|
||||
};
|
||||
|
||||
static const struct mtk_disp_ovl_data mt8192_ovl_2l_driver_data = {
|
||||
.addr = DISP_REG_OVL_ADDR_MT8173,
|
||||
.gmc_bits = 10,
|
||||
.layer_nr = 2,
|
||||
.fmt_rgb565_is_0 = true,
|
||||
.smi_id_en = true,
|
||||
};
|
||||
|
||||
static const struct of_device_id mtk_disp_ovl_driver_dt_match[] = {
|
||||
{ .compatible = "mediatek,mt2701-disp-ovl",
|
||||
.data = &mt2701_ovl_driver_data},
|
||||
|
@ -465,6 +481,10 @@ static const struct of_device_id mtk_disp_ovl_driver_dt_match[] = {
|
|||
.data = &mt8183_ovl_driver_data},
|
||||
{ .compatible = "mediatek,mt8183-disp-ovl-2l",
|
||||
.data = &mt8183_ovl_2l_driver_data},
|
||||
{ .compatible = "mediatek,mt8192-disp-ovl",
|
||||
.data = &mt8192_ovl_driver_data},
|
||||
{ .compatible = "mediatek,mt8192-disp-ovl-2l",
|
||||
.data = &mt8192_ovl_2l_driver_data},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, mtk_disp_ovl_driver_dt_match);
|
||||
|
|
|
@ -353,6 +353,10 @@ static const struct mtk_disp_rdma_data mt8183_rdma_driver_data = {
|
|||
.fifo_size = 5 * SZ_1K,
|
||||
};
|
||||
|
||||
static const struct mtk_disp_rdma_data mt8192_rdma_driver_data = {
|
||||
.fifo_size = 5 * SZ_1K,
|
||||
};
|
||||
|
||||
static const struct of_device_id mtk_disp_rdma_driver_dt_match[] = {
|
||||
{ .compatible = "mediatek,mt2701-disp-rdma",
|
||||
.data = &mt2701_rdma_driver_data},
|
||||
|
@ -360,6 +364,8 @@ static const struct of_device_id mtk_disp_rdma_driver_dt_match[] = {
|
|||
.data = &mt8173_rdma_driver_data},
|
||||
{ .compatible = "mediatek,mt8183-disp-rdma",
|
||||
.data = &mt8183_rdma_driver_data},
|
||||
{ .compatible = "mediatek,mt8192-disp-rdma",
|
||||
.data = &mt8192_rdma_driver_data},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, mtk_disp_rdma_driver_dt_match);
|
||||
|
|
|
@ -158,6 +158,25 @@ static const enum mtk_ddp_comp_id mt8183_mtk_ddp_ext[] = {
|
|||
DDP_COMPONENT_DPI0,
|
||||
};
|
||||
|
||||
static const enum mtk_ddp_comp_id mt8192_mtk_ddp_main[] = {
|
||||
DDP_COMPONENT_OVL0,
|
||||
DDP_COMPONENT_OVL_2L0,
|
||||
DDP_COMPONENT_RDMA0,
|
||||
DDP_COMPONENT_COLOR0,
|
||||
DDP_COMPONENT_CCORR,
|
||||
DDP_COMPONENT_AAL0,
|
||||
DDP_COMPONENT_GAMMA,
|
||||
DDP_COMPONENT_POSTMASK0,
|
||||
DDP_COMPONENT_DITHER,
|
||||
DDP_COMPONENT_DSI0,
|
||||
};
|
||||
|
||||
static const enum mtk_ddp_comp_id mt8192_mtk_ddp_ext[] = {
|
||||
DDP_COMPONENT_OVL_2L2,
|
||||
DDP_COMPONENT_RDMA4,
|
||||
DDP_COMPONENT_DPI0,
|
||||
};
|
||||
|
||||
static const struct mtk_mmsys_driver_data mt2701_mmsys_driver_data = {
|
||||
.main_path = mt2701_mtk_ddp_main,
|
||||
.main_len = ARRAY_SIZE(mt2701_mtk_ddp_main),
|
||||
|
@ -202,6 +221,13 @@ static const struct mtk_mmsys_driver_data mt8183_mmsys_driver_data = {
|
|||
.ext_len = ARRAY_SIZE(mt8183_mtk_ddp_ext),
|
||||
};
|
||||
|
||||
static const struct mtk_mmsys_driver_data mt8192_mmsys_driver_data = {
|
||||
.main_path = mt8192_mtk_ddp_main,
|
||||
.main_len = ARRAY_SIZE(mt8192_mtk_ddp_main),
|
||||
.ext_path = mt8192_mtk_ddp_ext,
|
||||
.ext_len = ARRAY_SIZE(mt8192_mtk_ddp_ext),
|
||||
};
|
||||
|
||||
static int mtk_drm_kms_init(struct drm_device *drm)
|
||||
{
|
||||
struct mtk_drm_private *private = drm->dev_private;
|
||||
|
@ -407,6 +433,10 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
|
|||
.data = (void *)MTK_DISP_OVL },
|
||||
{ .compatible = "mediatek,mt8183-disp-ovl-2l",
|
||||
.data = (void *)MTK_DISP_OVL_2L },
|
||||
{ .compatible = "mediatek,mt8192-disp-ovl",
|
||||
.data = (void *)MTK_DISP_OVL },
|
||||
{ .compatible = "mediatek,mt8192-disp-ovl-2l",
|
||||
.data = (void *)MTK_DISP_OVL_2L },
|
||||
{ .compatible = "mediatek,mt2701-disp-rdma",
|
||||
.data = (void *)MTK_DISP_RDMA },
|
||||
{ .compatible = "mediatek,mt8167-disp-rdma",
|
||||
|
@ -415,12 +445,16 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
|
|||
.data = (void *)MTK_DISP_RDMA },
|
||||
{ .compatible = "mediatek,mt8183-disp-rdma",
|
||||
.data = (void *)MTK_DISP_RDMA },
|
||||
{ .compatible = "mediatek,mt8192-disp-rdma",
|
||||
.data = (void *)MTK_DISP_RDMA },
|
||||
{ .compatible = "mediatek,mt8173-disp-wdma",
|
||||
.data = (void *)MTK_DISP_WDMA },
|
||||
{ .compatible = "mediatek,mt8167-disp-ccorr",
|
||||
.data = (void *)MTK_DISP_CCORR },
|
||||
{ .compatible = "mediatek,mt8183-disp-ccorr",
|
||||
.data = (void *)MTK_DISP_CCORR },
|
||||
{ .compatible = "mediatek,mt8192-disp-ccorr",
|
||||
.data = (void *)MTK_DISP_CCORR },
|
||||
{ .compatible = "mediatek,mt2701-disp-color",
|
||||
.data = (void *)MTK_DISP_COLOR },
|
||||
{ .compatible = "mediatek,mt8167-disp-color",
|
||||
|
@ -433,6 +467,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
|
|||
.data = (void *)MTK_DISP_AAL},
|
||||
{ .compatible = "mediatek,mt8183-disp-aal",
|
||||
.data = (void *)MTK_DISP_AAL},
|
||||
{ .compatible = "mediatek,mt8192-disp-aal",
|
||||
.data = (void *)MTK_DISP_AAL},
|
||||
{ .compatible = "mediatek,mt8167-disp-gamma",
|
||||
.data = (void *)MTK_DISP_GAMMA, },
|
||||
{ .compatible = "mediatek,mt8173-disp-gamma",
|
||||
|
@ -469,6 +505,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
|
|||
.data = (void *)MTK_DISP_MUTEX },
|
||||
{ .compatible = "mediatek,mt8183-disp-mutex",
|
||||
.data = (void *)MTK_DISP_MUTEX },
|
||||
{ .compatible = "mediatek,mt8192-disp-mutex",
|
||||
.data = (void *)MTK_DISP_MUTEX },
|
||||
{ .compatible = "mediatek,mt2701-disp-pwm",
|
||||
.data = (void *)MTK_DISP_BLS },
|
||||
{ .compatible = "mediatek,mt8167-disp-pwm",
|
||||
|
@ -477,6 +515,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
|
|||
.data = (void *)MTK_DISP_PWM },
|
||||
{ .compatible = "mediatek,mt8173-disp-od",
|
||||
.data = (void *)MTK_DISP_OD },
|
||||
{ .compatible = "mediatek,mt8192-disp-postmask",
|
||||
.data = (void *)MTK_DISP_POSTMASK },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
@ -493,6 +533,8 @@ static const struct of_device_id mtk_drm_of_ids[] = {
|
|||
.data = &mt8173_mmsys_driver_data},
|
||||
{ .compatible = "mediatek,mt8183-mmsys",
|
||||
.data = &mt8183_mmsys_driver_data},
|
||||
{ .compatible = "mediatek,mt8192-mmsys",
|
||||
.data = &mt8192_mmsys_driver_data},
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, mtk_drm_of_ids);
|
||||
|
|
Loading…
Reference in New Issue