All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Ni <wni@nvidia.com>
To: daniel.lezcano@linaro.org, edubezval@gmail.com, robh@kernel.org
Cc: thierry.reding@gmail.com, linux-tegra@vger.kernel.org,
	rui.zhang@intel.com, srikars@nvidia.com,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org, Wei Ni <wni@nvidia.com>
Subject: [PATCH v2 11/12] of: Add bindings of OC hw throttle for Tegra soctherm
Date: Thu, 21 Feb 2019 18:18:46 +0800	[thread overview]
Message-ID: <1550744327-4677-12-git-send-email-wni@nvidia.com> (raw)
In-Reply-To: <1550744327-4677-1-git-send-email-wni@nvidia.com>

Add OC HW throttle configuration for soctherm in DT.
It is used to describe the OCx throttle events.

Signed-off-by: Wei Ni <wni@nvidia.com>
---
 .../bindings/thermal/nvidia,tegra124-soctherm.txt  | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt
index cf6d0be56b7a..f02f38527a6b 100644
--- a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt
+++ b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt
@@ -64,6 +64,20 @@ 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: The following properties are T210 specific and
+      valid only for OCx throttle events.
+      - nvidia,count-threshold: Specifies the number of OC events that are
+        required for triggering an interrupt. Interrupts are not triggered if
+        the property is missing. A value of 0 will interrupt on every OC alarm.
+      - nvidia,polarity-active-low: Configures the polarity of the OC alaram
+        signal. If present, this means assert low, otherwise assert high.
+      - nvidia,alarm-filter: Number of clocks to filter event. When the filter
+        expires (which means the OC event has not occurred for a long time),
+        the counter is cleared and filter is rearmed. Default value is 0.
+      - nvidia,throttle-period-us: Specifies the number of uSec for which
+        throttling is engaged after the OC event is deasserted. Default value
+        is 0.
+
 Optional properties:
 - nvidia,thermtrips : When present, this property specifies the temperature at
   which the soctherm hardware will assert the thermal trigger signal to the
@@ -134,6 +148,17 @@ Example :
 			 * arbiter will select the highest priority as the final throttle
 			 * settings to skip cpu pulse.
 			 */
+
+			throttle_oc1: oc1 {
+				nvidia,priority = <50>;
+				nvidia,polarity-active-low;
+				nvidia,count-threshold = <100>;
+				nvidia,alarm-filter = <5100000>;
+				nvidia,throttle-period-us = <0>;
+				nvidia,cpu-throt-percent = <75>;
+				nvidia,gpu-throt-level =
+						<TEGRA_SOCTHERM_THROT_LEVEL_MED>;
+                        };
 		};
 	};
 
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: Wei Ni <wni@nvidia.com>
To: <daniel.lezcano@linaro.org>, <edubezval@gmail.com>, <robh@kernel.org>
Cc: <thierry.reding@gmail.com>, <linux-tegra@vger.kernel.org>,
	<rui.zhang@intel.com>, <srikars@nvidia.com>,
	<linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>,
	<devicetree@vger.kernel.org>, Wei Ni <wni@nvidia.com>
Subject: [PATCH v2 11/12] of: Add bindings of OC hw throttle for Tegra soctherm
Date: Thu, 21 Feb 2019 18:18:46 +0800	[thread overview]
Message-ID: <1550744327-4677-12-git-send-email-wni@nvidia.com> (raw)
In-Reply-To: <1550744327-4677-1-git-send-email-wni@nvidia.com>

Add OC HW throttle configuration for soctherm in DT.
It is used to describe the OCx throttle events.

Signed-off-by: Wei Ni <wni@nvidia.com>
---
 .../bindings/thermal/nvidia,tegra124-soctherm.txt  | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt
index cf6d0be56b7a..f02f38527a6b 100644
--- a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt
+++ b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt
@@ -64,6 +64,20 @@ 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: The following properties are T210 specific and
+      valid only for OCx throttle events.
+      - nvidia,count-threshold: Specifies the number of OC events that are
+        required for triggering an interrupt. Interrupts are not triggered if
+        the property is missing. A value of 0 will interrupt on every OC alarm.
+      - nvidia,polarity-active-low: Configures the polarity of the OC alaram
+        signal. If present, this means assert low, otherwise assert high.
+      - nvidia,alarm-filter: Number of clocks to filter event. When the filter
+        expires (which means the OC event has not occurred for a long time),
+        the counter is cleared and filter is rearmed. Default value is 0.
+      - nvidia,throttle-period-us: Specifies the number of uSec for which
+        throttling is engaged after the OC event is deasserted. Default value
+        is 0.
+
 Optional properties:
 - nvidia,thermtrips : When present, this property specifies the temperature at
   which the soctherm hardware will assert the thermal trigger signal to the
@@ -134,6 +148,17 @@ Example :
 			 * arbiter will select the highest priority as the final throttle
 			 * settings to skip cpu pulse.
 			 */
+
+			throttle_oc1: oc1 {
+				nvidia,priority = <50>;
+				nvidia,polarity-active-low;
+				nvidia,count-threshold = <100>;
+				nvidia,alarm-filter = <5100000>;
+				nvidia,throttle-period-us = <0>;
+				nvidia,cpu-throt-percent = <75>;
+				nvidia,gpu-throt-level =
+						<TEGRA_SOCTHERM_THROT_LEVEL_MED>;
+                        };
 		};
 	};
 
-- 
2.7.4


  parent reply	other threads:[~2019-02-21 10:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 10:18 [PATCH v2 00/12] Add some functionalities for Tegra soctherm Wei Ni
2019-02-21 10:18 ` Wei Ni
2019-02-21 10:18 ` [PATCH v2 01/12] of: Add bindings of thermtrip " Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-02-21 10:18 ` [PATCH v2 02/12] thermal: tegra: support hw and sw shutdown Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-02-21 10:18 ` [PATCH v2 03/12] arm64: dts: tegra210: set thermtrip Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-04-26  3:21   ` Wei Ni
2019-04-26  3:21     ` Wei Ni
2019-02-21 10:18 ` [PATCH v2 04/12] of: Add bindings of gpu hw throttle for Tegra soctherm Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-02-21 10:18 ` [PATCH v2 05/12] thermal: tegra: add support for gpu hw-throttle Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-02-21 10:18 ` [PATCH v2 06/12] arm64: dts: tegra210: set gpu hw throttle level Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-02-21 10:18 ` [PATCH v2 07/12] thermal: tegra: add support for thermal IRQ Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-02-21 10:18 ` [PATCH v2 08/12] thermal: tegra: add set_trips functionality Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-02-21 10:18 ` [PATCH v2 09/12] thermal: tegra: add support for EDP IRQ Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-02-21 10:18 ` [PATCH v2 10/12] arm64: dts: tegra210: set EDP interrupt line Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-02-21 10:18 ` Wei Ni [this message]
2019-02-21 10:18   ` [PATCH v2 11/12] of: Add bindings of OC hw throttle for Tegra soctherm Wei Ni
2019-02-21 10:18 ` [PATCH v2 12/12] thermal: tegra: enable OC hw throttle Wei Ni
2019-02-21 10:18   ` Wei Ni
2019-04-23 15:46   ` Eduardo Valentin
2019-04-24  8:36     ` Wei Ni
2019-04-24  8:36       ` Wei Ni
2019-04-24  9:49       ` Wei Ni
2019-04-24  9:49         ` Wei Ni
2019-03-26  2:17 ` [PATCH v2 00/12] Add some functionalities for Tegra soctherm Wei Ni
2019-03-26  2:17   ` Wei Ni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1550744327-4677-12-git-send-email-wni@nvidia.com \
    --to=wni@nvidia.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=srikars@nvidia.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.