From patchwork Tue Feb 28 10:26:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154654 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C843CC64ED6 for ; Tue, 28 Feb 2023 10:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=WBQ4siMRXVB9SrdHJDrM1tHlRn4OZfx2GTuin+J2Lo4=; b=XD5sE5QzCN1MachP89AAxRG0EY uC0HnjfralxiCmBSM34vB0DOqEnl/r3KAcAEI2rAQz/XJzW9IXc1v0fKPsIZ7C11BESMelK1Z+p9M 9bnD6KDgcbHliw0X/01ctfyqMdZDskQ6Jy/z2NYCFJY/dzEOd5eLBD8pKXn4JeOtu1938+LL8NCq1 oHAFG1yyjVhJt9UxCdyTsoLHQihSoxnDWwnFFh8WrmpNoeUbrziMqTBWXvuhXyK4A4mn6uKrile3Z S6fkUKyWww49mEpV6qIJbhtVn3FrECwh/vgdXGv9mYPQ8mUvxpvZpxMTdhxHk4bhR/JfSm+mmzOjd M9I2pyrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxFO-00Cdp0-TA; Tue, 28 Feb 2023 10:30:14 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCX-00Cc5H-3k; Tue, 28 Feb 2023 10:27:19 +0000 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 31DF46602F90; Tue, 28 Feb 2023 10:27:09 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580029; bh=g3NFpJH4/03P+ic0BhIheOKxhuMMGL+BE+w/2aTRtIY=; h=From:To:Cc:Subject:Date:From; b=LA/b4pGc1pYewDwhPssPa64PjNlqjxa1iWFAH07T1+oVAmCIJpmHfi2DrgrlXbnLO m1Anv6hn3Fyb3U8XwyXAKrN46v85PD2nrrUSg7sTLnvlwbCt5CWyPKV7TbLw6krpjI 6SuFxwHXemINV4Swuufmdx1Mj29/0zebztcOBizo93nt1I1jhZW+jB3O981Ko1Cjyy Z341bJKmyJUQ1I70Ofj/WLt9GsCMMDuh/lZHKayubYicQ30TA0Shz5moJLDEAmWglp pQAWHnK9yBUxgIrNBpgDgqg8agXKBviPVnvO78eez7ZbkbOCO4AeMoryvyhSQP5YIH DJmeqg3wSBXow== 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 v4 01/12] dt-bindings: gpu: mali-bifrost: Split out MediaTek power-domains variation Date: Tue, 28 Feb 2023 11:26:53 +0100 Message-Id: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022717_346434_31E120D3 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 From patchwork Tue Feb 28 10:26:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154628 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A692EC7EE33 for ; Tue, 28 Feb 2023 10:27:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AoTZEtmrkUQkLMvWbseF56KVXsJKgmVJ5cikWWvBTp4=; b=Bs4ZosE13gfVP2GZ7ObgzfRXno PRGi+pU77Dxq4T44tkFNRznxX7taXvbZ22cd0hx28BJQzwDlEwS1//RjdJbL3Lk1bWrNhKUsDWfaE fCU0W76hhHYvakXXcujD5v9TwpacG3F6c5LZQjynqdMVCkL2cs3rPaXvM8xC2v2iJGhng0xeGZsAe jCA5eQ4DUdAHjXeifJPPwRcPHH7UvB2u50M+ceaKIqNBeOiOMf0yOYgYYpG4c9Jw6LC3Gl/cEETIX kdHIounl9hS5DY/yCzkYvoObQTNFNyg+T/h+HT+4d19tFdoDVpJIK0IT+S1tI7IhNdiVbavUP4Ypr ZsGuaD0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCn-00CcLM-5m; Tue, 28 Feb 2023 10:27:33 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCS-00Cc5O-61; Tue, 28 Feb 2023 10:27:13 +0000 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 19EDA6602FD8; Tue, 28 Feb 2023 10:27:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580030; bh=07ttYEO0iBLHOrhXOFTPyKzhESTahMlFIiXlO4bGx5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HwanA9e8mQdP3F3nehvW+iHlvEKe5WR1w7Ik64jb67REBrVYaOGHmeCnb/cBWmP+3 O0eqLn0o54Vtl2zQIJvaoTCJkmxc1IJTDGM44j2cpFV0SQ80Hb7sqzgFXHNuDSvCUF 6A8nwA2xhX+22Q2aFA2Ckbg3gdo8bsL/CuDxdXJLaB2H0nFXGDQQ5phS42jz2Le6cq UAniRBIPAO0lVda2L67lVGR2ut/B/j/oi7s1bhuBLvCOdJSpEPdmlRYXgYTTHSDlET kU9+dLtg0YnJiLIKrnvEmr2nlQ9+enUFdK7QH50b1vHb5+hTU5C3fCAmOmPlczawXt yS9fsVl5VaL9Q== 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 v4 02/12] dt-bindings: gpu: mali-bifrost: Set power-domains maxItems to 5 Date: Tue, 28 Feb 2023 11:26:54 +0100 Message-Id: <20230228102704.708150-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022712_373713_0A06E2B6 X-CRM114-Status: UNSURE ( 8.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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: power-domains: minItems: 1 - maxItems: 3 + maxItems: 5 resets: minItems: 1 @@ -157,6 +157,7 @@ allOf: properties: power-domains: minItems: 3 + maxItems: 3 power-domain-names: items: - const: core0 From patchwork Tue Feb 28 10:26:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154653 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72AF9C64EC7 for ; Tue, 28 Feb 2023 10:30:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xFSNjgvQCbRLKguJlWgZtXeN1OyCNt0GGC7S26hO71c=; b=b+rk8VtDaBlL+KYhcXLWWE//Lx MIrQn8WdrYZcFGDu39Znf2Abl7F8QekDzc6gSVWileCjEmyMW1yuCJznNyWbDYVq3AHNVQez++FOl OmVy8vEx6CCLZidtgt0C+TPh0AarTTNthtidRrg/U9R0ttgAy/zWYAi5eek80RllqO6psFEgLPIHQ KLVtSNnASH+T9JxJ7lrY0Ux9gx9tWTAQTlcMn2kOu7wzco0KsnZ/sxvDZ0HsJ3Y2GzZqdol3LF7PF MWTm84l2dJ/0khyR0VDxutHWoJwIPezaJua/c/3mIpbF8sqBoaytCCrCN/ULJqhNTzIvG1Ho5FsZx 1oGLYz3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxFN-00CdoH-FQ; Tue, 28 Feb 2023 10:30:13 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCX-00Cc5k-3j; Tue, 28 Feb 2023 10:27:20 +0000 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 01DB46602FDA; Tue, 28 Feb 2023 10:27:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580031; bh=IUwSDoZ0KzMAk6G35a7rYGldsO2EXTi5ixj8lVj11EM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S8Eds0pn6StacRidqZGXiX9a612WEx1EH26yZRBqyAP74bbjvEgbKJTpWdOVcnk3k 4r21SW3n48f0VBiyTwGIMgLDxASk32LY0CqLzSnmqnjm42qDhDoeqk8iAPNmrduvsq 8oMChUnwHmO324BfRJ76hwV4dyh06bEzl2scsCSGpXxcvulEoUuJsaIQ9mdrF4iBz/ Nwd3CqURq4E5cOg2w8vAp0ltFLi5qLNJ8ORVj12bTXXbitwOKIMHxp4OWFGjRZoSfe C+FfmzyBZ0qR6J+qwkGC6Xd7VFmGt0lNygeNbG/qRRvaiG5dVPP0pu2Z/BzKog21T7 1V5sIotQniwjQ== 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 v4 03/12] dt-bindings: gpu: mali-bifrost: Fix power-domain-names validation Date: Tue, 28 Feb 2023 11:26:55 +0100 Message-Id: <20230228102704.708150-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022717_384935_D9B4DD7B X-CRM114-Status: UNSURE ( 7.43 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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..bf0f7f1f71e0 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 + power-domain-names: + minItems: 1 + 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 From patchwork Tue Feb 28 10:26:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154629 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90F1BC64ED6 for ; Tue, 28 Feb 2023 10:27:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IXZhRcxoYqPSpvzBcGXmZnDlN3ZQ7TAU9/2jMO7za9M=; b=AorRT/Pxmwqi8dJukhyGllr5J6 RpaOlWZPBd9e1VUI2ISUwxpDpX4z67u60HD2ez+PmphQDhcJNLP3NI6hYgA4KMfoIGS2RAtminGGj VhEfeGtuFTPvt2KD3/N6m4hS/VM0Uvtibwhnk1hA0LgoTORY39uNLR8E/xZAJvhRZWUR1ElG4Qf0D aZx6AuLhXrn6NKORaUgJM0c7T1LpV6Qxzaeqye/68Z1CB7fj/7c7+04Pdg12vAFQ+Cz6ycempM/s4 /hWnZ4JIjpIxqd2kmbpfsQxxSn55xpvyif4wn7kT2GtcVxMr6LlBiXRS/vbi5EYXp7o1SPWhJ1byf 063N+0Og==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxD3-00CcWq-Hs; Tue, 28 Feb 2023 10:27:49 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCT-00Cc68-Pn; Tue, 28 Feb 2023 10:27:15 +0000 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 DADA66602FDC; Tue, 28 Feb 2023 10:27:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580032; bh=/lMqqY+ruC5MK523tvrRTFkgnEJHeIu+JnhJU6LE/FE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ocPxywjVq2ceTiRY09SOE0M7Ru5gguOe/lvBF4gy6f1ISt40hyFah22qGAGTB7SlL FCh9Z92toTeVdkuJdabka/dIpLwqclbAgnsmbgMacqiqmXclc7lAAdTkABGss2drxB XVu7V8JnRZhmllRoH4PLpJCGNPCd7yV+Zfrop7KThb+uiL9h902OeQz5m20sBPbjpD czXx2wM3JPFLmX9Ilelz3cHcSZXmNNFsD2hCuOPgF4pTIOC4s3M1vK3wL0XCvvtyyE 6Kjp9e3/yqmwLac/Y9k7FVjkg7HMSVAMmrGtYwO7OHl62CP2HjYmbIgFrUfkWYe4K7 6KN38twFRpH9w== 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 v4 04/12] dt-bindings: gpu: mali-bifrost: Add sub-schema for MT8192's power domains Date: Tue, 28 Feb 2023 11:26:56 +0100 Message-Id: <20230228102704.708150-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022713_988804_2A875FA7 X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 --- Since the changes are small, I kept the Reviewed-by tags that were released on the previous version of this patch. If that was wrong, please advertise so. .../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 bf0f7f1f71e0..c5bef872114d 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: From patchwork Tue Feb 28 10:26:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154630 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CDA3FC64ED6 for ; Tue, 28 Feb 2023 10:28:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=d4EhRTlJNKqTvjOXCp6RtAo5OeQaDjXq9yFB/mooVfY=; b=4pFBPAMzsRMoZuyE0neyQWqgCM VZd42Fls2xdKglY8s2zn5AJ2jrPQmyO1Mf7K3qVJZpWUM12FMNs9l9dIp7FIkCvrDIeKx3rdkH7bd FwDP44hGDufHL86cI6ijuSHe5Qm7tptsLxB7dsiC1Jp2ndc0WJeA0ADncIZ3qVi2tvLFk6X8YPPtO FOt+f/BtG7nIRDpUT+wvw/O3kzBOPseaICk23vZ60hJ7U96w/uipth99FItB/++Y9ZSZdbLj04erW RNW7IFcaeiQ/tqR8c5pJQZEYrPMK84CGtHy/ZixaJaqJh+V5dfT3X2mQIARz9IgROCgnwsNi9z9eI 2QTenXDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxDN-00Ccj3-8f; Tue, 28 Feb 2023 10:28:09 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCU-00Cc6V-Mb; Tue, 28 Feb 2023 10:27:16 +0000 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 C18B06602FDB; Tue, 28 Feb 2023 10:27:12 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580033; bh=DycugKaR5mUM4/B5jFI1O5Chf+Iz4ZY0tMtXPBou2pk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TciQedvWltIU9GlfNDq1yjwAWt4XET1fgMhl0b6ZCnY+lY0vdzRTnVQPCOaA5LNBA tG33T24975UVz71zgw8/NZVKYtYc3CGnkr095mNYN67WrLecErMKuGYEmjI6rXHu2i Z+Qqc+KjsW9mHmrJj65YRImlICLoEANfaAXB37L0ubbEbB9swHQ1IpndwbmF4RurdK kGoXOFGBQMg9FRRmhhAxJ3BpQVIjbBKoP3ujR+RsO6Ws4O7H0VgNYq7HK4aYp3Pt1M eUWnuoCv7eGQsEnLZnkQsXkEqP9OCrfKNobQSrVg8QLYSY7nNSlsnh1pmMnOg01cwi FsELsq2vFknFw== 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 v4 05/12] dt-bindings: gpu: mali-bifrost: Add new MT8183 compatible Date: Tue, 28 Feb 2023 11:26:57 +0100 Message-Id: <20230228102704.708150-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022714_888604_F4B820D8 X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 --- Since the changes are small, I kept the Reviewed-by tags that were released on the previous version of this patch. If that was wrong, please advertise so. .../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 c5bef872114d..cf24aaba70f2 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: From patchwork Tue Feb 28 10:26:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154655 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A92F5C64ED6 for ; Tue, 28 Feb 2023 10:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/wQJs05byhrrLM8BF/IW9SqNQZTG2r5owrQyzEoZjSg=; b=s70DbWv86UcS/02k5xuBrJeht9 z/sdF5upsa8RpJdjtI7Ho6DCWHdnllg6Xx3ln9Y2OFM/nmMXBfAZRm7ZDqtwA1wDF/huSrwXigMUa 1eGvCBsJPYXcrCdju3/8j9DqEijaNXDzq0vUzI91/4DKXnPa0P2vySGcfyHdX3J9R19iqj2y8kAvw +T+60yNONpeuDSzQNL+eoCiHiDzMjOCPw0beSIcfB3nsN+Wof/+7vZb0I3drsYw+kb77y+Ca5lO27 cZblcuA/7kVotZcANkZI34teRtoimpTQpxxKn+RxJRt+awBY42ZrjaCL1bir3jLnIBrtRy4vJtacl SR4sxDIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxFS-00Cdr1-3x; Tue, 28 Feb 2023 10:30:18 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCX-00Cc73-3a; Tue, 28 Feb 2023 10:27:20 +0000 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 A91E06602FDE; Tue, 28 Feb 2023 10:27:13 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580034; bh=bxtPSXtkYJhetgJR72HKbYbaXEEqIZSwJCftN/W21/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CaJ6RRwqoHEFPQChKcPrJna+kHBLyaulH4Tnj5MYrHoZ/Mn2WE6E8r2yk1PSbODQR PQs+LAenZVzbbSjDYacpUzx08upKuyQpQ9NOZtVALR8899NeM+Nnoc6BxKAV4yZVto o1evuw9nFf0o+nEAMT6uiKeF9ZohB/4Bb5AUwtLdzGHcIgiztATlo/IKmwSYoV+L8q EPgFRWjzmnQ4H9v2bMfK4AjwwE1F95k5TT0pTiWtnccZ//JAVPTb0+8Et8rUYD9CrI BffdDsVpgN8wjN5yN3QQ7LIGqgJgwf9xdrtETmh+xtXLLdoe1dMLDWIR5KYyxAhU9t NU+f3aYmxzZGg== 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 v4 06/12] dt-bindings: gpu: mali-bifrost: Add support for MediaTek MT8186 Date: Tue, 28 Feb 2023 11:26:58 +0100 Message-Id: <20230228102704.708150-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022717_374538_0CF2E366 X-CRM114-Status: UNSURE ( 8.00 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 cf24aaba70f2..9f3991b6deae 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: From patchwork Tue Feb 28 10:26:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154631 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C557CC64ED6 for ; Tue, 28 Feb 2023 10:29:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=H/c7BX5MG88D5PyWJciXj6YiiuWDAq6tBfEEGE2NVj4=; b=OWuvsOaWyCFwXt3xK469pJp6I9 Q/H4GHpT0dRroebuDp+nwncZxuDuyf1xa3urWY7mMZTtuzqD/g2JQr/dOtgwKLxFvRZeFbBLpUThF rcdckeD1UMiEe/9NTGNeQ2b/CzMltq473XWPKfmCH5KQ44desNNK8X4do608yGyBDOcIzEP9XSIos ALQVojtKoVyUy3n1mH8pj8j07AF50d8V+eWY8e4NlmJjv11yw4ADxsUI3USOVEUTtUaMeTOtMTDMs vfeBr6ia3FFcvPP7GcCy7QjoE8UnsTAHDT4KxhcplkDLzDQZIYbfI853ftp6XfC7Tmp3fvg8/WhOn qUemTKjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxED-00Cd8i-O5; Tue, 28 Feb 2023 10:29:01 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCW-00Cc7l-GR; Tue, 28 Feb 2023 10:27:18 +0000 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 8F45B6602FD8; Tue, 28 Feb 2023 10:27:14 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580035; bh=58UmcWTMjp3ueAg+ubm3lZFiBe9/6S/M696EiXUjy5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZpHJ2RwvYuZTLDri18Sv6a1Pq1wOCNfK2lT5RYzhakbjg9a0VouYr4F9Nm11VQNEn ocqF+A59d6T52VzBOnnqG7RIT1Wk8jz4AOtxUdUMZbFyel6AjAaDtTOO/GfArsvx1f TduSHPIFDGt4J7wFu1F7J4bnhj8sBFq7ZKDkJq58LDIV+/mvJ9kSQAm9mwattgSIfb WCOLN334v+ngVFS0W/FFW48qRXDwU5LhwvVvU7cdLzYqp/vjAaRz45PzEbJoeetP8q zMwfmr+iBD8r+4NnVtHA03bjiIH3YXYRIN/+STUU+UkHzwnCK9awLooMfig1+g27iJ IQhL62jOQTn6g== 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 v4 07/12] dt-bindings: gpu: mali-bifrost: Add compatible for MT8195 SoC Date: Tue, 28 Feb 2023 11:26:59 +0100 Message-Id: <20230228102704.708150-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022716_717752_BBBEA881 X-CRM114-Status: UNSURE ( 8.17 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 9f3991b6deae..8a0083800810 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 fully discoverable + - items: + - enum: + - mediatek,mt8195-mali + - const: mediatek,mt8192-mali + - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable - items: - enum: - mediatek,mt8192-mali From patchwork Tue Feb 28 10:27:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154656 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1AC97C64EC7 for ; Tue, 28 Feb 2023 10:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Uu2ko/I2+FIAVizMpk+6MoW16wk0zrb3QEtaQNGzMgc=; b=paAxRuCVejTnJhY9exdOO2tNlX nYtw8HJtiaTcZqiwWMz9bIooSJOFjWTuusn7XGj88pBD9THgFWsepFBWYZQNKvOZ5gdPvvzFteCcT 36ap6YT5Bmaa+C5FCSMCcOUUqmzOGLJCrSuRkzBbTvojXcczTYCtq3Jo9dBtk8k1kPBRE3DtT2WTO VEcJheSOfmae0viIwaw/lAEGxrwjANvFkEwtuBWHDGmb+Zt4mtfNkboHmc87JmReoqzU/+az/i3Cu +jCR1TssquRhbe6szP1oc/3AuLuvN1OQicsDywFVd803zn7xzOJwiMuj+8TZFfZIZdguOF0dbWlOV SVmmPJwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxFU-00Cdsk-7A; Tue, 28 Feb 2023 10:30:20 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCX-00Cc8P-Ez; Tue, 28 Feb 2023 10:27:20 +0000 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 753246602FDC; Tue, 28 Feb 2023 10:27:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580036; bh=X9j7xcxPWqqju4SwMykvvaoqD5cIUMh5cTk3zCzxcjY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LC9MFIZ8VU3/L0enAm8U1kUxOFCW2IuiudOg7BO1K8C3vbjEaj4wXgWLJUrg/0Zis rRNDKijyS67V2kqNFuIeV1gigUbFS2vZFh080XLzKRp5r8P/mQ7D4m0SDtNDhYy6kF qnK+KmXVyYQRsm77z9kv1xVRYblldxk29wFAjMFE9esezF1X6Tp+rDcUHT8z5aMsaw pk9P9xRXcHewK5FR+l64yqlG4XXWsyPEFPyR9buKrEnejvQtY8E4HzobfY/KZIkpGx MUrNbXuhXjYHV1mLedFP9+mrMDqUtNQTrBiJUCLcmJ5LoyBeLQGvk2l0A8tOL2loiG jDlydoESAtpgg== 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 v4 08/12] drm/panfrost: Increase MAX_PM_DOMAINS to 5 Date: Tue, 28 Feb 2023 11:27:00 +0100 Message-Id: <20230228102704.708150-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022717_682169_8AF79B22 X-CRM114-Status: GOOD ( 10.00 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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/panfrost/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; #define NUM_JOB_SLOTS 3 -#define MAX_PM_DOMAINS 3 +#define MAX_PM_DOMAINS 5 struct panfrost_features { u16 id; From patchwork Tue Feb 28 10:27:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154657 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B201C64EC7 for ; Tue, 28 Feb 2023 10:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oRRbmSQ3Rq/4N4LJOPHJPIMC9cy1PqF0Em/E+4AfhBU=; b=Ilk73c/oJuHruGeUNzrTk7+Lp1 pLrzzf6khUmpAOBdJoa/q4CJoO1YA1ixpQ07EvGBhubRanYlIEupI6Z1aWRn7lK1iqP3CBj2A1ZVK 9WHbrLo10S2k/05DJjZz2rJDN034UvtWCzIHNcv+b9efO1Wtv8QmhgQgqfex+DTTLQVCZ2eZ19gDC cMKTn/YMBb/m6yTDTbB7zxiijHTrE9b7xXwEt34Uel5OsUslaGM/CyUZ8ajYXYvgYAcI017dcIH71 cE+kf/qkjUMXaIs1y1H5jgNNx24PguPTo5ZO1RPttZmrTdHLXppj1DOVZ3ec7KlWpVZcVdRpkSvnX PJivQsBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxHA-00Cexc-6c; Tue, 28 Feb 2023 10:32:04 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCY-00Cc9q-D1; Tue, 28 Feb 2023 10:27:22 +0000 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 5A9496602FDF; Tue, 28 Feb 2023 10:27:16 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580037; bh=HedQD3Ilc5pEnx8vhQO81s7TTNK+oqpJPvaglDZ6DvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i3y3MIK8tlPXFTrBcJE92aYQveJmU6nA7x6I3fYH7PSDC9nygTAK9zh8T9ygeyXFE TNT54P9E50hy62QWRG1IZEV3tgjZCJLW920xA3a2VNUumEJXBYpBBO3Ats+6jdDbiE frdAVKNaUpJaMY1ndEblkJ41bb+GHhvSJblSU1MDlYgfSEtKjw3rWxhjkYI8BDPyJC IsvuZoZbG/5HGmVpAGZI2jhUCQpqRL99hrxy7ra82MGZle+gFXaYKllkuyeKeLtm7z z1tn6NckeGui7MUHSf8vw68vgI0RN1ak2/f9DzCKlNy+0GYFvv4CqfHrAG/0ZeWus9 6luMsCNwnJzZQ== 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 v4 09/12] drm/panfrost: Add the MT8192 GPU ID Date: Tue, 28 Feb 2023 11:27:01 +0100 Message-Id: <20230228102704.708150-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022718_650253_C620BD45 X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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/panfrost/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[] = { 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)), }; static void panfrost_gpu_init_features(struct panfrost_device *pfdev) From patchwork Tue Feb 28 10:27:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154658 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64FC4C64ED6 for ; Tue, 28 Feb 2023 10:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/rRZquBeL2jOnSPHoHCrDfUkL4Y+iXOG/ZqD2+1dOXQ=; b=sHt8fu93aqtHPmJlVwNjVBp6X5 bF4xFh4G+K67zIDBVLcfrh5gZW4Hb/Q2WhPL3eZfv8ze4kKhQpUDKUbIwZabjy3Cdg2SYVADzfhT9 /xUkqvt4mgGQYve9q7f8yPqjKk55+f3FUUIywZQ4MeLLkR1PcrRnCxGJBa3WGTwlPW2+vfV3Ke8qI HpAfejionD+OKf4Ib0I6omTtTfwTmGf5HIxvevCQ9CkCkmM9K0/hUdvc96WMJ4w0mX4WoZ+xr1A3p tlQE5L1lGYYppBJau5hGPg+0EUEHYSzjGxKtYAakcrCXSRNvyumRC2u+xCyfI/pUsT3JrV+8txgpI pHE40cxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxHB-00Ceyd-Mw; Tue, 28 Feb 2023 10:32:05 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCZ-00CcAt-8r; Tue, 28 Feb 2023 10:27:22 +0000 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 406306602FE0; Tue, 28 Feb 2023 10:27:17 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580037; bh=XOBRNDDFJGfYsIgxMZ/xxG6T/bqER3TGwYBPNyV4tY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kNjEiIpU5LEKmdXFZ7CYc4ekqBOdxQYUdJ+y+fQEMFo66ksXXaAmFsXx4O/ZZtDu1 f5C2oBTaUqBeok3t/Mnte9PYCUSqmJQvQjp+eiHCGmpv0Sev3Rgz76NJix7iQxryQG jG2EUENslJdW+bRPooV/a6CGLVBb66/+r/qt5xxsHPjU/icT9x+hOaRRFGoPnVyqzY AaDJEvCHtOd49J88gIJWlDvFisxpso75d0v3syCjuqB4KHzPoEWxfv4rDv01ilY4YN 2OjTMrv/gqK57qMOefQSzkzeBUA7brmNlQEEWGA/fdkE1kJaSk4/1n3Gw30qrasLKf 8NVwljvUhO0zA== 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 v4 10/12] drm/panfrost: Add mediatek,mt8192-mali compatible Date: Tue, 28 Feb 2023 11:27:02 +0100 Message-Id: <20230228102704.708150-10-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022719_532047_D1F50055 X-CRM114-Status: GOOD ( 10.33 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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/panfrost/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_mt8183_data = { .pm_domain_names = mediatek_mt8183_pm_domains, }; +static const char * const mediatek_mt8192_supplies[] = { "mali", NULL }; +static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", "core2", + "core3", "core4" }; +static const struct panfrost_compatible mediatek_mt8192_data = { + .num_supplies = ARRAY_SIZE(mediatek_mt8192_supplies) - 1, + .supply_names = mediatek_mt8192_supplies, + .num_pm_domains = ARRAY_SIZE(mediatek_mt8192_pm_domains), + .pm_domain_names = mediatek_mt8192_pm_domains, +}; + static const struct of_device_id dt_match[] = { /* Set first to probe before the generic compatibles */ { .compatible = "amlogic,meson-gxm-mali", @@ -681,6 +691,7 @@ static const struct of_device_id dt_match[] = { { .compatible = "arm,mali-bifrost", .data = &default_data, }, { .compatible = "arm,mali-valhall-jm", .data = &default_data, }, { .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data }, + { .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data }, {} }; MODULE_DEVICE_TABLE(of, dt_match); From patchwork Tue Feb 28 10:27:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154659 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C648EC64EC7 for ; Tue, 28 Feb 2023 10:32:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kJkPXXd0E1FJFKrycqmi608Pd6u8FQxFygP/oYqBqwk=; b=aziqmUyIhXAhWuXs4PyhqiqpZx bvKHr1dr2dS5WfHiZ+fW19wUqAAgD1Phr8SzNr2sMBoOU9JNEsg71jhnKDlw6YLE4C+zUs/RyH5ni cXBb2Q/0nwKBYwNxVg3GFGFy9v8JfsBdj2lUucg8cYDJp2c9q/AXmjggTyf5vzihqQf0Um6CnbLfJ XccceDJ/7YzQT0UnDkezQw+4Cd2IuXhQWGuizh+zHmy5tpHckzwQpiNnSySjkXhfOW6CnLJOqYqp7 sv+ekyZEAk7MkQNUHfeW8vpztVuegNuMJ23Qn/wkCOcFp61nW28kezauD8dVUHfGj71ZY4a3qT8mf JBxVisgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxHE-00Cf0g-MW; Tue, 28 Feb 2023 10:32:08 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCa-00CcBi-04; Tue, 28 Feb 2023 10:27:22 +0000 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 1ED596602FDD; Tue, 28 Feb 2023 10:27:18 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580038; bh=d98v4XkYuSdlaBMRVhy8ckf3WPpqfT9gFqNu9PlgtLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qpy69orntrXDViupi8/DK29prpf9GYT8qb8Ln6gnx4JzEs/k1BRLwAvGJ6LXpp+2g /NvsuUea1bUD0csMXDqBkmm33isexWvMquveQqUidIrHovwyW18uj6dzVf1GkvBOcz RQ503puGDYPDuszsHcytrysZoNnwm44fPgNzuY61k/x3xuziscvAB3Te/dOfD1YyW+ YeQWOvIy8w+3CxbtJXSez8BWjG/O8zalaFEEaQqcXJENRlolxLx6ptROUAtT2f6DGO dtGdu3POoMF52pYdQYCwqUtINTTj5etgVLE9b0GEJnCdyG2T0rawleI1FAv89ZxlmA /5ohiGzZ0Oejg== 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 v4 11/12] drm/panfrost: Add new compatible for Mali on the MT8183 SoC Date: Tue, 28 Feb 2023 11:27:03 +0100 Message-Id: <20230228102704.708150-11-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022720_251965_E08A67F3 X-CRM114-Status: GOOD ( 12.52 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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/panfrost/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 = { .vendor_quirk = panfrost_gpu_amlogic_quirk, }; +/* + * 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[] = { "mali", "sram", NULL }; static const char * const mediatek_mt8183_pm_domains[] = { "core0", "core1", "core2" }; static const struct panfrost_compatible mediatek_mt8183_data = { @@ -663,6 +671,14 @@ static const struct panfrost_compatible mediatek_mt8183_data = { .pm_domain_names = mediatek_mt8183_pm_domains, }; +static const char * const mediatek_mt8183_b_supplies[] = { "mali", NULL }; +static const struct panfrost_compatible mediatek_mt8183_b_data = { + .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, + .supply_names = mediatek_mt8183_b_supplies, + .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains), + .pm_domain_names = mediatek_mt8183_pm_domains, +}; + static const char * const mediatek_mt8192_supplies[] = { "mali", NULL }; static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", "core2", "core3", "core4" }; @@ -691,6 +707,7 @@ static const struct of_device_id dt_match[] = { { .compatible = "arm,mali-bifrost", .data = &default_data, }, { .compatible = "arm,mali-valhall-jm", .data = &default_data, }, { .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data }, + { .compatible = "mediatek,mt8183b-mali", .data = &mediatek_mt8183_b_data }, { .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data }, {} }; From patchwork Tue Feb 28 10:27:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13154660 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73287C64EC7 for ; Tue, 28 Feb 2023 10:32:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=R+tG6JS0Kz0cbXbeKHjMGU0WeFesVUIEOdqPcndUf68=; b=0mcMsUvuFR4k2F2Q4sUqqMGzpM JiKvG2/8MvzzkcXbg9luENODEG3ZgUVFEgbc3ugkehGtCOtTllQM/p9WFSrFvVtZn2hoD1n8gn5zz iP01nJ/ZPw3J3JnSCT+RJ5UkYtWVFzd4nnQijqPjAp3NQwOz4PC8in0I8mtZbrELpAKoCuhEEw+7Y Gc1sfBU7TaGedJ7J/c05SMCSNKg6E9seepj1rX3UDoKwH0uqmmfPzwvyic6K9QPpKfaz3CVXqijQR 0FVnZ3wy4RE8hC9Rs6aafJ29Td6hZJrxtX6DfyEw7zZZohD5ySLdHK837nBtLZAREarwldhUvniN3 08QnQNKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxHt-00CfQh-NA; Tue, 28 Feb 2023 10:32:49 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWxCb-00CcCJ-6r; Tue, 28 Feb 2023 10:27:23 +0000 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 03DE66602FDB; Tue, 28 Feb 2023 10:27:18 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580039; bh=1JnVPVujLBT5atPy7IIvdnCv3UEvpv+n+JLXQmdBXc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XBtqrJ661TF65pMMYdFlcwffGxegFzbooParqFCFZ/PsBfC5GB/3luHURrV0BYvch WCUzqm8UyJbNHi0nzLej2N5SMiMMdBKWs2tkkPZwyZjadsTsXN9minzIpXJhksPZjI +ux46nPhjvajG96R8MeOmWfzjPAetD9idFqfaOV8E+17fgrO0Iy21mkoLIVcw++SDJ yHLrAum9cY2qA4NxshgkViXJOCqrA8UzJQq67gtrYEyqY8Wnl3ZXFHR6XVYVxEl1wf nyMaFifj5PlKcovAGTC7SYhuFyW5h3BBhiT4/GGTJAYscxIAyk9k2OM4qV8VWoHXZc minCGbH9D9V/A== 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 v4 12/12] drm/panfrost: Add support for Mali on the MT8186 SoC Date: Tue, 28 Feb 2023 11:27:04 +0100 Message-Id: <20230228102704.708150-12-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230228_022721_415657_DA78FBCB X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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/panfrost/panfrost_drv.c index 14cdeaeeb5c4..e4053bf84c62 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -679,6 +679,14 @@ static const struct panfrost_compatible mediatek_mt8183_b_data = { .pm_domain_names = mediatek_mt8183_pm_domains, }; +static const char * const mediatek_mt8186_pm_domains[] = { "core0", "core1" }; +static const struct panfrost_compatible mediatek_mt8186_data = { + .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, + .supply_names = mediatek_mt8183_b_supplies, + .num_pm_domains = ARRAY_SIZE(mediatek_mt8186_pm_domains), + .pm_domain_names = mediatek_mt8186_pm_domains, +}; + static const char * const mediatek_mt8192_supplies[] = { "mali", NULL }; static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", "core2", "core3", "core4" }; @@ -708,6 +716,7 @@ static const struct of_device_id dt_match[] = { { .compatible = "arm,mali-valhall-jm", .data = &default_data, }, { .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data }, { .compatible = "mediatek,mt8183b-mali", .data = &mediatek_mt8183_b_data }, + { .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data }, { .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data }, {} };