drm/mediatek: Add mt8186 dpi compatibles and platform data
authorXinlei Lee <xinlei.lee@mediatek.com>
Mon, 24 Oct 2022 02:04:59 +0000 (10:04 +0800)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Mon, 26 Dec 2022 23:19:28 +0000 (23:19 +0000)
Add the compatible because use edge_cfg_in_mmsys in mt8186.

Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1666577099-3859-4-git-send-email-xinlei.lee@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_dpi.c
drivers/gpu/drm/mediatek/mtk_drm_drv.c

index 00f7b9112466cf40e74b45bfe0ce894695eeb7a4..948a53f1f4b385154f7e58070812b326ae8bd7cf 100644 (file)
@@ -940,6 +940,24 @@ static const struct mtk_dpi_conf mt8183_conf = {
        .csc_enable_bit = CSC_ENABLE,
 };
 
+static const struct mtk_dpi_conf mt8186_conf = {
+       .cal_factor = mt8183_calculate_factor,
+       .reg_h_fre_con = 0xe0,
+       .max_clock_khz = 150000,
+       .output_fmts = mt8183_output_fmts,
+       .num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
+       .edge_cfg_in_mmsys = true,
+       .pixels_per_iter = 1,
+       .is_ck_de_pol = true,
+       .swap_input_support = true,
+       .support_direct_pin = true,
+       .dimension_mask = HPW_MASK,
+       .hvsize_mask = HSIZE_MASK,
+       .channel_swap_shift = CH_SWAP,
+       .yuv422_en_bit = YUV422_EN,
+       .csc_enable_bit = CSC_ENABLE,
+};
+
 static const struct mtk_dpi_conf mt8188_dpintf_conf = {
        .cal_factor = mt8195_dpintf_calculate_factor,
        .max_clock_khz = 600000,
@@ -1104,6 +1122,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
        { .compatible = "mediatek,mt8183-dpi",
          .data = &mt8183_conf,
        },
+       { .compatible = "mediatek,mt8186-dpi",
+         .data = &mt8186_conf,
+       },
        { .compatible = "mediatek,mt8188-dp-intf",
          .data = &mt8188_dpintf_conf,
        },
index cd5b18ef79512c24ede32cfb1fcc0fba11713d86..4d552c260c91bcaa37c0ccf6af5ac8e3a49f1f65 100644 (file)
@@ -637,6 +637,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
          .data = (void *)MTK_DPI },
        { .compatible = "mediatek,mt8183-dpi",
          .data = (void *)MTK_DPI },
+       { .compatible = "mediatek,mt8186-dpi",
+         .data = (void *)MTK_DPI },
        { .compatible = "mediatek,mt8188-dp-intf",
          .data = (void *)MTK_DP_INTF },
        { .compatible = "mediatek,mt8192-dpi",