From patchwork Thu Jan 16 14:25:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louis-Alexis Eyraud X-Patchwork-Id: 13941749 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D4C9C02187 for ; Thu, 16 Jan 2025 14:27:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B4A7F10E987; Thu, 16 Jan 2025 14:27:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="hnpwB10o"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 861AF10E987 for ; Thu, 16 Jan 2025 14:27:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1737037602; bh=D8xwpyjZ9J6n0Ug0JC0bsR09ktmpfFbgojqTtTCsimw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hnpwB10oFf10vvLPJDnp6Gz4aUoMbk4CIFL0k8EvYZokpj6RanPPBEqLaZIC9/IK1 3UkAYje3mnjX/6a1nS402vBdQNYaq8oZA9YpCN6kJlXUYqa4IgsANj9QNGyulWarqW ABCijlzf/EBtwJswRmx87W6hg9n0eItv4hDh5oU4Sw2UUPa2FHtCxWg2P3VB8e/HO9 APG1VktnX41csm8W3VnI6i0D/rrqeBl5gL3buKcDGREbIK4qRO0l61gzTAhoLMkyCI sUqp4YrKF35hDtyp8bbLpmNF5vcsGYjiK+rpp7ZOb0MfdsdFehO0MXGrLoB4XTQ9kZ 1SEudfD6TVJ0w== Received: from fedora.home (lfbn-tou-1-1147-231.w90-76.abo.wanadoo.fr [90.76.208.231]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: laeyraud) by bali.collaboradmins.com (Postfix) with ESMTPSA id 4B16717E0F75; Thu, 16 Jan 2025 15:26:41 +0100 (CET) From: Louis-Alexis Eyraud Date: Thu, 16 Jan 2025 15:25:58 +0100 Subject: [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC MIME-Version: 1.0 Message-Id: <20250116-mt8370-enable-gpu-v1-2-0a6b78e925c8@collabora.com> References: <20250116-mt8370-enable-gpu-v1-0-0a6b78e925c8@collabora.com> In-Reply-To: <20250116-mt8370-enable-gpu-v1-0-0a6b78e925c8@collabora.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Boris Brezillon , Steven Price Cc: kernel@collabora.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Louis-Alexis Eyraud X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737037598; l=1890; i=louisalexis.eyraud@collabora.com; s=20250113; h=from:subject:message-id; bh=D8xwpyjZ9J6n0Ug0JC0bsR09ktmpfFbgojqTtTCsimw=; b=envH7p+Ko8PBRZPwLmK+n7lslwoc9tRVDfNeh8MfNhxSq9NM8LDTJPC1M78qLRu/tXxGEjkYr 30TByGzgJdrByZ+ThSm+C3aKd/ovnZiAB9zjLt/YyrknCUuG2bGQvKi X-Developer-Key: i=louisalexis.eyraud@collabora.com; a=ed25519; pk=CHFBDB2Kqh4EHc6JIqFn69GhxJJAzc0Zr4e8QxtumuM= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This commit adds a compatible for the MediaTek MT8370 SoC, with an integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core), and adds platform data using the same supplies and the same power domain lists as MT8186 (one regulator, two power domains). Signed-off-by: Louis-Alexis Eyraud Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index 0f3935556ac761adcd80197d87e8e478df436fd5..1d51b64ed0f0660cc95263a289d5dad204540cfd 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -837,6 +837,15 @@ static const struct panfrost_compatible mediatek_mt8192_data = { .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF), }; +/* MT8370 uses the same power domains and power supplies as MT8186 */ +static const struct panfrost_compatible mediatek_mt8370_data = { + .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, + .supply_names = mediatek_mt8183_b_supplies, + .num_pm_domains = ARRAY_SIZE(mediatek_mt8186_pm_domains), + .pm_domain_names = mediatek_mt8186_pm_domains, + .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF), +}; + static const struct of_device_id dt_match[] = { /* Set first to probe before the generic compatibles */ { .compatible = "amlogic,meson-gxm-mali", @@ -859,6 +868,7 @@ static const struct of_device_id dt_match[] = { { .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data }, { .compatible = "mediatek,mt8188-mali", .data = &mediatek_mt8188_data }, { .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data }, + { .compatible = "mediatek,mt8370-mali", .data = &mediatek_mt8370_data }, {} }; MODULE_DEVICE_TABLE(of, dt_match);