From patchwork Mon Oct 7 22:05:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11178561 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B7D417EE for ; Mon, 7 Oct 2019 22:06:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 07C872133F for ; Mon, 7 Oct 2019 22:06:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BwM8IGAf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729133AbfJGWGG (ORCPT ); Mon, 7 Oct 2019 18:06:06 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:34161 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728422AbfJGWGG (ORCPT ); Mon, 7 Oct 2019 18:06:06 -0400 Received: by mail-io1-f68.google.com with SMTP id q1so32282663ion.1; Mon, 07 Oct 2019 15:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Twc3gHw5x4Wog7YioRFdt2DRj3Idc7+bXpqT/1hf/GA=; b=BwM8IGAfFvBfdef2Lcn9ilsr9qhBSudW05V5D/5vmlL2JjGCQk2t+E007puOLkLE7G Pp5/W7p0ju/W6fAg03miaqEwbkUBKCqgFwjXyPzq4zju0sBDr2wXJez9kBrUGQM1RmGO NbWuGpgxjri/wex9sXDdFblIWVIBCNxKkHulrPOLKfArSDCJFkGIDVo11FwKfJsq25x/ PvYE1waz2dwmul3X+yfxXxEr5oLSwcJc38hW6ZWMBawSqyVyp7iFw9UJmWmrbYoRQwci T9wcYEUFER4gcVvkpiPLjqYHScwZHwzgKihWISU8TPKiSrUCQAdZMmvg4MmBgudqVvSK e/yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Twc3gHw5x4Wog7YioRFdt2DRj3Idc7+bXpqT/1hf/GA=; b=i39/Yw4In3CFwzkAGgzxHGzB87l8PzHv8ACgybwFU7GU26+veb7V8lwH6p711j8kgT QcykM7bHo2U1P9fD0D9XazZreQusnJ54Q6KU6vRg+RohnSkqgLKHkam61dguEWtAsZ30 RqSHN6wCliHXYIKNBKULjop0tcmq3Xo/lurivckmfnPD6W+u8ITIMxDsVs72+MP7ld17 UukZ8DW78Hac5a4j3r9/rSuq9e2QiOvbifJWXhyO6pPz03DNea7K5rLojI0QoyvkdOjE Nh9lURhDV90Anbm5zUmrDFERZCSJChnzV4rUpmY7aWW4tey6dH/53tMYi7zEVjG0XqjX V7bQ== X-Gm-Message-State: APjAAAUfJ+knYa+BVy1cJswrLX5OGlhMrcXZYm4d9YqRftLVqfqFuHmZ qFfihRwjr958IK77L0qnVsL7o8TY X-Google-Smtp-Source: APXvYqyVAqPt1YZkaEVl6jWaSrNlk0N+4BwSkrrhVDjCjtrmc7NlXfQbwe77w3FKpa5DV52V1cNtMg== X-Received: by 2002:a6b:8e0f:: with SMTP id q15mr25463674iod.186.1570485964958; Mon, 07 Oct 2019 15:06:04 -0700 (PDT) Received: from localhost.localdomain (c-73-37-219-234.hsd1.mn.comcast.net. [73.37.219.234]) by smtp.gmail.com with ESMTPSA id m14sm6479874ild.3.2019.10.07.15.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 15:06:03 -0700 (PDT) From: Adam Ford To: linux-omap@vger.kernel.org Cc: adam.ford@logicpd.com, hns@goldelico.com, Adam Ford , =?utf-8?q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Rob Herring , Mark Rutland , Russell King , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] configs: ARM: omap2plus: Enable OMAP3_THERMAL Date: Mon, 7 Oct 2019 17:05:39 -0500 Message-Id: <20191007220540.30690-1-aford173@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The some in the OMAP3 family have a bandgap thermal sensor, but omap2plus has it disabled. This patch enables the OMAP3_THERMAL by default like the rest of the OMAP family. Signed-off-by: Adam Ford diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 8f1c2b6f9e56..7e14a8c8bb29 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -292,6 +292,7 @@ CONFIG_THERMAL_GOV_FAIR_SHARE=y CONFIG_THERMAL_GOV_USER_SPACE=y CONFIG_CPU_THERMAL=y CONFIG_TI_THERMAL=y +CONFIG_OMAP3_THERMAL=y CONFIG_OMAP4_THERMAL=y CONFIG_OMAP5_THERMAL=y CONFIG_DRA752_THERMAL=y From patchwork Mon Oct 7 22:05:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11178563 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E989817EE for ; Mon, 7 Oct 2019 22:06:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C81A921929 for ; Mon, 7 Oct 2019 22:06:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uAl/TZp7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729527AbfJGWGI (ORCPT ); Mon, 7 Oct 2019 18:06:08 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:34165 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728422AbfJGWGH (ORCPT ); Mon, 7 Oct 2019 18:06:07 -0400 Received: by mail-io1-f66.google.com with SMTP id q1so32282798ion.1; Mon, 07 Oct 2019 15:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xderkNAd5iCp8HxtFYkNSskrWASJhHRHCkZ3LCYjMzg=; b=uAl/TZp7ZkdqN0kHsH6si4mz/kt6foUvrxpy/Hs1hwwYeDdgEuTY2/NX8gN7Z6xarw 1hIqz1zlPv0f61x76A9KuZPX3ND6xtw+uJwpD9J2GmtwH5MMTXf4rikuKip1Zd6oOfeU KCFrY8uiRgAbhFxe9eH46tdvsh+yGE2QR037uytPar3/FjgdxxWuGmruBJFa1/lZ4DFi VUFpwudGnJyx287MeZ6YFJ0Kx8R/nsFFuL3x6PkufOhzgMZ05iJ6t+Qwcw1jThz4NCEc yijnv5TXxYEgWHpjcY+hnLWFuQe4uUe7e8JNlUeN53aU33oXKOKy+TjaqQIC7E3sUfl1 smEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xderkNAd5iCp8HxtFYkNSskrWASJhHRHCkZ3LCYjMzg=; b=TWFlofanP3rGcVdD29pD0JI+vriahiTYd2UtrBpViBkmMa9OJDbI+RIS+FRisQ5+l/ jYqQ9AM7roKeX4kXbynZoPGY6dCVX8+WEt5uCFszvIgWE8LTXOz6dvnfYZOsfZF0/Er7 MvhO8tCTzM+K109l4mqNEA7WLNEmq9fHieWKmaXWfnNGc5jcyfFg/3uD4g7PDjn7cvcM g/ejY7s3XVGYEmheWTxyeYtTbm6KYOrcVMzJPnGrNAC4+cbhEU73RG4cdQYyz/JKyqat mWM4nqFbtBf/dS2Isp9UXqIdeVgvoIKc2QvOjc/SXZ+ABFMrNdOpoz4CHMZ1tY70tXdx 3y8w== X-Gm-Message-State: APjAAAUXQROFZDhwrXFBhw+mCkRpPaFFYBkzbaAqScCpLQKzSQgfus3n 6n4jOamlm1CYCq8v14P4HH5WDQRs X-Google-Smtp-Source: APXvYqyjBEBE28A9G2yZBMzh9WFCpy/KQsZ4WTfLgjutm/b0s70ky7JLyIM5zHztc9JPwoU/XJytDQ== X-Received: by 2002:a5e:c747:: with SMTP id g7mr269134iop.70.1570485966577; Mon, 07 Oct 2019 15:06:06 -0700 (PDT) Received: from localhost.localdomain (c-73-37-219-234.hsd1.mn.comcast.net. [73.37.219.234]) by smtp.gmail.com with ESMTPSA id m14sm6479874ild.3.2019.10.07.15.06.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 15:06:05 -0700 (PDT) From: Adam Ford To: linux-omap@vger.kernel.org Cc: adam.ford@logicpd.com, hns@goldelico.com, Adam Ford , =?utf-8?q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Rob Herring , Mark Rutland , Russell King , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ARM: dts: omap3: Add cpu trips and cooling map for omap34/36 families Date: Mon, 7 Oct 2019 17:05:40 -0500 Message-Id: <20191007220540.30690-2-aford173@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191007220540.30690-1-aford173@gmail.com> References: <20191007220540.30690-1-aford173@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The OMAP3530, OMAP3630, and DM3730 all show thresholds of 90C and 105C depending on commercial or industrial temperature ratings. This patch expands the thermal information to include the limits of 90 and 105C for alert and critical. It sets the coolings-cells for the 34xx and 36xx CPU's which both point to omap3-cpu-thermal.dtsi. For boards who never use industrial temperatures, these can be changed on their respective device trees with something like: &cpu_alert0 { temperature = <85000>; /* millicelsius */ }; &cpu_crit { temperature = <90000>; /* millicelsius */ }; Signed-off-by: Adam Ford Tested-by: H. Nikolaus Schaller # on GTA04A5 with dm3730cbp100 diff --git a/arch/arm/boot/dts/omap3-cpu-thermal.dtsi b/arch/arm/boot/dts/omap3-cpu-thermal.dtsi index 235ecfd61e2d..dfbd0cb0b00b 100644 --- a/arch/arm/boot/dts/omap3-cpu-thermal.dtsi +++ b/arch/arm/boot/dts/omap3-cpu-thermal.dtsi @@ -17,4 +17,25 @@ cpu_thermal: cpu_thermal { /* sensor ID */ thermal-sensors = <&bandgap 0>; + + cpu_trips: trips { + cpu_alert0: cpu_alert { + temperature = <90000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + cpu_crit: cpu_crit { + temperature = <105000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "critical"; + }; + }; + + cpu_cooling_maps: cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = + <&cpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; diff --git a/arch/arm/boot/dts/omap34xx.dtsi b/arch/arm/boot/dts/omap34xx.dtsi index 7b09cbee8bb8..99a7161bebb2 100644 --- a/arch/arm/boot/dts/omap34xx.dtsi +++ b/arch/arm/boot/dts/omap34xx.dtsi @@ -26,6 +26,7 @@ 600000 1350000 >; clock-latency = <300000>; /* From legacy driver */ + #cooling-cells = <2>; }; }; diff --git a/arch/arm/boot/dts/omap36xx.dtsi b/arch/arm/boot/dts/omap36xx.dtsi index 1e552f08f120..8096b6ef0ae1 100644 --- a/arch/arm/boot/dts/omap36xx.dtsi +++ b/arch/arm/boot/dts/omap36xx.dtsi @@ -28,6 +28,7 @@ 800000 1325000 >; clock-latency = <300000>; /* From legacy driver */ + #cooling-cells = <2>; }; };