Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3546941imu; Mon, 17 Dec 2018 23:36:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/VoZ18zNR8OJaYgBkn83vNqS236EInPKxaT22xYzKyqJIif70Pzji3zIlJ2C4ejyP3u06sj X-Received: by 2002:a17:902:b093:: with SMTP id p19mr15395395plr.135.1545118603006; Mon, 17 Dec 2018 23:36:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545118602; cv=none; d=google.com; s=arc-20160816; b=sxuDtgUFOL1VPxBYJLJkUwHNZ2NL19ZMhJdte1ni9ZpP59TCSdFgcUSp4EeJRemQfR RHo4oV1rZCsNdZWOHXBa7S33RyBqY3R5wLaCPv4NVqJPuYJdDdnKdeaAa+6Lf2nHR6+b lv2R5MgMDavvEMI0umU877GSbvIcU9RqKiVae7YCy9DJ5Aa6h5zgyqqGyQG5JQpXFpUy Y+PrTtu2U1vBEeLqZAW/Jb20OpsTpytYM10nYHgJIGGdA4dvAMiQI8CGOOMJIkl0im1P t8x4WFqzwisJBqsSCqkBZhKZPFy+aDhsEagVls1sFgm0CZJhBu9koAwYs1Dm5K63VnRa x6LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=DvywBLgymtuHtdQVAmcWVgLWinucGK52qF/cX0AEx64=; b=a2HIBB6Y4QdLEjS10XSmUwJt3vlm2hQp8ejSvfJMPwUQB+JBB6ZUZTyY9QTf43Yogh 3w8ACh6htgyI5lHfvfmcE4wu9WRt/9PAMJis1QVxHAM5VFXmhnO14pKG+2jj9bsqFNsW 9ZIotgcNzrTpvxaogoaq9romwrIYgLhC7s9KwA3Z/a+TUxNsRNA413snKrCAcllOA+d+ 8TzcDz2RfT1KnoUQ9qb1NKFXMdHva0EuSY790V6dSBb9u5QODdsvtc/JlkEQmFf9D3hE 5GwyZIt530SeEsoJlBIYPXTOglINdKGCc71ANLeDf4fDIxq+hgfloHjMGD2Y8A136U24 SNzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=fiMhWpPv; 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=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si13373985pla.405.2018.12.17.23.36.27; Mon, 17 Dec 2018 23:36:42 -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=@nvidia.com header.s=n1 header.b=fiMhWpPv; 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=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbeLRHfU (ORCPT + 99 others); Tue, 18 Dec 2018 02:35:20 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:8305 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726613AbeLRHfS (ORCPT ); Tue, 18 Dec 2018 02:35:18 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 17 Dec 2018 23:35:12 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 17 Dec 2018 23:35:18 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 17 Dec 2018 23:35:18 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL103.nvidia.com (172.20.187.11) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 18 Dec 2018 07:35:17 +0000 Received: from HQMAIL108.nvidia.com (172.18.146.13) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 18 Dec 2018 07:35:17 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL108.nvidia.com (172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Tue, 18 Dec 2018 07:35:17 +0000 Received: from niwei-ubuntu.nvidia.com (Not Verified[10.19.225.182]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Mon, 17 Dec 2018 23:35:17 -0800 From: Wei Ni To: , , , CC: , , , , Wei Ni Subject: [PATCH v1 04/12] of: Add bindings of gpu hw throttle for Tegra soctherm Date: Tue, 18 Dec 2018 15:34:36 +0800 Message-ID: <1545118484-23641-6-git-send-email-wni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545118484-23641-1-git-send-email-wni@nvidia.com> References: <1545118484-23641-1-git-send-email-wni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1545118512; bh=DvywBLgymtuHtdQVAmcWVgLWinucGK52qF/cX0AEx64=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=fiMhWpPvbTO2X4brLpZ+yJfSaaZ3QY2qBMn9fKtVWLxr18Q1yBvsqRDmBGFBEGFew 1EDzTDGPm0WHX4ifRevFhcP58zMsRknDsP1FOpUU6GyXj5C0cLvMpjObHeV8SPeTI5 QMNaxyfq/MTW9AVU1xGf7aU0sem8hT+nRbLZtlKen3ppVfij6Z0dPO8SOhFTUo/tYK syvL/C2EYpHQn8EejoVlh3zbl9aRe5/ctHMCHaVGvBh0XZvyCyLNI8mCxD7ABZe5pb Iwi93haay4ql/gMs0LPzVFPNIWl455DHBZxzd/Yx0nedStBBpdhQofuKpx7qigJFWE oPGrGlK9Hm9oA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add "nvidia,gpu-throt-level" property to set gpu hw throttle level. Signed-off-by: Wei Ni --- .../bindings/thermal/nvidia,tegra124-soctherm.txt | 17 +++++++++++++++-- include/dt-bindings/thermal/tegra124-soctherm.h | 22 ++++++++++++++++++---- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt index ab66d6feab4b..cf6d0be56b7a 100644 --- a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt +++ b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt @@ -52,6 +52,15 @@ Required properties : Must set as following values: TEGRA_SOCTHERM_THROT_LEVEL_LOW, TEGRA_SOCTHERM_THROT_LEVEL_MED TEGRA_SOCTHERM_THROT_LEVEL_HIGH, TEGRA_SOCTHERM_THROT_LEVEL_NONE + - nvidia,gpu-throt-level: This property is for Tegra124 and Tegra210. + It is the level of pulse skippers, which used to throttle clock + frequencies. It indicates gpu clock throttling depth and can be + programmed to any of the following values which represent a throttling + percentage: + TEGRA_SOCTHERM_THROT_LEVEL_NONE (0%) + TEGRA_SOCTHERM_THROT_LEVEL_LOW (50%), + TEGRA_SOCTHERM_THROT_LEVEL_MED (75%), + TEGRA_SOCTHERM_THROT_LEVEL_HIGH (85%). - #cooling-cells: Should be 1. This cooling device only support on/off state. See ./thermal.txt for a description of this property. @@ -96,22 +105,26 @@ Example : throttle-cfgs { /* * When the "heavy" cooling device triggered, - * the HW will skip cpu clock's pulse in 85% depth + * the HW will skip cpu clock's pulse in 85% depth, + * skip gpu clock's pulse in 85% level */ throttle_heavy: heavy { nvidia,priority = <100>; nvidia,cpu-throt-percent = <85>; + nvidia,gpu-throt-level = ; #cooling-cells = <1>; }; /* * When the "light" cooling device triggered, - * the HW will skip cpu clock's pulse in 50% depth + * the HW will skip cpu clock's pulse in 50% depth, + * skip gpu clock's pulse in 50% level */ throttle_light: light { nvidia,priority = <80>; nvidia,cpu-throt-percent = <50>; + nvidia,gpu-throt-level = ; #cooling-cells = <1>; }; diff --git a/include/dt-bindings/thermal/tegra124-soctherm.h b/include/dt-bindings/thermal/tegra124-soctherm.h index c15e8b709a0d..75853df1c609 100644 --- a/include/dt-bindings/thermal/tegra124-soctherm.h +++ b/include/dt-bindings/thermal/tegra124-soctherm.h @@ -1,5 +1,19 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* + * Copyright (c) 2014 - 2018, NVIDIA CORPORATION. All rights reserved. + * + * Author: + * Mikko Perttunen + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * * This header provides constants for binding nvidia,tegra124-soctherm. */ @@ -12,9 +26,9 @@ #define TEGRA124_SOCTHERM_SENSOR_PLLX 3 #define TEGRA124_SOCTHERM_SENSOR_NUM 4 -#define TEGRA_SOCTHERM_THROT_LEVEL_LOW 0 -#define TEGRA_SOCTHERM_THROT_LEVEL_MED 1 -#define TEGRA_SOCTHERM_THROT_LEVEL_HIGH 2 -#define TEGRA_SOCTHERM_THROT_LEVEL_NONE -1 +#define TEGRA_SOCTHERM_THROT_LEVEL_NONE 0 +#define TEGRA_SOCTHERM_THROT_LEVEL_LOW 1 +#define TEGRA_SOCTHERM_THROT_LEVEL_MED 2 +#define TEGRA_SOCTHERM_THROT_LEVEL_HIGH 3 #endif -- 2.7.4