From patchwork Fri Nov 2 03:11:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Tang X-Patchwork-Id: 10664903 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 32AB815E9 for ; Fri, 2 Nov 2018 03:15:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 182962C073 for ; Fri, 2 Nov 2018 03:15:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09F9A2C084; Fri, 2 Nov 2018 03:15:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 689622C073 for ; Fri, 2 Nov 2018 03:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=8oAv1+Wd11C5UJCIokK7zAxQQktLCXzHXmt6kyPIMho=; b=D0v 86UVrvs+hplXR3ZO6SpY1b1zVshEYdKixykobXUaS7z8rf/m1Ofoz+X5S3lpDlUokadUXep5fykf5 Lgx0m85lxcxyBSdttphsE1s/vDh+TBn7vdxWn7eWs1aEbUIFmvBDyEk3cuxIOC/kQAxMrecO0d48W EUwVu0FPi3MAyB085Q3RzAKHmIIRqElL8a164IhcCgAndVzv0J0aHeSJRkqYSgcV06pkdRUe2Fc7w 6dT8Yw4QeV2SD2eywot0QPt0CISuE9P44RXJHXRrYiENub0Q/i0pFfg4rtjAInIkyjWU10/9HV71e RICQVJmkwsxS56fWerD5Dk0GmVdaBcQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIPw4-0002z9-9e; Fri, 02 Nov 2018 03:15:48 +0000 Received: from inva021.nxp.com ([92.121.34.21]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIPw0-0002xt-1n for linux-arm-kernel@lists.infradead.org; Fri, 02 Nov 2018 03:15:46 +0000 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 173DC2000C9; Fri, 2 Nov 2018 04:15:30 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1915B200010; Fri, 2 Nov 2018 04:15:25 +0100 (CET) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id EB0E4402EB; Fri, 2 Nov 2018 11:15:18 +0800 (SGT) From: Yuantian Tang To: shawnguo@kernel.org Subject: [PATCH] arm64: dts: nxp: add more thermal zone support Date: Fri, 2 Nov 2018 11:11:15 +0800 Message-Id: <20181102031115.3818-1-andy.tang@nxp.com> X-Mailer: git-send-email 2.14.1 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_201544_373912_4D7C4AF3 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, Yuantian Tang , daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, leoyang.li@nxp.com, robh+dt@kernel.org, rui.zhang@intel.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To enable all the supported thermal sensors, add sensor id information to thermal zone node. Dts for ls1012a, ls1046a, ls1043a, ls1088a are updated. Signed-off-by: Yuantian Tang --- arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 39 +++------------ arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 59 +++++++++++------------ arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 55 ++++++++++------------ arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 54 ++++++---------------- 4 files changed, 75 insertions(+), 132 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi index 68ac78c..9526b66 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi @@ -28,7 +28,7 @@ #address-cells = <1>; #size-cells = <0>; - cpu0: cpu@0 { + cooling_map0: cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a53"; reg = <0x0>; @@ -100,36 +100,7 @@ mask = <0x02>; }; - thermal-zones { - cpu_thermal: cpu-thermal { - polling-delay-passive = <1000>; - polling-delay = <5000>; - thermal-sensors = <&tmu 0>; - - trips { - cpu_alert: cpu-alert { - temperature = <85000>; - hysteresis = <2000>; - type = "passive"; - }; - - cpu_crit: cpu-crit { - temperature = <95000>; - hysteresis = <2000>; - type = "critical"; - }; - }; - - cooling-maps { - map0 { - trip = <&cpu_alert>; - cooling-device = - <&cpu0 THERMAL_NO_LIMIT - THERMAL_NO_LIMIT>; - }; - }; - }; - }; + #include "fsl-tmu.dtsi" soc { compatible = "simple-bus"; @@ -506,3 +477,9 @@ }; }; }; + +&thermal_zones { + thermal-zone0 { + status = "okay"; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi index 7881e3d..3afc6d4 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi @@ -37,7 +37,7 @@ * * Currently supported enable-method is psci v0.2 */ - cpu0: cpu@0 { + cooling_map0: cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a53"; reg = <0x0>; @@ -146,36 +146,7 @@ mask = <0x02>; }; - thermal-zones { - cpu_thermal: cpu-thermal { - polling-delay-passive = <1000>; - polling-delay = <5000>; - - thermal-sensors = <&tmu 3>; - - trips { - cpu_alert: cpu-alert { - temperature = <85000>; - hysteresis = <2000>; - type = "passive"; - }; - cpu_crit: cpu-crit { - temperature = <95000>; - hysteresis = <2000>; - type = "critical"; - }; - }; - - cooling-maps { - map0 { - trip = <&cpu_alert>; - cooling-device = - <&cpu0 THERMAL_NO_LIMIT - THERMAL_NO_LIMIT>; - }; - }; - }; - }; + #include "fsl-tmu.dtsi" timer { compatible = "arm,armv8-timer"; @@ -747,3 +718,29 @@ #include "qoriq-qman-portals.dtsi" #include "qoriq-bman-portals.dtsi" + +&thermal_zones { + thermal-zone0 { + status = "okay"; + }; + + thermal-zone1 { + status = "okay"; + }; + + thermal-zone2 { + status = "okay"; + }; + + thermal-zone3 { + status = "okay"; + }; + + thermal-zone4 { + status = "okay"; + }; + + thermal-zone5 { + status = "okay"; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi index ef83786..11793ca 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi @@ -33,7 +33,7 @@ #address-cells = <1>; #size-cells = <0>; - cpu0: cpu@0 { + cooling_map0: cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a72"; reg = <0x0>; @@ -115,36 +115,7 @@ mask = <0x02>; }; - thermal-zones { - cpu_thermal: cpu-thermal { - polling-delay-passive = <1000>; - polling-delay = <5000>; - thermal-sensors = <&tmu 3>; - - trips { - cpu_alert: cpu-alert { - temperature = <85000>; - hysteresis = <2000>; - type = "passive"; - }; - - cpu_crit: cpu-crit { - temperature = <95000>; - hysteresis = <2000>; - type = "critical"; - }; - }; - - cooling-maps { - map0 { - trip = <&cpu_alert>; - cooling-device = - <&cpu0 THERMAL_NO_LIMIT - THERMAL_NO_LIMIT>; - }; - }; - }; - }; + #include "fsl-tmu.dtsi" timer { compatible = "arm,armv8-timer"; @@ -743,3 +714,25 @@ #include "qoriq-qman-portals.dtsi" #include "qoriq-bman-portals.dtsi" + +&thermal_zones { + thermal-zone0 { + status = "okay"; + }; + + thermal-zone1 { + status = "okay"; + }; + + thermal-zone2 { + status = "okay"; + }; + + thermal-zone3 { + status = "okay"; + }; + + thermal-zone4 { + status = "okay"; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi index a07f612..d47f1a0 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi @@ -25,7 +25,7 @@ #size-cells = <0>; /* We have 2 clusters having 4 Cortex-A53 cores each */ - cpu0: cpu@0 { + cooling_map0: cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a53"; reg = <0x0>; @@ -61,7 +61,7 @@ #cooling-cells = <2>; }; - cpu4: cpu@100 { + cooling_map1: cpu4: cpu@100 { device_type = "cpu"; compatible = "arm,cortex-a53"; reg = <0x100>; @@ -128,43 +128,7 @@ }; }; - thermal-zones { - cpu_thermal: cpu-thermal { - polling-delay-passive = <1000>; - polling-delay = <5000>; - thermal-sensors = <&tmu 0>; - - trips { - cpu_alert: cpu-alert { - temperature = <85000>; - hysteresis = <2000>; - type = "passive"; - }; - - cpu_crit: cpu-crit { - temperature = <95000>; - hysteresis = <2000>; - type = "critical"; - }; - }; - - cooling-maps { - map0 { - trip = <&cpu_alert>; - cooling-device = - <&cpu0 THERMAL_NO_LIMIT - THERMAL_NO_LIMIT>; - }; - - map1 { - trip = <&cpu_alert>; - cooling-device = - <&cpu4 THERMAL_NO_LIMIT - THERMAL_NO_LIMIT>; - }; - }; - }; - }; + #include "fsl-tmu.dtsi" timer { compatible = "arm,armv8-timer"; @@ -648,3 +612,15 @@ }; }; + +#include "fsl-tmu-map1.dtsi" + +&thermal_zones { + thermal-zone0 { + status = "okay"; + }; + + thermal-zone1 { + status = "okay"; + }; +};