Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3225098imu; Sat, 24 Nov 2018 00:31:20 -0800 (PST) X-Google-Smtp-Source: AJdET5fRxP9sjDgjkBi/Z/9/5i0ayWsRYk63WP5WLCB7k7sHwoEGU+Gk+2NWjbV8pwInLGzEGKcb X-Received: by 2002:a62:a117:: with SMTP id b23-v6mr18915238pff.163.1543048280673; Sat, 24 Nov 2018 00:31:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543048280; cv=none; d=google.com; s=arc-20160816; b=WDV+S1qySThXCiukFh3EYRezOUh9gr1YEiJ8XELVrwyR7lGKzWiFdvSBctfPDoBtst Ug/QCipa4AN3TGle6ScyLK5pf3xk0d6uo2rXusVhocT7zn9guhXEu/3tSU1natD+g0nn rmp3f8fOesZmDFbI4qfMDnatqeC7VY+XiQA9PTvFErFLgIREHK3pclKaFFW3x9PLG3DK dw/KjOMG6WRxKiY1+1S73mXGHLTjrdfo7wAUhjvp/B52dU4Tpw5Kb0dedgbZq1eXq1fX kkUzOPWOnMKwVTX0k4ORUuXsJ9GTF+BP13D/lYDLo91pnFexbssD9TF49FjE7Dcer/kC V3PQ== 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=DiJ8mgydcFLQgRIq3IKKEyTIgKLQiadTZ8mklrWjrmY=; b=ncwgDfWa+ZeZIiAGl+9zf8BTtzLYyZZReoBRKAxC6ficlZxP5Q7duVdcWglErOzRQ2 DUnqA7+S6SIxkwPzI/1ysWYSPF939rgii78mKaT9fNovun1DuyxyXkQApmJogDi00vCY nEuCriOKPY/qMFXB7xaB8OZRhvzSbYoSZI5UB300IfIN+AP/TcIb3R1cY3+84FDsNcpK q0Ft0CfikbKvX+g4BV1FFaExYRRSCQJFXJyO4Pac5gRVbysk0daVAf/zfFQi6v9jdXiK Jp02ANCL8k3Q4n2Oo8D8TYKluDOSgT9kj/k56uZMfMF3i0sbH5IIXwahrIc5BK1p4Fjs 4Yfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rJN7EmtV; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g187si31381040pfc.43.2018.11.24.00.31.06; Sat, 24 Nov 2018 00:31:20 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=rJN7EmtV; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504170AbeKWXCs (ORCPT + 99 others); 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-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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- .../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"; + }; + }; + }; }; }; -- 2.19.1