From patchwork Fri Nov 23 12:18:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10695727 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 AD07C13BF for ; Fri, 23 Nov 2018 12:19:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1496D2B478 for ; Fri, 23 Nov 2018 12:18:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 082522B49A; Fri, 23 Nov 2018 12:18:57 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A43702B478 for ; Fri, 23 Nov 2018 12:18:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504161AbeKWXCs (ORCPT ); Fri, 23 Nov 2018 18:02:48 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:34338 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387898AbeKWXCq (ORCPT ); Fri, 23 Nov 2018 18:02:46 -0500 Received: by mail-ed1-f66.google.com with SMTP id b3so10127466ede.1; Fri, 23 Nov 2018 04:18:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DiJ8mgydcFLQgRIq3IKKEyTIgKLQiadTZ8mklrWjrmY=; b=rJN7EmtV1SvfEM4enPwsWtkcwsBRnOLFsaIw+26j2GgY5V//qCAQTQmrReX6hqNp0u 5JnwX3u0sp0jSb1AtJAqYopVsRLV/VvyZK5WqSZN5obxn7frxM03v6eFnq0aZDMK8hUc uT4i/QUgGpHwEyV7j7gZuCW4Q7ZCDvfOfLkYVWq9EaSmGiU4YmX1jQ6uAkk29OPvRu14 hZEudBRz7x3z2cDwyMxhK2AIA/QFXd0WRcobfNUilskZ320qlz2BNiloVGceuiw9C/Th xn+I1GuBifWgdkgSOFT6//04mDDCOuJZ+oBdJZNgqDO6kLDOzODsQ7hk97h8Cqs2aTgO LmMA== 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=DiJ8mgydcFLQgRIq3IKKEyTIgKLQiadTZ8mklrWjrmY=; b=tc17paB70Vm9TibCVhrInD4dl9ubns0jj3WBdSyDNXifutu2RMoECSWvrTzvPiSc/t m0f1Lk7fPv7cuO6dA7pxMPpxtDOLngUKCBHdsXN+ShNTjyZLKTLBUUzHuuve3qY73TGL ElHkJB8p4ZgzEcm43Lo7mvg5pOQOol6MWRYZVSPvzBtShAaUCqkIjjPAhOwp2WopNsvu yHYwNUTvw1j+LaM1pf9eFFVLOA8zBm+kuf27rPm5B3EYify9ytxR2wFyV48kp4m76TW1 hlg6aoI0ktQC0aoSt6OKaXR6UytvmzDO9PeiJdIzML+mmTZ/VF+Ta1Pzmk1tV3p7AIyu 15ug== X-Gm-Message-State: AA+aEWYy/WCCWJfRTzceU+cEgUBu0Us0A0u5onEmJOqn1mhB2Csdcr9H Psd3NCJ/pkrPlbQB0pRHodY= X-Google-Smtp-Source: AFSGD/VdFbOsPlP1AqdLvv+GIAS+xc/RexjBk/2YbR0ykvvR9El3sojinb+O+TpFstJ2fTgyH09d0A== X-Received: by 2002:a50:d643:: with SMTP id c3mr1554525edj.178.1542975525202; Fri, 23 Nov 2018 04:18:45 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id c11-v6sm6641048ejm.67.2018.11.23.04.18.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Nov 2018 04:18:44 -0800 (PST) From: Thierry Reding To: Thierry Reding Cc: Jon Hunter , Mikko Perttunen , Rob Herring , linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] arm64: tegra: p2972: Enable the CPU, GPU and AUX thermal zones Date: Fri, 23 Nov 2018 13:18:39 +0100 Message-Id: <20181123121839.18573-3-thierry.reding@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181123121839.18573-1-thierry.reding@gmail.com> References: <20181123121839.18573-1-thierry.reding@gmail.com> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Enable these thermal zones to be able to monitor their temperatures and control the fan to cool down the system if necessary. Signed-off-by: Thierry Reding Acked-by: Eduardo Valentin --- .../boot/dts/nvidia/tegra194-p2972-0000.dts | 91 ++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts b/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts index cbae8e8b1281..e29f8f6117c8 100644 --- a/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts @@ -43,8 +43,97 @@ }; }; - fan { + fan: fan { compatible = "pwm-fan"; pwms = <&pwm4 0 45334>; + + cooling-levels = <0 64 128 255>; + cooling-min-state = <0>; + cooling-max-state = <3>; + #cooling-cells = <2>; + }; + + thermal-zones { + cpu { + polling-delay = <0>; + polling-delay-passive = <500>; + status = "okay"; + + trips { + cpu_trip_critical: critical { + temperature = <96500>; + hysteresis = <0>; + type = "critical"; + }; + + cpu_trip_hot: hot { + temperature = <70000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_trip_active: active { + temperature = <50000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_passive: passive { + temperature = <30000>; + hysteresis = <2000>; + type = "passive"; + }; + }; + + cooling-maps { + cpu-critical { + cooling-device = <&fan 3 3>; + trip = <&cpu_trip_critical>; + }; + + cpu-hot { + cooling-device = <&fan 2 2>; + trip = <&cpu_trip_hot>; + }; + + cpu-active { + cooling-device = <&fan 1 1>; + trip = <&cpu_trip_active>; + }; + + cpu-passive { + cooling-device = <&fan 0 0>; + trip = <&cpu_trip_passive>; + }; + }; + }; + + gpu { + polling-delay = <0>; + polling-delay-passive = <500>; + status = "okay"; + + trips { + gpu_alert0: critical { + temperature = <99000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + aux { + polling-delay = <0>; + polling-delay-passive = <500>; + status = "okay"; + + trips { + aux_alert0: critical { + temperature = <90000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; }; };