From patchwork Wed Mar 1 09:55:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 62820 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e54c:0:0:0:0:0 with SMTP id z12csp2257746wrm; Wed, 1 Mar 2023 01:56:57 -0800 (PST) X-Google-Smtp-Source: AK7set82JMJ3ADfjLao1B3hjHtVOTxwJWt+KsJd+yA70uj3qZ2bFN14y63IdyqQuPCxIJnpu02sc X-Received: by 2002:a17:90b:1642:b0:237:d2d7:56c3 with SMTP id il2-20020a17090b164200b00237d2d756c3mr6558303pjb.27.1677664616757; Wed, 01 Mar 2023 01:56:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677664616; cv=none; d=google.com; s=arc-20160816; b=aViBkfbC/rY7opYU4OFCug9CIlHg0rBO6rkZR1rjppgDoSJu6qU68FaKRI6AfvuaJf mlON1q1OXSMv1Qp7N9UarTaUJJ44eKaTzUdapEQB81WEZZjrfilmMOXNodfz0Pi+7zvU 2F7BZlGb7Ar8Lqp1k9MqtkhC54sVUlwFP9YhOEMeEZlPYPulWdx0UIcWXVhy0eqT6JZv 99jc/xuDHf0k7rgl3N4bIrUGaZsm+UyLcG4DN6IhsMzzMGw5UnjhmI1SPmUoCSXF4Efx ALVgBk3Pz33PsAVG37jEeEJD5InXGCSgWvJ/QO0/zcULZtfsoeAbcWgWMpp/uzy0OI7O VMiA== 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=XtjAfW7+Rlf+69wSa/p62xO+SabQsANF3Bai4Fyfo6Q=; b=SCBv49VO5iNhPYZLYlqrOGpBUiLIhb+dSYSwrwabrxCm72A4YyrCyq0cKManGg1/3N Ed6QNyzCIprSsu9+5pImAC8TUx1SDEkp39EYm15X8TPphbHXFGN1f9jBC2TdToTxMUkk 1AvfjB4tYFJzHJCw4AW6ypC1atvTj8suow58ujKfXNJwMmSrahvDEsLElviKvN07gVOn LYHq2TF2aTneDRTcV7NgLLCqLhhTQ7oAACoBR8JHVBYJfAL2uHib33vJiHFyRgQOOzlz NVsJKA4rfWxNc4Tq11Y0VVOD19qw0PalX/rkKuFPHzPmt2uWlI5db+JV/7VTu5pymXeb DO5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QylmoMJ1; 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 ds12-20020a17090b08cc00b0022c8ba1bd77si15430442pjb.174.2023.03.01.01.56.44; Wed, 01 Mar 2023 01:56:56 -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=QylmoMJ1; 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 S229968AbjCAJz6 (ORCPT + 99 others); Wed, 1 Mar 2023 04:55:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229887AbjCAJzi (ORCPT ); Wed, 1 Mar 2023 04:55:38 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E602B23C60; Wed, 1 Mar 2023 01:55:36 -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 5AE7A6602136; Wed, 1 Mar 2023 09:55:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677664533; bh=WS/5GDWx9zfOrHB3JiHOO+tDSOb8JiL3fs15woWgU4M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QylmoMJ1GQotalrfRakBbOuQdDCgme16Wj0YeUN7rCOpBwlAE/GkXCy6rhJ95vxxJ K9Y+A2HujYoMjArvR2Y9f87xlbyEFKDHprhYMdgUuGcRZPUi3cHyHq2pdBXnJGkVOD Bp9rPdvtxaHj5WHlUkVQNGyOfBq/sbVDBpTkflqErAO6Qq9AO80+fnBH7JlVH3OLs5 49xU0pI90eVAWOT10lOQxM4H24YaPYwQdjP8LSy1B5B46nGoXqa+zx2OoXugewsJWz eW20diFbmoyh/+T4pQbQGA7Cr8U1up2M5w3G/OxbxUQm/cYkngQFBGoYwALVJkRXLx +Xf3JklBNNoHA== 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?= =?utf-8?q?_F_=2E_R_=2E_A_=2E_Prado?= Subject: [PATCH v4 07/19] arm64: dts: mediatek: mt8192: Add GPU nodes Date: Wed, 1 Mar 2023 10:55:11 +0100 Message-Id: <20230301095523.428461-8-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?1759158853035714621?= X-GMAIL-MSGID: =?utf-8?q?1759158853035714621?= 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 message] Signed-off-by: NĂ­colas 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 = <13000000>; }; + gpu_opp_table: opp-table-0 { + compatible = "operating-points-v2"; + opp-shared; + + opp-358000000 { + opp-hz = /bits/ 64 <358000000>; + opp-microvolt = <606250>; + }; + + opp-399000000 { + opp-hz = /bits/ 64 <399000000>; + opp-microvolt = <618750>; + }; + + opp-440000000 { + opp-hz = /bits/ 64 <440000000>; + opp-microvolt = <631250>; + }; + + opp-482000000 { + opp-hz = /bits/ 64 <482000000>; + opp-microvolt = <643750>; + }; + + opp-523000000 { + opp-hz = /bits/ 64 <523000000>; + opp-microvolt = <656250>; + }; + + opp-564000000 { + opp-hz = /bits/ 64 <564000000>; + opp-microvolt = <668750>; + }; + + opp-605000000 { + opp-hz = /bits/ 64 <605000000>; + opp-microvolt = <681250>; + }; + + opp-647000000 { + opp-hz = /bits/ 64 <647000000>; + opp-microvolt = <693750>; + }; + + opp-688000000 { + opp-hz = /bits/ 64 <688000000>; + opp-microvolt = <706250>; + }; + + opp-724000000 { + opp-hz = /bits/ 64 <724000000>; + opp-microvolt = <725000>; + }; + + opp-748000000 { + opp-hz = /bits/ 64 <748000000>; + opp-microvolt = <737500>; + }; + + opp-772000000 { + opp-hz = /bits/ 64 <772000000>; + opp-microvolt = <750000>; + }; + + opp-795000000 { + opp-hz = /bits/ 64 <795000000>; + opp-microvolt = <762500>; + }; + + opp-819000000 { + opp-hz = /bits/ 64 <819000000>; + opp-microvolt = <775000>; + }; + + opp-843000000 { + opp-hz = /bits/ 64 <843000000>; + opp-microvolt = <787500>; + }; + + opp-866000000 { + opp-hz = /bits/ 64 <866000000>; + opp-microvolt = <800000>; + }; + }; + soc { #address-cells = <2>; #size-cells = <2>; @@ -1266,6 +1351,28 @@ mmc1: mmc@11f70000 { status = "disabled"; }; + gpu: gpu@13000000 { + compatible = "mediatek,mt8192-mali", "arm,mali-valhall-jm"; + reg = <0 0x13000000 0 0x4000>; + interrupts = , + , + ; + interrupt-names = "job", "mmu", "gpu"; + + clocks = <&apmixedsys CLK_APMIXED_MFGPLL>; + + power-domains = <&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 = "core0", "core1", "core2", "core3", "core4"; + + operating-points-v2 = <&gpu_opp_table>; + + status = "disabled"; + }; + mfgcfg: clock-controller@13fbf000 { compatible = "mediatek,mt8192-mfgcfg"; reg = <0 0x13fbf000 0 0x1000>;