From nobody Thu Nov 14 06:32:14 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 143E9C7EE32 for ; Tue, 28 Feb 2023 10:48:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231235AbjB1KsQ (ORCPT ); Tue, 28 Feb 2023 05:48:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230479AbjB1Kr5 (ORCPT ); Tue, 28 Feb 2023 05:47:57 -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 2135A2108; Tue, 28 Feb 2023 02:47:55 -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 6BDA96602FD5; Tue, 28 Feb 2023 10:47:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677581274; bh=WS/5GDWx9zfOrHB3JiHOO+tDSOb8JiL3fs15woWgU4M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hFiGqwIy0PW5EEBiCOUUhlRawMccNNZVVKNBuS2jqmVQkisdZSCiAw/FNWT0nfE14 23urU4jIHs8M5D739n8PlEArHUfAm2KIRtvD/rHiycwSKjzNmHkWYq0r0n7OlIMM2y NPa6H5/c6Bg+7k8Vfy/7iwQcfIeUBS+YxS91h28an+eYDiNvSvmIvvGBOrYOxvSm5u 6jHdz1r9ZKc/XOXYmJAKb/kXUcLz6YFHAVcfltEm2AeNzR1yvS3ZH8NGrdPU9I0CPO AeZAaWANoHuMB3VsKL3wtCNT7jyvtUcacSuAnjdIeth14V0U+3ilkvaxzPakmaIefj wFwKZm9CJy7jA== 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, Alyssa Rosenzweig , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= Subject: [PATCH v3 07/18] arm64: dts: mediatek: mt8192: Add GPU nodes Date: Tue, 28 Feb 2023 11:47:30 +0100 Message-Id: <20230228104741.717819-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228104741.717819-1-angelogioacchino.delregno@collabora.com> References: <20230228104741.717819-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alyssa Rosenzweig The MediaTek MT8192 includes a Mali-G57 GPU supported in Panfrost. Add the GPU node to the device tree to enable 3D acceleration. The GPU node is disabled by default. It should be enabled by board with its power supplies correctly assigned. Signed-off-by: Alyssa Rosenzweig [nfraprado: removed sram supply, tweaked opp node name, adjusted commit mes= sage] Signed-off-by: N=C3=ADcolas F. R. A. Prado [wenst@: disable GPU by default; adjusted prefix; split out board change] Signed-off-by: Chen-Yu Tsai [Angelo: cosmetic fixes] Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai --- arch/arm64/boot/dts/mediatek/mt8192.dtsi | 107 +++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts= /mediatek/mt8192.dtsi index 87b91c8feaf9..34631adc52c6 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi @@ -312,6 +312,91 @@ timer: timer { clock-frequency =3D <13000000>; }; =20 + gpu_opp_table: opp-table-0 { + compatible =3D "operating-points-v2"; + opp-shared; + + opp-358000000 { + opp-hz =3D /bits/ 64 <358000000>; + opp-microvolt =3D <606250>; + }; + + opp-399000000 { + opp-hz =3D /bits/ 64 <399000000>; + opp-microvolt =3D <618750>; + }; + + opp-440000000 { + opp-hz =3D /bits/ 64 <440000000>; + opp-microvolt =3D <631250>; + }; + + opp-482000000 { + opp-hz =3D /bits/ 64 <482000000>; + opp-microvolt =3D <643750>; + }; + + opp-523000000 { + opp-hz =3D /bits/ 64 <523000000>; + opp-microvolt =3D <656250>; + }; + + opp-564000000 { + opp-hz =3D /bits/ 64 <564000000>; + opp-microvolt =3D <668750>; + }; + + opp-605000000 { + opp-hz =3D /bits/ 64 <605000000>; + opp-microvolt =3D <681250>; + }; + + opp-647000000 { + opp-hz =3D /bits/ 64 <647000000>; + opp-microvolt =3D <693750>; + }; + + opp-688000000 { + opp-hz =3D /bits/ 64 <688000000>; + opp-microvolt =3D <706250>; + }; + + opp-724000000 { + opp-hz =3D /bits/ 64 <724000000>; + opp-microvolt =3D <725000>; + }; + + opp-748000000 { + opp-hz =3D /bits/ 64 <748000000>; + opp-microvolt =3D <737500>; + }; + + opp-772000000 { + opp-hz =3D /bits/ 64 <772000000>; + opp-microvolt =3D <750000>; + }; + + opp-795000000 { + opp-hz =3D /bits/ 64 <795000000>; + opp-microvolt =3D <762500>; + }; + + opp-819000000 { + opp-hz =3D /bits/ 64 <819000000>; + opp-microvolt =3D <775000>; + }; + + opp-843000000 { + opp-hz =3D /bits/ 64 <843000000>; + opp-microvolt =3D <787500>; + }; + + opp-866000000 { + opp-hz =3D /bits/ 64 <866000000>; + opp-microvolt =3D <800000>; + }; + }; + soc { #address-cells =3D <2>; #size-cells =3D <2>; @@ -1266,6 +1351,28 @@ mmc1: mmc@11f70000 { status =3D "disabled"; }; =20 + gpu: gpu@13000000 { + compatible =3D "mediatek,mt8192-mali", "arm,mali-valhall-jm"; + reg =3D <0 0x13000000 0 0x4000>; + interrupts =3D , + , + ; + interrupt-names =3D "job", "mmu", "gpu"; + + clocks =3D <&apmixedsys CLK_APMIXED_MFGPLL>; + + power-domains =3D <&spm MT8192_POWER_DOMAIN_MFG2>, + <&spm MT8192_POWER_DOMAIN_MFG3>, + <&spm MT8192_POWER_DOMAIN_MFG4>, + <&spm MT8192_POWER_DOMAIN_MFG5>, + <&spm MT8192_POWER_DOMAIN_MFG6>; + power-domain-names =3D "core0", "core1", "core2", "core3", "core4"; + + operating-points-v2 =3D <&gpu_opp_table>; + + status =3D "disabled"; + }; + mfgcfg: clock-controller@13fbf000 { compatible =3D "mediatek,mt8192-mfgcfg"; reg =3D <0 0x13fbf000 0 0x1000>; --=20 2.39.2