From nobody Sat Sep 21 03:06:43 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 1B4F8C64ED6 for ; Tue, 21 Feb 2023 15:37:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234562AbjBUPhw (ORCPT ); Tue, 21 Feb 2023 10:37:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233828AbjBUPhs (ORCPT ); Tue, 21 Feb 2023 10:37:48 -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 436406A43; Tue, 21 Feb 2023 07:37:47 -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 EA54066021CD; Tue, 21 Feb 2023 15:37:44 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993865; bh=DZyb8vw6qbtsYIBlP4pzm++AodTcvCv6AvAETopyIuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IVEXs0YCZUHyAapvJaL7aVXlMFv/vsVn5oMxuyZIvMl/T5zqxgfCYeHhYmO2zTn4P x4O/Ligz1ltjjWbtSD3MfYn5s31rg+XjE7bPD7MLuUfU9k8O13YchbjQq45jh21ZTa LztdlXygiNltijjIgzXHYdvOKIqU4J3+ZDe9zG5MHj6IG9T8YkD133VVKBabn3XU1l hyukQs3LB4LsL5x/o2e0YoZs7FZcnA8w0Pa3VvR0uv1jMx2E3viudreCGS26pvRoxw /JKxEK5nWPMf4Pz/k+y9uqFXsjOtNbmHoAA4cxN9SHYaLddrBDO9o6btnNztpvt/me CqXQtOjT+NW2Q== 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 v2 01/10] dt-bindings: gpu: mali-bifrost: Add power-domain-names to base schema Date: Tue, 21 Feb 2023 16:37:31 +0100 Message-Id: <20230221153740.1620529-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-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: Chen-Yu Tsai In commit a7a596cd3115 ("dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183"), "power-domain-names" was added to the mt8183-mali sub-schema, but was not added to the base mali-bifrost schema. Because validation happens for the base schema and any sub-schemas separately, this causes errors to be emitted when validating the MT8183 device trees. Add power-domain-names to the base schema to silence the error. Fixes: a7a596cd3115 ("dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183") Signed-off-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 78964c140b46..02699d389be1 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -65,6 +65,8 @@ properties: minItems: 1 maxItems: 3 =20 + power-domain-names: true + resets: minItems: 1 maxItems: 3 @@ -166,6 +168,7 @@ allOf: properties: power-domains: maxItems: 1 + power-domain-names: false sram-supply: false - if: properties: --=20 2.39.2 From nobody Sat Sep 21 03:06:43 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 E7EE1C61DA3 for ; Tue, 21 Feb 2023 15:37:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233843AbjBUPhz (ORCPT ); Tue, 21 Feb 2023 10:37:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234527AbjBUPht (ORCPT ); Tue, 21 Feb 2023 10:37:49 -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 C36832A9B7; Tue, 21 Feb 2023 07:37:47 -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 CDB4166021CE; Tue, 21 Feb 2023 15:37:45 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993866; bh=dYSlQLXMyB6AD5hy1+lsca8EHSPk5mj7QuNmBK+ZBoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fruQtiaCFMTjf65J3alfeo62CbcoagqQqYvW554EK9LoXS9Jq6sdepSifhbe9eSCT IAXo3KLtInJZRV1NQWbBeXKRWC0mWHT07qmVMNNv6WYiU4A7yrnesuAIc6oOhgmPM6 SbHmDPIjvKdhhEBGdJR3G35/PACkTxb/MnHm8twuGJhNia6fdirTD/65IEd3kcVju9 SxUTm+McN27gp5Z6FKgX9+DY+S6ra/n7qrN3gKTOZwWD9GNyTEObNyl/VRwK2VSDCy O7VDCYayuQXWe/ABLKOnd3dhnuiYB/IR4RsdrNAYvLgGNOxXPYN/P6PqpKBPVvlInt R6TyvdcMlrwzg== 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 v2 02/10] dt-bindings: gpu: mali-bifrost: Split out MediaTek power-domains variation Date: Tue, 21 Feb 2023 16:37:32 +0100 Message-Id: <20230221153740.1620529-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-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-domain-names and power-domainsvariation 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 --- .../devicetree/bindings/gpu/arm,mali-bifrost.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 02699d389be1..ac174c17e25f 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -145,6 +145,18 @@ allOf: - power-domains - resets - reset-names + - if: + not: + properties: + compatible: + contains: + enum: + - mediatek,mt8183-mali + then: + properties: + power-domains: + maxItems: 1 + power-domain-names: false - if: properties: compatible: @@ -166,9 +178,6 @@ allOf: - power-domain-names else: properties: - power-domains: - maxItems: 1 - power-domain-names: false sram-supply: false - if: properties: --=20 2.39.2 From nobody Sat Sep 21 03:06:43 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 598A4C64ED6 for ; Tue, 21 Feb 2023 15:38:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234551AbjBUPh7 (ORCPT ); Tue, 21 Feb 2023 10:37:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234532AbjBUPhu (ORCPT ); Tue, 21 Feb 2023 10:37:50 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A183010C5; Tue, 21 Feb 2023 07:37:48 -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 B411566021D0; Tue, 21 Feb 2023 15:37:46 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993867; bh=JLv1ypqmRwA4sZAh0v4tJj4CqhA/6gB3AMkCmc8wtN0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iRERP9lHxptyHbkUIZZpTJEqOpnNczybSXcyIV2hS8lxN1Xf3IbrOuPaPNYKST+ZN Fz5zFhdeoF6ZzKr8f0ZsVa5aoa63K7JcIZCAfSjclssml45FkFuiK/miXMO46sUTwv rZLajVOGcKKAZf7CR2I86/6OTqe74T2xWUg2wjULhETlbTdPH8WvNX97XqxLUjC7Jm Vpxx7rw5rxf6QFFGSrlVCQ6qP7PfNW6Qc/UY8qGR6hU+cdPyRUMtxqqWcWx5llNodm gKq02ZgAYkvQEL4I6wFUv6qC2CmQrzstTzSWYBRIGibzsZlJh1HORevo5JzmS4Lo4A iNwNkr5vSAYtg== 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 v2 03/10] dt-bindings: gpu: mali-bifrost: Allow up to 5 power domains for MT8192 Date: Tue, 21 Feb 2023 16:37:33 +0100 Message-Id: <20230221153740.1620529-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-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. 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 | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/= Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index ac174c17e25f..65fe139ceb83 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 power-domain-names: true =20 @@ -152,6 +152,7 @@ allOf: contains: enum: - mediatek,mt8183-mali + - mediatek,mt8192-mali then: properties: power-domains: @@ -179,6 +180,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 Sat Sep 21 03:06:43 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 5079BC6379F for ; Tue, 21 Feb 2023 15:38:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234327AbjBUPiC (ORCPT ); Tue, 21 Feb 2023 10:38:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234537AbjBUPhu (ORCPT ); Tue, 21 Feb 2023 10:37:50 -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 BB1CA3A99; Tue, 21 Feb 2023 07:37:49 -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 9794866021CF; Tue, 21 Feb 2023 15:37:47 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993868; bh=jFlvEa9umviwW9HdtIpX7rwDDrEbdIW1Lu37fWHY6Jc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gfe+P9SfLlXPyMbQFKsRZfLfQUoASqM8Xd1PfVHy1vDH89/Xf6AtO0RuqccLgxEJe vAiI8yo1geE6uP7y2N9e4mQ9OBZYmPinmLEIfORujDQH6GxR1qKVxezCTDtMbvQ62Z PKLq5Sd1UWOsYFJ3jxuHmXScJpJ4u/0YFnrxpiYjZANmWVZO/1tum+4+0xJ+0O/PXt sMti7CxG9DjsQ79cTw2HMnmswEUxweNgezxPLfgS9aOodn8BYo+7/VI4u3jMqfE8uv PEfkxIyNThGnZKVsHiQ/TDEn2xUgxl1VIp+LsLovhFewfVcNexOoQvHaunFSl4Jh5Q 55qCAZ2ere6Sw== 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 v2 04/10] dt-bindings: gpu: mali-bifrost: Add compatible for MT8195 SoC Date: Tue, 21 Feb 2023 16:37:34 +0100 Message-Id: <20230221153740.1620529-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-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 65fe139ceb83..4d9ab4702582 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.2 From nobody Sat Sep 21 03:06:43 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 DC788C678D5 for ; Tue, 21 Feb 2023 15:38:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234714AbjBUPiF (ORCPT ); Tue, 21 Feb 2023 10:38:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234559AbjBUPhv (ORCPT ); Tue, 21 Feb 2023 10:37:51 -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 581E065BF; Tue, 21 Feb 2023 07:37:50 -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 7B21966021D1; Tue, 21 Feb 2023 15:37:48 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993869; bh=laOGM5qspmdr3Jbg8tYgPNAcwC0TKu24Y1j4uxBmTgs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QjILYONtql0ehe3PptlOR7eKUZBQeJMTTtYY8w09XRxxCvmZ5OYdQLRzzzMtSAGby HsVOVWCd83+EDTFZF3doY2lB7PSEgLgZYw6qei1/ITB6eJeRtG2by53TaA2P5DdPXZ jRazpehci/kSx/ivYH9a4JAUwyZOOmyAqDJiYwUZWMQtslL6KVoPqUhczn4h1MZoGq Twg6GYpjzPuSO63ekaMKMQKyPl8kQz1XrLYnFSbJlypVckkERbCThJBEueEzSPLHlW JOzblsKjiyQXZ3l7dhy4efPviX5plwEkjHZ2HtU0kIu0ipOp+dUVHmPFtb7Did83w0 52JqyI6frluDA== 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 v2 05/10] dt-bindings: gpu: mali-bifrost: Add new MT8183 compatible Date: Tue, 21 Feb 2023 16:37:35 +0100 Message-Id: <20230221153740.1620529-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-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 4d9ab4702582..be18b161959b 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 @@ -157,6 +158,7 @@ allOf: contains: enum: - mediatek,mt8183-mali + - mediatek,mt8183b-mali - mediatek,mt8192-mali then: properties: @@ -185,6 +187,23 @@ allOf: else: properties: sram-supply: false + - 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.2 From nobody Sat Sep 21 03:06:43 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 A1264C636D7 for ; Tue, 21 Feb 2023 15:38:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234093AbjBUPiL (ORCPT ); Tue, 21 Feb 2023 10:38:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234613AbjBUPh4 (ORCPT ); Tue, 21 Feb 2023 10:37:56 -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 8006A1CAC7; Tue, 21 Feb 2023 07:37:51 -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 61588660219C; Tue, 21 Feb 2023 15:37:49 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993870; bh=XZzIf5WhWGCw6ZUak5aUno/dS29XlqQ4V6b5lAMNRT4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H+Othc8jly/UlZ/H/DYKYH2UsRajWJP5aw6CzokeJLVJtdEBoZthynoP83iLZjADP Vq9CEae9R1VtMisaalqSoYE0IvUcRUFRBQFBJVJEmhrhQ4eNWTJqeeuUWuH27UBNwU 4I/QgzW1qoOVHRfCrVXmB0IMd5+vOIZCCqVmeld4+LNPTjNAjqmQN/gmnIW31qcNgP iOvpAWaRT9jEATqXvjZ+/02fhU/Ik7SW9kk9FBy4Th2+SWqmXlK1wmk24yPDCSUXwo mHfIF1LJ3agbpB9T1IuXi8ESMSXkBjbiQodLq1XmhDr0mOYRyT/uA3UpA+X5ce42v5 yRgIO9n6bKObw== 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 v2 06/10] dt-bindings: gpu: mali-bifrost: Add a compatible for MediaTek MT8186 Date: Tue, 21 Feb 2023 16:37:36 +0100 Message-Id: <20230221153740.1620529-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-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 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 be18b161959b..43a841d4e94d 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.2 From nobody Sat Sep 21 03:06:43 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 C4FBBC636D7 for ; Tue, 21 Feb 2023 15:38:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234046AbjBUPiI (ORCPT ); Tue, 21 Feb 2023 10:38:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234596AbjBUPh4 (ORCPT ); Tue, 21 Feb 2023 10:37:56 -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 2E0B622010; Tue, 21 Feb 2023 07:37:52 -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 43EC366021D2; Tue, 21 Feb 2023 15:37:50 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993871; bh=X9j7xcxPWqqju4SwMykvvaoqD5cIUMh5cTk3zCzxcjY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U6/pIFVnfCKS+MNTaAAmacRT0UTSPBum3hfbt9pRV5q7VFocDcyxcvGF7XrWAG/i1 sLaW/zi3XqfHtI4FiqAifMDCVres/490H6yCUfIFcSH+GkICdjw+mR5o3574fAIcFU ipUSyKZk2vlnvse4k9bNyVHGosdWvWU6wY8d3aC/hpBU6X2fXPj4kiWwfO5LjjWpPV cJI7OVZDogorBXjC7/exwBkjEQKrUCu9Pyijtn5u28Hxx9UMVcZ86KknTb+q/xiCIX WnqOcwvTj4cMnPRtc3pbcNeb3m53bItthzxujx02NyLDUkBRUdIVge7CtiwXy6O1if rs1iIJyaFne5Q== 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 v2 07/10] drm/panfrost: Increase MAX_PM_DOMAINS to 5 Date: Tue, 21 Feb 2023 16:37:37 +0100 Message-Id: <20230221153740.1620529-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-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 Sat Sep 21 03:06:43 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 68C70C64ED6 for ; Tue, 21 Feb 2023 15:38:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234383AbjBUPiO (ORCPT ); Tue, 21 Feb 2023 10:38:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234186AbjBUPh5 (ORCPT ); Tue, 21 Feb 2023 10:37:57 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 170E623103; Tue, 21 Feb 2023 07:37:53 -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 29E9266021CF; Tue, 21 Feb 2023 15:37:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993871; bh=HedQD3Ilc5pEnx8vhQO81s7TTNK+oqpJPvaglDZ6DvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mzSAB68huZi2FWdjCmbPQLcRx/D12xji2dNq7yFIsN0pLXxptw/dMPR76n0abG8lz xcx+ldXx+RYzOJ0Z/EyrgyjHYxS4dTBHPe2puZUkPf/pqMKV8sRY1BqdI0UsmEnFg0 yzMHNEuaeXf5jQBw+Psxdkt5mOTiW3OzmMMjwCSCoDv9X+G8ZnMwlqAH994GT/GuCR dmmBdZCS+Sv+N6O0da+H4/DQgL+2F7TAHQL6yqMcObaqIG7Z2q5RBfSXyZSsn9DdWZ LVGdO2sQLN7DPcdiZnyMxP6vAvdeKXavJeqC495UgF84b0OOVHDvdQ88rKmu6hSnYm 9OL2oeVX36WjA== 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 v2 08/10] drm/panfrost: Add the MT8192 GPU ID Date: Tue, 21 Feb 2023 16:37:38 +0100 Message-Id: <20230221153740.1620529-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-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 Sat Sep 21 03:06:43 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 560C1C6379F for ; Tue, 21 Feb 2023 15:38:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234709AbjBUPiR (ORCPT ); Tue, 21 Feb 2023 10:38:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234703AbjBUPiC (ORCPT ); Tue, 21 Feb 2023 10:38:02 -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 79BD52BF1C; Tue, 21 Feb 2023 07:37:53 -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 104D666021CD; Tue, 21 Feb 2023 15:37:52 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993872; bh=XOBRNDDFJGfYsIgxMZ/xxG6T/bqER3TGwYBPNyV4tY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TrsF2ZypFqBW/bFW+D9vITUwBlUQmc7X2dV7H+9+GCQRSLcrcgaqvgJKiXy6AY22m sLpSh/oNr3lXRepkMyKbiIhoWxkQvRPTYxrONI7RCCeEDo3XmMNflF3uAyrJHBJnc0 EJSCfPgDiThzY9s6UyUE2bI7E3nY433Mza3tMzLh66+eUeWJeK4jYG5pSKttwil/yI 4AtFcfZ3CuyH3O8cuC4Sb5kKJPZXwM7F72wZAQA6SMXxMvBLaDUSkskyajmC07z2b0 Rl39zya/RTIQUWR9z8qN/a0gihB4NnU1YSn7MiJ6yogg5GevScbfKrG+DLqx8W6SDC FSoHCoGOhTqXQ== 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 v2 09/10] drm/panfrost: Add mediatek,mt8192-mali compatible Date: Tue, 21 Feb 2023 16:37:39 +0100 Message-Id: <20230221153740.1620529-10-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-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 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.2 From nobody Sat Sep 21 03:06:43 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 36471C61DA3 for ; Tue, 21 Feb 2023 15:38:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233971AbjBUPiX (ORCPT ); Tue, 21 Feb 2023 10:38:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234606AbjBUPiD (ORCPT ); Tue, 21 Feb 2023 10:38:03 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07A2E2BF3A; Tue, 21 Feb 2023 07:37:54 -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 E3C9666021D3; Tue, 21 Feb 2023 15:37:52 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993873; bh=d98v4XkYuSdlaBMRVhy8ckf3WPpqfT9gFqNu9PlgtLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UzrE+LbQ/q/0oEUfdmGWDjpM6NnJzjiNqoBtqiibNwJyOF6/8O7KN8y54F0CMgd9y stIgTD8qLHyWnvwds8ShWi8WDhOJdDF8LXMThS8yUsuTwO9XvQfQVafex2aLd3OczH WAmHckmNQJcvQhmyKFYTlguwycU553zByLkDfXZ+aSJiuhLiR77aKQk6pS/Lu1sesA W1xqD0lj0CWJIjhbpjlBN/1pxG8rP08/Rt78pgudRFgmG8PUOa7rQM6OcJbNnCOXs6 6BQAyJzAdFlIxXawaNBxgj800LlZwNc6FMLN0k2sGuxI5QKkBhGtGYygRhnIXmyG3R sN4UBYv7JHEfQ== 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 v2 10/10] drm/panfrost: Add new compatible for Mali on the MT8183 SoC Date: Tue, 21 Feb 2023 16:37:40 +0100 Message-Id: <20230221153740.1620529-11-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-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 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.2