From patchwork Wed Feb 8 10:37: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: 54359 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3380530wrn; Wed, 8 Feb 2023 02:45:08 -0800 (PST) X-Google-Smtp-Source: AK7set+JSnbHUJqfYNxBgztqxC796ox4Pc2hSqO+pT9/l5HcsrL35MDWyZtFdWUFOlVC++y9isWo X-Received: by 2002:a17:90a:3f17:b0:230:dc97:9da2 with SMTP id l23-20020a17090a3f1700b00230dc979da2mr6156209pjc.1.1675853107947; Wed, 08 Feb 2023 02:45:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675853107; cv=none; d=google.com; s=arc-20160816; b=SVSvknLIzjSKRR/s+rBFWYAuzVzmE7r70r58RXG8PIXiCLuTQ+956bgLF1Kih6HYkj iGVo/f42MfgKqi8sx0XPO+40T5aoPH9bUH1MVb/JpMugQugR84iPoeDxUmj71dMMzb0D EV5Yoiypn67Sk81n86q6NnmZXpCETmKAOBXD4MJqEau80GtgTE+CY/1/J3TF0w9u386s 8Y4KTlrTDCh0GOp9BhOCd2c9r+/hGXn6rmYWB3skcylRMXwJcbGSSvjDONBrlc7fmkWR BoT5hQfDxcKOHAJg0PHLm9tCBvSebTUycOnFs7ThNQJ1MTjn5DxAgjQQva/zTBbuXxjs Ns5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SWNmf2nLlhoisJn7hBQMZi0RyjThEJRFSKPxRhFbSpA=; b=CguciQF3txmJqD4xrLNK2R6dqkTXkd8LNWC+ESj4KeOUkCNfgZn3heoMnxo0TXafVW QqQwEAQwy23wkGcYyDIt5VD08aPeKpIoX34x63VQ7sQRgthCoKy9oTtNnDqq7ggWVZge wRjYBhrQUY8je8vZPELXf8nxnOkYmvZITiLtHjn6g0ZT4MIEVnOHYyZ6xv32fvb/7yDf mZNZslkV18MY4f/xhQlDVNCWfs80sNgMRIDMRssJ4OvIDyBDsKRbvXwAehvoIpDHUZ93 zlOsTmrwIgEzJZxBaWPvGa/7v+ULVqsoJFefgKJWcD7HwYVg4xFDda86xPGB5ZA/RuMb Jp7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=K7QoFPGp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a17090a658700b002311599a930si1223670pjj.147.2023.02.08.02.44.54; Wed, 08 Feb 2023 02:45:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=K7QoFPGp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231273AbjBHKhd (ORCPT + 99 others); Wed, 8 Feb 2023 05:37:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230108AbjBHKh3 (ORCPT ); Wed, 8 Feb 2023 05:37:29 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 780AA4740E; Wed, 8 Feb 2023 02:37:27 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 7C5F56602091; Wed, 8 Feb 2023 10:37:25 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852646; bh=9zKNAYGAIzYijQZ5yFYs1JqVdC6zxa+UlfAq3E44SFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7QoFPGpxVSP+tQKfGWuOebcnt6Sd7l0HgiIDDgqcEbc6Z9X2oX2CngfDWRQqfjL2 ttioKTdt5/tFqh19H6ZXV0irIqDpptMKjbJ6h2vKMVAYWmu1lp57CqO6i6QO4vr/+/ 8ZITo3NG4Tu6PgU5CSyyGPkyNHVnS0c98xBydU5cCbfBfuqnS1mYh9ynOP2Lfr/DpG DKWE5uTekG4YZIj4ym4iTzTPkIxwgLcidjyXfjVkwOhkLDWihddzEfsmBUWOP0Cl5r iBTlQjk8u9Ie8TEN0zfTiYHOH2Tlg6ErACv7GNRDCqYCkGZcGi4WcmsmSMj+dEh3mo hIVb/qvf5QvDQ== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH 1/9] dt-bindings: gpu: mali-bifrost: Don't allow sram-supply by default Date: Wed, 8 Feb 2023 11:37:01 +0100 Message-Id: <20230208103709.116896-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757259348709341288?= X-GMAIL-MSGID: =?utf-8?q?1757259348709341288?= The sram-supply is MediaTek-specific, it is and will ever be used only for the mediatek,mt8183-mali compatible due to the addition of the mediatek-regulator-coupler driver: change the binding to add this supply when mediatek,mt8183-mali is present as a compatible instead of disabling it when not present. This is done in preparation for adding new bindings for other MediaTek SoCs, such as MT8192 and others. Signed-off-by: AngeloGioacchino Del Regno --- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 78964c140b46..69212f3b1328 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -57,8 +57,6 @@ properties: mali-supply: true - sram-supply: true - operating-points-v2: true power-domains: @@ -157,6 +155,7 @@ allOf: - const: core0 - const: core1 - const: core2 + sram-supply: true required: - sram-supply @@ -166,7 +165,6 @@ allOf: properties: power-domains: maxItems: 1 - sram-supply: false - if: properties: compatible: From patchwork Wed Feb 8 10:37: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: 54362 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3380805wrn; Wed, 8 Feb 2023 02:45:53 -0800 (PST) X-Google-Smtp-Source: AK7set/IpsZIZ3JmFFDIobCd/qFfNr0efaGE4+wQzuH6s1Tkn44sdY1/u6QSsjxRkvtMdjkjmNAt X-Received: by 2002:a17:906:283:b0:878:4bda:2011 with SMTP id 3-20020a170906028300b008784bda2011mr6153038ejf.4.1675853153702; Wed, 08 Feb 2023 02:45:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675853153; cv=none; d=google.com; s=arc-20160816; b=VH/29yWeLOKtC1xPMOFhgqAK8ZflMZUgFQynirbqxNHZUeCMRsQ8fk8Dgi+zDB/oTg WbAzcEIVzgZSBq0EOLqkXLprb0AxF/UISOiScbJVDAkcr1c+9bMOp+kI4ZddRKC8fs19 GLurkjnmO1oJrTx7NYWmGdkT4nrvYvRruHlu1VDJar7BeZTURAqyG+ZZzUmNIt4WmSmq Lb198QAyxoEewS0C9hVBVutXCG17aOE1qDLI279nBJyKFcDkq3HWXPjVmM/BCkUXaeag D56emgFPKgFPkBx/Xy26t3NY+4ftTcnSrCNecJze26QYFfKmFWmO1/fQ1smhUERekJw1 hw0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mzjBF2E75w1L7hmKJRlyRtNS2bCPZJqCosU6lkNkeOE=; b=bxmGTQvHga2j5XHHhx5qnKbtLs+Us9jZ6sxjhZlYgz4kvchUqEbQwSRacMd4v1IBXx ulomqpKbNa1XTMhZ9aR5O0psjuW8vK29437tJHZr6Idj2/+KNAEi1C7OHL8d08S4bbsj rND9e/IlL9926OhyAmYCNVdAy0Fyd/vBZVkXC57kKoH7Z1j9nBhmn636gzllx51++ENJ TXlUBbS+F0O7UKVTtWIOainvqgf69NfDEAsNkfQEMbPtjM/K/J61Iui6T+i4owpKf769 nYfcYSGEv0GY3kD+JVrMHXYRsCiTFVJUyTKvHfAaSGGoQjedqsRcEWdO8pvFzBLWa95g mF/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=b2o9AxfF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fe17-20020a1709072a5100b00894740b6d66si13606675ejc.83.2023.02.08.02.45.31; Wed, 08 Feb 2023 02:45:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=b2o9AxfF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231534AbjBHKhg (ORCPT + 99 others); Wed, 8 Feb 2023 05:37:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbjBHKha (ORCPT ); Wed, 8 Feb 2023 05:37:30 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F9AF47430; Wed, 8 Feb 2023 02:37:28 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 619EE6602096; Wed, 8 Feb 2023 10:37:26 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852647; bh=c4XKOxPhUZU76+HjvxTFR5jXrHZr0pBaargwTPOI/Ss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b2o9AxfFJM6QmX5gwpY5DMnWxdAumOp5mbUr7Q7fvp4LtZcJo7ZeSLuv3mLd+C4s+ EhMyG5FTLJ0P/FzFbX4poNJLZ+aY9NKBZMrJOHw75Q7x8XCivHX5+i80gyBugOvUCo q1TfBGxcCMw7gD1XY0KVA8cMaPloi4d/EbUrZt6Bh3f+ggW1Bc9fsbug+FUAKJ+gCB ygg8qpkprBgyPpuNvYgm4G1uoc6IdlR8QM6iPieOjQNsI7bGHCenL8FzdfKbEtcyph lvwJ6MJthlfGqmtCrwpJraxp/g2qqQytxAD8GYFwj5KwMCyJQocKzv1kehB9ReTsrf AP5SAdEdzR9oA== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH 2/9] dt-bindings: gpu: mali-bifrost: Allow up to 5 power domains for MT8192 Date: Wed, 8 Feb 2023 11:37:02 +0100 Message-Id: <20230208103709.116896-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757259396140238902?= X-GMAIL-MSGID: =?utf-8?q?1757259396140238902?= MediaTek MT8192 (and similar) needs five power domains for the Mali GPU and no sram-supply: change the binding to allow so. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring --- .../bindings/gpu/arm,mali-bifrost.yaml | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 69212f3b1328..e7aba66ddb8f 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -61,7 +61,7 @@ properties: power-domains: minItems: 1 - maxItems: 3 + maxItems: 5 resets: minItems: 1 @@ -141,6 +141,18 @@ allOf: - power-domains - resets - reset-names + - if: + not: + properties: + compatible: + contains: + enum: + - mediatek,mt8183-mali + - mediatek,mt8192-mali + then: + properties: + power-domains: + maxItems: 1 - if: properties: compatible: @@ -161,10 +173,26 @@ allOf: - sram-supply - power-domains - power-domain-names - else: + - if: + properties: + compatible: + contains: + const: mediatek,mt8192-mali + then: properties: power-domains: - maxItems: 1 + minItems: 5 + power-domain-names: + items: + - const: core0 + - const: core1 + - const: core2 + - const: core3 + - const: core4 + + required: + - power-domains + - power-domain-names - if: properties: compatible: From patchwork Wed Feb 8 10:37: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: 54360 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3380736wrn; Wed, 8 Feb 2023 02:45:42 -0800 (PST) X-Google-Smtp-Source: AK7set/00tO9DLFuiac+f7WBReXSeAqW/f/bgfpj1D1/9GYhAKJRrhUxE/YqDJzBaV6M9SFTzi4H X-Received: by 2002:a05:6402:2550:b0:4ab:dde:dea7 with SMTP id l16-20020a056402255000b004ab0ddedea7mr1363055edb.2.1675853142539; Wed, 08 Feb 2023 02:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675853142; cv=none; d=google.com; s=arc-20160816; b=LoN+tKX5cWKYOG62yvIGlE18tbW2Zhr7jrUOsrwwcu1rgUBNtymqhHs+XL0FCJF/ZI dn3GdkMiategEgG2iA1FlRfZAhN/4WTVAbsxVGi91Q9TBaOvxc6llaPIj05cqdyxlbcI ImFYQkQoHu+MsMX98H2M1O6vIwrX3DdgCvBjvqLwYG4O11pwsXt9ISiA6M8W1N6f+9Sp kU/Lpj73c45lXrfUvtaOBUi0MEtBOAmqF7L+CjK9bEf7rKjD8wjzH8Zvfdf2+u/CoF7U wxPPu5nhJMUIEAO78c2pCUypVHdqyQuYyUtc7oruG/6jAf4ywnizzWcRw5JgCuqvsKyo vvXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SPmcqlCH8gfa/S0XyLcaZzGm2q/Txx5vHwqcRFzb5Yc=; b=fV1qR6sOd2wRpWDjd+6FG1Bf893CzFYHUywwKol4dqsIvCS/BVYlp88JLdNiw/ovx2 QqrlHfnS/5DxAg9i8zlhvlH3GdEmvssJ+CiM8tmoVxbYt5g7fj4PG8Lb9DKVB2cGzqO2 Tw9lGqxKdh4X4JH6Q5qPD/a2F0D0PbEJafi791BVkK9NT2xaQnFeGTsQspOnThzqvTy0 ZtIoBQWYmXCRN1dIhMGITtDfF7B1N0l3/oBHPPwR8sMr2PybMCdmArcumqk530Nlqnqg 6CFQCNHrNn2UWKkCCiCGgwavy9UUE0jWlOz7IHazOG0iMQ/h08n9nAfWsY4CqVKgw61J L29Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=PcA1w0qQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6-20020a508dc6000000b004a2254ee2e7si16996980edh.492.2023.02.08.02.45.19; Wed, 08 Feb 2023 02:45:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=PcA1w0qQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231579AbjBHKhi (ORCPT + 99 others); Wed, 8 Feb 2023 05:37:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231417AbjBHKhb (ORCPT ); Wed, 8 Feb 2023 05:37:31 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F1D3470B6; Wed, 8 Feb 2023 02:37:29 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 47D4F6602099; Wed, 8 Feb 2023 10:37:27 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852648; bh=gm5F2sSwiOtYTPOlUBqXjRr6lOwCrY+tYUuQg0DBVn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PcA1w0qQ58/z+R8lt9CK1ZTIss+J8CHl2DVcujZANu6edJog53Dc4+v3S9f9ktT0H JBCRojfUPmvBkufTRYWbS8IwDw4hDvL/ppm58837d1XzQ+Vn7wBoa6hDT6hzACim0x eRgWZ4K9OAPUxs/y1mZu1JQ8cZYg9SSYMmV9s+NgDo0YPheAr6hWgF1ncO4xjjIqNn WajBk1GnhU4MiSil1bv+ddv6uttyV3E2ifS+PwMyZQoPaeYiPNZCRIsoZ2gHXxyrbq 12Wz0CroCjIoXgdyz1Hv+EA3/CmFls5ZAItilsNG5KXokAGZ1mh62uV133Kjx2TVSl f3zSnQvFQLgxQ== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH 3/9] dt-bindings: gpu: mali-bifrost: Add compatible for MT8195 SoC Date: Wed, 8 Feb 2023 11:37:03 +0100 Message-Id: <20230208103709.116896-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757259384388718191?= X-GMAIL-MSGID: =?utf-8?q?1757259384388718191?= 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 --- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index e7aba66ddb8f..6bd0a5b3c5b7 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -25,6 +25,11 @@ properties: - rockchip,px30-mali - rockchip,rk3568-mali - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is 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 Wed Feb 8 10:37: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: 54361 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3380757wrn; Wed, 8 Feb 2023 02:45:46 -0800 (PST) X-Google-Smtp-Source: AK7set/eXkl761x+S18/Ul9bKbcWS9pHrcUe+3Orpx8PpoMysyju1JuE7aIm8AewhA6AhQ07ylVX X-Received: by 2002:a05:6402:278a:b0:4aa:b394:7b28 with SMTP id b10-20020a056402278a00b004aab3947b28mr8577123ede.3.1675853146398; Wed, 08 Feb 2023 02:45:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675853146; cv=none; d=google.com; s=arc-20160816; b=WBHenAYGX4vufqwd+tQzBnBCc/mPDcbMvLU5FItHa0bV760s7Wk5K/V0W2jq4GwL2k xO3OoTKNl4i/8tB1rMMHYBGc+BpXmS7G401cCiDYOMTYfXO3K8K9QczSiL5qdO7OEK1X xycqmH+HT/VnVqdU5MCMabpyXzPz3qN0KuD1UoIe3VIjX5XX4OUrcnxnv5ZuPtGMlHia ZFkfofw6wbFWeAPVZuzrU8VhfYBWA/W0S3fkMl32klGDTu74MQ39JGUrW/xl3ixun8Da 2xzVsFhK8Io/lr9c8kzCcIhen0XV7kS0P08qwT6QEEdUrsKUh20FbgOTQOP44KxSsxpY 0EOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cRe6ULsW8BvFwUQo7jPv+BqiozgvUWaZkrcSi+h1Zbs=; b=AiW15ZLGOUTy1QPWQYGXkYAjis/OS5OZpzCAZOohUjPzP1q3vBhWa0ykD526NHLUfq l07pWXqXt1vpKvJF1X5fW8C70YOBQ/dLzYkGMAg1kzFf9PDBoibbjyJuEKIkxbZ0zq6B vAOUoyGSHYxYeavFIXUGnuQg5H6hf/mV+F9Jn15kX+U/48wiSDwCI2JVh/nsKQQD8hYF 2a+sCPB6rWyvmRrk8JD+Trlr1OyOk7juGoFGf/m2d5fG1Maunm/aUsz1W+5LhdeWgF6G 1LwQrkpYwn059uucb3dZTyCrSZLllTy2jXFznzrtjOD/DhAaaEq2Zly9rel55/6gs0BR WXcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=HMnBmVeQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bo28-20020a0564020b3c00b004aab4e3deffsi8899123edb.418.2023.02.08.02.45.24; Wed, 08 Feb 2023 02:45:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=HMnBmVeQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231583AbjBHKhl (ORCPT + 99 others); Wed, 8 Feb 2023 05:37:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230392AbjBHKhc (ORCPT ); Wed, 8 Feb 2023 05:37:32 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6358146179; Wed, 8 Feb 2023 02:37:30 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2EE74660209A; Wed, 8 Feb 2023 10:37:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852648; bh=d0G1BjjpzFctDZyjviGuYyWcI6wqWF1+NmTwUM5ryBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HMnBmVeQqM3mZa3JMdwTPCM9maPHuXoBCaIDUWShbjzXpN0eA48WHjqmpYxa7aaMe D0wGrLRwK3QCtWax+iZlRy5r99p3fpTLjRr3x0QGimaQwOmaN0n87rmvJNdf9ZRfSo 0yV8I1/f8M2Pos7NY56XFij//aZNqD+xCBOoaWlGHaljDKiE+hDXYxaf07DStwoqlR 6NNJqxJDMFgUWthCvBVtpLceUN9UePv0G1qWBFtutMLDqFaQq/LMMofUnW84uvNdGP DKMk4mjsdru1dalbYNUnauvsRFyAXt7rvkhCqzQWwBjV38NUkvplKzpt7ras7QWZ9D 8qhv9z8+fKybQ== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH 4/9] dt-bindings: gpu: mali-bifrost: Add new MT8183 compatible Date: Wed, 8 Feb 2023 11:37:04 +0100 Message-Id: <20230208103709.116896-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757259388996731311?= X-GMAIL-MSGID: =?utf-8?q?1757259388996731311?= 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 --- .../bindings/gpu/arm,mali-bifrost.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 6bd0a5b3c5b7..8c57b89ee866 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -19,6 +19,7 @@ properties: - enum: - amlogic,meson-g12a-mali - mediatek,mt8183-mali + - mediatek,mt8183b-mali - realtek,rtd1619-mali - renesas,r9a07g044-mali - renesas,r9a07g054-mali @@ -153,6 +154,7 @@ allOf: contains: enum: - mediatek,mt8183-mali + - mediatek,mt8183b-mali - mediatek,mt8192-mali then: properties: @@ -178,6 +180,24 @@ allOf: - sram-supply - power-domains - power-domain-names + - if: + properties: + compatible: + contains: + const: mediatek,mt8183b-mali + then: + properties: + power-domains: + minItems: 3 + power-domain-names: + items: + - const: core0 + - const: core1 + - const: core2 + + required: + - power-domains + - power-domain-names - if: properties: compatible: From patchwork Wed Feb 8 10:37:05 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: 54367 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3381142wrn; Wed, 8 Feb 2023 02:46:49 -0800 (PST) X-Google-Smtp-Source: AK7set9KY5oXgCMoqhkb+J3XQoCduRnL7Fiimy6pldX0CTlC8mURXc/nquQoStrKBm0odKkCyUFu X-Received: by 2002:a05:6a20:8e29:b0:b6:5687:17b1 with SMTP id y41-20020a056a208e2900b000b6568717b1mr7976679pzj.4.1675853209215; Wed, 08 Feb 2023 02:46:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675853209; cv=none; d=google.com; s=arc-20160816; b=htOypL5rrwciDiWd+xbJ5QMzoeATu/kZLgfddH0p9zyFdLuTMBpDhWjkA4S8QkaGT9 f+rth6Tpl0Ny88YClVuuEnmYoA6d9TbfUCrHmBc9cmzaijmv7zstHcPGlW9l9CJa90o1 vhifzEUN9+c7lvXbflRlp8nviD75sASrSiFL9seIn7F1cOtIVLsFi8Q83W17snuDoqr+ 86ntztFQHXyX1+ZUlDdDKVoFoJJXtqkofAT6Lyl11gyZBpfhe3VJNeJgHFOUgt8VDemA l5yeK6TVtOWDHBXbOU1NrDDdx0BSOgFsD3vXAjyu1u5FH3DJ4l34F0K9ztt/ckaz2+MP Bf+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+vln0CNwaST+CG5hDwRmd3vFdEm2z8jnscnTb6gZD+o=; b=URldZVmXcJzMCvXuECUmBZfi/RthHj+VmdWpgyn6at7gwskVr+QSBVWXYnGRf99CEZ rXbNbVug661Wu9WIdgMwai+RMD8OnvH0B3zJ1BZrLWuOthghTIBeAyOVTy3KkcyShuza tKomW7sdLJ6u8/TAcZYIataS1JYZUm/4nExyAkRJguQaQ3l9MSfbA3+/r04EiEBTOMwC foFzxVeECxLu8brnEU+qhvWThi9l4Sq3hMSuScJ2dSNxzE+maUJR6Org+mVaU65R6w2m SWI5lC+f0RSmpTkR06ZUALdVZhJJzrGJ8+WwxJTG7ldMPLhPITTk+Ox7P6Bg5JL459SQ xXAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NPOzPn5D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 78-20020a630051000000b004e0d688fb7bsi17698582pga.706.2023.02.08.02.46.35; Wed, 08 Feb 2023 02:46:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NPOzPn5D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231608AbjBHKht (ORCPT + 99 others); Wed, 8 Feb 2023 05:37:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231515AbjBHKhd (ORCPT ); Wed, 8 Feb 2023 05:37:33 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F328B4741A; Wed, 8 Feb 2023 02:37:30 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 16FD3660209C; Wed, 8 Feb 2023 10:37:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852649; bh=NHwI9wz8c2rm9f8C+YQk4IHldiJVGMy9bByas6AgTLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NPOzPn5DJLfXV7xK7LvRnHr+UPZ1vZHuttiqK7hW4ilQgrER8UKEPM5tuE+ceqxH8 lWuTDfdPzaALUnr0PwA6ikpN9mIAkoCYBMqkR8TxtG686lsu6sjBG1OB8jcxJJ01rx IjpU1IhF/rx1pnvcb1J+kJ8pqzmyRwP17EPybH1CN3nct2hRsPE/25driR3IXo0PNN NIVL7vMOnfrafgfguiH1mVeFNRFVjm6JHsmflVuC5Lj8BkfuFz8ph/TWmgAAy8i+X1 t7ppyaLizEvTOeVubFipnVGZZ6GlrhI9QUp/l+fBfxfU0okzwtAN+Idc3Go1WXDle9 6dZIfQktps8Ow== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH 5/9] dt-bindings: gpu: mali-bifrost: Add a compatible for MediaTek MT8186 Date: Wed, 8 Feb 2023 11:37:05 +0100 Message-Id: <20230208103709.116896-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757259455073765994?= X-GMAIL-MSGID: =?utf-8?q?1757259455073765994?= Get GPU support on MT8186 by adding its compatible. Signed-off-by: AngeloGioacchino Del Regno --- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 8c57b89ee866..85111559dfe0 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -15,6 +15,11 @@ properties: compatible: oneOf: + - items: + - enum: + - mediatek,mt8186-mali + - const: mediatek,mt8183b-mali + - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable - items: - enum: - amlogic,meson-g12a-mali From patchwork Wed Feb 8 10:37:06 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: 54363 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3380933wrn; Wed, 8 Feb 2023 02:46:16 -0800 (PST) X-Google-Smtp-Source: AK7set/YD9/ruXic0/CiVJU85HVdqP4FCDNUnii0bQciVmXF7YpTajESTz7UhZNlw0hofZ4AMpgD X-Received: by 2002:a05:6402:278f:b0:4aa:aa5b:fcd0 with SMTP id b15-20020a056402278f00b004aaaa5bfcd0mr8708265ede.1.1675853176065; Wed, 08 Feb 2023 02:46:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675853176; cv=none; d=google.com; s=arc-20160816; b=L6ltVSGwTgkOfPDTl9H8/fE2C6f7tU8ZR/ilIVMzGJLgpzRdgPEEP8tIgKDo2ngs95 XcZ4TUoAb1qoBdfO0XufXD8gNXGU3NyNfSNhox6n2tcaaIAV+8sOVHa8JhXooFkGkIWF NIkZ0Dr7nyxP/zLrmLg/yI4KJ96hUDcBALBDBwJbtJ+WZ8IKp59Blk4Sf6pSu+ILC68n dcyGqeExT5fZfHjYQxTb9gAJUsBRwXX3gZSlzcMxyRwUpgm8dNJYrttqdm8KoYS51Ifz BOJk/uaxJxDeXczuGZ3We91x5guCjtc6smSuY26tHq5XIlvm9mjIiWMa6zeDvvLYnNBy qAQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Y41zmXXeElPJkIjMCJVd+9dUW8ioKfsO+1DnyeK0CXk=; b=m82nYGlMR/mPWUPXhkQkQOn6XnehjdqQUe0XRONWUtjJ195ZZQiNSTgyLQYGKp7QWG 90NnHhNSAlTjU6qT4NvwJhO1hXO8y+sF2IY5f9TZw5FX3JkMOjJGWy0ljTpqjlB0+2D8 bzfyFSzBC+Ff7vO1OMgQAFNJjLPXH6J/UUvIkfLnBxIQpImiQMx6/vdU9y1tHWlv4wT3 vvmA6kRsNvcUq5o7UwrmyK9lCZNY79oBPh4xKrkPGA7+5Zr+SfzMfnWlwMh12bfD0Aja B2PWqwYs6ODBHlrtid92heiYN4w4pmxhK5AC4MTJdPjFnMcmygcflwzzvl4WysmHOqt8 4gRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DOF7DQKN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i25-20020a0564020f1900b0049e37585a7bsi20516548eda.196.2023.02.08.02.45.52; Wed, 08 Feb 2023 02:46:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DOF7DQKN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230207AbjBHKhw (ORCPT + 99 others); Wed, 8 Feb 2023 05:37:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231530AbjBHKhe (ORCPT ); Wed, 8 Feb 2023 05:37:34 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1B43474C4; Wed, 8 Feb 2023 02:37:31 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id F29AB6600362; Wed, 8 Feb 2023 10:37:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852650; bh=TVLY2L+iZ2tOkGaynl/eW0t9KWfRLxnjRTuTvMUlR9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DOF7DQKNlIx3DGDjusmsvqeIWQ4+zhnIynQ30pUL1pkwfdJI89U48pie4nUFO4GPR CwyqoL12zay29aDkxWhrAoFIQBhLw4Zz1J0HQ23nUlfRuTdH76apCqb5JtQe+zSuUJ iG3A4x8TRdAaWrS8IraO/6MWTTSz10KyMUSlddNViACkcI5A1eW4E+acudNZcoB5ea uTc0Rujx+MxqzPnqMMcSQU6QCUOAS+DDiZtqRfKdnrCaOc5B0Lf+31SmOpHvWVF9wv v4RI9X+dMjRXmziJrtlK7DDvziKDtiMR7VokYatVoOdFd5U63TzejumENi6pFk3LWA MTn81FLJ/bxOw== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH 6/9] drm/panfrost: Increase MAX_PM_DOMAINS to 5 Date: Wed, 8 Feb 2023 11:37:06 +0100 Message-Id: <20230208103709.116896-7-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757259419955867676?= X-GMAIL-MSGID: =?utf-8?q?1757259419955867676?= 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 --- 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 Wed Feb 8 10:37:07 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: 54364 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3380971wrn; Wed, 8 Feb 2023 02:46:21 -0800 (PST) X-Google-Smtp-Source: AK7set++6ScsU0iOwXl05g+cFE+qPonwz3t+NZf19j9SYMhzRng53MnJBSvU8GqUHahAe36aNLXq X-Received: by 2002:a05:6402:510f:b0:49d:fd2a:39cd with SMTP id m15-20020a056402510f00b0049dfd2a39cdmr8623304edd.1.1675853181408; Wed, 08 Feb 2023 02:46:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675853181; cv=none; d=google.com; s=arc-20160816; b=UIL1eFl/dH3n4XPWx/Ns1e6z/mxt0Bjd5Vmy9i/NtFJBjjJLQ2abiIpFrFPtGrtifo DXf36F56xZCBw6Q8Vqg8/tGznZHOGG1Fy5Cxr6eMB4S2stOJVLfHP407CgrGwO+phDI1 VRYfTT+Zfdc5gAFwBdYaLbbMmZDZrA5mXlJ9pMu+1Zt70iVaROooFNN9jaCcZAgXH1p2 Doz+sfx8m+EJR5RhN2yHqW9/6Phcc1GfBGfY3cdhdlCxyVM7priIhYmmA0b3e1sw5mG1 2jEHOZzwpcaUfz0HszWIsvV6ltn2Ld09ufzrpVabNHrWSsb3z3fdFlwng0pVr8ARpVl1 PewQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JnqlMSYbLSfyrZv3NuxdKIzzO66HDL4mfm2zGzBYrJs=; b=1EeEuwO3GOauAy0HgRyuRYLa5aushXur96dHUsP6EnXyTAsN2fpHr/c1nkx10gIWe5 weUTF/yLWpcPI5vMsonm24PhhgKh6JTivWDQxXARhd7UdUfVK7g7lxZlylsaRL9+Uo+m FSy06HMZfynhTqe7h9Ygc0QuDRflK/lyloMI+YCiqtbqczJLYFeYltxhkzhjLz9j7TXO E8SkGA3k41zr9pSCfITiSHjqUs3FPMit24rQ73oFAuuVwTA+SxXBRMx5jl93s7vJEinH Lyps4M1uuPAtYNe/PeKu+uun01DJUL7ZVPOyShz5RfCAku7HR7m2i7+4qfTN6+hX5Gje syxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=VpkWOXIG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fk5-20020a056402398500b004a0b3d74a33si20909251edb.56.2023.02.08.02.45.59; Wed, 08 Feb 2023 02:46:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=VpkWOXIG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231309AbjBHKhy (ORCPT + 99 others); Wed, 8 Feb 2023 05:37:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231552AbjBHKhi (ORCPT ); Wed, 8 Feb 2023 05:37:38 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7C74474D3; Wed, 8 Feb 2023 02:37:32 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id DAD6E6602091; Wed, 8 Feb 2023 10:37:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852651; bh=2pa0jFRatcXMZ9SnaIXUtFWvuVZm0Clr55bqDu2qpDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VpkWOXIGyP9vosdNbC4o+VzOZQgIPd0IMHDDiDb6HoXAtn48eT7pQhg7LHKJ3OYPd NqLjqw1PCw14weP0jrt5K/9cwIB2nKVtoYx0+t1KlA3LVfzcnz4P53OC/Ud2b3lcEm FetNWbRbu29E7KDL0YkEN4w9vbaQm2HjcKmth3zuF1oUsOt5npxcVo/cah+iPdE041 ZhQJ12wIQ2wGyBhAaYMfKzb6ak8V6kGaOs+HNEOUh3fh4wDZ9Lk680IVxQiXeRhk5W 8flOvLKXuYzyxUsXNrqbmTvAjTB2cJU6wpHqnZl2jYz1VgHYZw3lJO09Uc86ToKjUI gPKGCQhsWpFoQ== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH 7/9] drm/panfrost: Add the MT8192 GPU ID Date: Wed, 8 Feb 2023 11:37:07 +0100 Message-Id: <20230208103709.116896-8-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757259425515467476?= X-GMAIL-MSGID: =?utf-8?q?1757259425515467476?= 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 --- 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 Wed Feb 8 10:37:08 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: 54365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3381000wrn; Wed, 8 Feb 2023 02:46:25 -0800 (PST) X-Google-Smtp-Source: AK7set9nLz8ZAH/wwDqJRAiYiIcLBM2fULbUzJPFyMpxsvzGQuY283cWi95FFyswbj7bNIFnPjL6 X-Received: by 2002:a17:906:738f:b0:888:346a:fb48 with SMTP id f15-20020a170906738f00b00888346afb48mr7059814ejl.0.1675853184909; Wed, 08 Feb 2023 02:46:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675853184; cv=none; d=google.com; s=arc-20160816; b=qcCUZRY2E7elNjZloMkmRpcOkOpNW4aRbOLMMoVzlzd3d7YxwwszHj3vBGnDfq1Mdv XBuZ5ydNhAYFJE22emSqwV/fEtzMq7srLT1oHH6zjkARr8i1ooIUFgnl8XzTQXl43TcU aYs9R+Sl7NNEFOGOLbvba52kTsloTHq8lqWHZDK2ymDVufJFXX6211ywTMq6r6i+uZ7T 8sT1MuwyQKMxvDW5yMIKy/TG/nfNWhSOYC7MC7MxW2ErqgyixTZoGk+/E2cfViX0x1YU WI/Axu7CHeJ0atmp97kKj7qWnL6rgEnBaHPFm3/fXPlNxhrP4CiV3KjqdGrfZ/9ksxw0 cWiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5iu4HyV4QefgqNrWKVIM+ZIhlqSYpiRjUuqAdSGr3Sg=; b=lFy0BAadATgzfid5c03K6UoR4081UqRechufAUFX9m6P6/KYp55hH9j2w5khKcrsxK +aDu6n7SpQNK4fyCJkfgqFCh8A3QliSp9oSeRgBhZ5kwzmDYGiMn+J8ex42BAU5qYEZ9 ZK/uxhFjwsnt5yY5XyOgraYnNdKgfGepnxEvBBDy/A+Sbiv4Zb9ACv6ZDcXu9BogVCDv 0bKhbEyn7SbPm1rCwXj1vRJsj+LWDQGy3SiwtQnBLlD1SYS+LyhB1j/HbnzameAwkN75 TZaa9WMfa9Wc8F2SmXuWoN4OTqqP80qD3Om99ODXQ4k4rGjaXhqp/4XbnwAsBc1oPZaM 0maA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cfCFb6dE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 10-20020a170906100a00b00889e8de7ce0si1761391ejm.587.2023.02.08.02.46.01; Wed, 08 Feb 2023 02:46:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cfCFb6dE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231638AbjBHKh4 (ORCPT + 99 others); Wed, 8 Feb 2023 05:37:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231586AbjBHKhm (ORCPT ); Wed, 8 Feb 2023 05:37:42 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADF4D47EC7; Wed, 8 Feb 2023 02:37:33 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id B91B96602096; Wed, 8 Feb 2023 10:37:31 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852652; bh=LMwqpEoSTBoag1iPNbLWuJ7k3BNQAL+D9DLjE7DnY9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cfCFb6dE/tVp+UCzTu0P7PveAPy3W365WlwuAqZ9TGV+jT1tt7LsqhLAx20mFF4uk OHFJhvmFLqBtIeMGsaRDS7wFRaJUOrNdHkKsnR2zYW+QLFlHTwtGMZGhSgbroTouon aFEThvfjhIUh002uNwUDhdEJVwIhnIOwCbrEN8CEl4qch5Se0jZK7mGgEjctPAbVQn zY9vRJuIYusMAp6Cozze/Cc/OqbC8G/zBBnQGyDWM+fASe9rH+DHc0XXpCfBMtGJln fB5AeySmDcjR2WENSv4FOSLOv6WBjlNm44DsTNC/NRhAik6cbIAfrBnohc4WaiUjbg rq3mTg8ONrJnw== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH 8/9] drm/panfrost: Add mediatek,mt8192-mali compatible Date: Wed, 8 Feb 2023 11:37:08 +0100 Message-Id: <20230208103709.116896-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757259428964991072?= X-GMAIL-MSGID: =?utf-8?q?1757259428964991072?= 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 --- 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 Wed Feb 8 10:37:09 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: 54366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3381018wrn; Wed, 8 Feb 2023 02:46:27 -0800 (PST) X-Google-Smtp-Source: AK7set94GRQvIKzN79EuocQWdPt3XjSZb/DQQwfXSOxQEMLwxwuqZJuPV/zHKMfJvyhLXuchFQVN X-Received: by 2002:a05:6402:278a:b0:4aa:b394:7b28 with SMTP id b10-20020a056402278a00b004aab3947b28mr8579113ede.3.1675853187112; Wed, 08 Feb 2023 02:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675853187; cv=none; d=google.com; s=arc-20160816; b=SydYXNgc9gRpSQpbtWyldikkLGM77JGMZ1vaTedqx86D5qvYSi02VUPzFE17zDNij+ vnLGZs+IgAEMy1t0Aq2s0tEs6GqpUhPJUk6F/hDUnKK1NbyQIZ3u8jVLXiICs9gB3KJr MU5UG4nN48Dt8rnAKCTpeUhcgpAHgAJKRcPF9ISIRZ5UX05xG3uGRjy6wjaU4tJwnUWP SAM+SQjh1ZG/5plINFaVf958pBtqx0xEAxSmpSt1pll/luj/VaEsEq0NOXgs7DyjYqaj OnsF+LlkULrNYgGvQxMeO1ihIfLxAvkJeeIYpqofdJZ/XLdPvhpsjix/Kq8OEdoblXof ZNaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x3vvJ7XZOA20TvNDOEdKj5AjGGsdTA4T+MDKg86IeZA=; b=M1LU0xp5jFq0hGscwVB6jMVSd0xNJCBSmX4qdQBUrknnUmNkDPbPcQ8MV4mEGnDj5f R+nqauWyZ6+ZtHUIOHWf724pvNxLpr38IjwdQ9gP31yb40M8tI8dNyG5NpRbfKJvcGhT f0PIxhNyLTVosVQzqIGelAj1FcaMhn+gwD9UYbf2qYcEmf8SZZshbAP7Y/dkuyvPVKk6 pIHeXo0HhXUS2otGo3J459ESd6IUWPsxXMrcixhy0VBt6es9ToZJNdGkg1S8qxwsWULz d+kKhIbpWqp6zOoNufQGrbEeBHH3P8tSns9AjVgsmlb+C/8/FKNvqJngBee5+PZUygTB OKTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=m0kZfEfI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j1-20020aa7ca41000000b004aad91c9937si3991174edt.511.2023.02.08.02.46.03; Wed, 08 Feb 2023 02:46:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=m0kZfEfI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231645AbjBHKh6 (ORCPT + 99 others); Wed, 8 Feb 2023 05:37:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231589AbjBHKhs (ORCPT ); Wed, 8 Feb 2023 05:37:48 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80BDA1206A; Wed, 8 Feb 2023 02:37:34 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 9F71A660209D; Wed, 8 Feb 2023 10:37:32 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675852653; bh=q67l6huNz6BOkkKA1cnX0CAnLFXPlSrwL9Q000QH1Ig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m0kZfEfI5WeuqtCvZPkgFg1ubv2kuTxppzd0P2D36SxeI3CRiPZSowKiJbtTwkzhs OaRLAHrFj7CHofTz6oWdZGwduxkSxC/c9Z6Kk0H2HwptSmHAlhQ6qYymiYHWt+YUO4 oWteS3if3HIc3/sa4SJkvHRakxqd01DCTkigL7ld9ft5rQ7gSNvQLHnHFOQRZRLwfr 1CTJgMT+7AzMPhOzzMZsQhDTbIHSxzjSWmtWraG2GYD6Nn8uBNrVui6TLns51QchEm xBgdPs0cMEQno20sygWAfXFn8lmtt4iL6Y7TzkStQ3HOICS6u7UNDhsC0JKvdQs9dy qovg2VcCIIm5A== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH 9/9] drm/panfrost: Add new compatible for Mali on the MT8183 SoC Date: Wed, 8 Feb 2023 11:37:09 +0100 Message-Id: <20230208103709.116896-10-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> References: <20230208103709.116896-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757259431809030524?= X-GMAIL-MSGID: =?utf-8?q?1757259431809030524?= 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 --- 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 }, {} };