drm/panfrost: Add support for Mali on the MT8188 SoC
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 11 Jun 2024 08:56:02 +0000 (10:56 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 19 Jun 2024 11:41:28 +0000 (13:41 +0200)
MediaTek MT8188 has a Mali-G57 MC3 (Valhall-JM): add a new
compatible and platform data using the same supplies and the
same power domain lists as MT8183 (one regulator, three power
domains).

Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240611085602.491324-3-angelogioacchino.delregno@collabora.com
drivers/gpu/drm/panfrost/panfrost_drv.c

index ef9f6c0..b43557b 100644 (file)
@@ -777,6 +777,15 @@ static const struct panfrost_compatible mediatek_mt8186_data = {
        .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
 };
 
+/* MT8188 uses the same power domains and power supplies as MT8183 */
+static const struct panfrost_compatible mediatek_mt8188_data = {
+       .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1,
+       .supply_names = mediatek_mt8183_b_supplies,
+       .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains),
+       .pm_domain_names = mediatek_mt8183_pm_domains,
+       .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
+};
+
 static const char * const mediatek_mt8192_supplies[] = { "mali", NULL };
 static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", "core2",
                                                           "core3", "core4" };
@@ -808,6 +817,7 @@ static const struct of_device_id dt_match[] = {
        { .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data },
        { .compatible = "mediatek,mt8183b-mali", .data = &mediatek_mt8183_b_data },
        { .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data },
+       { .compatible = "mediatek,mt8188-mali", .data = &mediatek_mt8188_data },
        { .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data },
        {}
 };