Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp28369imp; Tue, 19 Feb 2019 17:24:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IYv4NP9pMf8FAKQ5tC2B4XjPjrk1md8yOjinJYkP60u+lTQV9i05doa7zu0oAJBzApNUlvH X-Received: by 2002:a62:1a8c:: with SMTP id a134mr31141918pfa.182.1550625850079; Tue, 19 Feb 2019 17:24:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550625850; cv=none; d=google.com; s=arc-20160816; b=oINonSCRun09abnTrLS3F8K7a4YSo75FdhfkUEx4O7xNprnx9B84ROdKf9k+B5AyVK UbxO44isZeeg4VcnVjTdPO0KyJE9tT+12aMQDVJ2amNDvffHl13nXI+m1e3YDxhluRmC StwMF8kwaF4RAdFaiazYvqzE+hnu1WZPr0nMCq4NWhiqPHnWjePO1tzWQktQdKuY8b2B tEoPUUtFUpyeej3p34YK+HQFKFa9hJYk/ar0hTY+abzTC1+qqnXAdAszroucjEqG0snB oSmGqcvNZnp7TZ2ST/8E/ma7uEEFojYndEmfzL0gf1TpW4Pc4yrqA97AcXIU8yWC2ZZK q8Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jirMJR6OXKA94AUCEPBAMxfWc0nU/EYAhogmk+ZdqyU=; b=NuFlVwPrfeH8TOLtPwNnjdnNFMJ8n3qThpj7dzYtmPFVOJ/7JR8HqDR8SWIiIBQLGH XxIL4eMJEnaUlcKLIhFIKnM0IqBBUv5WjbUmQvUNiM3H7z5jjU7mk6JweGI6sNRMu29T BUWLN/6YfnAtGrr4xmCbuD36CLctvxHypo3I6oP5zcM3ZA43vtEZnYlxOCVC2jUuheoF KRhCBoJSfdgAFzTfUn7JtP9XZ7Kcm87sxpJBKQiaK5e2UK2DJuLZxON1UwHawfd9qKI8 tREPNJwEtK2Cipg5xioT7MV7Loe70Uvd7YGeB5g0OzCxzasezosjSfclDy/VUAdqYbMs lc3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="E5/0Pft9"; 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 d22si2095527pfo.142.2019.02.19.17.23.54; Tue, 19 Feb 2019 17:24:10 -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="E5/0Pft9"; 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 S1727790AbfBTBWS (ORCPT + 99 others); Tue, 19 Feb 2019 20:22:18 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41344 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726176AbfBTBWR (ORCPT ); Tue, 19 Feb 2019 20:22:17 -0500 Received: by mail-pg1-f193.google.com with SMTP id m1so10974981pgq.8; Tue, 19 Feb 2019 17:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jirMJR6OXKA94AUCEPBAMxfWc0nU/EYAhogmk+ZdqyU=; b=E5/0Pft923Sv4s/K/P1bnkntKbS3NBVCG6f49ROCGlCak8ENVKWQkSxf6aQd50GDhc RNeOPbxkuKJidUtcjcjrYY4yRlrUF7R3NsljnFcxS5rWWYT/ISDtDvT5X/tcUfbsr/LU mWJ39cSDyPxbQMPjxof/Qe+ENgO+c8VhBqsfZQLQioec6CMtHpL7/tFbKdyM7DdvSrzx WewMcGuixItwZVGdqURb7CmuWngxp2Icx7w2+UP+0bxpshbM9CnmqYKsUnNO1/jCwj2F DMgkFNV7NqEpURz1crCvikss9vk3O5uWC0OVgaeT/DW84Q+Ojp7PtzCfz5CbWLFt1M9m K9XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jirMJR6OXKA94AUCEPBAMxfWc0nU/EYAhogmk+ZdqyU=; b=ED8BQah5IuoHMZRouZ7fxyyMe9musPEyuk1Jk2BohcToU6ybvNwgWzM52ujaXJ3W0m zDXfvjzFLd74AKfB+Eqx/QOXqh6vNMRJTUURXVD8bs0JW0UhCU3qbegmtb/CdonRUd8j ACkUtRBa8jPudYJvetV/q65thcgqq1Mtv/MZ6uvZZ08xEQQ6eUue81TRqV0WMQUdDXGF z6cN1RKufID4gsLraidHNjrm4QwyFCizIDyMycX0PMSuEcGL6EgONoPaIYPOCOrA4aCn 7pUZRGUsQ+Psojhx85HIJDvYQAmqAKvqL/hYEdKT9zmeDAKmFZ72bV8DZ5yFKefR/9Vl tQXg== X-Gm-Message-State: AHQUAuaWC5wFp387o09yFCVr3Isvtqf7lCQgd35r7X47rJHQcDT6gIGi MMZiTSb6TxT3Ou8dtSQHV9o= X-Received: by 2002:a65:410a:: with SMTP id w10mr3772063pgp.206.1550625736746; Tue, 19 Feb 2019 17:22:16 -0800 (PST) Received: from localhost.localdomain ([2601:644:8201:32e0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id x23sm42131170pfe.0.2019.02.19.17.22.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 17:22:15 -0800 (PST) Date: Tue, 19 Feb 2019 17:22:13 -0800 From: Eduardo Valentin To: Wei Ni Cc: Rob Herring , thierry.reding@gmail.com, daniel.lezcano@linaro.org, linux-tegra@vger.kernel.org, rui.zhang@intel.com, srikars@nvidia.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v1 01/12] of: Add bindings of thermtrip for Tegra soctherm Message-ID: <20190220012212.GE2811@localhost.localdomain> References: <1545118484-23641-1-git-send-email-wni@nvidia.com> <1545118484-23641-3-git-send-email-wni@nvidia.com> <20181227230630.GA3659@bogus> <1441d2d1-acfa-7b8d-5ed8-c2ca257df05d@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441d2d1-acfa-7b8d-5ed8-c2ca257df05d@nvidia.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 28, 2018 at 11:28:42AM +0800, Wei Ni wrote: > > > On 28/12/2018 7:06 AM, Rob Herring wrote: > > On Tue, Dec 18, 2018 at 03:34:33PM +0800, Wei Ni wrote: > >> Add optional property "nvidia,thermtrips". > >> If present, these trips will be used as HW shutdown trips, > >> and critical trips will be used as SW shutdown trips. > >> > >> Signed-off-by: Wei Ni > >> --- > >> .../bindings/thermal/nvidia,tegra124-soctherm.txt | 20 +++++++++++++++++--- > >> 1 file changed, 17 insertions(+), 3 deletions(-) > >> > >> diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt > >> index b6c0ae53d4dc..ab66d6feab4b 100644 > >> --- a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt > >> +++ b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt > >> @@ -55,10 +55,21 @@ Required properties : > >> - #cooling-cells: Should be 1. This cooling device only support on/off state. > >> See ./thermal.txt for a description of this property. > >> > >> +Optional properties: > >> +- nvidia,thermtrips : When present, this property specifies the temperature at > >> + which the soctherm hardware will assert the thermal trigger signal to the > >> + Power Management IC, which can be configured to reset or shutdown the device. > >> + It is an array of pairs where each pair represents a tsensor id followed by a > >> + temperature in milli Celcius. In the absence of this property the critical > >> + trip point will be used for thermtrip temperature. > >> + > >> Note: > >> -- the "critical" type trip points will be set to SOC_THERM hardware as the > >> -shut down temperature. Once the temperature of this thermal zone is higher > >> -than it, the system will be shutdown or reset by hardware. > >> +- the "critical" type trip points will be used to set the temperature at which > >> +the SOC_THERM hardware will assert a thermal trigger if the "nvidia,thermtrips" > >> +property is missing. When the thermtrips property is present, the breach of a > >> +critical trip point is reported back to the thermal framework to implement > >> +software shutdown. > > > > This hardly seems like a NVidia specific concept. A h/w shutdown > > temperature... Come up with something common. > > Hi Rob, > In current thermal framework, it doesn't support to set h/w shutdown > trips, the "critical" trip is used for s/w shutdown. I noticed that in > rockchip-thermal driver, it also used "rockchip,hw-tshut-temp" to set > h/w shutdown temperature. Why a critical trip point cannot be used for your hw shutdown too? > > > > > Also, we already have a temperature table. Why do we need temperatures > > in 2 places. > > Sorry, what do you mean temperature table? Do you mean the trip nodes? > > Thanks. > Wei. > > > > >> + > >> - the "hot" type trip points will be set to SOC_THERM hardware as the throttle > >> temperature. Once the the temperature of this thermal zone is higher > >> than it, it will trigger the HW throttle event. > >> @@ -79,6 +90,9 @@ Example : > >> > >> #thermal-sensor-cells = <1>; > >> > >> + nvidia,thermtrips = >> + TEGRA124_SOCTHERM_SENSOR_GPU 103000>; > >> + > >> throttle-cfgs { > >> /* > >> * When the "heavy" cooling device triggered, > >> -- > >> 2.7.4 > >>