From patchwork Mon May 20 17:01:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 10951907 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 605186C5 for ; Mon, 20 May 2019 17:01:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AF7F288BB for ; Mon, 20 May 2019 17:01:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EDB6288BE; Mon, 20 May 2019 17:01:55 +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=ham 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 D1C87288BB for ; Mon, 20 May 2019 17:01:54 +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: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:In-Reply-To:References: List-Owner; bh=MVlyU2lZNpd/TSHd4eJIx9V0i/9uHqWAZmLVzEv1TVw=; b=B0Z1VkztRv/4RY lT47qYBpttJlTW/NeDmLbMSIJ91Wbw4qGRI5Xe5wd1rew1XRA4u1dQFPl5yNE+osA1KgUWJHOH1gP IhTSha5qOA/psAcjJ9yQSJhOnWsHoS7XaOtwesDPA0TQ0l50Ouimx8BSJlSIRp2tNoXsGB63yXI9W SkkMj/fjuOPDMxd7hD6cNjksHu8Z6NcpGISSAbb4rpCqolxnX4WODR3ydnbekwysEhsAyruXf1DWN F+mkBrvNE8sBp7AfJf8VDE9ACnpwHG82rnO4ymly3EQU1Z47BUfZ8V1R1cSHNt449Cm3w6YWQcqvD xoQ/GJqtdyr/mYG13azQ==; 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 1hSlfT-0007Bo-O4; Mon, 20 May 2019 17:01:43 +0000 Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSlfQ-0007AB-ES for linux-arm-kernel@lists.infradead.org; Mon, 20 May 2019 17:01:41 +0000 Received: by mail-io1-xd43.google.com with SMTP id g16so11607894iom.9 for ; Mon, 20 May 2019 10:01:39 -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:mime-version :content-transfer-encoding; bh=x6v5cZ4d3IbzzHyX9tB5SggAe9a0MLVJDqe4K+VrolY=; b=DgcBl8Smh89XruihvIIqo2/jwlRNXKwzhoakXmLzoUDPce90oG/GyzQ8l/jtA2OL0i SEXXSDe8NSrl1QM7MqUwkOtgDOh2Gr66AcXniCOv8ZqSJbDbxRvzXncS4+WdSFomASNH WfY30ET7xT7NYiS1Z1z8P77Zabz6rKiUmME9A= 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:mime-version :content-transfer-encoding; bh=x6v5cZ4d3IbzzHyX9tB5SggAe9a0MLVJDqe4K+VrolY=; b=UGt9xycxsHURXbD3kc4GvcGJKacaPWvxKmd8qd3fD3Rr2WgEK+KRqpRgubp32WuAA9 jfyr489TC/cpUXfp/VmeBby8dNvDnLaa7b8tVN/45XmXbYJJpr0PTpfb6eY/DYYURe06 D7es8H60HgKcBiw8zUrecEjlf7oNvQ8oNZoovUW42Q1G//CMHRCLfs/u9UszPTSzB1iK sLnFSnKmSS+gmTaO7sK5Ad0fRp8D2x26gKHqqSWPZAnP1WK/IyxS1a7YI+gYNd3m8WyJ yYRPYryJgPVo9MWS0o/F7n++IiXWstZ9Sx10+XwPeg6JGjUKltIxEWIK/BjJw+kDu8t6 qQfw== X-Gm-Message-State: APjAAAW34/dAjDDN2uwMmYCvaKLVgVeXjTFMQsTWg52aOgKcHxaTeJFL YMairdex07Cyw/rBr1CoJwUtHQ== X-Google-Smtp-Source: APXvYqy0W2gpclxj4ZGsAs2T9LwfcoVY4dorBvuLBx7NxPHNi4Rs1l+AN5UkFsEt4Xy4HrBvwIlWAw== X-Received: by 2002:a6b:2c94:: with SMTP id s142mr25278871ios.302.1558371699238; Mon, 20 May 2019 10:01:39 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id v202sm25015itb.38.2019.05.20.10.01.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 10:01:38 -0700 (PDT) From: Matthias Kaehlcke To: Heiko Stuebner , Rob Herring , Mark Rutland Subject: [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot Date: Mon, 20 May 2019 10:01:31 -0700 Message-Id: <20190520170132.91571-1-mka@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190520_100140_496806_B73C7FC3 X-CRM114-Status: GOOD ( 11.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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 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 --- 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts index d889ab3c8235..f118d92a49d0 100644 --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts @@ -125,6 +125,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>; + }; }; };