From nobody Sun Nov 10 19:49:29 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 368BFC6FD1F for ; Thu, 16 Mar 2023 10:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230452AbjCPKVQ (ORCPT ); Thu, 16 Mar 2023 06:21:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230480AbjCPKUz (ORCPT ); Thu, 16 Mar 2023 06:20:55 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBD6DB1A4A; Thu, 16 Mar 2023 03:20:48 -0700 (PDT) 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 28F90660309E; Thu, 16 Mar 2023 10:20:46 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962046; bh=t6e55TKXpWDXs7rKf1rewUoc056XoaKTiofz8DN9RjM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RynW8u0Dr4ZczODzCd2SqpQk6l0qle1QQQKYJReaYbbgC/NiBVgsx8YY/z1d86idK f4IQC1dpbvJM61+JNY8IKP3oQ3PpwHoBs7UUqYHCj6Hf+mpHt16S/pCwrxDVGXPCQb 2CpXPfrQWFani4dmmdV1QUymIn8bWPeUP6lXbkml5nQ+M2RQaejKmWT8827i8yhght mM5Rc3MYdRtOp7i5UkB5BO7y3t40z1vH9I7tV5N3MeYSICkOyFEoBOcu1ZgiYofuTo 0K53H3tkpCB5WHdMIl6yQ8txBdOSaapyxAbhB24sRX3Q9svQ2dhqp7TneaTHHTbDLC oCABAxTCASlUQ== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 01/12] dt-bindings: gpu: mali-bifrost: Split out MediaTek power-domains variation Date: Thu, 16 Mar 2023 11:20:30 +0100 Message-Id: <20230316102041.210269-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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" In preparation for adding new bindings for new MediaTek SoCs, split out the power-domains variation from the `else` in the current mediatek,mt8183-mali conditional. The sram-supply part is left in place to be disallowed for anything that is not compatible with "mediatek,mt8183-mali" as this regulator is MediaTek-specific and it is, and will ever be, used only for this specific string due to the addition of the mediatek-regulator-coupler driver. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Reviewed-by: Rob Herring --- .../devicetree/bindings/gpu/arm,mali-bifrost.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 78964c140b46..7e110751353e 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -109,6 +109,9 @@ allOf: contains: const: amlogic,meson-g12a-mali then: + properties: + power-domains: + maxItems: 1 required: - resets - if: @@ -131,6 +134,8 @@ allOf: - const: gpu - const: bus - const: bus_ace + power-domains: + maxItems: 1 resets: minItems: 3 reset-names: @@ -164,8 +169,6 @@ allOf: - power-domain-names else: properties: - power-domains: - maxItems: 1 sram-supply: false - if: properties: @@ -180,6 +183,8 @@ allOf: items: - const: gpu - const: bus + power-domains: + maxItems: 1 required: - clock-names =20 --=20 2.39.2 From nobody Sun Nov 10 19:49:29 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 91411C6FD19 for ; Thu, 16 Mar 2023 10:21:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231176AbjCPKVW (ORCPT ); Thu, 16 Mar 2023 06:21:22 -0400 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 S230365AbjCPKU5 (ORCPT ); Thu, 16 Mar 2023 06:20:57 -0400 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 65CA3BD4E0; Thu, 16 Mar 2023 03:20:49 -0700 (PDT) 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 110C8660309F; Thu, 16 Mar 2023 10:20:47 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962047; bh=0AQ+gCHdVFTNhiJx165qPUL/6q3xPgjQ71jCDBHRJbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XZDAjq3y2FnChbx/QaN5W8qWibNZXqFSx+bE4yxNo3mFhqkC7puUiGzFrqJ5720we v276dVUUfq1cEPXmL24DQ4EhnCiJsU25pvEEIvRp3r/vhHJbgczulchcoecA+QwABQ B1HOy+tPc/AkhUEuqiFocFMS+vZeq5umSPFkuuheU3xiOtZYibBpfGg/ajB8vdAruC 4R7RsK/EAaaGdSde/s04W54Jf6mYSi8f0QMZIPtMAI5KdYR2Pc6Yb27G3iEgE81+XC CySRPOBKTfHPlH+BVgy45OGeCYPm+Yxj95Ynox8lSxDadnVcD/twx2DodOuI9ckKhQ 2H7AMk+HJ9iqg== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 02/12] dt-bindings: gpu: mali-bifrost: Set power-domains maxItems to 5 Date: Thu, 16 Mar 2023 11:20:31 +0100 Message-Id: <20230316102041.210269-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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" In preparation for adding (and fixing) power-domain-names and MediaTek MT8192 bindings, allow up to five items for power-domains. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 7e110751353e..5b7f1c9d2b30 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -63,7 +63,7 @@ properties: =20 power-domains: minItems: 1 - maxItems: 3 + maxItems: 5 =20 resets: minItems: 1 @@ -157,6 +157,7 @@ allOf: properties: power-domains: minItems: 3 + maxItems: 3 power-domain-names: items: - const: core0 --=20 2.39.2 From nobody Sun Nov 10 19:49:29 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 9524AC6FD1F for ; Thu, 16 Mar 2023 10:21:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230342AbjCPKVZ (ORCPT ); Thu, 16 Mar 2023 06:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230388AbjCPKVA (ORCPT ); Thu, 16 Mar 2023 06:21:00 -0400 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 14386BD4FD; Thu, 16 Mar 2023 03:20:50 -0700 (PDT) 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 E845C66030A0; Thu, 16 Mar 2023 10:20:47 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962048; bh=vym02gfUeFtMkZA43yUlFdqpHJiV8QIzeChJfzjI5R4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kpuX2RQEQblFvVlA7uJOEnSjVUFXexzWEE/YHcNPmudmm7wBcVbhDyeCcz0HytihH QYyQvyV1KUPfBuFYVRXjYBWitRc1/PDQVEoJ3NwwBdlagUZLljRznoSR9VBltb115K sSIb8uAvevtYftC68I6ie/HvBHpjGLp3GDzeN7VwZC6QKZwBs4Tt7akIlqvaMdGgYg 9wUqlcy4JrZGu5PCvcsn45YWj80jUHqUoSXEnH5CVmUYUyB+TJ0mXOdlNvGbaRPTqq i442BMbVucu3fEyfzp45+wMpBVdKbUA54NgVaZfU3/d60oaM7ykeJnezgsvJAa97lk 5ZmtnXLNoHEhA== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 03/12] dt-bindings: gpu: mali-bifrost: Fix power-domain-names validation Date: Thu, 16 Mar 2023 11:20:32 +0100 Message-Id: <20230316102041.210269-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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" Commit ("dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183") incorrectly introduced power domain names for MT8183, causing validation issues. Add power-domain-names to the base schema, allowing a maximum of five elements; since platforms having a single power domain don't need any actual domain name, disallow that for each sub-schema. Fixes: a7a596cd3115 ("dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183") Signed-off-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Reviewed-by: Rob Herring --- .../devicetree/bindings/gpu/arm,mali-bifrost.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 5b7f1c9d2b30..7c61524aae26 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -65,6 +65,10 @@ properties: minItems: 1 maxItems: 5 =20 + power-domain-names: + minItems: 2 + maxItems: 5 + resets: minItems: 1 maxItems: 3 @@ -112,6 +116,7 @@ allOf: properties: power-domains: maxItems: 1 + power-domain-names: false required: - resets - if: @@ -136,6 +141,7 @@ allOf: - const: bus_ace power-domains: maxItems: 1 + power-domain-names: false resets: minItems: 3 reset-names: @@ -186,6 +192,7 @@ allOf: - const: bus power-domains: maxItems: 1 + power-domain-names: false required: - clock-names =20 --=20 2.39.2 From nobody Sun Nov 10 19:49:29 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 CDC81C6FD19 for ; Thu, 16 Mar 2023 10:21:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231209AbjCPKVa (ORCPT ); Thu, 16 Mar 2023 06:21:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230434AbjCPKVC (ORCPT ); Thu, 16 Mar 2023 06:21:02 -0400 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 F3206BDD00; Thu, 16 Mar 2023 03:20:52 -0700 (PDT) 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 CD3D966030A1; Thu, 16 Mar 2023 10:20:48 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962049; bh=cvXpJ8LbxubJEtHvxk8Psw3/s85Oor+YdZdxHV1BvnA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kaRZ4u7T2R2eNSV5sEw9n2rokz8EIIh9g3ilN7C700K2R+bZ50POfJlz9WcqMNubk 7Km6JlWLgGcL7zZ13CMx4wVWRvFC+3vpXiXrW8e1Jo4i6nGcMsq0bsvUwBIeFlgOP9 pkMZSKHhW7xd0q7M1kJg8kJEqyVmhJ3ZZqlK+hdJnIbcx7gUT8RQisOeaCpBUTLzqt V0pFeyDva4lz2iqPUO9UDjOGZLZ0MHS85N+mnaDDtYh91CYuM5saXaaKynjHhZ3hSm ODxHBVVJIX76MhqWsS0pU+QVQS5q+Y1hysd2KmHVfcGfK+Ql+GB+kHCYOGOLzJ/ffp 9rLDEFBU0wAsQ== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 04/12] dt-bindings: gpu: mali-bifrost: Add sub-schema for MT8192's power domains Date: Thu, 16 Mar 2023 11:20:33 +0100 Message-Id: <20230316102041.210269-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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 by also introducing power-domain-names in the generic binding; while at it, also disallow the newly introduced power-domain-names for all non-MediaTek bindings. Fixes: 5d82e74a97c2 ("dt-bindings: Add compatible for Mali Valhall (JM)") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai --- .../bindings/gpu/arm,mali-bifrost.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 7c61524aae26..9ede51427012 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -177,6 +177,25 @@ allOf: else: properties: sram-supply: false + - if: + properties: + compatible: + contains: + const: mediatek,mt8192-mali + then: + properties: + power-domains: + 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.2 From nobody Sun Nov 10 19:49:29 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 29684C7618A for ; Thu, 16 Mar 2023 10:21:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231289AbjCPKVl (ORCPT ); Thu, 16 Mar 2023 06:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230510AbjCPKVK (ORCPT ); Thu, 16 Mar 2023 06:21:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06596BCB9C; Thu, 16 Mar 2023 03:20:56 -0700 (PDT) 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 B3C1566030A4; Thu, 16 Mar 2023 10:20:49 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962050; bh=Ve/6iRm3WMPE1EojlHjL3TKtdXfDs4Ou+mT+OBRzwJc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RPzEZRk1nUidBfPOaouPRtWxnwWtq6OclMoT7GIZ8LRg4a/f0sCDMsBximrNRluAL vvLyYi39Q9YBaVPMZUqHsRVhdq42Fc0aUhKRWXvlx6oMOXxhTGRfOc86pF7Dlt/exl 0jyXG5HBHArpaz/fJh3eBF9mqI3T+GKWoH4Ekab2org7gjC9vePDLgG6iNDkEZmByM MK3m7x60UCGUAk7mrgr0PdyTnGww1wIOkVlthr5BoOEjiEO/EwvJuBqQsFZrwp2b56 Y51NImWYIBF1AYX2E1CSmNygH8rZkaghZC09ZlO3xB9djIMl4sVjs5Pnz0yBJEt9nV yt0wZqcNPlwgg== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 05/12] dt-bindings: gpu: mali-bifrost: Add new MT8183 compatible Date: Thu, 16 Mar 2023 11:20:34 +0100 Message-Id: <20230316102041.210269-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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: Chen-Yu Tsai Tested-by: Chen-Yu Tsai --- .../bindings/gpu/arm,mali-bifrost.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 9ede51427012..63b993d5fd87 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 @@ -177,6 +178,24 @@ allOf: else: properties: sram-supply: false + - if: + properties: + compatible: + contains: + const: mediatek,mt8183b-mali + then: + properties: + power-domains: + minItems: 3 + maxItems: 3 + power-domain-names: + items: + - const: core0 + - const: core1 + - const: core2 + required: + - power-domains + - power-domain-names - if: properties: compatible: --=20 2.39.2 From nobody Sun Nov 10 19:49:29 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 4778FC7618D for ; Thu, 16 Mar 2023 10:21:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230034AbjCPKVq (ORCPT ); Thu, 16 Mar 2023 06:21:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230499AbjCPKVJ (ORCPT ); Thu, 16 Mar 2023 06:21:09 -0400 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 D67941B322; Thu, 16 Mar 2023 03:20:56 -0700 (PDT) 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 96F2966030A2; Thu, 16 Mar 2023 10:20:50 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962051; bh=uglCXCkWdTA8UQ8UzHMlW0QAy31JjzQ29lenVUc0QMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JJNsD8RRoKeOsn+xdsXLRjM30aGTJrGpguskbdxgNVnCsVGyyi7RANKku2nXARYdJ bRb//ChxE+qethj+tRWNauzSzq6hM0ayC1iy5Obr94nrbR7x+ObttT948WqSRhgjZ6 +1BBu5QHYgbhZRMcnuBFnNHUc6KsQd45bQXajV23WPDqfvo1kGSCp1D7/BbQrKYYnd OzSLLzOYKozdGPaobdmDXcj0kBtLLoD6e7WoTiQjKZ+zDV6FQ4IzS2GynIBECnR8Yd RdkqzzN9s7uXq2JDe12OkX3aDfTMeYr8+dM61MLUuHz8Sn5PTC2iY3iqXmlp05qf03 MkQmD4/4vD4PA== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 06/12] dt-bindings: gpu: mali-bifrost: Add support for MediaTek MT8186 Date: Thu, 16 Mar 2023 11:20:35 +0100 Message-Id: <20230316102041.210269-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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" MT8186 has a Mali-G52 MC2 2EE GPU (two cores): add a binding with two power domains (one per core) for it. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Reviewed-by: Rob Herring --- .../bindings/gpu/arm,mali-bifrost.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 63b993d5fd87..3d0d96913b1b 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -20,6 +20,7 @@ properties: - amlogic,meson-g12a-mali - mediatek,mt8183-mali - mediatek,mt8183b-mali + - mediatek,mt8186-mali - realtek,rtd1619-mali - renesas,r9a07g044-mali - renesas,r9a07g054-mali @@ -196,6 +197,23 @@ allOf: required: - power-domains - power-domain-names + - if: + properties: + compatible: + contains: + const: mediatek,mt8186-mali + then: + properties: + power-domains: + minItems: 2 + maxItems: 2 + power-domain-names: + items: + - const: core0 + - const: core1 + required: + - power-domains + - power-domain-names - if: properties: compatible: --=20 2.39.2 From nobody Sun Nov 10 19:49:29 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 76793C6FD1F for ; Thu, 16 Mar 2023 10:21:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231273AbjCPKVi (ORCPT ); Thu, 16 Mar 2023 06:21:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230517AbjCPKVJ (ORCPT ); Thu, 16 Mar 2023 06:21:09 -0400 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 05B98149B9; Thu, 16 Mar 2023 03:20:56 -0700 (PDT) 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 7DF9466030A3; Thu, 16 Mar 2023 10:20:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962052; bh=K9yinOJko6zzZkMe4qGeCS9OW1OYLujXAPuZpWyodhg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PH0QDH67wQD+cAv/qmvs91HIUbrel0QvgoAcHb3NbKlvwiMFxyZShkUgQQCuHLooI 5k/R79dq3TBk175tqXtAx6JGwCy+iIsly/SBouQctONXkNHQWqxxPgzDN6AVyrz/7b aXyIeupRe6nxRD70u2Xv23d2oOiGtcWYQNZtpWBqAJFoSOpJfZPIN5RKvZolsp1Kea ArxzsDFwwpcbddr1CSkAdD/QYSa926f/a67HSQpuPcUHMCsaCuFzICRarHa5a6qeIe d/d+1uw/yX7E/yTixPBVM+Bghyf7hhhlwhNUrpwqkxkdPCFN6rZM5OJA+pSw3jt8CS TvP7pN0VLbdhg== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 07/12] dt-bindings: gpu: mali-bifrost: Add compatible for MT8195 SoC Date: Thu, 16 Mar 2023 11:20:36 +0100 Message-Id: <20230316102041.210269-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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: Chen-Yu Tsai 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 3d0d96913b1b..3eb9a4e95e92 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -27,6 +27,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.2 From nobody Sun Nov 10 19:49:29 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 D6A57C6FD19 for ; Thu, 16 Mar 2023 10:21:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231300AbjCPKVo (ORCPT ); Thu, 16 Mar 2023 06:21:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230506AbjCPKVK (ORCPT ); Thu, 16 Mar 2023 06:21:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06116BCB9B; Thu, 16 Mar 2023 03:20:56 -0700 (PDT) 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 67A6066030A7; Thu, 16 Mar 2023 10:20:52 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962053; bh=3GXafAdQmj7KJvnDtfsbN8H0g0sDtqhLZbndyfx7ewg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=en3zTI6JULuMGdA06Z2jl35WgPdA4yH3N2FqGUtRMZJtXhCSdQSV44iTOILb3qS+l 9PhbxcxSa+0zcDjwEKBEbo6nvU/tl639ddlwJ7ZCGn5Ep7Nd8JlmXQjWDakKl+XbgS p4+AvyVhiKHNnASdYmtVvHsKKzq/pWOEJJ/d2DXve/dLrNkmnUawtyWBWl2gFaQLpJ hNMMdpLl78ssCYXhKRx6js5Wr2FEfO6kCsnKyK3NA8T+ItFgttygCva+a0rW/lrdBa o0UbQXNvJPD+fIzHG7EWTMJVG1xnGo82OhVe90HK2tSlVtShT961P0mSuo+6/rbmo7 mBMcu7rW6Dclw== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 08/12] drm/panfrost: Increase MAX_PM_DOMAINS to 5 Date: Thu, 16 Mar 2023 11:20:37 +0100 Message-Id: <20230316102041.210269-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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 Reviewed-by: Chen-Yu Tsai 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.2 From nobody Sun Nov 10 19:49:29 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 40CC7C6FD1F for ; Thu, 16 Mar 2023 10:21:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231320AbjCPKVv (ORCPT ); Thu, 16 Mar 2023 06:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbjCPKVL (ORCPT ); Thu, 16 Mar 2023 06:21:11 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF593BBB3D; Thu, 16 Mar 2023 03:20:58 -0700 (PDT) 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 4D4D966030A8; Thu, 16 Mar 2023 10:20:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962054; bh=tqMhjHDqyf9W8dBe5zrV6xBWEsaXyIn78lwVXQZBTKI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W8HjQ4jWTnPPa1xbsH5ty3//pOcwvc6EEOM8oaoUH9B5Lsytcw8cka9PfoYvzeDKa HSbRn96OzlC2Izzc+T53S8M7LPqceVuullDRTaz+Q8fd8xlo53gjmnxR4XMpQco8ZQ azu+rKOc4Odp5mBAxTnXbSFUZbGfYnONPRuW6vl1efpZgHky+RD49KvC9pfeS6WR5h gIlwrtoKk2ouFNJlUJon9St7OmcifPL8toK50aRb04bxUqYLFFNCdWqK/3M1AfoinC 5shGEDTrupd8XVc90oS/JUuZTKasyJqMYsGp3HDCURwBEmm612z9O0d7er4lJNz5pq YuzoHIZ/k+IQg== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 09/12] drm/panfrost: Add the MT8192 GPU ID Date: Thu, 16 Mar 2023 11:20:38 +0100 Message-Id: <20230316102041.210269-10-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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 Reviewed-by: Chen-Yu Tsai 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.2 From nobody Sun Nov 10 19:49:29 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 CAFD7C6FD1F for ; Thu, 16 Mar 2023 10:21:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231322AbjCPKVy (ORCPT ); Thu, 16 Mar 2023 06:21:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231133AbjCPKVM (ORCPT ); Thu, 16 Mar 2023 06:21:12 -0400 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 CF843BD4E1; Thu, 16 Mar 2023 03:20:58 -0700 (PDT) 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 3278466030A5; Thu, 16 Mar 2023 10:20:54 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962054; bh=zaVPC8a/zjPKkMkKy2u0SknVPayDnrlxaZ88LGSOuPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V+ebgBXr59zxnfFqZTRha1fbz/sXBfiDuR3wz4sIfqE/TQ4J9AbE3/XQpH2LGrDjk I7OA2HII3H2o9DkwjN98y5HpFsScHJli/w165lcNfVJdfo6E0caSfhbfdSCmCaW7x4 ZsN9by9bR+7sqhKL8hZKStk2J/tnqF0cm9hbBelMEYFTFNzgmfikxiHvhXW3SRx/1H McZoEAyZvv7bwEzcScDFwZHRQsZzz8/t7KbdnhYncpQPPwJfelsXm0zJRfPn4nb4TY zWcejFyTAo0xah/I2OXNetcw+Io8wvB2VWxW+ONsCOKbhOantTDqr5ZidQI5raWz9k fkxEFQntyhYVA== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 10/12] drm/panfrost: Add mediatek,mt8192-mali compatible Date: Thu, 16 Mar 2023 11:20:39 +0100 Message-Id: <20230316102041.210269-11-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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 Reviewed-by: Chen-Yu Tsai 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 f49096f53141..45c4accb6a1e 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -656,6 +656,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", @@ -674,6 +684,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.2 From nobody Sun Nov 10 19:49:29 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 1F537C6FD19 for ; Thu, 16 Mar 2023 10:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231330AbjCPKV5 (ORCPT ); Thu, 16 Mar 2023 06:21:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231137AbjCPKVQ (ORCPT ); Thu, 16 Mar 2023 06:21:16 -0400 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 0E4AABDD08; Thu, 16 Mar 2023 03:21:01 -0700 (PDT) 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 1797366030AA; Thu, 16 Mar 2023 10:20:55 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962055; bh=lEySQxwP+CBzmjLe1Ez9oQHJ1wF/3PthJcz2r8dmYDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CmOentXJT+KPr7n9fi+2MDCN9eA3JjDJSnGJbJ06B2ipD5GxazaCZ7c16Tyt+ReGM 9tzHzUTQuPdYS2V8jfwVebQYT4RuEWgeHQA04tqgXFiWjD7+sDOnp8JixJEB/ohvbj GmU2FbIAxbYAnDCHUXxsJmunQoB9ASfx5JI+1iQK1XMJOmcXvO/1AAavxHMVKRjx86 qeu+X/HAomJ8hEobxCUh1rIgN5SaatpYuJcQydfB5MwXh0D0/fAvdXXhjN8APoSx7f SwijZdQomMhXJkuoXC8bGoyTwbPwGvU/tiYbgyuX233UWEPyK//40tOGx2geBELVfO f3PRz1uFlrtWw== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 11/12] drm/panfrost: Add new compatible for Mali on the MT8183 SoC Date: Thu, 16 Mar 2023 11:20:40 +0100 Message-Id: <20230316102041.210269-12-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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 Reviewed-by: Chen-Yu Tsai 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 45c4accb6a1e..4f39b410302c 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -647,6 +647,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 { @@ -656,6 +664,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" }; @@ -684,6 +700,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.2 From nobody Sun Nov 10 19:49:29 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 77BB4C7618A for ; Thu, 16 Mar 2023 10:22:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231334AbjCPKWA (ORCPT ); Thu, 16 Mar 2023 06:22:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbjCPKVQ (ORCPT ); Thu, 16 Mar 2023 06:21:16 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0953CBD4E6; Thu, 16 Mar 2023 03:21:01 -0700 (PDT) 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 F1A0F660309D; Thu, 16 Mar 2023 10:20:55 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962056; bh=6DBVKIIHG8WZZ3ntbG1VNgOpsrN60zwSXj2PzGrIUrQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MbXRKWlmiz0cDiInj2vV5mKScoT/lZkY25h1C8iu8wTWzLudoPjB68uvEUYSKXkjD HHP+smP827Gc38cqEDXPjAAaPU5jBbNNqcwkuUXn4/v7lgtXUjARhXTePEPi7JFfyl kfhIOYrGcMrLKaz/TN2mf1XJHRu8kaEKB3Ncn3kJd6o/asHXUrbnIt1x6yIVWUepG8 ckMf9jds4JjYEQNWDZepYz63jS2tg0UyF5gcDtrK0KYOR+77EWKqsY1PIEJMzBW+8X nMpYv7dvDbHG6av2kGdWh+DAlqs8gTyIEiB59yGF5+4GzsjvR/Ucq539rfqGztng6b nNOUIvNpnRYUg== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v5 12/12] drm/panfrost: Add support for Mali on the MT8186 SoC Date: Thu, 16 Mar 2023 11:20:41 +0100 Message-Id: <20230316102041.210269-13-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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 MT8186 has a Mali-G52 MC2 2EE (Bifrost): add a new compatible and platform data using the same supplies list as "mt8183_b" (only one regulator), and a new pm_domains list with only two power domains. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai --- drivers/gpu/drm/panfrost/panfrost_drv.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panf= rost/panfrost_drv.c index 4f39b410302c..bbada731bbbd 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -672,6 +672,14 @@ static const struct panfrost_compatible mediatek_mt818= 3_b_data =3D { .pm_domain_names =3D mediatek_mt8183_pm_domains, }; =20 +static const char * const mediatek_mt8186_pm_domains[] =3D { "core0", "cor= e1" }; +static const struct panfrost_compatible mediatek_mt8186_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_mt8186_pm_domains), + .pm_domain_names =3D mediatek_mt8186_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" }; @@ -701,6 +709,7 @@ static const struct of_device_id dt_match[] =3D { { .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,mt8186-mali", .data =3D &mediatek_mt8186_data= }, { .compatible =3D "mediatek,mt8192-mali", .data =3D &mediatek_mt8192_data= }, {} }; --=20 2.39.2