linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: omap5/dra7/x15: Thermal dts patches
@ 2015-03-20 19:47 Nishanth Menon
  2015-03-20 19:47 ` [PATCH 1/3] ARM: dts: OMAP5+: separate the cpu thermal zone definition from omap4 Nishanth Menon
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Nishanth Menon @ 2015-03-20 19:47 UTC (permalink / raw)
  To: Tony Lindgren, Benoît Cousson
  Cc: Eduardo Valentin, linux-kernel, linux-arm-kernel, devicetree,
	linux-omap, Keerthy, Tero Kristo, Nishanth Menon

Hi,

Here are a few pending patches for DRA7/ OMAP5 and patch hooking the
GPIO fan to the thermal framework.

Tested on BeagleBoard-X15, uEVM with next-20150320. (just load up
cpufreq_dt and gpio_fan modules with omap2plus_defconfig, run cpuburn
to generate thermal and just wait for the fan to trigger - and it does-
we dont hit the frequency throttling temps)

The patches are based on
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
branch: omap-for-v4.1/dt-v2 10709c0858d8 ARM: dts: Update Nanobone dts file

The patch #3(gpio fan-thermal hookup) depends on 
(from linus master):
12ca7188468e thermal: Introduce dummy functions when thermal is not defined
and the following currently in linux-next(next-20150320) queued for future.
b5cf88e46bad (gpio-fan): Add thermal control hooks

Keerthy (1):
  ARM: dts: DRA7: Add bandgap and related thermal nodes

Nishanth Menon (1):
  ARM: dts: am57xx-beagle-x15: Add thermal map

Tero Kristo (1):
  ARM: dts: OMAP5+: separate the cpu thermal zone definition from omap4

 arch/arm/boot/dts/am57xx-beagle-x15.dts  |   49 ++++++++++++++++++++++++++++++
 arch/arm/boot/dts/dra7.dtsi              |   12 ++++++++
 arch/arm/boot/dts/dra72x.dtsi            |    9 ++++++
 arch/arm/boot/dts/dra74x.dtsi            |    9 ++++++
 arch/arm/boot/dts/omap5-cpu-thermal.dtsi |   41 +++++++++++++++++++++++++
 arch/arm/boot/dts/omap5.dtsi             |    2 +-
 6 files changed, 121 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/omap5-cpu-thermal.dtsi

Regards,
Nishanth Menon
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] ARM: dts: OMAP5+: separate the cpu thermal zone definition from omap4
  2015-03-20 19:47 [PATCH 0/3] ARM: omap5/dra7/x15: Thermal dts patches Nishanth Menon
@ 2015-03-20 19:47 ` Nishanth Menon
  2015-03-20 21:54   ` Eduardo Valentin
  2015-03-20 19:47 ` [PATCH 2/3] ARM: dts: DRA7: Add bandgap and related thermal nodes Nishanth Menon
  2015-03-20 19:47 ` [PATCH 3/3] ARM: dts: am57xx-beagle-x15: Add thermal map Nishanth Menon
  2 siblings, 1 reply; 9+ messages in thread
From: Nishanth Menon @ 2015-03-20 19:47 UTC (permalink / raw)
  To: Tony Lindgren, Benoît Cousson
  Cc: Eduardo Valentin, linux-kernel, linux-arm-kernel, devicetree,
	linux-omap, Keerthy, Tero Kristo, Nishanth Menon

From: Tero Kristo <t-kristo@ti.com>

OMAP4 has a finer counter granularity, which allows for a delay of 1000ms
in the thermal zone polling intervals. OMAP5/DRA7 have different counter
mechanism, which allows at maximum a 500ms timer. Adjust the cpu thermal
zone accordingly for OMAP5/DRA7.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/boot/dts/omap5-cpu-thermal.dtsi |   41 ++++++++++++++++++++++++++++++
 arch/arm/boot/dts/omap5.dtsi             |    2 +-
 2 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/omap5-cpu-thermal.dtsi

diff --git a/arch/arm/boot/dts/omap5-cpu-thermal.dtsi b/arch/arm/boot/dts/omap5-cpu-thermal.dtsi
new file mode 100644
index 000000000000..4a6427c1e47e
--- /dev/null
+++ b/arch/arm/boot/dts/omap5-cpu-thermal.dtsi
@@ -0,0 +1,41 @@
+/*
+ * Device Tree Source for OMAP4/5 SoC CPU thermal
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ * Contact: Tero Kristo <t-kristo@ti.com>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <dt-bindings/thermal/thermal.h>
+
+cpu_thermal: cpu_thermal {
+	polling-delay-passive = <250>; /* milliseconds */
+	polling-delay = <500>; /* milliseconds */
+
+			/* sensor       ID */
+	thermal-sensors = <&bandgap     0>;
+
+	cpu_trips: trips {
+		cpu_alert0: cpu_alert {
+			temperature = <100000>; /* millicelsius */
+			hysteresis = <2000>; /* millicelsius */
+			type = "passive";
+		};
+		cpu_crit: cpu_crit {
+			temperature = <125000>; /* millicelsius */
+			hysteresis = <2000>; /* millicelsius */
+			type = "critical";
+		};
+	};
+
+	cpu_cooling_maps: cooling-maps {
+		map0 {
+			trip = <&cpu_alert0>;
+			cooling-device =
+				<&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index ddff674bd05e..e650d4eb59dd 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -67,7 +67,7 @@
 	};
 
 	thermal-zones {
-		#include "omap4-cpu-thermal.dtsi"
+		#include "omap5-cpu-thermal.dtsi"
 		#include "omap5-gpu-thermal.dtsi"
 		#include "omap5-core-thermal.dtsi"
 	};
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] ARM: dts: DRA7: Add bandgap and related thermal nodes
  2015-03-20 19:47 [PATCH 0/3] ARM: omap5/dra7/x15: Thermal dts patches Nishanth Menon
  2015-03-20 19:47 ` [PATCH 1/3] ARM: dts: OMAP5+: separate the cpu thermal zone definition from omap4 Nishanth Menon
@ 2015-03-20 19:47 ` Nishanth Menon
  2015-03-20 21:51   ` Eduardo Valentin
  2015-03-20 19:47 ` [PATCH 3/3] ARM: dts: am57xx-beagle-x15: Add thermal map Nishanth Menon
  2 siblings, 1 reply; 9+ messages in thread
From: Nishanth Menon @ 2015-03-20 19:47 UTC (permalink / raw)
  To: Tony Lindgren, Benoît Cousson
  Cc: Eduardo Valentin, linux-kernel, linux-arm-kernel, devicetree,
	linux-omap, Keerthy, Tero Kristo, Nishanth Menon

From: Keerthy <j-keerthy@ti.com>

Add bandgap and related thermal nodes. The patch adds 5 thermal
sensors. Only one cooling device for mpu as of now. The sensors are
the exact same on both dra72 and dra7.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/boot/dts/dra7.dtsi   |   12 ++++++++++++
 arch/arm/boot/dts/dra72x.dtsi |    9 +++++++++
 arch/arm/boot/dts/dra74x.dtsi |    9 +++++++++
 3 files changed, 30 insertions(+)

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index eea4a54d6cb3..4b975cc377fd 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -177,6 +177,18 @@
 			};
 		};
 
+		bandgap: bandgap@4a0021e0 {
+			reg = <0x4a0021e0 0xc
+				0x4a00232c 0xc
+				0x4a002380 0x2c
+				0x4a0023C0 0x3c
+				0x4a002564 0x8
+				0x4a002574 0x50>;
+				compatible = "ti,dra752-bandgap";
+				interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
+				#thermal-sensor-cells = <1>;
+		};
+
 		cm_core_aon: cm_core_aon@4a005000 {
 			compatible = "ti,dra7-cm-core-aon";
 			reg = <0x4a005000 0x2000>;
diff --git a/arch/arm/boot/dts/dra72x.dtsi b/arch/arm/boot/dts/dra72x.dtsi
index e5a3d23a3df1..43bd0709bde9 100644
--- a/arch/arm/boot/dts/dra72x.dtsi
+++ b/arch/arm/boot/dts/dra72x.dtsi
@@ -20,6 +20,11 @@
 			device_type = "cpu";
 			compatible = "arm,cortex-a15";
 			reg = <0>;
+
+			/* cooling options */
+			cooling-min-level = <0>;
+			cooling-max-level = <2>;
+			#cooling-cells = <2>; /* min followed by max */
 		};
 	};
 
@@ -27,4 +32,8 @@
 		compatible = "arm,cortex-a15-pmu";
 		interrupts = <GIC_SPI DIRECT_IRQ(131) IRQ_TYPE_LEVEL_HIGH>;
 	};
+
+	thermal_zones: thermal-zones {
+		#include "omap5-cpu-thermal.dtsi"
+	};
 };
diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi
index 10173fab1a15..4f2c870836fe 100644
--- a/arch/arm/boot/dts/dra74x.dtsi
+++ b/arch/arm/boot/dts/dra74x.dtsi
@@ -31,6 +31,11 @@
 			clock-names = "cpu";
 
 			clock-latency = <300000>; /* From omap-cpufreq driver */
+
+			/* cooling options */
+			cooling-min-level = <0>;
+			cooling-max-level = <2>;
+			#cooling-cells = <2>; /* min followed by max */
 		};
 		cpu@1 {
 			device_type = "cpu";
@@ -45,6 +50,10 @@
 			     <GIC_SPI DIRECT_IRQ(132) IRQ_TYPE_LEVEL_HIGH>;
 	};
 
+	thermal_zones: thermal-zones {
+		#include "omap5-cpu-thermal.dtsi"
+	};
+
 	ocp {
 		omap_dwc3_4: omap_dwc3_4@48940000 {
 			compatible = "ti,dwc3";
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] ARM: dts: am57xx-beagle-x15: Add thermal map
  2015-03-20 19:47 [PATCH 0/3] ARM: omap5/dra7/x15: Thermal dts patches Nishanth Menon
  2015-03-20 19:47 ` [PATCH 1/3] ARM: dts: OMAP5+: separate the cpu thermal zone definition from omap4 Nishanth Menon
  2015-03-20 19:47 ` [PATCH 2/3] ARM: dts: DRA7: Add bandgap and related thermal nodes Nishanth Menon
@ 2015-03-20 19:47 ` Nishanth Menon
  2015-03-20 21:50   ` Eduardo Valentin
  2 siblings, 1 reply; 9+ messages in thread
From: Nishanth Menon @ 2015-03-20 19:47 UTC (permalink / raw)
  To: Tony Lindgren, Benoît Cousson
  Cc: Eduardo Valentin, linux-kernel, linux-arm-kernel, devicetree,
	linux-omap, Keerthy, Tero Kristo, Nishanth Menon

BeagleBoard-X15 has capability for a fan and has an onboard TMP102
temperature sensor as well. This allows us to create a new thermal
zone (called, un-imaginatively "board"), and allows us to use some
active cooling as temperatures start edge upward in the system by
creating a new alert temperature (emperically 50C) for cpu.

NOTE: Fan is NOT mounted by default on the platform, in such a case,
all we end up doing is switch on a regulator and leak very minimal
current.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/boot/dts/am57xx-beagle-x15.dts |   49 +++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 41642fe770a1..6a3621c23017 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -86,6 +86,7 @@
 		gpios =  <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>;
 		gpio-fan,speed-map = <0     0>,
 				     <13000 1>;
+		#cooling-cells = <2>;
 	};
 
 	extcon_usb1: extcon_usb1 {
@@ -441,6 +442,7 @@
 		pinctrl-0 = <&tmp102_pins_default>;
 		interrupt-parent = <&gpio7>;
 		interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
+		#thermal-sensor-cells = <1>;
 	};
 };
 
@@ -559,3 +561,50 @@
 &usb2 {
 	dr_mode = "peripheral";
 };
+
+&cpu_trips {
+	cpu_alert1: cpu_alert1 {
+		temperature = <50000>; /* millicelsius */
+		hysteresis = <2000>; /* millicelsius */
+		type = "active";
+	};
+};
+
+&cpu_cooling_maps {
+	map1 {
+		trip = <&cpu_alert1>;
+		cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+	};
+};
+
+&thermal_zones {
+	board_thermal: board_thermal {
+		polling-delay-passive = <1250>; /* milliseconds */
+		polling-delay = <1500>; /* milliseconds */
+
+				/* sensor       ID */
+		thermal-sensors = <&tmp102     0>;
+
+		board_trips: trips {
+			board_alert0: board_alert {
+				temperature = <40000>; /* millicelsius */
+				hysteresis = <2000>; /* millicelsius */
+				type = "active";
+			};
+
+			board_crit: board_crit {
+				temperature = <105000>; /* millicelsius */
+				hysteresis = <0>; /* millicelsius */
+				type = "critical";
+			};
+		};
+
+		board_cooling_maps: cooling-maps {
+			map0 {
+				trip = <&board_alert0>;
+				cooling-device =
+				  <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+			};
+		};
+       };
+};
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] ARM: dts: am57xx-beagle-x15: Add thermal map
  2015-03-20 19:47 ` [PATCH 3/3] ARM: dts: am57xx-beagle-x15: Add thermal map Nishanth Menon
@ 2015-03-20 21:50   ` Eduardo Valentin
  0 siblings, 0 replies; 9+ messages in thread
From: Eduardo Valentin @ 2015-03-20 21:50 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Tony Lindgren, Benoît Cousson, linux-kernel,
	linux-arm-kernel, devicetree, linux-omap, Keerthy, Tero Kristo

[-- Attachment #1: Type: text/plain, Size: 2715 bytes --]

On Fri, Mar 20, 2015 at 02:47:41PM -0500, Nishanth Menon wrote:
> BeagleBoard-X15 has capability for a fan and has an onboard TMP102
> temperature sensor as well. This allows us to create a new thermal
> zone (called, un-imaginatively "board"), and allows us to use some
> active cooling as temperatures start edge upward in the system by
> creating a new alert temperature (emperically 50C) for cpu.
> 
> NOTE: Fan is NOT mounted by default on the platform, in such a case,
> all we end up doing is switch on a regulator and leak very minimal
> current.
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

> ---
>  arch/arm/boot/dts/am57xx-beagle-x15.dts |   49 +++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> index 41642fe770a1..6a3621c23017 100644
> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> @@ -86,6 +86,7 @@
>  		gpios =  <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>;
>  		gpio-fan,speed-map = <0     0>,
>  				     <13000 1>;
> +		#cooling-cells = <2>;
>  	};
>  
>  	extcon_usb1: extcon_usb1 {
> @@ -441,6 +442,7 @@
>  		pinctrl-0 = <&tmp102_pins_default>;
>  		interrupt-parent = <&gpio7>;
>  		interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
> +		#thermal-sensor-cells = <1>;
>  	};
>  };
>  
> @@ -559,3 +561,50 @@
>  &usb2 {
>  	dr_mode = "peripheral";
>  };
> +
> +&cpu_trips {
> +	cpu_alert1: cpu_alert1 {
> +		temperature = <50000>; /* millicelsius */
> +		hysteresis = <2000>; /* millicelsius */
> +		type = "active";
> +	};
> +};
> +
> +&cpu_cooling_maps {
> +	map1 {
> +		trip = <&cpu_alert1>;
> +		cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> +	};
> +};
> +
> +&thermal_zones {
> +	board_thermal: board_thermal {
> +		polling-delay-passive = <1250>; /* milliseconds */
> +		polling-delay = <1500>; /* milliseconds */
> +
> +				/* sensor       ID */
> +		thermal-sensors = <&tmp102     0>;
> +
> +		board_trips: trips {
> +			board_alert0: board_alert {
> +				temperature = <40000>; /* millicelsius */
> +				hysteresis = <2000>; /* millicelsius */
> +				type = "active";
> +			};
> +
> +			board_crit: board_crit {
> +				temperature = <105000>; /* millicelsius */
> +				hysteresis = <0>; /* millicelsius */
> +				type = "critical";
> +			};
> +		};
> +
> +		board_cooling_maps: cooling-maps {
> +			map0 {
> +				trip = <&board_alert0>;
> +				cooling-device =
> +				  <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> +			};
> +		};
> +       };
> +};
> -- 
> 1.7.9.5
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] ARM: dts: DRA7: Add bandgap and related thermal nodes
  2015-03-20 19:47 ` [PATCH 2/3] ARM: dts: DRA7: Add bandgap and related thermal nodes Nishanth Menon
@ 2015-03-20 21:51   ` Eduardo Valentin
  0 siblings, 0 replies; 9+ messages in thread
From: Eduardo Valentin @ 2015-03-20 21:51 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Tony Lindgren, Benoît Cousson, linux-kernel,
	linux-arm-kernel, devicetree, linux-omap, Keerthy, Tero Kristo

[-- Attachment #1: Type: text/plain, Size: 2851 bytes --]

On Fri, Mar 20, 2015 at 02:47:40PM -0500, Nishanth Menon wrote:
> From: Keerthy <j-keerthy@ti.com>
> 
> Add bandgap and related thermal nodes. The patch adds 5 thermal
> sensors. Only one cooling device for mpu as of now. The sensors are
> the exact same on both dra72 and dra7.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

> ---
>  arch/arm/boot/dts/dra7.dtsi   |   12 ++++++++++++
>  arch/arm/boot/dts/dra72x.dtsi |    9 +++++++++
>  arch/arm/boot/dts/dra74x.dtsi |    9 +++++++++
>  3 files changed, 30 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> index eea4a54d6cb3..4b975cc377fd 100644
> --- a/arch/arm/boot/dts/dra7.dtsi
> +++ b/arch/arm/boot/dts/dra7.dtsi
> @@ -177,6 +177,18 @@
>  			};
>  		};
>  
> +		bandgap: bandgap@4a0021e0 {
> +			reg = <0x4a0021e0 0xc
> +				0x4a00232c 0xc
> +				0x4a002380 0x2c
> +				0x4a0023C0 0x3c
> +				0x4a002564 0x8
> +				0x4a002574 0x50>;
> +				compatible = "ti,dra752-bandgap";
> +				interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
> +				#thermal-sensor-cells = <1>;
> +		};
> +
>  		cm_core_aon: cm_core_aon@4a005000 {
>  			compatible = "ti,dra7-cm-core-aon";
>  			reg = <0x4a005000 0x2000>;
> diff --git a/arch/arm/boot/dts/dra72x.dtsi b/arch/arm/boot/dts/dra72x.dtsi
> index e5a3d23a3df1..43bd0709bde9 100644
> --- a/arch/arm/boot/dts/dra72x.dtsi
> +++ b/arch/arm/boot/dts/dra72x.dtsi
> @@ -20,6 +20,11 @@
>  			device_type = "cpu";
>  			compatible = "arm,cortex-a15";
>  			reg = <0>;
> +
> +			/* cooling options */
> +			cooling-min-level = <0>;
> +			cooling-max-level = <2>;
> +			#cooling-cells = <2>; /* min followed by max */
>  		};
>  	};
>  
> @@ -27,4 +32,8 @@
>  		compatible = "arm,cortex-a15-pmu";
>  		interrupts = <GIC_SPI DIRECT_IRQ(131) IRQ_TYPE_LEVEL_HIGH>;
>  	};
> +
> +	thermal_zones: thermal-zones {
> +		#include "omap5-cpu-thermal.dtsi"
> +	};
>  };
> diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi
> index 10173fab1a15..4f2c870836fe 100644
> --- a/arch/arm/boot/dts/dra74x.dtsi
> +++ b/arch/arm/boot/dts/dra74x.dtsi
> @@ -31,6 +31,11 @@
>  			clock-names = "cpu";
>  
>  			clock-latency = <300000>; /* From omap-cpufreq driver */
> +
> +			/* cooling options */
> +			cooling-min-level = <0>;
> +			cooling-max-level = <2>;
> +			#cooling-cells = <2>; /* min followed by max */
>  		};
>  		cpu@1 {
>  			device_type = "cpu";
> @@ -45,6 +50,10 @@
>  			     <GIC_SPI DIRECT_IRQ(132) IRQ_TYPE_LEVEL_HIGH>;
>  	};
>  
> +	thermal_zones: thermal-zones {
> +		#include "omap5-cpu-thermal.dtsi"
> +	};
> +
>  	ocp {
>  		omap_dwc3_4: omap_dwc3_4@48940000 {
>  			compatible = "ti,dwc3";
> -- 
> 1.7.9.5
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] ARM: dts: OMAP5+: separate the cpu thermal zone definition from omap4
  2015-03-20 19:47 ` [PATCH 1/3] ARM: dts: OMAP5+: separate the cpu thermal zone definition from omap4 Nishanth Menon
@ 2015-03-20 21:54   ` Eduardo Valentin
  2015-03-23 10:16     ` Tero Kristo
  0 siblings, 1 reply; 9+ messages in thread
From: Eduardo Valentin @ 2015-03-20 21:54 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Tony Lindgren, Benoît Cousson, linux-kernel,
	linux-arm-kernel, devicetree, linux-omap, Keerthy, Tero Kristo

[-- Attachment #1: Type: text/plain, Size: 2731 bytes --]

On Fri, Mar 20, 2015 at 02:47:39PM -0500, Nishanth Menon wrote:
> From: Tero Kristo <t-kristo@ti.com>
> 
> OMAP4 has a finer counter granularity, which allows for a delay of 1000ms
> in the thermal zone polling intervals. OMAP5/DRA7 have different counter
> mechanism, which allows at maximum a 500ms timer. Adjust the cpu thermal
> zone accordingly for OMAP5/DRA7.
> 
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>


> ---
>  arch/arm/boot/dts/omap5-cpu-thermal.dtsi |   41 ++++++++++++++++++++++++++++++
>  arch/arm/boot/dts/omap5.dtsi             |    2 +-
>  2 files changed, 42 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/omap5-cpu-thermal.dtsi
> 
> diff --git a/arch/arm/boot/dts/omap5-cpu-thermal.dtsi b/arch/arm/boot/dts/omap5-cpu-thermal.dtsi
> new file mode 100644
> index 000000000000..4a6427c1e47e
> --- /dev/null
> +++ b/arch/arm/boot/dts/omap5-cpu-thermal.dtsi
> @@ -0,0 +1,41 @@
> +/*
> + * Device Tree Source for OMAP4/5 SoC CPU thermal
> + *
> + * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
> + * Contact: Tero Kristo <t-kristo@ti.com>
> + *
> + * This file is licensed under the terms of the GNU General Public License
> + * version 2.  This program is licensed "as is" without any warranty of any
> + * kind, whether express or implied.
> + */
> +
> +#include <dt-bindings/thermal/thermal.h>
> +
> +cpu_thermal: cpu_thermal {
> +	polling-delay-passive = <250>; /* milliseconds */
> +	polling-delay = <500>; /* milliseconds */
> +
> +			/* sensor       ID */
> +	thermal-sensors = <&bandgap     0>;
> +
> +	cpu_trips: trips {
> +		cpu_alert0: cpu_alert {
> +			temperature = <100000>; /* millicelsius */
> +			hysteresis = <2000>; /* millicelsius */
> +			type = "passive";
> +		};
> +		cpu_crit: cpu_crit {
> +			temperature = <125000>; /* millicelsius */
> +			hysteresis = <2000>; /* millicelsius */
> +			type = "critical";
> +		};
> +	};
> +
> +	cpu_cooling_maps: cooling-maps {
> +		map0 {
> +			trip = <&cpu_alert0>;
> +			cooling-device =
> +				<&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> +		};
> +	};
> +};
> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
> index ddff674bd05e..e650d4eb59dd 100644
> --- a/arch/arm/boot/dts/omap5.dtsi
> +++ b/arch/arm/boot/dts/omap5.dtsi
> @@ -67,7 +67,7 @@
>  	};
>  
>  	thermal-zones {
> -		#include "omap4-cpu-thermal.dtsi"
> +		#include "omap5-cpu-thermal.dtsi"

Can't we simple change the polling value for the omap5 case and reuse
the omap4 file?

>  		#include "omap5-gpu-thermal.dtsi"
>  		#include "omap5-core-thermal.dtsi"
>  	};
> -- 
> 1.7.9.5
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] ARM: dts: OMAP5+: separate the cpu thermal zone definition from omap4
  2015-03-20 21:54   ` Eduardo Valentin
@ 2015-03-23 10:16     ` Tero Kristo
  2015-03-23 17:00       ` Nishanth Menon
  0 siblings, 1 reply; 9+ messages in thread
From: Tero Kristo @ 2015-03-23 10:16 UTC (permalink / raw)
  To: Eduardo Valentin, Nishanth Menon
  Cc: Tony Lindgren, Benoît Cousson, linux-kernel,
	linux-arm-kernel, devicetree, linux-omap, Keerthy

On 03/20/2015 11:54 PM, Eduardo Valentin wrote:
> On Fri, Mar 20, 2015 at 02:47:39PM -0500, Nishanth Menon wrote:
>> From: Tero Kristo <t-kristo@ti.com>
>>
>> OMAP4 has a finer counter granularity, which allows for a delay of 1000ms
>> in the thermal zone polling intervals. OMAP5/DRA7 have different counter
>> mechanism, which allows at maximum a 500ms timer. Adjust the cpu thermal
>> zone accordingly for OMAP5/DRA7.
>>
>> Signed-off-by: Tero Kristo <t-kristo@ti.com>
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>
>
>> ---
>>   arch/arm/boot/dts/omap5-cpu-thermal.dtsi |   41 ++++++++++++++++++++++++++++++
>>   arch/arm/boot/dts/omap5.dtsi             |    2 +-
>>   2 files changed, 42 insertions(+), 1 deletion(-)
>>   create mode 100644 arch/arm/boot/dts/omap5-cpu-thermal.dtsi
>>
>> diff --git a/arch/arm/boot/dts/omap5-cpu-thermal.dtsi b/arch/arm/boot/dts/omap5-cpu-thermal.dtsi
>> new file mode 100644
>> index 000000000000..4a6427c1e47e
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/omap5-cpu-thermal.dtsi
>> @@ -0,0 +1,41 @@
>> +/*
>> + * Device Tree Source for OMAP4/5 SoC CPU thermal
>> + *
>> + * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
>> + * Contact: Tero Kristo <t-kristo@ti.com>
>> + *
>> + * This file is licensed under the terms of the GNU General Public License
>> + * version 2.  This program is licensed "as is" without any warranty of any
>> + * kind, whether express or implied.
>> + */
>> +
>> +#include <dt-bindings/thermal/thermal.h>
>> +
>> +cpu_thermal: cpu_thermal {
>> +	polling-delay-passive = <250>; /* milliseconds */
>> +	polling-delay = <500>; /* milliseconds */
>> +
>> +			/* sensor       ID */
>> +	thermal-sensors = <&bandgap     0>;
>> +
>> +	cpu_trips: trips {
>> +		cpu_alert0: cpu_alert {
>> +			temperature = <100000>; /* millicelsius */
>> +			hysteresis = <2000>; /* millicelsius */
>> +			type = "passive";
>> +		};
>> +		cpu_crit: cpu_crit {
>> +			temperature = <125000>; /* millicelsius */
>> +			hysteresis = <2000>; /* millicelsius */
>> +			type = "critical";
>> +		};
>> +	};
>> +
>> +	cpu_cooling_maps: cooling-maps {
>> +		map0 {
>> +			trip = <&cpu_alert0>;
>> +			cooling-device =
>> +				<&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>> +		};
>> +	};
>> +};
>> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
>> index ddff674bd05e..e650d4eb59dd 100644
>> --- a/arch/arm/boot/dts/omap5.dtsi
>> +++ b/arch/arm/boot/dts/omap5.dtsi
>> @@ -67,7 +67,7 @@
>>   	};
>>
>>   	thermal-zones {
>> -		#include "omap4-cpu-thermal.dtsi"
>> +		#include "omap5-cpu-thermal.dtsi"
>
> Can't we simple change the polling value for the omap5 case and reuse
> the omap4 file?

Hmm yea, I posted a patch like this before for o5 and it was queued 
already. See:

http://thread.gmane.org/gmane.linux.ports.arm.omap/123729

The dra7 part was missing from this set though, so patches 2/3 do not 
directly work with that one and will require some changes similar to the 
linked omap4 one.

-Tero

>
>>   		#include "omap5-gpu-thermal.dtsi"
>>   		#include "omap5-core-thermal.dtsi"
>>   	};
>> --
>> 1.7.9.5
>>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] ARM: dts: OMAP5+: separate the cpu thermal zone definition from omap4
  2015-03-23 10:16     ` Tero Kristo
@ 2015-03-23 17:00       ` Nishanth Menon
  0 siblings, 0 replies; 9+ messages in thread
From: Nishanth Menon @ 2015-03-23 17:00 UTC (permalink / raw)
  To: Tero Kristo, Eduardo Valentin
  Cc: Tony Lindgren, Benoît Cousson, linux-kernel,
	linux-arm-kernel, devicetree, linux-omap, Keerthy

On 03/23/2015 05:16 AM, Tero Kristo wrote:
> On 03/20/2015 11:54 PM, Eduardo Valentin wrote:
>> On Fri, Mar 20, 2015 at 02:47:39PM -0500, Nishanth Menon wrote:
>>> From: Tero Kristo <t-kristo@ti.com>

[...]

>> Can't we simple change the polling value for the omap5 case and reuse
>> the omap4 file?
> 
> Hmm yea, I posted a patch like this before for o5 and it was queued 
> already. See:
> 
> http://thread.gmane.org/gmane.linux.ports.arm.omap/123729
> 
> The dra7 part was missing from this set though, so patches 2/3 do not 
> directly work with that one and will require some changes similar to the 
> linked omap4 one.

OK. will do that and as part of that, I will squash up patch 1 and 2
Since it is needed only when we introduce DRA7 thermal description -
Apologies on missing the O5 patch.


-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-23 17:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20 19:47 [PATCH 0/3] ARM: omap5/dra7/x15: Thermal dts patches Nishanth Menon
2015-03-20 19:47 ` [PATCH 1/3] ARM: dts: OMAP5+: separate the cpu thermal zone definition from omap4 Nishanth Menon
2015-03-20 21:54   ` Eduardo Valentin
2015-03-23 10:16     ` Tero Kristo
2015-03-23 17:00       ` Nishanth Menon
2015-03-20 19:47 ` [PATCH 2/3] ARM: dts: DRA7: Add bandgap and related thermal nodes Nishanth Menon
2015-03-20 21:51   ` Eduardo Valentin
2015-03-20 19:47 ` [PATCH 3/3] ARM: dts: am57xx-beagle-x15: Add thermal map Nishanth Menon
2015-03-20 21:50   ` Eduardo Valentin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).