aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2015-03-23 15:39:39 -0400
committerTony Lindgren <tony@atomide.com>2015-03-26 15:02:12 -0400
commitd723cfeafc7b4c73e89ed3d4b1a4d747e990872c (patch)
treec46ac09bac9f252764ffc5ec233c9b7e0ea3588c
parentf7397edf47ecc859fa69c15c4f9cefc8f2ee00c8 (diff)
ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102
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> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/boot/dts/am57xx-beagle-x15.dts49
-rw-r--r--arch/arm/boot/dts/omap4-cpu-thermal.dtsi4
2 files changed, 51 insertions, 2 deletions
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 03750af3b49a..ae83a812d8a6 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -87,6 +87,7 @@
87 gpios = <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>; 87 gpios = <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>;
88 gpio-fan,speed-map = <0 0>, 88 gpio-fan,speed-map = <0 0>,
89 <13000 1>; 89 <13000 1>;
90 #cooling-cells = <2>;
90 }; 91 };
91 92
92 extcon_usb1: extcon_usb1 { 93 extcon_usb1: extcon_usb1 {
@@ -442,6 +443,7 @@
442 pinctrl-0 = <&tmp102_pins_default>; 443 pinctrl-0 = <&tmp102_pins_default>;
443 interrupt-parent = <&gpio7>; 444 interrupt-parent = <&gpio7>;
444 interrupts = <16 IRQ_TYPE_LEVEL_LOW>; 445 interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
446 #thermal-sensor-cells = <1>;
445 }; 447 };
446}; 448};
447 449
@@ -560,3 +562,50 @@
560&usb2 { 562&usb2 {
561 dr_mode = "peripheral"; 563 dr_mode = "peripheral";
562}; 564};
565
566&cpu_trips {
567 cpu_alert1: cpu_alert1 {
568 temperature = <50000>; /* millicelsius */
569 hysteresis = <2000>; /* millicelsius */
570 type = "active";
571 };
572};
573
574&cpu_cooling_maps {
575 map1 {
576 trip = <&cpu_alert1>;
577 cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
578 };
579};
580
581&thermal_zones {
582 board_thermal: board_thermal {
583 polling-delay-passive = <1250>; /* milliseconds */
584 polling-delay = <1500>; /* milliseconds */
585
586 /* sensor ID */
587 thermal-sensors = <&tmp102 0>;
588
589 board_trips: trips {
590 board_alert0: board_alert {
591 temperature = <40000>; /* millicelsius */
592 hysteresis = <2000>; /* millicelsius */
593 type = "active";
594 };
595
596 board_crit: board_crit {
597 temperature = <105000>; /* millicelsius */
598 hysteresis = <0>; /* millicelsius */
599 type = "critical";
600 };
601 };
602
603 board_cooling_maps: cooling-maps {
604 map0 {
605 trip = <&board_alert0>;
606 cooling-device =
607 <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
608 };
609 };
610 };
611};
diff --git a/arch/arm/boot/dts/omap4-cpu-thermal.dtsi b/arch/arm/boot/dts/omap4-cpu-thermal.dtsi
index cb9458feb2e3..ab7f87ae96f0 100644
--- a/arch/arm/boot/dts/omap4-cpu-thermal.dtsi
+++ b/arch/arm/boot/dts/omap4-cpu-thermal.dtsi
@@ -18,7 +18,7 @@ cpu_thermal: cpu_thermal {
18 /* sensor ID */ 18 /* sensor ID */
19 thermal-sensors = <&bandgap 0>; 19 thermal-sensors = <&bandgap 0>;
20 20
21 trips { 21 cpu_trips: trips {
22 cpu_alert0: cpu_alert { 22 cpu_alert0: cpu_alert {
23 temperature = <100000>; /* millicelsius */ 23 temperature = <100000>; /* millicelsius */
24 hysteresis = <2000>; /* millicelsius */ 24 hysteresis = <2000>; /* millicelsius */
@@ -31,7 +31,7 @@ cpu_thermal: cpu_thermal {
31 }; 31 };
32 }; 32 };
33 33
34 cooling-maps { 34 cpu_cooling_maps: cooling-maps {
35 map0 { 35 map0 {
36 trip = <&cpu_alert0>; 36 trip = <&cpu_alert0>;
37 cooling-device = 37 cooling-device =