From patchwork Tue Jan 26 01:17:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Boichat X-Patchwork-Id: 12045019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFF16C433E0 for ; Tue, 26 Jan 2021 01:20:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9ACCD23104 for ; Tue, 26 Jan 2021 01:20:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9ACCD23104 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mdtZjjO7UH6bEpDq7AimPpPz47xJlCLSZo/ZnfFkI8k=; b=ZGOhlnV/jyHbbm83C3Qt0QXhI uq+eMpONYE9jeaAPLR5NamAJvL12XqNYcLoWhvfVRuGfOm5urLSugM5blJ4vWHznk4Vpo41B23+np zXMm/IVUq/mJglDmFmLpX3AwfkOY+dPnWy6VgCZhRTGAytGxhlW4cjraOhSYy704U88RFPF3iwtj2 XCdC8vXi8eg6q/hbY/U1Ldh4lskYnDEmwYfn+ePMqTHEndiEaArDk9xCmo6eownoQwyaanNurdOfJ 62795h+G+3IAbw1wogPeWbxN5ooiyq+y4csxtXqVXK1OuC0RkuccGsPZdTCV/+EhWqQI98FIMl8JJ 0xd7j7Hug==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4Czz-0007va-4p; Tue, 26 Jan 2021 01:18:27 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4Czn-0007qX-Q2 for linux-arm-kernel@lists.infradead.org; Tue, 26 Jan 2021 01:18:19 +0000 Received: by mail-pj1-x102b.google.com with SMTP id g15so777540pjd.2 for ; Mon, 25 Jan 2021 17:18:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0BZifB+iVMGmxp83gSV8xBJi4ZuHE+jJzS5b46pYB0A=; b=buRZJlIfAEszu7DTDxrGpStS4yJ+JlArTcXt0x76ycaU2bjFQCHidprSrOBF3N1xve e2RNFHNjUFXkRgFexKzldGH0QtYp6XGsa/hwV2THVKhJrBrbOYGfciG0gbWd3kkjhV6l hJasfeZTmZ6+c6txPNSZExg1rsZfom+QZAd74= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0BZifB+iVMGmxp83gSV8xBJi4ZuHE+jJzS5b46pYB0A=; b=s2isG4dYWDugqYor2n2ncmRIwmULw/CQ9DcfYbXUu3G2DusQwUX0CkJQHLYDGPoj23 ftDzQ7WE5G1d3kzS7QwHk3Dfz5WkXAjd11AOeCWLfxxmpOYJChM4tHDkCefKSbejxkd4 ksq56VCA2UY6b4C3lYA1ySiGjmXPr8zp9WS/Q2Z00h+iXyVZjP9rnH/ad64+hsQ5WsOu iMuQWYHhwh17UgQF3TCCzraVyD6KMAnf0RB11g0O5E6iz69G9KRBXR+TmxgrBzdEjyD6 vQjcTsQ5ApPBCOZ/ig0nKuGnax74NDgt4khQj5S9WZ+gNxac/Fb5TBOW43PVroyUmenn LR0w== X-Gm-Message-State: AOAM530yDBZm0VKZFMyA5neQL2w0S8tGFPFMyDkK8NXbv2AvSJt9byuq NFgQRI0KBNJUYFJ/Gs+KAUAF+Q== X-Google-Smtp-Source: ABdhPJzq03UOZA3rzW/Jku1UL/Q9+LLv9sYit5RxxJUopLFrSfRQH8oSRCQ/AdGoGrss8ksnQD4EKg== X-Received: by 2002:a17:90a:77c1:: with SMTP id e1mr3157796pjs.141.1611623893652; Mon, 25 Jan 2021 17:18:13 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:50cc:9282:4fdd:3979]) by smtp.gmail.com with ESMTPSA id k9sm522248pji.8.2021.01.25.17.18.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 17:18:12 -0800 (PST) From: Nicolas Boichat To: Rob Herring , Steven Price , Alyssa Rosenzweig Subject: [PATCH v11 1/4] dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183 Date: Tue, 26 Jan 2021 09:17:56 +0800 Message-Id: <20210126091747.v11.1.Ie74d3355761aab202d4825ac6f66d990bba0130e@changeid> X-Mailer: git-send-email 2.30.0.280.ga3ce27912f-goog In-Reply-To: <20210126011759.1605641-1-drinkcat@chromium.org> References: <20210126011759.1605641-1-drinkcat@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210125_201815_934932_F219ABBD X-CRM114-Status: GOOD ( 12.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Nicolas Boichat , Tomeu Vizoso , fshao@chromium.org, David Airlie , linux-kernel@vger.kernel.org, Rob Herring , boris.brezillon@collabora.com, linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, Daniel Vetter , hsinyi@chromium.org, Matthias Brugger , hoegsberg@chromium.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Define a compatible string for the Mali Bifrost GPU found in Mediatek's MT8183 SoCs. Signed-off-by: Nicolas Boichat --- Changes in v11: - binding: power-domain-names not power-domainS-names Changes in v10: - Fix the binding to make sure sram-supply property can be provided. Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: - Rebased, actually tested with recent mesa driver. Changes in v5: - Rename "2d" power domain to "core2" Changes in v4: - Add power-domain-names description (kept Alyssa's reviewed-by as the change is minor) Changes in v3: None Changes in v2: None .../bindings/gpu/arm,mali-bifrost.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 184492162e7e..3e758f88e2cd 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -17,6 +17,7 @@ properties: items: - enum: - amlogic,meson-g12a-mali + - mediatek,mt8183-mali - realtek,rtd1619-mali - rockchip,px30-mali - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable @@ -41,6 +42,8 @@ properties: mali-supply: true + sram-supply: true + operating-points-v2: true power-domains: @@ -87,6 +90,31 @@ allOf: then: required: - resets + - if: + properties: + compatible: + contains: + const: mediatek,mt8183-mali + then: + properties: + power-domains: + description: + List of phandle and PM domain specifier as documented in + Documentation/devicetree/bindings/power/power_domain.txt + minItems: 3 + maxItems: 3 + power-domain-names: + items: + - const: core0 + - const: core1 + - const: core2 + required: + - sram-supply + - power-domains + - power-domain-names + else: + properties: + sram-supply: false examples: - | From patchwork Tue Jan 26 01:17:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Boichat X-Patchwork-Id: 12045023 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17412C433E6 for ; Tue, 26 Jan 2021 01:20:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B478F23107 for ; Tue, 26 Jan 2021 01:20:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B478F23107 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yTre2MoOX+P+8OdpR3epRcR8I4xXfLXQJ5RwAWjNr3I=; b=jUNegI8NwFFYMj5xiUg3XbpIa 1NpstJZYLOUJqqjEVJqTo2rAUtOLFgceC1x+MNAF87F38PZD5YimIa7/UtiFyp9K1aAu1v+OtaCh8 68QQwtehdDN1/k1XDg6mJy73MF3UJMoJqfuDT25lEBWU5KH7eI2SzwaI89aDQw3sXihHkJsEbiwux VMHXd+oO1HJozc0iIF2Urs+Fb4RC4u/pa/+12dWi27kM68azyE3C9cHAYIPV392iNa66jNXqykQCf OQFvXlfQESevNckeW8F6/nFtJBebcf+HwGVrrVJKIH58ofV0Y/BzZtzsZxXM/gY6lgxEiXbmAjkFx b5g3EPStw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4D06-0007xL-Dl; Tue, 26 Jan 2021 01:18:34 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4Czr-0007s0-8o for linux-arm-kernel@lists.infradead.org; Tue, 26 Jan 2021 01:18:24 +0000 Received: by mail-pj1-x102f.google.com with SMTP id l18so772094pji.3 for ; Mon, 25 Jan 2021 17:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4MZcK/Jikfq4/3qPuHsl4/GCY0KQe1j7Y0TQEvfb5i8=; b=nvdo3uVv94+13BzyqdNas3z+qbMzBpHaOdRF61DAhnICJQlAoqgP4IUKqOjXm/Pekj VfcYNpJya5TS4YLBmKG3NqozoMwrJP1VYiNcljGrKGhtnXAnXxycPldQR1ITy8Wr7VKR dxAXFWM2qISsNskt2aXA2PwYChFtzFIJuakj8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4MZcK/Jikfq4/3qPuHsl4/GCY0KQe1j7Y0TQEvfb5i8=; b=SDak+c4BtsTYZGx6CXxWaZUKeOMafzFDSUOFnMciIpxfoAOM2KQfZAO9l1l2hEGil5 UAigP0Cn1NevHi5OjaxqTByQXnFXgec4/7upeRt3Gij67W0wtTfZx/aFDFr+/obCdugm Zut+0wrvSr55JywFBZlQbTxH+KBRmkC8Bh8/KVyafTCjeUrV1bVKEu3+ONUH/KWMjXfT BmtT5HpSaFwgwFbi8KWZVjQYWVYRJVbHFfJDzqAPgsOtQ/a9QYAuY6Yo/cmLeM0vXdMd bkxrwkux3obYRnmpdPKQXd18UnfNkwvQYNwyJXBNrCFY4EUY5jev229UNnjzpUb3/0dk +G1g== X-Gm-Message-State: AOAM5304N02cFOhI1lj6Z1W1hMu1mofKs+M8FC+Ge03Fxt29DhmNbJ90 wB3KEvNUPemqxgHVHTIAUw9bEw== X-Google-Smtp-Source: ABdhPJxrn0j7lZ3wKb5X4YSyB87XaVDn1bKvzM0KGnUMLv4HqJPROOVEFmDoZxDDsLvPK9wCG5GTjg== X-Received: by 2002:a17:902:ec04:b029:de:9184:7247 with SMTP id l4-20020a170902ec04b02900de91847247mr3192407pld.57.1611623896956; Mon, 25 Jan 2021 17:18:16 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:50cc:9282:4fdd:3979]) by smtp.gmail.com with ESMTPSA id k9sm522248pji.8.2021.01.25.17.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 17:18:16 -0800 (PST) From: Nicolas Boichat To: Rob Herring , Steven Price , Alyssa Rosenzweig Subject: [PATCH v11 2/4] arm64: dts: mt8183: Add node for the Mali GPU Date: Tue, 26 Jan 2021 09:17:57 +0800 Message-Id: <20210126091747.v11.2.I9f45f5c1f975422d58b5904d11546349e9ccdc94@changeid> X-Mailer: git-send-email 2.30.0.280.ga3ce27912f-goog In-Reply-To: <20210126011759.1605641-1-drinkcat@chromium.org> References: <20210126011759.1605641-1-drinkcat@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210125_201819_448665_2A2BE1F3 X-CRM114-Status: GOOD ( 14.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Nicolas Boichat , Tomeu Vizoso , fshao@chromium.org, linux-kernel@vger.kernel.org, Rob Herring , boris.brezillon@collabora.com, linux-mediatek@lists.infradead.org, hsinyi@chromium.org, Matthias Brugger , hoegsberg@chromium.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a basic GPU node for mt8183. Signed-off-by: Nicolas Boichat --- The binding we use with out-of-tree Mali drivers includes more clocks, this is used for devfreq: the out-of-tree driver switches clk_mux to clk_sub_parent (26Mhz), adjusts clk_main_parent, then switches clk_mux back to clk_main_parent: (see https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.19/drivers/gpu/arm/midgard/platform/mediatek/mali_kbase_runtime_pm.c#423) clocks = <&topckgen CLK_TOP_MFGPLL_CK>, <&topckgen CLK_TOP_MUX_MFG>, <&clk26m>, <&mfgcfg CLK_MFG_BG3D>; clock-names = "clk_main_parent", "clk_mux", "clk_sub_parent", "subsys_mfg_cg"; (based on discussions, this probably belongs in the clock core) This only matters for devfreq, that is disabled anyway as we don't have platform-specific code to handle >1 supplies. Changes in v11: - mt8183*.dts: remove incorrect supply-names Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: - Add gpu regulators to kukui dtsi as well. - Power domains are now attached to spm, not scpsys - Drop R-B. Changes in v5: - Rename "2d" power domain to "core2" (keep R-B again). Changes in v4: - Add power-domain-names to describe the 3 domains. (kept Alyssa's reviewed-by as the change is minor) Changes in v3: None Changes in v2: - Use sram instead of mali_sram as SRAM supply name. - Rename mali@ to gpu@. arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 5 + .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 5 + arch/arm64/boot/dts/mediatek/mt8183.dtsi | 105 ++++++++++++++++++ 3 files changed, 115 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts index cba2d8933e79..1cfbea5a0101 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts @@ -42,6 +42,11 @@ &auxadc { status = "okay"; }; +&gpu { + mali-supply = <&mt6358_vgpu_reg>; + sram-supply = <&mt6358_vsram_gpu_reg>; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c_pins_0>; diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi index bf2ad1294dd3..a38315b604df 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi @@ -249,6 +249,11 @@ &cpu7 { proc-supply = <&mt6358_vproc11_reg>; }; +&gpu { + mali-supply = <&mt6358_vgpu_reg>; + sram-supply = <&mt6358_vsram_gpu_reg>; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index 5b782a4769e7..5430e05e18a0 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -964,6 +964,111 @@ mfgcfg: syscon@13000000 { #clock-cells = <1>; }; + gpu: gpu@13040000 { + compatible = "mediatek,mt8183-mali", "arm,mali-bifrost"; + reg = <0 0x13040000 0 0x4000>; + interrupts = + , + , + ; + interrupt-names = "job", "mmu", "gpu"; + + clocks = <&topckgen CLK_TOP_MFGPLL_CK>; + + power-domains = + <&spm MT8183_POWER_DOMAIN_MFG_CORE0>, + <&spm MT8183_POWER_DOMAIN_MFG_CORE1>, + <&spm MT8183_POWER_DOMAIN_MFG_2D>; + power-domain-names = "core0", "core1", "core2"; + + operating-points-v2 = <&gpu_opp_table>; + }; + + gpu_opp_table: opp_table0 { + compatible = "operating-points-v2"; + opp-shared; + + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <625000>, <850000>; + }; + + opp-320000000 { + opp-hz = /bits/ 64 <320000000>; + opp-microvolt = <631250>, <850000>; + }; + + opp-340000000 { + opp-hz = /bits/ 64 <340000000>; + opp-microvolt = <637500>, <850000>; + }; + + opp-360000000 { + opp-hz = /bits/ 64 <360000000>; + opp-microvolt = <643750>, <850000>; + }; + + opp-380000000 { + opp-hz = /bits/ 64 <380000000>; + opp-microvolt = <650000>, <850000>; + }; + + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <656250>, <850000>; + }; + + opp-420000000 { + opp-hz = /bits/ 64 <420000000>; + opp-microvolt = <662500>, <850000>; + }; + + opp-460000000 { + opp-hz = /bits/ 64 <460000000>; + opp-microvolt = <675000>, <850000>; + }; + + opp-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <687500>, <850000>; + }; + + opp-540000000 { + opp-hz = /bits/ 64 <540000000>; + opp-microvolt = <700000>, <850000>; + }; + + opp-580000000 { + opp-hz = /bits/ 64 <580000000>; + opp-microvolt = <712500>, <850000>; + }; + + opp-620000000 { + opp-hz = /bits/ 64 <620000000>; + opp-microvolt = <725000>, <850000>; + }; + + opp-653000000 { + opp-hz = /bits/ 64 <653000000>; + opp-microvolt = <743750>, <850000>; + }; + + opp-698000000 { + opp-hz = /bits/ 64 <698000000>; + opp-microvolt = <768750>, <868750>; + }; + + opp-743000000 { + opp-hz = /bits/ 64 <743000000>; + opp-microvolt = <793750>, <893750>; + }; + + opp-800000000 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <825000>, <925000>; + }; + }; + mmsys: syscon@14000000 { compatible = "mediatek,mt8183-mmsys", "syscon"; reg = <0 0x14000000 0 0x1000>; From patchwork Tue Jan 26 01:17:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Boichat X-Patchwork-Id: 12045025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 646CFC433E9 for ; Tue, 26 Jan 2021 01:20:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2713923107 for ; Tue, 26 Jan 2021 01:20:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2713923107 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wUV6PmkezQTXDqZLbLh5DzzBeQas/2SSWoU/PlCiISA=; b=Ne8Kd7DBnviE+y/txcJBgDDOM CjV9j5+VWiNB+f1e9KrkmJElhjHFeX3ksexl/uvTB06YO/lEsHlNDIikBIt5WGASbroM50Pn5Xohc iC5CD7UzTh6FwdilG6834LVbyTRlxp4CQVAiM1VygExIvxaD0uyotGSCKwqypmGDAgAFukOoa0lxy pqVuHp9eBWm0zluCvMUdZh3ml3PNuMl7kRVx8/FWzuP2+KggIxhZYPI/RkPvQMKNJcg90B96PJV1O FgjLIC1KjdwI3CIO8B+rhxdxJx1T2HrRMG7q8LIx8cAV7O9wlGBIPE6Nc5yuuZ9U4IdoRrxF+iiT/ 68C7AUvfg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4D0C-0007z0-LR; Tue, 26 Jan 2021 01:18:40 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4Czx-0007uQ-8b for linux-arm-kernel@lists.infradead.org; Tue, 26 Jan 2021 01:18:28 +0000 Received: by mail-pl1-x635.google.com with SMTP id j21so4152628pls.7 for ; Mon, 25 Jan 2021 17:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cW8krSz9Suh27i3kFLRH+rKbVyIy/nSf3JAVtiB3NGg=; b=OMcAX8e+LPP25ZJuWYYSgfhNFgcP++z9OXPz3H76Ovwj4lxCkaDbAt80h+rthknDrq iJuS3q9mOu9ltZ1mqU9i7psDGke7EPWs5StZWbYFBwnQdv6EuQAYuIrrSMk00/dCcYP8 TXAomikkDj+f0/yxJkFL1lBn852p9TZcaJI+o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cW8krSz9Suh27i3kFLRH+rKbVyIy/nSf3JAVtiB3NGg=; b=qj/ufKoybCtqXEpbnzTyI+m8P5OSBWVTaW1y/d4qQuGK6bip3/BH6zA6O///z13PaV xK3voR2r3X2YmWbKKCQRJnAqyXhRfXjwFbSwLgezakiJNHnY0SYS26v9IJvrrXojyd0T WGJSg/XeLFsnqJmdEyPFa0ZPdSOFi5/wDp6wLmCWqLDhQr9KW9rbi96INDvidtMHV5+/ EyJV7VRaWjAXTcAWWgwFyWQYE4jGkN5hio0Hg0IBCzbBD5xpY7FyC2Xr6NRHf+sxDgok vsxNjGx0dUfKjZvQR04NBXNAjfcDKak+QcAwO5nardtH7dXbrOWt84ZEQ+DTIEHhSjEY bJsg== X-Gm-Message-State: AOAM5317xi5rJAcZBSbKYxdDtkXKu1Lz8L5goL6IObqq4cnZm+Nu/D9/ TDeGYWT/rmD3VBZD2DWc8+EYBw== X-Google-Smtp-Source: ABdhPJz1KwRDKhFH1+4vA/V0bCaojV/wBSjNoY/yJR26q15uQ6o7lk+MBQ0LDf1TE+A2gIPGNnJuTg== X-Received: by 2002:a17:902:bccc:b029:de:8483:506d with SMTP id o12-20020a170902bcccb02900de8483506dmr3201535pls.53.1611623903115; Mon, 25 Jan 2021 17:18:23 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:50cc:9282:4fdd:3979]) by smtp.gmail.com with ESMTPSA id k9sm522248pji.8.2021.01.25.17.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 17:18:22 -0800 (PST) From: Nicolas Boichat To: Rob Herring , Steven Price , Alyssa Rosenzweig Subject: [PATCH v11 4/4] drm/panfrost: Add mt8183-mali compatible string Date: Tue, 26 Jan 2021 09:17:59 +0800 Message-Id: <20210126091747.v11.4.I5f6b04431828ec9c3e41e65f3337cec6a127480d@changeid> X-Mailer: git-send-email 2.30.0.280.ga3ce27912f-goog In-Reply-To: <20210126011759.1605641-1-drinkcat@chromium.org> References: <20210126011759.1605641-1-drinkcat@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210125_201826_181977_2D34EEFA X-CRM114-Status: GOOD ( 16.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Boichat , Tomeu Vizoso , fshao@chromium.org, David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, boris.brezillon@collabora.com, linux-mediatek@lists.infradead.org, Daniel Vetter , hsinyi@chromium.org, Matthias Brugger , hoegsberg@chromium.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for MT8183's G72 Bifrost. Signed-off-by: Nicolas Boichat Reviewed-by: Tomeu Vizoso Reviewed-by: Steven Price --- Changes in v11: None Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: - Fix GPU ID in commit message Changes in v6: - Context conflicts, reflow the code. - Use ARRAY_SIZE for power domains too. Changes in v5: - Change power domain name from 2d to core2. Changes in v4: - Add power domain names. Changes in v3: - Match mt8183-mali instead of bifrost, as we require special handling for the 2 regulators and 3 power domains. Changes in v2: None drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index 83a461bdeea8..ca07098a6141 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -665,6 +665,15 @@ static const struct panfrost_compatible amlogic_data = { .vendor_quirk = panfrost_gpu_amlogic_quirk, }; +const char * const mediatek_mt8183_supplies[] = { "mali", "sram" }; +const char * const mediatek_mt8183_pm_domains[] = { "core0", "core1", "core2" }; +static const struct panfrost_compatible mediatek_mt8183_data = { + .num_supplies = ARRAY_SIZE(mediatek_mt8183_supplies), + .supply_names = mediatek_mt8183_supplies, + .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains), + .pm_domain_names = mediatek_mt8183_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 +690,7 @@ static const struct of_device_id dt_match[] = { { .compatible = "arm,mali-t860", .data = &default_data, }, { .compatible = "arm,mali-t880", .data = &default_data, }, { .compatible = "arm,mali-bifrost", .data = &default_data, }, + { .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data }, {} }; MODULE_DEVICE_TABLE(of, dt_match);