Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1464013pxu; Thu, 17 Dec 2020 10:30:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgaPgQ3SrTM25pnrYnlgOskYbmEaAReWJPmqj8z6CExQO5PssR5oL1wdpchrWvpKvIWlV2 X-Received: by 2002:a17:906:5002:: with SMTP id s2mr348102ejj.16.1608229844365; Thu, 17 Dec 2020 10:30:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608229844; cv=none; d=google.com; s=arc-20160816; b=lQ1YB07+u9lSok19oG2JbCSB1LfGu7WUuVYQEciR7JXHMxt/mDV9I4b5kn/ShnOTuj 4OrTzHHZgnnIPGV2+51ys7OVkPN+o0e6Bf17aFJ52y8yd81fW7TlARAdid4m8OX2L7Y2 sA1yZF9SkXh3xnZlS/deoDPWzLjqMast+KAfPXrRTCXMMkLG+NCvywPOGAKBZJYBDecm mgwepZRt0yROJdNheEdmPmM/BqtZTUkSJe3tGdatthU7XnfpxDIUY4YDnAS+PxvlnoWB or1VDnFNyLP3tkzrwQIz1GigslrM9y77jm663e2imRudheXpjMflBRgamvKTj6DmEMob Ryew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=q8aRgUoihX8Avz9ruuy2QvIzzYrzaxUTGheCXawpxLo=; b=NHFVOn1zp3dMuIQHTYiCxAgkU2hZ0WnfqCUzh9rc6xbVfMjr/D0R8mpCqCKK5QQW28 AuM5jiz2xhJSa7rVxuDSVzKhPWNTjWDuGnOyUvlgDbcTSiCqC2/xSkduc+gjgDjJt7k8 QGsuvTvaLGtd0R0A++/DgQNyGtRBpUBwniRx/lJtsSsx4P8fy29eKNiGU+JXv1Tb6J4M YV9yXmmmbBa/zvziHtbeqDpCKYUtyd9lUG2bpO2jpIx5zgMCh0jJB+cDqUPPoZiStfs5 GmYENlFLtfTS/wyUPby/PrI7jZKU+PV1Xf4p5xPUNWZmp3yA1zSsjnSGk6lfecbFZaJK DAaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xl1+B8fg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si3154764ejb.22.2020.12.17.10.30.21; Thu, 17 Dec 2020 10:30:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xl1+B8fg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730999AbgLQS3t (ORCPT + 99 others); Thu, 17 Dec 2020 13:29:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730693AbgLQS3s (ORCPT ); Thu, 17 Dec 2020 13:29:48 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5E71C0611C5 for ; Thu, 17 Dec 2020 10:29:01 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id r7so27583899wrc.5 for ; Thu, 17 Dec 2020 10:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=q8aRgUoihX8Avz9ruuy2QvIzzYrzaxUTGheCXawpxLo=; b=xl1+B8fgQHVTz0DkWK6xdRV/uEVFC82QHBw49Alo1pZRQNVZfyPx/dg+9bxRxn3y5j wOqiffyVmnYbj1EgpecnWAs09QIW7EF/7NIcncaJdZmmY7+vczFoazIVy/Eg+65pjOtM gbZSGEAdgwAa1cWspO2xP3t3GCTb/mkxr1zZPv3grz2TSux4ttuJEbJVzOWrxUZiqiYa EyespBuebZDUnKpi2lIbacdsmhJeRja5SjUmsnxUg4sTGmUV//8S1eWH9DFS0ELLtHED LuXIIy4cz1c19ZN2cy4JbGpV1+1UqvirDLHJkG8A4GrB16/yngcSjT40kjaVP9H2ytUQ kfsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=q8aRgUoihX8Avz9ruuy2QvIzzYrzaxUTGheCXawpxLo=; b=clkKvxoW4Zb8fcR7hla6j2Whsb4KEk0MS6d2Zldz6hBFK2ViwazdUkyZDY9n89Vij+ 8ZbdYKV3/p0M0+pB+6iVNl3iHhW/nZsIKM1pYck78JjaJT79ZpaoyM/bgrBmqcXUEzga Ye1JL8d+/meHTmw/LDgbIyYfZ40DX5Nk/71grMHxEPufOojmvp2UCDtkQkSSp/Z+BlCn UDiwNQa5eqX/067B2kO/Hrxi3Tt180bmEkycgz3u/FvM1fxhGuSoaNeBE2fZnFZUvM2n z93dgR8+e9G1Lst+BDOIryvBBpab7Sd2DG7/MBMAq4IW49mz77rXDNClfESqnT5q4Wu7 6CfA== X-Gm-Message-State: AOAM533AArX2PznBTVjmHAkZMcqzDPvt6ehzqep28Ow2D3A5I2X80MsJ 67jl6AWkBGSTcthW6uqaoiMC/w== X-Received: by 2002:a5d:61ca:: with SMTP id q10mr144253wrv.124.1608229740327; Thu, 17 Dec 2020 10:29:00 -0800 (PST) Received: from ?IPv6:2a01:e34:ed2f:f020:ccb6:ce78:2bcd:4ead? ([2a01:e34:ed2f:f020:ccb6:ce78:2bcd:4ead]) by smtp.googlemail.com with ESMTPSA id f7sm15260897wmc.1.2020.12.17.10.28.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Dec 2020 10:28:59 -0800 (PST) Subject: Re: [PATCH v2 48/48] ARM: tegra: cardhu: Support CPU voltage scaling and thermal throttling To: Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Mark Brown , Liam Girdwood , Ulf Hansson , Mauro Carvalho Chehab , Rob Herring , Peter Geis , Nicolas Chauvet , Krzysztof Kozlowski , "Rafael J. Wysocki" , Kevin Hilman , Peter De Schrijver , Viresh Kumar , Stephen Boyd , Michael Turquette Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org References: <20201217180638.22748-1-digetx@gmail.com> <20201217180638.22748-49-digetx@gmail.com> From: Daniel Lezcano Message-ID: Date: Thu, 17 Dec 2020 19:28:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201217180638.22748-49-digetx@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/12/2020 19:06, Dmitry Osipenko wrote: > Enable CPU voltage scaling and thermal throttling on Tegra30 Cardhu board. > > Signed-off-by: Dmitry Osipenko > --- Same comments as 47/48 > arch/arm/boot/dts/tegra30-cardhu.dtsi | 61 ++++++++++++++++++++++++++- > 1 file changed, 60 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi > index d74c9ca78a7f..08c0ea4e6228 100644 > --- a/arch/arm/boot/dts/tegra30-cardhu.dtsi > +++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi > @@ -1,6 +1,9 @@ > // SPDX-License-Identifier: GPL-2.0 > #include > +#include > #include "tegra30.dtsi" > +#include "tegra30-cpu-opp.dtsi" > +#include "tegra30-cpu-opp-microvolt.dtsi" > > /** > * This file contains common DT entry for all fab version of Cardhu. > @@ -339,12 +342,13 @@ ldo8_reg: ldo8 { > }; > }; > > - temperature-sensor@4c { > + nct1008: temperature-sensor@4c { > compatible = "onnn,nct1008"; > reg = <0x4c>; > vcc-supply = <&sys_3v3_reg>; > interrupt-parent = <&gpio>; > interrupts = ; > + #thermal-sensor-cells = <1>; > }; > > vdd_core: tps62361@60 { > @@ -438,6 +442,29 @@ clk32k_in: clock@0 { > #clock-cells = <0>; > }; > > + cpus { > + cpu0: cpu@0 { > + cpu-supply = <&vddctrl_reg>; > + operating-points-v2 = <&cpu0_opp_table>; > + #cooling-cells = <2>; > + }; > + > + cpu@1 { > + cpu-supply = <&vddctrl_reg>; > + operating-points-v2 = <&cpu0_opp_table>; > + }; > + > + cpu@2 { > + cpu-supply = <&vddctrl_reg>; > + operating-points-v2 = <&cpu0_opp_table>; > + }; > + > + cpu@3 { > + cpu-supply = <&vddctrl_reg>; > + operating-points-v2 = <&cpu0_opp_table>; > + }; > + }; > + > panel: panel { > compatible = "chunghwa,claa101wb01"; > ddc-i2c-bus = <&panelddc>; > @@ -617,6 +644,38 @@ sound { > <&tegra_car TEGRA30_CLK_EXTERN1>; > }; > > + thermal-zones { > + cpu-thermal { > + polling-delay-passive = <1000>; /* milliseconds */ > + polling-delay = <5000>; /* milliseconds */ > + > + thermal-sensors = <&nct1008 1>; > + > + trips { > + trip0: cpu-alert0 { > + /* throttle at 57C until temperature drops to 56.8C */ > + temperature = <57000>; > + hysteresis = <200>; > + type = "passive"; > + }; > + > + trip1: cpu-crit { > + /* shut down at 60C */ > + temperature = <60000>; > + hysteresis = <2000>; > + type = "critical"; > + }; > + }; > + > + cooling-maps { > + map0 { > + trip = <&trip0>; > + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + }; > + }; > + > gpio-keys { > compatible = "gpio-keys"; > > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog