Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2884291ybb; Mon, 30 Mar 2020 15:13:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv9PuQn0qA29sIb/zMLhMNk5/eKhmYjAxnSOQbiwM0jiA4X5Y131KZITHP8LvO2VbKq6bDf X-Received: by 2002:a05:6808:abc:: with SMTP id r28mr155975oij.161.1585606393747; Mon, 30 Mar 2020 15:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585606393; cv=none; d=google.com; s=arc-20160816; b=pOot4iwjoWhixYzFA9TlUoAx3PaBPWXBCZiji3reJZtmdTUjuCzr709piBt8tAISMl IdtznNS3TvN91EAi30/g3i87zBOPmFoeDj4pLXbOgT10NDlJKkw3AHprVnnPqjRkHXJ5 xCHNx2cxuxaOnSzp6FFvIR9mApnHN1b4SejPKYmics2WbTxzGyZaidYaLH/jv3vKIZ4a Z5SXlcnbDN8gLs52cSMRtp+H3RoSxPiXLHcS54SdZj2/M3L8BtyXwqwEqdFkRes1YrTf xZLu7Y5TuFXQuyftkUWjMj/U+uWT0FZWMhAuocRXjmQAiutprwlRMrKbHhrAEjDbIWpU tAQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0cKp3v348vmyZeRheT+gdcc+gPdXRTpNkP+LQYIKnRY=; b=d0ZRwTsZdEI4Xya809ZkLXOCuKGDCX6OWD00VTeYkMdTryVPbZjuvzYv0Ka0Kg0Yk9 2qLM585zNlhS0MEJqKF4HlJyOfbGfdpVyWBTANjydn5xCNP1iNSw1YmA3jCpJl8hgLiI 8rNZUn4d0JPfDmKUoEVjOl1HzKffm6HzNZG6ALExkYwXJXnNUqgBDTy7faskZOPxUc9Q JAhigm5tHt4DmL6l9lshtgH9tm7e6Uk8oX8Uvr5C8ihlilqR9GXn1gH9q6OfEt8Sd+pW Z/8+YD59SPWtY2WxZfqdTRSwCqXJQdsHo5+WZ9BPIkOeP3SqXmECw+6iuKunShZQ2yL6 9cGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=gSjEgukU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r184si5927577oie.79.2020.03.30.15.12.56; Mon, 30 Mar 2020 15:13:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=gSjEgukU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731027AbgC3WLq (ORCPT + 99 others); Mon, 30 Mar 2020 18:11:46 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38833 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730989AbgC3WLe (ORCPT ); Mon, 30 Mar 2020 18:11:34 -0400 Received: by mail-wm1-f65.google.com with SMTP id f6so523331wmj.3; Mon, 30 Mar 2020 15:11:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0cKp3v348vmyZeRheT+gdcc+gPdXRTpNkP+LQYIKnRY=; b=gSjEgukUqEEFV5PGf6eqXlNOdSmlijDI9Trne9JLdp++Q3i8ZTE8F9E1nWyxJs87+s 2aJapUm5GSI1GekjpCVqG/KT0baw06lJdLtJgesPGw6ljriLeEpfup3I0dm+pbvL7jn/ xZ27MfgHxZ7b8TiFWchs6Wv/hG27na7pRzCnM7ngQkKA8QgAItsu5rMd4g/aH69NzpkD UVyFqzPYcE6drMPOoGh6qk+fRLpE06IG4CVR0cnMM3YqmTRDtNQNIeP4Wc97L79/+A3d 0z6D4+pKtBh+8MlYKFMtQxa6w+r21JMn0HfSIvk0UuuHYHqGdvKhImwKbdP9MbdnvOLz jz+w== 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=0cKp3v348vmyZeRheT+gdcc+gPdXRTpNkP+LQYIKnRY=; b=MJxlNahoVMamMuUIZ+P/hyHYCbof+JCnG60Y3Gx8QwW5ZBWfXfB6Eeu6wKMIQqpIuk 5I5Su7qaMSXyYzihfy6tfDzzfdTE+dVgc0mgPdAacn77x1QqNFxhtO3QZYU8bJRWkRG/ ltaj1TthqbwdfYOavwR7oZs9R4GGDH6vVH7h092Ku9nPQV+wHkEz6jdNYr4hQoPil4mi lD6OdKP6FiNxNkWvUon4c/QC7r5HtuciFn54buqDqjg+WqGAZxAi3peyOJka3seEothW icAJvdwdBkbpz7OipV+PzmrqSkCDSVJp1kVNRmSnQXyGEh17h4H+ru+KXEpKdrj1FGGQ ZsqA== X-Gm-Message-State: ANhLgQ06TksvbaXLxR6loeueBbjqfyIGFSPQCVfbIZ18gMLAN8KwUUEs eUNekDoum7tRYfBKt9iJ+eDbld0f X-Received: by 2002:a7b:c145:: with SMTP id z5mr212421wmi.55.1585606292625; Mon, 30 Mar 2020 15:11:32 -0700 (PDT) Received: from localhost.localdomain (p200300F13710ED00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3710:ed00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id b187sm1260509wmc.14.2020.03.30.15.11.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 15:11:32 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com, jbrunet@baylibre.com, narmstrong@baylibre.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Martin Blumenstingl Subject: [RFC v1 4/5] arm64: dts: amlogic: meson-gxm: add the Mali OPP table and use DVFS Date: Tue, 31 Mar 2020 00:11:03 +0200 Message-Id: <20200330221104.3163788-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200330221104.3163788-1-martin.blumenstingl@googlemail.com> References: <20200330221104.3163788-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the OPP table for the Mali-T820 GPU and drop the hardcoded initial clock configuration. This enables GPU DVFS and thus saves power when the GPU is not in use while still being able switch to a higher clock on demand. Signed-off-by: Martin Blumenstingl --- arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 45 ++++++++++++++-------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxm.dtsi index b6f89f108e28..0f1d1cf4248f 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxm.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxm.dtsi @@ -82,6 +82,35 @@ cpu7: cpu@103 { #cooling-cells = <2>; }; }; + + gpu_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-125000000 { + opp-hz = /bits/ 64 <125000000>; + opp-microvolt = <950000>; + }; + opp-250000000 { + opp-hz = /bits/ 64 <250000000>; + opp-microvolt = <950000>; + }; + opp-285714285 { + opp-hz = /bits/ 64 <285714285>; + opp-microvolt = <950000>; + }; + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <950000>; + }; + opp-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <950000>; + }; + opp-666666666 { + opp-hz = /bits/ 64 <666666666>; + opp-microvolt = <950000>; + }; + }; }; &apb { @@ -106,21 +135,7 @@ mali: gpu@c0000 { interrupt-names = "job", "mmu", "gpu"; clocks = <&clkc CLKID_MALI>; resets = <&reset RESET_MALI_CAPB3>, <&reset RESET_MALI>; - - /* - * Mali clocking is provided by two identical clock paths - * MALI_0 and MALI_1 muxed to a single clock by a glitch - * free mux to safely change frequency while running. - */ - assigned-clocks = <&clkc CLKID_MALI_0_SEL>, - <&clkc CLKID_MALI_0>, - <&clkc CLKID_MALI>; /* Glitch free mux */ - assigned-clock-parents = <&clkc CLKID_FCLK_DIV3>, - <0>, /* Do Nothing */ - <&clkc CLKID_MALI_0>; - assigned-clock-rates = <0>, /* Do Nothing */ - <666666666>, - <0>; /* Do Nothing */ + operating-points-v2 = <&gpu_opp_table>; }; }; -- 2.26.0