From patchwork Mon May 20 22:00:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 10952437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9DEC11395 for ; Mon, 20 May 2019 22:01:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A4E62893F for ; Mon, 20 May 2019 22:01:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CEAA28942; Mon, 20 May 2019 22:01:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3388F2893F for ; Mon, 20 May 2019 22:01:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=uG5L1PDdc0gyIR+2kBtFdkhQZgTfg4nudDhZlXhpb/g=; b=lkImiLI+OVmyPF gDJXK82zpnAssSkW4mHpVVC2TmMCT63PH/pINEiKubQD5fKdqP25v3WtcBMlz4DIMumWNvJnS1BzT 1EQdtmCzIeesxgAFtYHaC5O3Fab6HkuGOUf0IgHu9GdYvVjAUAVgHF2CnpWrMhuQN8ZeayA044zFf Me5bBJGfc5P2MD45weaUj/qFR2fxWcQ6yGIt852pswQwQss783cbMt8W6FCtYaUBxaheiSIHNKzOX kuCAecCzO9i8AK5/fLKlEAyFYSRA2jc+vAaO9YwLs+Op222LGHbNUuRt78yyi1HkvUwvBbZig+vGw 7fOD96cM2GrQO6aiZcqA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSqLQ-0001MU-Io; Mon, 20 May 2019 22:01:20 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSqL6-0000wD-AN for linux-rockchip@lists.infradead.org; Mon, 20 May 2019 22:01:02 +0000 Received: by mail-pl1-x642.google.com with SMTP id f12so7336468plt.8 for ; Mon, 20 May 2019 15:01:00 -0700 (PDT) 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=AhecyL2qQDBC3MCxt/zq3Kbo+pVDpSa4FZM2PC318KM=; b=Z29uCy48sLghmNEdhhMQV0TpJwla5O9kSHf07Kq1yjC7hxkrawcDlwcEoypi9ODm+q n2wRZpZ1LIgMMfnJ6PFTBpPuoRTwNeP9123yeA2DpRntUT8mJfxDahavhiUY5qg6j34u VtKZ+kG4sPm3iPzYFN/QPEO/zwnxl/apQ8iGI= 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=AhecyL2qQDBC3MCxt/zq3Kbo+pVDpSa4FZM2PC318KM=; b=ZHzkECLReu0nWZ+tZIGpgmmhnoFnSBZM+uxojuWnlNi9QwePdZRF7K0OAAJblt7Pz9 Y54HR+J08BKL4V/Im/4AA9ZhICSjOahgYtkuv9FWch9aUHPowvyF+t6zRmoa4lIXK1nd hJAPfeA+HeXuCG4xRvEqdf5W4QEmFs7OEKhDtlef+KWi4gojSI5Tza/aKzcVf+rJM5HC cprSfP9cfUrf82X7nKBpFX7kXL9Y8HtjTUrRqd0L1GaU1abJzpyuV/gkzY/I10aRQNcO e3dfRCDBiDnFydVPX5Cn528ZBTg8ijcVEY0PN/TLWSBwzGm6EcRm1jptKjaMW2IIdRxT wHlw== X-Gm-Message-State: APjAAAUqtgP2DUyeWzIfsOcL5cI4qAbXIYOQkOlvDqjQdVcCV71maYM3 bXvFNmOyJuZWVjQWe31eRvatsw== X-Google-Smtp-Source: APXvYqw/+0hzgI+vOKWf7oG9dIM+CdVU0SsWOEYDBUI9M09FHn5cLFKmvyy5ff7yHB0Q6vF8xTU8XQ== X-Received: by 2002:a17:902:8ec4:: with SMTP id x4mr68111479plo.249.1558389659959; Mon, 20 May 2019 15:00:59 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id u66sm21907479pfb.76.2019.05.20.15.00.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 15:00:59 -0700 (PDT) From: Matthias Kaehlcke To: Heiko Stuebner , Rob Herring , Mark Rutland Subject: [PATCH v2 2/3] ARM: dts: rockchip: Use the GPU to cool CPU thermal zone of veyron mickey Date: Mon, 20 May 2019 15:00:50 -0700 Message-Id: <20190520220051.54847-2-mka@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog In-Reply-To: <20190520220051.54847-1-mka@chromium.org> References: <20190520220051.54847-1-mka@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190520_150100_356063_32294B54 X-CRM114-Status: GOOD ( 13.23 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Matthias Kaehlcke , linux-arm-kernel@lists.infradead.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On rk3288 the CPU and GPU temperatures are correlated. Limit the GPU frequency on veyron mickey to 400 MHz for CPU temperatures >= 65°C and to 300 MHz for CPU temperatures >= 85°C. This matches the configuration of the downstream Chrome OS 3.14 kernel, the 'official' kernel for mickey. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- Changes in v2: - added 'cpu_warm_limit_gpu' to throttle GPU for T.cpu >= 65°C - removed comment saying that GPU isn't throttled beyond 400 MHz based on CPU temperature - updated commit message Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) --- arch/arm/boot/dts/rk3288-veyron-mickey.dts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts index 52f6abc22291..34797abe3403 100644 --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts @@ -75,9 +75,7 @@ cooling-maps { /* * After 1st level, throttle the CPU down to as low as 1.4 GHz - * and don't let the GPU go faster than 400 MHz. Note that we - * won't throttle the GPU lower than 400 MHz due to CPU - * heat--we'll let the GPU do the rest itself. + * and don't let the GPU go faster than 400 MHz. */ cpu_warm_limit_cpu { trip = <&cpu_alert_warm>; @@ -86,6 +84,10 @@ <&cpu2 THERMAL_NO_LIMIT 4>, <&cpu3 THERMAL_NO_LIMIT 4>; }; + cpu_warm_limit_gpu { + trip = <&cpu_alert_warm>; + cooling-device = <&gpu 1 1>; + }; /* * Add some discrete steps to help throttling system deal @@ -125,6 +127,12 @@ <&cpu2 8 THERMAL_NO_LIMIT>, <&cpu3 8 THERMAL_NO_LIMIT>; }; + + /* At very hot, don't let GPU go over 300 MHz */ + cpu_very_hot_limit_gpu { + trip = <&cpu_alert_very_hot>; + cooling-device = <&gpu 2 2>; + }; }; };