From patchwork Wed Mar 1 09:55:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 62823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3539749wrd; Wed, 1 Mar 2023 01:57:22 -0800 (PST) X-Google-Smtp-Source: AK7set8XzwSp9qsivPkKzla1UvwYFWAliJ6mIrlP7CLUa8NnEvH9ya+Q8e8qjSx09P8ZL3FO4t4B X-Received: by 2002:a17:903:1104:b0:19c:be57:9c82 with SMTP id n4-20020a170903110400b0019cbe579c82mr6644549plh.65.1677664642257; Wed, 01 Mar 2023 01:57:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677664642; cv=none; d=google.com; s=arc-20160816; b=PKECQQ8fEpHenuYySBxcRw8RewpFX1uhnm14GX90G179vtLQIvKlvCOGbukR4a+vgU vp0EuN/3uZHxKj7KP+nc2aGMxGssoE2zvPtYORt+6RKA8nI+Lwc/sEcxtKieAY+u8sKI SL+FfTmlKSDp93tLfHRD6TytmJbKZ8TvFEGPUdcn4tmhz366P8n8EMlZXUZeNxWXIL9B BGEgbleDCnvI+D7fzHDei1EkCuzPRdqFkleO0oHtSDKBcG2mbQFyQAKJ0lQEp2Ykwnnu gzmA0JQD1qpmowje7Ca/HHItWew4y30PHC8yioLZM7nPPSCAXka7ey0pOrGrlFz4jWN5 xv6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IHUnpS+jgII8NH6CUZkk0oqQjLbd64MUZcAKoSVnw24=; b=B+yfavEIQucm562DNsO1zSQsliM4P5ifDkgMVkIPkirMy4gAyZQB9py2Q8bLF3ug1c h0pa1TXhFbAfYUIkLBQ/9IuzoKXLO3droeK5fWVBsrc+FKj0y1OKYZAIMzp52kerVq+Y innusOgk2fmOzXloIB/Hn6bXAaNg3kmWp/wkMP4qntRCuG4/dRI1yvDb2wVgA2gYpuok F3vzEOBnjZmSOX5zcVbXQral5m+aZslTcCjBpisCH83d3Qs7Zq8YqF55obIbpGECd9Gh NUxfyanQbulx79R6XcGHunPjikY6Ds8bxw6iRSFiVJ7oI6jG1IJFqECli/Peis1xgZBd zOzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=gID9mgNd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kz6-20020a170902f9c600b0019911e762c1si11855431plb.212.2023.03.01.01.57.07; Wed, 01 Mar 2023 01:57:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=gID9mgNd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230023AbjCAJ40 (ORCPT + 99 others); Wed, 1 Mar 2023 04:56:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229920AbjCAJzq (ORCPT ); Wed, 1 Mar 2023 04:55:46 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 371953B659; Wed, 1 Mar 2023 01:55:41 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (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: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id E572C6602123; Wed, 1 Mar 2023 09:55:38 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677664539; bh=smKRDmDdu68lnpbPgqG4z/RTkzBSVrXMEAsrpvTEOiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gID9mgNdEM8lIoCqtjh1fLYHHiIebSoOFt1AYUFgrvvtr27rHTIM6Q13H42Rq7Q1q 2D3XkgV8TC3CTYEQer9Wu8zUeuSU7NlgDAhgIniKqa+8Ee9pU2GTt4jbjc7YtTVCSK H1AHjbkwDQn2N3+TUoYFk5SAqLHnhSqwX4/1OJuZ3/tjJZb7SRbl+DpTHzwcnBZ29u oEB9rKwxpZLpjQ4fRGjGhJhEc9Y6e9oAxro1xv26mpimd/P+2noAIsq69H//cVPKIm TyyKMnB44IL0qhsVlFWEfpSA7hQJnC/un7eTVFz7OqhGbbyqK1+uYkb1IkDUtEuQk/ TGw/bgmJ4H9lA== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, angelogioacchino.delregno@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wenst@chromium.org Subject: [PATCH v4 15/19] arm64: dts: mt8195: Add panfrost node for Mali-G57 Valhall Natt GPU Date: Wed, 1 Mar 2023 10:55:19 +0100 Message-Id: <20230301095523.428461-16-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230301095523.428461-1-angelogioacchino.delregno@collabora.com> References: <20230301095523.428461-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759158880068943311?= X-GMAIL-MSGID: =?utf-8?q?1759158880068943311?= Add GPU support through panfrost for the Mali-G57 GPU on MT8195 with its OPP table but keep it in disabled state. This is expected to be enabled only on boards which make use of the GPU. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 90 ++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index d116830d6af3..0e4ee7713c30 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -333,6 +333,76 @@ performance: performance-controller@11bc10 { #performance-domain-cells = <1>; }; + gpu_opp_table: opp-table-gpu { + compatible = "operating-points-v2"; + opp-shared; + + opp-390000000 { + opp-hz = /bits/ 64 <390000000>; + opp-microvolt = <625000>; + }; + opp-410000000 { + opp-hz = /bits/ 64 <410000000>; + opp-microvolt = <631250>; + }; + opp-431000000 { + opp-hz = /bits/ 64 <431000000>; + opp-microvolt = <631250>; + }; + opp-473000000 { + opp-hz = /bits/ 64 <473000000>; + opp-microvolt = <637500>; + }; + opp-515000000 { + opp-hz = /bits/ 64 <515000000>; + opp-microvolt = <637500>; + }; + opp-556000000 { + opp-hz = /bits/ 64 <556000000>; + opp-microvolt = <643750>; + }; + opp-598000000 { + opp-hz = /bits/ 64 <598000000>; + opp-microvolt = <650000>; + }; + opp-640000000 { + opp-hz = /bits/ 64 <640000000>; + opp-microvolt = <650000>; + }; + opp-670000000 { + opp-hz = /bits/ 64 <670000000>; + opp-microvolt = <662500>; + }; + opp-700000000 { + opp-hz = /bits/ 64 <700000000>; + opp-microvolt = <675000>; + }; + opp-730000000 { + opp-hz = /bits/ 64 <730000000>; + opp-microvolt = <687500>; + }; + opp-760000000 { + opp-hz = /bits/ 64 <760000000>; + opp-microvolt = <700000>; + }; + opp-790000000 { + opp-hz = /bits/ 64 <790000000>; + opp-microvolt = <712500>; + }; + opp-820000000 { + opp-hz = /bits/ 64 <820000000>; + opp-microvolt = <725000>; + }; + opp-850000000 { + opp-hz = /bits/ 64 <850000000>; + opp-microvolt = <737500>; + }; + opp-880000000 { + opp-hz = /bits/ 64 <880000000>; + opp-microvolt = <750000>; + }; + }; + pmu-a55 { compatible = "arm,cortex-a55-pmu"; interrupt-parent = <&gic>; @@ -1790,6 +1860,26 @@ ufsphy: ufs-phy@11fa0000 { status = "disabled"; }; + gpu: gpu@13000000 { + compatible = "mediatek,mt8195-mali", "mediatek,mt8192-mali", + "arm,mali-valhall-jm"; + reg = <0 0x13000000 0 0x4000>; + + clocks = <&mfgcfg CLK_MFG_BG3D>; + interrupts = , + , + ; + interrupt-names = "job", "mmu", "gpu"; + operating-points-v2 = <&gpu_opp_table>; + power-domains = <&spm MT8195_POWER_DOMAIN_MFG2>, + <&spm MT8195_POWER_DOMAIN_MFG3>, + <&spm MT8195_POWER_DOMAIN_MFG4>, + <&spm MT8195_POWER_DOMAIN_MFG5>, + <&spm MT8195_POWER_DOMAIN_MFG6>; + power-domain-names = "core0", "core1", "core2", "core3", "core4"; + status = "disabled"; + }; + mfgcfg: clock-controller@13fbf000 { compatible = "mediatek,mt8195-mfgcfg"; reg = <0 0x13fbf000 0 0x1000>;