From nobody Thu Nov 14 07:06:04 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 CA22EC636CC for ; Wed, 8 Feb 2023 10:37:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231519AbjBHKhe (ORCPT ); Wed, 8 Feb 2023 05:37:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230108AbjBHKh3 (ORCPT ); Wed, 8 Feb 2023 05:37:29 -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 780AA4740E; Wed, 8 Feb 2023 02:37:27 -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 7C5F56602091; Wed, 8 Feb 2023 10:37:25 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852646; bh=9zKNAYGAIzYijQZ5yFYs1JqVdC6zxa+UlfAq3E44SFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7QoFPGpxVSP+tQKfGWuOebcnt6Sd7l0HgiIDDgqcEbc6Z9X2oX2CngfDWRQqfjL2 ttioKTdt5/tFqh19H6ZXV0irIqDpptMKjbJ6h2vKMVAYWmu1lp57CqO6i6QO4vr/+/ 8ZITo3NG4Tu6PgU5CSyyGPkyNHVnS0c98xBydU5cCbfBfuqnS1mYh9ynOP2Lfr/DpG DKWE5uTekG4YZIj4ym4iTzTPkIxwgLcidjyXfjVkwOhkLDWihddzEfsmBUWOP0Cl5r iBTlQjk8u9Ie8TEN0zfTiYHOH2Tlg6ErACv7GNRDCqYCkGZcGi4WcmsmSMj+dEh3mo hIVb/qvf5QvDQ== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, 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, AngeloGioacchino Del Regno Subject: [PATCH 1/9] dt-bindings: gpu: mali-bifrost: Don't allow sram-supply by default Date: Wed, 8 Feb 2023 11:37:01 +0100 Message-Id: <20230208103709.116896-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The sram-supply is MediaTek-specific, it is and will ever be used only for the mediatek,mt8183-mali compatible due to the addition of the mediatek-regulator-coupler driver: change the binding to add this supply when mediatek,mt8183-mali is present as a compatible instead of disabling it when not present. This is done in preparation for adding new bindings for other MediaTek SoCs, such as MT8192 and others. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Tested-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 78964c140b46..69212f3b1328 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -57,8 +57,6 @@ properties: =20 mali-supply: true =20 - sram-supply: true - operating-points-v2: true =20 power-domains: @@ -157,6 +155,7 @@ allOf: - const: core0 - const: core1 - const: core2 + sram-supply: true =20 required: - sram-supply @@ -166,7 +165,6 @@ allOf: properties: power-domains: maxItems: 1 - sram-supply: false - if: properties: compatible: --=20 2.39.1 From nobody Thu Nov 14 07:06:04 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 7E77FC05027 for ; Wed, 8 Feb 2023 10:37:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231544AbjBHKhg (ORCPT ); Wed, 8 Feb 2023 05:37:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbjBHKha (ORCPT ); Wed, 8 Feb 2023 05:37:30 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F9AF47430; Wed, 8 Feb 2023 02:37:28 -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 619EE6602096; Wed, 8 Feb 2023 10:37:26 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852647; bh=c4XKOxPhUZU76+HjvxTFR5jXrHZr0pBaargwTPOI/Ss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b2o9AxfFJM6QmX5gwpY5DMnWxdAumOp5mbUr7Q7fvp4LtZcJo7ZeSLuv3mLd+C4s+ EhMyG5FTLJ0P/FzFbX4poNJLZ+aY9NKBZMrJOHw75Q7x8XCivHX5+i80gyBugOvUCo q1TfBGxcCMw7gD1XY0KVA8cMaPloi4d/EbUrZt6Bh3f+ggW1Bc9fsbug+FUAKJ+gCB ygg8qpkprBgyPpuNvYgm4G1uoc6IdlR8QM6iPieOjQNsI7bGHCenL8FzdfKbEtcyph lvwJ6MJthlfGqmtCrwpJraxp/g2qqQytxAD8GYFwj5KwMCyJQocKzv1kehB9ReTsrf AP5SAdEdzR9oA== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, 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, AngeloGioacchino Del Regno Subject: [PATCH 2/9] dt-bindings: gpu: mali-bifrost: Allow up to 5 power domains for MT8192 Date: Wed, 8 Feb 2023 11:37:02 +0100 Message-Id: <20230208103709.116896-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" MediaTek MT8192 (and similar) needs five power domains for the Mali GPU and no sram-supply: change the binding to allow so. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Steven Price Tested-by: Chen-Yu Tsai --- .../bindings/gpu/arm,mali-bifrost.yaml | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 69212f3b1328..e7aba66ddb8f 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -61,7 +61,7 @@ properties: =20 power-domains: minItems: 1 - maxItems: 3 + maxItems: 5 =20 resets: minItems: 1 @@ -141,6 +141,18 @@ allOf: - power-domains - resets - reset-names + - if: + not: + properties: + compatible: + contains: + enum: + - mediatek,mt8183-mali + - mediatek,mt8192-mali + then: + properties: + power-domains: + maxItems: 1 - if: properties: compatible: @@ -161,10 +173,26 @@ allOf: - sram-supply - power-domains - power-domain-names - else: + - if: + properties: + compatible: + contains: + const: mediatek,mt8192-mali + then: properties: power-domains: - maxItems: 1 + minItems: 5 + power-domain-names: + items: + - const: core0 + - const: core1 + - const: core2 + - const: core3 + - const: core4 + + required: + - power-domains + - power-domain-names - if: properties: compatible: --=20 2.39.1 From nobody Thu Nov 14 07:06:04 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 C50E2C636D3 for ; Wed, 8 Feb 2023 10:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbjBHKhk (ORCPT ); Wed, 8 Feb 2023 05:37:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231417AbjBHKhb (ORCPT ); Wed, 8 Feb 2023 05:37:31 -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 5F1D3470B6; Wed, 8 Feb 2023 02:37:29 -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 47D4F6602099; Wed, 8 Feb 2023 10:37:27 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852648; bh=gm5F2sSwiOtYTPOlUBqXjRr6lOwCrY+tYUuQg0DBVn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PcA1w0qQ58/z+R8lt9CK1ZTIss+J8CHl2DVcujZANu6edJog53Dc4+v3S9f9ktT0H JBCRojfUPmvBkufTRYWbS8IwDw4hDvL/ppm58837d1XzQ+Vn7wBoa6hDT6hzACim0x eRgWZ4K9OAPUxs/y1mZu1JQ8cZYg9SSYMmV9s+NgDo0YPheAr6hWgF1ncO4xjjIqNn WajBk1GnhU4MiSil1bv+ddv6uttyV3E2ifS+PwMyZQoPaeYiPNZCRIsoZ2gHXxyrbq 12Wz0CroCjIoXgdyz1Hv+EA3/CmFls5ZAItilsNG5KXokAGZ1mh62uV133Kjx2TVSl f3zSnQvFQLgxQ== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, 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, AngeloGioacchino Del Regno Subject: [PATCH 3/9] dt-bindings: gpu: mali-bifrost: Add compatible for MT8195 SoC Date: Wed, 8 Feb 2023 11:37:03 +0100 Message-Id: <20230208103709.116896-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The MediaTek MT8195 SoC has a Mali G57 MC5 (Valhall-JM) and has the same number of power domains and requirements as MT8192 in terms of bindings. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Steven Price Tested-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index e7aba66ddb8f..6bd0a5b3c5b7 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -25,6 +25,11 @@ properties: - rockchip,px30-mali - rockchip,rk3568-mali - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is f= ully discoverable + - items: + - enum: + - mediatek,mt8195-mali + - const: mediatek,mt8192-mali + - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision i= s fully discoverable - items: - enum: - mediatek,mt8192-mali --=20 2.39.1 From nobody Thu Nov 14 07:06:04 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 CF770C05027 for ; Wed, 8 Feb 2023 10:37:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231494AbjBHKhn (ORCPT ); Wed, 8 Feb 2023 05:37:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230392AbjBHKhc (ORCPT ); Wed, 8 Feb 2023 05:37:32 -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 6358146179; Wed, 8 Feb 2023 02:37:30 -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 2EE74660209A; Wed, 8 Feb 2023 10:37:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852648; bh=d0G1BjjpzFctDZyjviGuYyWcI6wqWF1+NmTwUM5ryBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HMnBmVeQqM3mZa3JMdwTPCM9maPHuXoBCaIDUWShbjzXpN0eA48WHjqmpYxa7aaMe D0wGrLRwK3QCtWax+iZlRy5r99p3fpTLjRr3x0QGimaQwOmaN0n87rmvJNdf9ZRfSo 0yV8I1/f8M2Pos7NY56XFij//aZNqD+xCBOoaWlGHaljDKiE+hDXYxaf07DStwoqlR 6NNJqxJDMFgUWthCvBVtpLceUN9UePv0G1qWBFtutMLDqFaQq/LMMofUnW84uvNdGP DKMk4mjsdru1dalbYNUnauvsRFyAXt7rvkhCqzQWwBjV38NUkvplKzpt7ras7QWZ9D 8qhv9z8+fKybQ== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, 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, AngeloGioacchino Del Regno Subject: [PATCH 4/9] dt-bindings: gpu: mali-bifrost: Add new MT8183 compatible Date: Wed, 8 Feb 2023 11:37:04 +0100 Message-Id: <20230208103709.116896-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Since new platform data was required in Panfrost for getting GPU DVFS finally working on MediaTek SoCs, add a new "mediatek,mt8183b-mali" compatible. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Steven Price Tested-by: Chen-Yu Tsai --- .../bindings/gpu/arm,mali-bifrost.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 6bd0a5b3c5b7..8c57b89ee866 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -19,6 +19,7 @@ properties: - enum: - amlogic,meson-g12a-mali - mediatek,mt8183-mali + - mediatek,mt8183b-mali - realtek,rtd1619-mali - renesas,r9a07g044-mali - renesas,r9a07g054-mali @@ -153,6 +154,7 @@ allOf: contains: enum: - mediatek,mt8183-mali + - mediatek,mt8183b-mali - mediatek,mt8192-mali then: properties: @@ -178,6 +180,24 @@ allOf: - sram-supply - power-domains - power-domain-names + - if: + properties: + compatible: + contains: + const: mediatek,mt8183b-mali + then: + properties: + power-domains: + minItems: 3 + power-domain-names: + items: + - const: core0 + - const: core1 + - const: core2 + + required: + - power-domains + - power-domain-names - if: properties: compatible: --=20 2.39.1 From nobody Thu Nov 14 07:06:04 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 8274DC6379F for ; Wed, 8 Feb 2023 10:37:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231307AbjBHKhu (ORCPT ); Wed, 8 Feb 2023 05:37:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231515AbjBHKhd (ORCPT ); Wed, 8 Feb 2023 05:37:33 -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 F328B4741A; Wed, 8 Feb 2023 02:37:30 -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 16FD3660209C; Wed, 8 Feb 2023 10:37:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852649; bh=NHwI9wz8c2rm9f8C+YQk4IHldiJVGMy9bByas6AgTLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NPOzPn5DJLfXV7xK7LvRnHr+UPZ1vZHuttiqK7hW4ilQgrER8UKEPM5tuE+ceqxH8 lWuTDfdPzaALUnr0PwA6ikpN9mIAkoCYBMqkR8TxtG686lsu6sjBG1OB8jcxJJ01rx IjpU1IhF/rx1pnvcb1J+kJ8pqzmyRwP17EPybH1CN3nct2hRsPE/25driR3IXo0PNN NIVL7vMOnfrafgfguiH1mVeFNRFVjm6JHsmflVuC5Lj8BkfuFz8ph/TWmgAAy8i+X1 t7ppyaLizEvTOeVubFipnVGZZ6GlrhI9QUp/l+fBfxfU0okzwtAN+Idc3Go1WXDle9 6dZIfQktps8Ow== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, 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, AngeloGioacchino Del Regno Subject: [PATCH 5/9] dt-bindings: gpu: mali-bifrost: Add a compatible for MediaTek MT8186 Date: Wed, 8 Feb 2023 11:37:05 +0100 Message-Id: <20230208103709.116896-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Get GPU support on MT8186 by adding its compatible. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Tested-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 8c57b89ee866..85111559dfe0 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -15,6 +15,11 @@ properties: =20 compatible: oneOf: + - items: + - enum: + - mediatek,mt8186-mali + - const: mediatek,mt8183b-mali + - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is f= ully discoverable - items: - enum: - amlogic,meson-g12a-mali --=20 2.39.1 From nobody Thu Nov 14 07:06:04 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 0B72DC05027 for ; Wed, 8 Feb 2023 10:37:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231500AbjBHKhw (ORCPT ); Wed, 8 Feb 2023 05:37:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231530AbjBHKhe (ORCPT ); Wed, 8 Feb 2023 05:37:34 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1B43474C4; Wed, 8 Feb 2023 02:37:31 -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 F29AB6600362; Wed, 8 Feb 2023 10:37:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852650; bh=TVLY2L+iZ2tOkGaynl/eW0t9KWfRLxnjRTuTvMUlR9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DOF7DQKNlIx3DGDjusmsvqeIWQ4+zhnIynQ30pUL1pkwfdJI89U48pie4nUFO4GPR CwyqoL12zay29aDkxWhrAoFIQBhLw4Zz1J0HQ23nUlfRuTdH76apCqb5JtQe+zSuUJ iG3A4x8TRdAaWrS8IraO/6MWTTSz10KyMUSlddNViACkcI5A1eW4E+acudNZcoB5ea uTc0Rujx+MxqzPnqMMcSQU6QCUOAS+DDiZtqRfKdnrCaOc5B0Lf+31SmOpHvWVF9wv v4RI9X+dMjRXmziJrtlK7DDvziKDtiMR7VokYatVoOdFd5U63TzejumENi6pFk3LWA MTn81FLJ/bxOw== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, 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, AngeloGioacchino Del Regno Subject: [PATCH 6/9] drm/panfrost: Increase MAX_PM_DOMAINS to 5 Date: Wed, 8 Feb 2023 11:37:06 +0100 Message-Id: <20230208103709.116896-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alyssa Rosenzweig Increase the MAX_PM_DOMAINS constant from 3 to 5, to support the extra power domains required by the Mali-G57 on the MT8192. Signed-off-by: Alyssa Rosenzweig Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Tested-by: Chen-Yu Tsai --- drivers/gpu/drm/panfrost/panfrost_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/p= anfrost/panfrost_device.h index d9ba68cffb77..b0126b9fbadc 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.h +++ b/drivers/gpu/drm/panfrost/panfrost_device.h @@ -23,7 +23,7 @@ struct panfrost_job; struct panfrost_perfcnt; =20 #define NUM_JOB_SLOTS 3 -#define MAX_PM_DOMAINS 3 +#define MAX_PM_DOMAINS 5 =20 struct panfrost_features { u16 id; --=20 2.39.1 From nobody Thu Nov 14 07:06:04 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 C1520C636CC for ; Wed, 8 Feb 2023 10:37:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231588AbjBHKhy (ORCPT ); Wed, 8 Feb 2023 05:37:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231552AbjBHKhi (ORCPT ); Wed, 8 Feb 2023 05:37:38 -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 D7C74474D3; Wed, 8 Feb 2023 02:37:32 -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 DAD6E6602091; Wed, 8 Feb 2023 10:37:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852651; bh=2pa0jFRatcXMZ9SnaIXUtFWvuVZm0Clr55bqDu2qpDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VpkWOXIGyP9vosdNbC4o+VzOZQgIPd0IMHDDiDb6HoXAtn48eT7pQhg7LHKJ3OYPd NqLjqw1PCw14weP0jrt5K/9cwIB2nKVtoYx0+t1KlA3LVfzcnz4P53OC/Ud2b3lcEm FetNWbRbu29E7KDL0YkEN4w9vbaQm2HjcKmth3zuF1oUsOt5npxcVo/cah+iPdE041 ZhQJ12wIQ2wGyBhAaYMfKzb6ak8V6kGaOs+HNEOUh3fh4wDZ9Lk680IVxQiXeRhk5W 8flOvLKXuYzyxUsXNrqbmTvAjTB2cJU6wpHqnZl2jYz1VgHYZw3lJO09Uc86ToKjUI gPKGCQhsWpFoQ== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, 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, AngeloGioacchino Del Regno Subject: [PATCH 7/9] drm/panfrost: Add the MT8192 GPU ID Date: Wed, 8 Feb 2023 11:37:07 +0100 Message-Id: <20230208103709.116896-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alyssa Rosenzweig MediaTek MT8192 has a Mali-G57 with a special GPU ID. Add its GPU ID, but treat it as otherwise identical to a standard Mali-G57. We do _not_ fix up the GPU ID here -- userspace needs to be aware of the special GPU ID, in case we find functional differences between MediaTek's implementation and the standard Mali-G57 down the line. Signed-off-by: Alyssa Rosenzweig Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Tested-by: Chen-Yu Tsai --- drivers/gpu/drm/panfrost/panfrost_gpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panf= rost/panfrost_gpu.c index 6452e4e900dd..d28b99732dde 100644 --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c @@ -204,6 +204,14 @@ static const struct panfrost_model gpu_models[] =3D { =20 GPU_MODEL(g57, 0x9001, GPU_REV(g57, 0, 0)), + + /* MediaTek MT8192 has a Mali-G57 with a different GPU ID from the + * standard. Arm's driver does not appear to handle this model. + * ChromeOS has a hack downstream for it. Treat it as equivalent to + * standard Mali-G57 for now. + */ + GPU_MODEL(g57, 0x9003, + GPU_REV(g57, 0, 0)), }; =20 static void panfrost_gpu_init_features(struct panfrost_device *pfdev) --=20 2.39.1 From nobody Thu Nov 14 07:06:04 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 D15D1C636CC for ; Wed, 8 Feb 2023 10:37:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231523AbjBHKh5 (ORCPT ); Wed, 8 Feb 2023 05:37:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231586AbjBHKhm (ORCPT ); Wed, 8 Feb 2023 05:37:42 -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 ADF4D47EC7; Wed, 8 Feb 2023 02:37:33 -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 B91B96602096; Wed, 8 Feb 2023 10:37:31 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852652; bh=LMwqpEoSTBoag1iPNbLWuJ7k3BNQAL+D9DLjE7DnY9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cfCFb6dE/tVp+UCzTu0P7PveAPy3W365WlwuAqZ9TGV+jT1tt7LsqhLAx20mFF4uk OHFJhvmFLqBtIeMGsaRDS7wFRaJUOrNdHkKsnR2zYW+QLFlHTwtGMZGhSgbroTouon aFEThvfjhIUh002uNwUDhdEJVwIhnIOwCbrEN8CEl4qch5Se0jZK7mGgEjctPAbVQn zY9vRJuIYusMAp6Cozze/Cc/OqbC8G/zBBnQGyDWM+fASe9rH+DHc0XXpCfBMtGJln fB5AeySmDcjR2WENSv4FOSLOv6WBjlNm44DsTNC/NRhAik6cbIAfrBnohc4WaiUjbg rq3mTg8ONrJnw== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, 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, AngeloGioacchino Del Regno Subject: [PATCH 8/9] drm/panfrost: Add mediatek,mt8192-mali compatible Date: Wed, 8 Feb 2023 11:37:08 +0100 Message-Id: <20230208103709.116896-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alyssa Rosenzweig Required for Mali-G57 on the Mediatek MT8192 and MT8195, which uses even more power domains than the MT8183 before it. Signed-off-by: Alyssa Rosenzweig [Angelo: Removed unneeded "sram" supply, added mt8195 to commit description] Co-developed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Tested-by: Chen-Yu Tsai --- drivers/gpu/drm/panfrost/panfrost_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panf= rost/panfrost_drv.c index abb0dadd8f63..5d25e77e1037 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -663,6 +663,16 @@ static const struct panfrost_compatible mediatek_mt818= 3_data =3D { .pm_domain_names =3D mediatek_mt8183_pm_domains, }; =20 +static const char * const mediatek_mt8192_supplies[] =3D { "mali", NULL }; +static const char * const mediatek_mt8192_pm_domains[] =3D { "core0", "cor= e1", "core2", + "core3", "core4" }; +static const struct panfrost_compatible mediatek_mt8192_data =3D { + .num_supplies =3D ARRAY_SIZE(mediatek_mt8192_supplies) - 1, + .supply_names =3D mediatek_mt8192_supplies, + .num_pm_domains =3D ARRAY_SIZE(mediatek_mt8192_pm_domains), + .pm_domain_names =3D mediatek_mt8192_pm_domains, +}; + static const struct of_device_id dt_match[] =3D { /* Set first to probe before the generic compatibles */ { .compatible =3D "amlogic,meson-gxm-mali", @@ -681,6 +691,7 @@ static const struct of_device_id dt_match[] =3D { { .compatible =3D "arm,mali-bifrost", .data =3D &default_data, }, { .compatible =3D "arm,mali-valhall-jm", .data =3D &default_data, }, { .compatible =3D "mediatek,mt8183-mali", .data =3D &mediatek_mt8183_data= }, + { .compatible =3D "mediatek,mt8192-mali", .data =3D &mediatek_mt8192_data= }, {} }; MODULE_DEVICE_TABLE(of, dt_match); --=20 2.39.1 From nobody Thu Nov 14 07:06:04 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 EE17CC05027 for ; Wed, 8 Feb 2023 10:38:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbjBHKiA (ORCPT ); Wed, 8 Feb 2023 05:38:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231589AbjBHKhs (ORCPT ); Wed, 8 Feb 2023 05:37:48 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80BDA1206A; Wed, 8 Feb 2023 02:37:34 -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 9F71A660209D; Wed, 8 Feb 2023 10:37:32 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852653; bh=q67l6huNz6BOkkKA1cnX0CAnLFXPlSrwL9Q000QH1Ig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m0kZfEfI5WeuqtCvZPkgFg1ubv2kuTxppzd0P2D36SxeI3CRiPZSowKiJbtTwkzhs OaRLAHrFj7CHofTz6oWdZGwduxkSxC/c9Z6Kk0H2HwptSmHAlhQ6qYymiYHWt+YUO4 oWteS3if3HIc3/sa4SJkvHRakxqd01DCTkigL7ld9ft5rQ7gSNvQLHnHFOQRZRLwfr 1CTJgMT+7AzMPhOzzMZsQhDTbIHSxzjSWmtWraG2GYD6Nn8uBNrVui6TLns51QchEm xBgdPs0cMEQno20sygWAfXFn8lmtt4iL6Y7TzkStQ3HOICS6u7UNDhsC0JKvdQs9dy qovg2VcCIIm5A== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, 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, AngeloGioacchino Del Regno Subject: [PATCH 9/9] drm/panfrost: Add new compatible for Mali on the MT8183 SoC Date: Wed, 8 Feb 2023 11:37:09 +0100 Message-Id: <20230208103709.116896-10-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The "mediatek,mt8183-mali" compatible uses platform data that calls for getting (and managing) two regulators ("mali" and "sram") but devfreq does not support this usecase, resulting in DVFS not working. Since a lot of MediaTek SoCs need to set the voltages for the GPU SRAM regulator in a specific relation to the GPU VCORE regulator, a MediaTek SoC specific driver was introduced to automatically satisfy, through coupling, these constraints: this means that there is at all no need to manage both regulators in panfrost but to otherwise just manage the main "mali" (-> gpu vcore) regulator instead. Keeping in mind that we cannot break the ABI, the most sensible route (avoiding hacks and uselessly overcomplicated code) to get a MT8183 node with one power supply was to add a new "mediatek,mt8183b-mali" compatible, which effectively deprecates the former. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Tested-by: Chen-Yu Tsai --- drivers/gpu/drm/panfrost/panfrost_drv.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panf= rost/panfrost_drv.c index 5d25e77e1037..14cdeaeeb5c4 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -654,6 +654,14 @@ static const struct panfrost_compatible amlogic_data = =3D { .vendor_quirk =3D panfrost_gpu_amlogic_quirk, }; =20 +/* + * The old data with two power supplies for MT8183 is here only to + * keep retro-compatibility with older devicetrees, as DVFS will + * not work with this one. + * + * On new devicetrees please use the _b variant with a single and + * coupled regulators instead. + */ static const char * const mediatek_mt8183_supplies[] =3D { "mali", "sram",= NULL }; static const char * const mediatek_mt8183_pm_domains[] =3D { "core0", "cor= e1", "core2" }; static const struct panfrost_compatible mediatek_mt8183_data =3D { @@ -663,6 +671,14 @@ static const struct panfrost_compatible mediatek_mt818= 3_data =3D { .pm_domain_names =3D mediatek_mt8183_pm_domains, }; =20 +static const char * const mediatek_mt8183_b_supplies[] =3D { "mali", NULL = }; +static const struct panfrost_compatible mediatek_mt8183_b_data =3D { + .num_supplies =3D ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, + .supply_names =3D mediatek_mt8183_b_supplies, + .num_pm_domains =3D ARRAY_SIZE(mediatek_mt8183_pm_domains), + .pm_domain_names =3D mediatek_mt8183_pm_domains, +}; + static const char * const mediatek_mt8192_supplies[] =3D { "mali", NULL }; static const char * const mediatek_mt8192_pm_domains[] =3D { "core0", "cor= e1", "core2", "core3", "core4" }; @@ -691,6 +707,7 @@ static const struct of_device_id dt_match[] =3D { { .compatible =3D "arm,mali-bifrost", .data =3D &default_data, }, { .compatible =3D "arm,mali-valhall-jm", .data =3D &default_data, }, { .compatible =3D "mediatek,mt8183-mali", .data =3D &mediatek_mt8183_data= }, + { .compatible =3D "mediatek,mt8183b-mali", .data =3D &mediatek_mt8183_b_d= ata }, { .compatible =3D "mediatek,mt8192-mali", .data =3D &mediatek_mt8192_data= }, {} }; --=20 2.39.1