From patchwork Thu Feb 23 13:34:30 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: 13150344 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 F1BE4C636D6 for ; Thu, 23 Feb 2023 13:36:18 +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=U1/arpsFTNupPbknD64llFhKUm/wlNgsw1KbnSZuMME=; b=hnOMSUdfoMW83oJu/BRcHuc4KG fC6Dp1qOe1WfwhYxVgmnxcywC7To87dQLXjslCw6qVlxxNHomlIK5fi8vENp75qYtpAp9yBd3+hgr DyWR0NjUSkHBvgkx+IHb55HXdFJXhssuzhfrcR+AXQ4TQoU3s9/qNzxHvZsAWh7gLgnCg3WzyIwiD nf3Dt5K6tvDRXySIv93ta2qTzPK2nsAa+2PWEGhzDC10VJCO600/zipnIrl7zUPaiJpaQtstdwRNw r5SckuBJZ2F18qKb9gUiYScHM8XVwEKlbV7Km2T0HADyxR/W6nl7jOVnrxeAwRi2P4MNA9FFLHaBu GaMGJX2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBlb-00GTk6-HC; Thu, 23 Feb 2023 13:36:11 +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 1pVBkQ-00GSxB-BZ; Thu, 23 Feb 2023 13:35:00 +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 98B0E6602207; Thu, 23 Feb 2023 13:34:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159294; bh=DZyb8vw6qbtsYIBlP4pzm++AodTcvCv6AvAETopyIuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NYu03vv1qJuOYlmylMrIAyYrmCCeql0wrQvbiOajOzEtWMk9fe2QClrSXl5UKBq7F gnBv7pcmHASD9KHn9aA8CYcQjSaz5T5fcM+kbDOExSgearlpCRBas/XTGpT5+o/vDI CvVsacZ/DGPBhH6QBAudtY1bmf5NjNlMbNCuF3n8etvKB2aBijiQSCOYMWIYYDpXcM YQbUXF9UpbvdB0vTfPN00MjxPShFufEUoPr9vo+FYil4d5wyB5m69+RwLNIFFLEevV g0Rh0xjEusaGljfQTj3+SHcAr3LYy+s+85UxTjYgeyaUjp2Il2Zg3U7SMHK3y2HlEQ rSJuihO2Whkwg== 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 v3 01/11] dt-bindings: gpu: mali-bifrost: Add power-domain-names to base schema Date: Thu, 23 Feb 2023 14:34:30 +0100 Message-Id: <20230223133440.80941-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053458_583108_B4A4E417 X-CRM114-Status: UNSURE ( 9.13 ) 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 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 --- 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 + 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: From patchwork Thu Feb 23 13:34:31 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: 13150347 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 C1343C636D6 for ; Thu, 23 Feb 2023 13:36:32 +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=Ux2XCuCi78DmCxhmj2ukCazKOuQq87GMBp4lF8TlRzI=; b=DnRn9KQ38rGNuGCYoUl3f/eMI3 Wb/St9Koc8AVQPpOqMju05FYqpwBPNvQCBnq0V4/zfn5W8p+0xK+ghOqbmsUciOOlcXKoq1J1tQ1H RGnr7oKKStDTbW4D9P7fzgazo3PKh32gFsSiqYjGOf/RrxBankLFmeE0zDnLWKOawiVXLLv9WFLT6 eA4anwsY8oDMKpxKTt7naxkBybxOvDxd1OQSrsuolIUUQoCU0RBQ/o3ks7kp/s3DkfQiNYkk7rNV9 h43CwPOM/E9DNWmZ71pWvb84oHqWjD2/W7qDBUMrHTHRHMv2S+Ry3F/mYxyJeBDLWWvFc0f+/KtU9 ch0I7p7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBlp-00GTuN-IH; Thu, 23 Feb 2023 13:36:25 +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 1pVBkQ-00GSxU-BY; Thu, 23 Feb 2023 13:35:00 +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 849BC6602208; Thu, 23 Feb 2023 13:34:54 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159295; bh=dYSlQLXMyB6AD5hy1+lsca8EHSPk5mj7QuNmBK+ZBoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FGiXI4PexxD/JDfciqJmMleb9tUNND4UDMfKXb7gr+GV9mJ4UeWxUFvWgwbXc3xiE mLw9wEN0gS2VSpf17qZOpU0jYnEIps5xluIiMRlV0Vo0wUISCL33Jhwhfasa+u0RYr Z/JCi930T4A4pte/8K4b+1cPA6URW32CJauGvdR8AYcX7ANSaVC2zb1vef9iNdVpJN UlBRkx+8toCzdc43xXxMd3QjDEP37ypIo4EnWA6yNZ2J30W4LZFUWNGmRW21I7txRC RS9b3Fz3UYGn0CouDtWNuU6DKUV3PD30d4PIetfRHOODdro60dWKW8GYu0TNoxV7tl QXMUbDwsiw2hw== 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 v3 02/11] dt-bindings: gpu: mali-bifrost: Split out MediaTek power-domains variation Date: Thu, 23 Feb 2023 14:34:31 +0100 Message-Id: <20230223133440.80941-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053458_566763_109A2528 X-CRM114-Status: UNSURE ( 9.89 ) 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-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 Reviewed-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: From patchwork Thu Feb 23 13:34:32 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: 13150345 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 CB140C636D6 for ; Thu, 23 Feb 2023 13:36: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: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=9ywC0lpWIV9O+8/h0oC75OVWnYnh4CTXbd+m738N5ds=; b=g5hNxoxCRmsL1Iy3OzOQ+qXVTY oK+DP3I6G+yiIfAjoFuEvUwsZs72zUWGuFQFE+RSQgXL9W/2Od1ZdPAOZzjui5XpyKPkdKQXUFUZ5 FnZt4AuH1+VY9DLPcXKeBwtK+2TJRMaOE9WgDKp5Bz46L/0ec42wNcUF/CzPpWE+OAitQXhcVn1TU 8fCUtrkGV0OGJ+E97+sHNd3tJQa5b0EK9JHkawcKVG89e4BNnC9ff34ItX0sZn4WBna0wz8B0d4bK mOcng0ckgqdGLMh0FDaWqNJcTQu76WHXyBc7kaTnVWEW+rJ1BlDd/sfONHEaNn7tKnfTl+6vQGehL SIcXjiWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBld-00GTm0-Qs; Thu, 23 Feb 2023 13:36: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 1pVBkQ-00GSxi-Ba; Thu, 23 Feb 2023 13:35:00 +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 6F3126602209; Thu, 23 Feb 2023 13:34:55 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159296; bh=JLv1ypqmRwA4sZAh0v4tJj4CqhA/6gB3AMkCmc8wtN0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S2rgnFPD+fTyfHhqgstB7LTl1kGPo44M2phl54QzydFcD2EUaaGWwsajUDcCzkbWs FKvY20+PnWDFfQ0Wzfb5Zy5jEUvSg8jRWUEArHqkY5kwnSZMq+fxlXute/9c2DBFVd BXUrFqYwiPgMWRMEPG5wq8UY3QBdb5xbBV5D73aPEmbpEbzxRfksb5Dmw906xQAVq2 9tyLADgKSJ/ON1K8uLTlWf1PBHBUsSd+GsCW1nQ8GELVlLIw0q6CrvQA70K2sNzJdY fHivw5MkRRtvH/lL3lu43e1ftJn86jz+p1P6ZZdwQLqx2M4s1IXRmGXNxl0i7Jc1aT /ejkmKq5/z3vw== 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 v3 03/11] dt-bindings: gpu: mali-bifrost: Allow up to 5 power domains for MT8192 Date: Thu, 23 Feb 2023 14:34:32 +0100 Message-Id: <20230223133440.80941-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053458_579689_A43D6FDA X-CRM114-Status: UNSURE ( 9.07 ) 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. 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 --- .../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: power-domains: minItems: 1 - maxItems: 3 + maxItems: 5 power-domain-names: true @@ -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: From patchwork Thu Feb 23 13:34:33 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: 13150346 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 41D97C61DA4 for ; Thu, 23 Feb 2023 13:36:31 +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=HE1nmL/pK+99rwUcEZBSlqoNXqs5jByJDekHuPe79dk=; b=NaopXesmQS9c0SadJHM2PuUU6D SmdEn2jUAva3epHJHQQuyscu63mjcWyku59WPt8ua2ghyJBTGWQ1JhURL+lxu51gQ1lU/9F2g1ms5 o+cmhtwU/Vpas5hOyGlq6Nj5ErxcH2sOK99K4R2qXWccOybAjxOXtV/OUTRQLrHXks4Zo22m1SMEd yAFI4tQsj6OyWy4WNlc6LBY1EVOJNLNHraosPiGxowtCDJ1jX4jenBMYwieZ1NiuytOtNRFTGKBHY +R28ujiUDrwTiJPNnUw/wEvbWYVyCx7ymA21s5UNmaPQBYlj0GvKUy81eeLmfBW2vyFFu2H1XYi5u 9yWcTKVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBll-00GTrx-Sh; Thu, 23 Feb 2023 13:36:21 +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 1pVBkQ-00GSyI-7v; Thu, 23 Feb 2023 13:35:00 +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 5502D660220A; Thu, 23 Feb 2023 13:34:56 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159297; bh=jFlvEa9umviwW9HdtIpX7rwDDrEbdIW1Lu37fWHY6Jc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kntM5AwgKX26gYdEGJ3RvpEOmIRLr4Ms4C4mKuT+bG3cAcqlAt3c1T3uAwjkYhfbL daYeus0x3tKaahnQkyiZLSSVmS0roW4+Wd95DYEjVJQDmFG0oVhKOblEx1H08SjO8Y SldPs9Ov6jVmj10004fTmDDHRF7euDMO0pQAek7wUbECOYcpOGftGN+O6aMEDhiM1c IH20vtcSEmZe5q2zuiVuN6/kJXj+dj9nHRv0FsPOuMLOogsBYtxhdd3zDOmAa6BbXg IBPSR6xM7FkfXHv2raMEntf5Dfsgt8Cps9BMRFtlo134gGRkFW3qzFsWVI5Gsx8YNw Tuskcltn3d0Nw== 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 v3 04/11] dt-bindings: gpu: mali-bifrost: Add compatible for MT8195 SoC Date: Thu, 23 Feb 2023 14:34:33 +0100 Message-Id: <20230223133440.80941-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053458_432657_D9E59D57 X-CRM114-Status: UNSURE ( 7.86 ) 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 --- 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 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 Thu Feb 23 13:34:34 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: 13150348 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 ABCE7C64ED8 for ; Thu, 23 Feb 2023 13:36:34 +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=qbFCyiDnazR31Wpk8O7uCqJDZQcBF26z3rz3IXEylsw=; b=oCS0mj+l5xQ/7RdAXr93bEf1f+ jswBvey3XIu1Y2m0hKYHnRuOkKxlzgocy6Qg4b060JDpPqIkhlTRSCk+Z2Zk0M7jXH3eKTJtFMw05 uMof1uDNdJ55sKh4Z0BXL3dXaLISnaqsYLSn30h6ocb5D8TQ8Mqv8BIn0cT4y02YuxBBeN9yqNNoI 4UZcl5tbz+BWT8DOcaEJxaKaWBxYnSJmaP5Cmoxa+bRoyfaNO7m0I/WXRxSAZhQApj7Ne7wGHpAlg dCfsbqa9LeWcbtzFfIjeQXLsDlcmkFK22JgCsruwu+HdsgFmNtfSUN3kx6ByZYbs7GV9HRknY+R+g NoqlcZ0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBlr-00GTvl-EG; Thu, 23 Feb 2023 13:36:27 +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 1pVBkR-00GSyd-4z; Thu, 23 Feb 2023 13:35:00 +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 3E522660220B; Thu, 23 Feb 2023 13:34:57 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159298; bh=laOGM5qspmdr3Jbg8tYgPNAcwC0TKu24Y1j4uxBmTgs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EGliHEY2FfpU6ewOZ7Gre6/MTmOaJCwo/t4Arc33peJ3l5axYDKF8/A4na6/ER1AF toY/zW0lqddMZwoZlLsGiIYuy5mLRapDP0tLpSlEejPblTa8sPpZMVeXbrLsKyNkU+ rPyweyMABKl5lhSI8QPqLv46N0UDHuJQ8Vw99CI6XsnHWgN4lOOTZOX+cTs2kDgbUF TiPztTla2J93t2mg16jotppsSM71hY/mg0oc25XA++kE1ZkZTx3jB+01rBuu9LjGoR S7B5CAZvh40jslAKvY9Sxi7me4yAXOZT7qXu82Pyogefim6OylU49J6dIR0tjv2PSH IZe54ja4qT+Vw== 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 v3 05/11] dt-bindings: gpu: mali-bifrost: Add new MT8183 compatible Date: Thu, 23 Feb 2023 14:34:34 +0100 Message-Id: <20230223133440.80941-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053459_395156_E2D264BC X-CRM114-Status: UNSURE ( 7.02 ) 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 --- .../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: From patchwork Thu Feb 23 13:34:35 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: 13150349 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 3715CC636D6 for ; Thu, 23 Feb 2023 13:37: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=5PFdmTvEkXL5Fq1d/s1QVn/IJt1nY9cmUPxoQNK3fHQ=; b=RxMoTnt472cCV47pOqX1yFsvXD SNZnjXcPJYAfor/5fbSJmy6JiM51ASEJt11ThUL1IWkT7EAOiKEfo67ep7ZsYK3v7/E36s982Zns5 jzK58zjk+nry3rLcLUSCabsXmrID8jHV9gq7MiZEVEayYc2FgY1wu0MYEAVEkXoffmX7KfZT+fB8E JMcuUjDG1yt8FDH9oJcAc+AbUFEUSryfW8Daw0omdDLBKj+m3eZlS0mVnGC3W6CeMoJIueUz7Pm5v CUjhNEOOSxGEaiM927LMnHEKO7aL84QxfCRFprNbD0LKGvjbDViMtQAT5euqcD83xtL0xSQM0Mm80 s4+mZF5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBmX-00GUL8-7u; Thu, 23 Feb 2023 13:37:09 +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 1pVBkS-00GSzZ-0f; Thu, 23 Feb 2023 13:35:02 +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 242906602206; Thu, 23 Feb 2023 13:34:58 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159298; bh=8laopmxtR2OlouaKlRNp419Yf1O5zDNFgjtz+3x6w6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ELHcbqVZlsGf9F5eWvkeUdUS6r54S6c20urNg8COWvLiOWeQLN+XvJdtF111drNqG j88UAdHB5EORMwWIwMyIohA02twGQKeDj7ZETlgdk8i+7kUKvsgdAqKBilxs2I3+fT xpq8W+03OxqlTT9zaJHwvHYhm/olqxKQWy2zyaXgvYVVyLtjeYrLxYFiD/0CtTh0Vh GokQAcANcL3X+dGcE05wB/n2KO8NzQc9cJgF//kOPUj8iUDBRVLq+rqephLG5oUx20 r+31XHYb3qsKZU+qoykzHtdlotX6tbGfzwcUtfEqoQWDMRM9JllelqjpF414w2xzzy Oih3Cp9+LICgQ== 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 v3 06/11] dt-bindings: gpu: mali-bifrost: Add support for MediaTek MT8186 Date: Thu, 23 Feb 2023 14:34:35 +0100 Message-Id: <20230223133440.80941-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053500_212289_B27B4711 X-CRM114-Status: UNSURE ( 7.59 ) 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 --- .../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 be18b161959b..b9424f3ebd5f 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 @@ -159,6 +160,7 @@ allOf: enum: - mediatek,mt8183-mali - mediatek,mt8183b-mali + - mediatek,mt8186-mali - mediatek,mt8192-mali then: properties: @@ -204,6 +206,22 @@ allOf: required: - power-domains - power-domain-names + - if: + properties: + compatible: + contains: + const: mediatek,mt8186-mali + then: + properties: + power-domains: + minItems: 2 + power-domain-names: + items: + - const: core0 + - const: core1 + required: + - power-domains + - power-domain-names - if: properties: compatible: From patchwork Thu Feb 23 13:34:36 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: 13150350 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 F405EC636D6 for ; Thu, 23 Feb 2023 13:37:36 +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=XfiEPjjoBJoeqNxmphMh/Ub+LC AhIF2BcYRZIjynmZi+eBbTThXnca51RcMy7TQ90W3+4z8N0MUNPb5hj/PwEwuoHbHHywp4LdTH4Di 32HRC0lNH5aohWD3BfWk2HTiPiGfR7hAo/np+dxnCARz+Vx1SwfGSaiCziaw0Yt4tuAb9ZHG7AE0A b8cVHkmdxV5WgSzBCZSydpHqsJcPB/X7O8CU2MzMkD37BOC85svlK1VBh45yHROT5wI4D3jfo5Qwk oU4zzADY/xh1QUJCynxxVJh6oxyb3uXsK8LomG/lfaOby5FrTjIJGW60DtvzScvhNvC0eIcGmtfjw ghi5Pmhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBmq-00GUXs-OV; Thu, 23 Feb 2023 13:37:28 +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 1pVBkT-00GT0d-FE; Thu, 23 Feb 2023 13:35:03 +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 08D39660220D; Thu, 23 Feb 2023 13:34:58 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159299; bh=X9j7xcxPWqqju4SwMykvvaoqD5cIUMh5cTk3zCzxcjY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ct53OBIozlhWIY3U/hyAhuOh03mRrpYYSm5EBI9k2O1t+NmARG3qpK6MZq7Usp1a7 e3Fk357GSQz7mhlI3a0J/hSn5f7MgDOuWhdNIUsV3Z+CYohayKPPJRRHaPxL5PYWRG 9t60KGEUMw9N+JwvU7WsJBKwBzAMyF9Sh3ADLSseFNb0hduGBvGL/FFJrt1nZ2nVPD S+OqEa/NcM5b3j8sfa56GsBACsyTpHarPuCc/4k/2x7uFgdlIaixZrqrnSWNQr5+rq s7IWJoofM/siC9v0IpFNbNlczNwXdmns2AGOm17TdgEDm5ybSdeschCbrp8VeszaZj 3oMABsiIUQRAw== 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 v3 07/11] drm/panfrost: Increase MAX_PM_DOMAINS to 5 Date: Thu, 23 Feb 2023 14:34:36 +0100 Message-Id: <20230223133440.80941-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053501_767117_2609C140 X-CRM114-Status: UNSURE ( 9.89 ) 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 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 --- 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 Thu Feb 23 13:34:37 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: 13150351 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 55770C61DA4 for ; Thu, 23 Feb 2023 13:38:07 +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=DL3gqfr+JS1DPSQQ+/tgIwDCwW n0601Hj6xNGm6RngXD3vqeMx5Umoalcr9gH8O0rk5XUQSzv7mW6Rxd+9T96exVLSYfIxoyDRrsR0G 6vc7jMsqBZBVEnpXrzoEch/hFIIxOzwGJe0nRPduj6pcWdkXrKF3oafDi/4ynBahGNFoP62+ER6ns 4k+P9AmMCNjXLevKNWRnAwRcl7IMpYF7eLwZbhlR4avHpNYkvPq2xKvpY2M5YIakuB+EVSXk3Ouu0 J9MbuONcqmDOwsPIPojyRBAR71t57ebYSIHdO9T4Ff5ng+sVMB0BT1dE3tRJKbhNwkv2+FTIUA1G+ 86I5aFag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBnM-00GUtJ-DR; Thu, 23 Feb 2023 13:38:00 +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 1pVBkT-00GT0o-TV; Thu, 23 Feb 2023 13:35:03 +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 DA46F660220C; Thu, 23 Feb 2023 13:34:59 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159300; bh=HedQD3Ilc5pEnx8vhQO81s7TTNK+oqpJPvaglDZ6DvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ObJ4LF5X4PZNlRDmnrWekg9i9g2IizcQbV6DRR2GJSeASIpU55TnttDCZPkW9wK7F oUEhnbgnMZuYUxMivnVUUIu78obGY9N+2hbQebVBpSrL3J6iNUE6QPtN9zMLJMWQJn oYow2HNSSLAkeGQdcye85zzh8jm6DWR4dmTDrthfu/YItt4/N5dG6E+KqNS9UP+yMV qoYDuBiX0DSgSIFDYBkJBs8gi/y70dnXLP19Ie7af1tGWI9HxOGWpd0b6tXFKbNwk8 7h8/l2kY1WGogawQoutk9u6HwFXujUyvGsY/9rXodKqZdIzAtYqf+iLsW6PNZc0xAn rl6X23v6rdpwA== 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 v3 08/11] drm/panfrost: Add the MT8192 GPU ID Date: Thu, 23 Feb 2023 14:34:37 +0100 Message-Id: <20230223133440.80941-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053502_159070_F0BD01E7 X-CRM114-Status: GOOD ( 10.95 ) 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 --- 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 Thu Feb 23 13:34:38 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: 13150352 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 C4F29C61DA4 for ; Thu, 23 Feb 2023 13:38:26 +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=ihiRwbOsOrpK4xfgXomDalAOZu +6/2oFkb3YUPnL1MfZqoA6Tfbj82hmSP2ZGqTBJvmhrFCx2QlMPeCQuMoTq0Yhiouu5I2BWedL91j Q8DiO+fAnXDSI7d7n0pHkBnAxYVNWCsH3vUZzNCx38czGoz3jJmWLJ1tiqme9aabEPkCRioHCtngD LT8s+ojTffHphtRrpzZXa4fVEVSfKPcr2MdsVkh5mSSHEKDiCgliSx7oDMlDxdEiiCf+IEQoBXveK H72N1B5XQei1sgg3ypLp/igLGJdL6uBG2Dx3gnduC0cmkSufQkT4ZYd+qI/YKp/sPvJlgWfd2+ra1 sC3BWjaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBng-00GV7A-8e; Thu, 23 Feb 2023 13:38:20 +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 1pVBkU-00GT1w-MP; Thu, 23 Feb 2023 13:35:04 +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 C04366602207; Thu, 23 Feb 2023 13:35:00 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159301; bh=XOBRNDDFJGfYsIgxMZ/xxG6T/bqER3TGwYBPNyV4tY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K2hEs3qWTn6Jo3MfIL2vRN2fscHXem6euUhAtaPSESk/8f+QmDgSKg4RNQkN7ADfG yNLagQDw1+8fH4IyI5bf9aUaxNRXWGD3K1LHA/QpY0nPMqJLmwsv+Hz1XHoaCiBdEK 3lWrNGkg5nsymLLa3V4R64G9yrDPZxlAgLgsomQyGPj1WpI8YXQ1E29Kc9CTlDpV6G BbiUu1CpwYfCkqsgdqJP4x255zFuZfC8gQdVd+uN70vEz6Wykcqj3dlu7DHrmQata3 hSjaG5/xFnUII6Gd3ZUu/r7S9OKfK9KE95yWYbGhkyQ3IgObvy9x7HYXI7mxj6Lf1/ jJnNG8vAes+wA== 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 v3 09/11] drm/panfrost: Add mediatek,mt8192-mali compatible Date: Thu, 23 Feb 2023 14:34:38 +0100 Message-Id: <20230223133440.80941-10-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053502_889409_41E7030E X-CRM114-Status: GOOD ( 10.20 ) 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 --- 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 Thu Feb 23 13:34:39 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: 13150353 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 D4829C61DA4 for ; Thu, 23 Feb 2023 13:38:46 +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=saMcU+3LtdQYHnjJ6zs7dXz3aH l3xiCe5m/sxG9BIn/uS7XUpuSMmG7jz/QLT5DpxlOT0NOG1bHR6mbF8MrgsH0WWlh+yw5/dOhn8A0 ohOFPwVR+jM7iAbmoP1i+g27xdEQltixJXNcpr7efUNzfcdC3WcvUbAR4Y12cMvKXHMi6PRBEyYbN ZlNAuIJEkjFBAbTGYOicnpWv886LjilJ8RkldwEryVWFKnMrnhj70KWsOeT8fb1gzExI5FddfwhGk 9pSbknoD/hyVztHAmHcY3EsaoMYSuXTKuPTVTucAKoBAmfbh5I4ci2L6fytIRuhUw/xekRoNFGmpD okjq520A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBnz-00GVK7-Ny; Thu, 23 Feb 2023 13:38:39 +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 1pVBkV-00GT2y-RC; Thu, 23 Feb 2023 13:35:05 +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 A474E6602208; Thu, 23 Feb 2023 13:35:01 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159302; bh=d98v4XkYuSdlaBMRVhy8ckf3WPpqfT9gFqNu9PlgtLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BiGnh69IV/fDTW/ttFIjrRlyQipfGpN6lJfGvE8RG2QP5PA2XxzKvXP5T0Ng30Nbu RPgrEYsC2hIJHKsn+o/2NYBKQ9jEsCy2fur4ybtcGZNpVj3tQ1RPclzrvY4ehkELXv qTproiq1OpDgtg28YiTGIaxko0qMPLWKxsSdMg0KRImVJzxDUGCaeQuSjjec5g/Wkz 8u9XDpkT2rBpeC/ReF60wO+BuIIRTK3ZzPVxsbtrA01FkZ/pNVOuPUJdfv72MaCrET gNF76Um5JwfxiPt318kFBhfmNHuUfMmvoLEjMu/hZ8p1LH2fMEdCvE4SqoWq9Cr4zh lrM0jQS0jAynw== 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 v3 10/11] drm/panfrost: Add new compatible for Mali on the MT8183 SoC Date: Thu, 23 Feb 2023 14:34:39 +0100 Message-Id: <20230223133440.80941-11-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053504_050015_C4B3B498 X-CRM114-Status: GOOD ( 12.31 ) 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 --- 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 Thu Feb 23 13:34:40 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: 13150382 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 C4C68C636D6 for ; Thu, 23 Feb 2023 13:39:59 +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=FMfdiM13fhNnqDKSct6SZ9/VsenkCovJxjsYEtqYwCE=; b=HUkaUmV6uKfRDe8pZehTxeKM5d JUqGGx84uTPaHAahvbMvPQmeVKxm8IL+hpKWMzh7EFm/+q+XRaJsacjc06tVDyygsFjd15DbgVyHc nP8Me8FC57xKzhw9kqFgaOjFmkgZO4yZzQrIJzBqTvVAHF+6HT2jEKDBMPQYng8XgMBifu9MyCkM2 vAIvGftuPnLMLyIEJAStHzGYk760HOi7embIzXYY+r2B38UYKsUV+TCDYmG2gd5AYrcDByjgVu5Tk 22uezL1UIr4uLu4sw5WktnOlQi6/CBpII8KRAXpJslQk6Olc4mkgYUhW418xOtcEj51Ex1ktEZqy3 tONz41WQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVBpB-00GW64-4f; Thu, 23 Feb 2023 13:39:53 +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 1pVBkW-00GT3b-Gu; Thu, 23 Feb 2023 13:35:07 +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 8C6CA6602206; Thu, 23 Feb 2023 13:35:02 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159303; bh=hkk4f6FFc9GkAmhDJ/1AiRSfMxb8riRRgIr9wuciCH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DU3AqJ0zCCiOWwKjRhzNTq4/7HwCBpb9jEPw1PWupbABOHnMVA1gWQgVpgd9kHSqN v54YewBfLsyLZP4fA0GVryUdVTTG3Mytud2s8G7t2Pf9FBJDacdlgUCEcIhN8RvqJo ZvXHitMOwFh28a/EsK1vNvT16Mss035RjZuHjZN+AJv0rd6wYtbwVkU9wfvAeNThVg mRuxTEQJH3sbODV+l2h6xljlgD16lkvD/RjrPXDqQYp0SsyEoJemHQuDJ6DyfcLhXy XyDgx0r2fTFZflf/zIc51MCARWXOJOjbu1toIj3odbWDB95bbnMs18uZJrHmS3qd07 wvWOh2NW9HVZw== 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 v3 11/11] drm/panfrost: Add support for Mali on the MT8186 SoC Date: Thu, 23 Feb 2023 14:34:40 +0100 Message-Id: <20230223133440.80941-12-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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-20230223_053504_750425_C9B03C49 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 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 --- 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 }, {} };