* [PATCH V2 0/2] DRA7/X15: Thermal dts patches @ 2015-03-23 19:39 Nishanth Menon 2015-03-23 19:39 ` [PATCH V2 1/2] ARM: dts: DRA7: Add bandgap and related thermal nodes Nishanth Menon 2015-03-23 19:39 ` [PATCH V2 2/2] ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102 Nishanth Menon 0 siblings, 2 replies; 7+ messages in thread From: Nishanth Menon @ 2015-03-23 19:39 UTC (permalink / raw) To: tony, bcousson, edubezval Cc: linux-kernel, linux-arm-kernel, devicetree, linux-omap, j-keerthy, t-kristo, nm Hi Here are a few pending patches for DRA7 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) (next-20150323 is broken for build currently). 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 Changes since V1: Based on review comments: - patches 1/3 and 2/3 has been squashed up to introduce zone and bandgap information - Dropped the entire omap5-cpu-thermal.dtsi idea. done the same way as omap5. - minor updates to fan - so, all patches have been modified. - Not carrying forward ack due to changes V1: http://marc.info/?l=devicetree&m=142688089417731&w=2 Keerthy (1): ARM: dts: DRA7: Add bandgap and related thermal nodes Nishanth Menon (1): ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102 arch/arm/boot/dts/am57xx-beagle-x15.dts | 49 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/dra7.dtsi | 23 ++++++++++++++ arch/arm/boot/dts/dra72x.dtsi | 5 +++ arch/arm/boot/dts/dra74x.dtsi | 5 +++ arch/arm/boot/dts/omap4-cpu-thermal.dtsi | 4 +-- 5 files changed, 84 insertions(+), 2 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH V2 1/2] ARM: dts: DRA7: Add bandgap and related thermal nodes 2015-03-23 19:39 [PATCH V2 0/2] DRA7/X15: Thermal dts patches Nishanth Menon @ 2015-03-23 19:39 ` Nishanth Menon 2015-03-27 6:02 ` Keerthy 2015-03-23 19:39 ` [PATCH V2 2/2] ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102 Nishanth Menon 1 sibling, 1 reply; 7+ messages in thread From: Nishanth Menon @ 2015-03-23 19:39 UTC (permalink / raw) To: tony, bcousson, edubezval Cc: linux-kernel, linux-arm-kernel, devicetree, linux-omap, j-keerthy, t-kristo, nm 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. Introduce CPU, GPU, core nodes for the moment as they are direct reuse of OMAP5 entities. NOTE: OMAP4 has a finer counter granularity, which allows for a delay of 1000ms in the thermal zone polling intervals. DRA7 have different counter mechanism, which allows at maximum a 500ms timer. Adjust the cpu thermal zone accordingly for DRA7. Signed-off-by: Keerthy <j-keerthy@ti.com> [t-kristo@ti.com: few reuse from OMAP5 entities] Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> --- Changes since V1: - omap5-cpu-thermal.dtsi dropped - approach similar to omap5 - added core and gpu thermal dtsi(they can be reused) - Squashed patch #1 from v1 to patch #2 - this patch. - Not carrying forward ack due to change V1: http://marc.info/?t=142688102700006&r=1&w=2 arch/arm/boot/dts/dra7.dtsi | 23 +++++++++++++++++++++++ arch/arm/boot/dts/dra72x.dtsi | 5 +++++ arch/arm/boot/dts/dra74x.dtsi | 5 +++++ 3 files changed, 33 insertions(+) diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index eea4a54d6cb3..2d6a7e3e001f 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>; @@ -1419,6 +1431,17 @@ status = "disabled"; }; }; + + thermal_zones: thermal-zones { + #include "omap4-cpu-thermal.dtsi" + #include "omap5-gpu-thermal.dtsi" + #include "omap5-core-thermal.dtsi" + }; + +}; + +&cpu_thermal { + polling-delay = <500>; /* milliseconds */ }; /include/ "dra7xx-clocks.dtsi" diff --git a/arch/arm/boot/dts/dra72x.dtsi b/arch/arm/boot/dts/dra72x.dtsi index e5a3d23a3df1..6ac8e3601499 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 */ }; }; diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi index 10173fab1a15..eef981f4bcd5 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"; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH V2 1/2] ARM: dts: DRA7: Add bandgap and related thermal nodes 2015-03-23 19:39 ` [PATCH V2 1/2] ARM: dts: DRA7: Add bandgap and related thermal nodes Nishanth Menon @ 2015-03-27 6:02 ` Keerthy 2015-03-27 8:08 ` Keerthy 0 siblings, 1 reply; 7+ messages in thread From: Keerthy @ 2015-03-27 6:02 UTC (permalink / raw) To: Nishanth Menon, tony, bcousson, edubezval Cc: linux-kernel, linux-arm-kernel, devicetree, linux-omap, j-keerthy, t-kristo On Tuesday 24 March 2015 01:09 AM, 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. Introduce CPU, GPU, core nodes > for the moment as they are direct reuse of OMAP5 entities. > > NOTE: OMAP4 has a finer counter granularity, which allows for a delay > of 1000ms in the thermal zone polling intervals. DRA7 have different > counter mechanism, which allows at maximum a 500ms timer. Adjust the > cpu thermal zone accordingly for DRA7. > > Signed-off-by: Keerthy <j-keerthy@ti.com> > [t-kristo@ti.com: few reuse from OMAP5 entities] > Signed-off-by: Tero Kristo <t-kristo@ti.com> > Signed-off-by: Nishanth Menon <nm@ti.com> > --- > Changes since V1: > - omap5-cpu-thermal.dtsi dropped > - approach similar to omap5 > - added core and gpu thermal dtsi(they can be reused) > - Squashed patch #1 from v1 to patch #2 - this patch. > - Not carrying forward ack due to change Thanks for updating Nishanth. Looks good to me. - Keerthy > > V1: http://marc.info/?t=142688102700006&r=1&w=2 > > arch/arm/boot/dts/dra7.dtsi | 23 +++++++++++++++++++++++ > arch/arm/boot/dts/dra72x.dtsi | 5 +++++ > arch/arm/boot/dts/dra74x.dtsi | 5 +++++ > 3 files changed, 33 insertions(+) > > diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi > index eea4a54d6cb3..2d6a7e3e001f 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>; > @@ -1419,6 +1431,17 @@ > status = "disabled"; > }; > }; > + > + thermal_zones: thermal-zones { > + #include "omap4-cpu-thermal.dtsi" > + #include "omap5-gpu-thermal.dtsi" > + #include "omap5-core-thermal.dtsi" > + }; > + > +}; > + > +&cpu_thermal { > + polling-delay = <500>; /* milliseconds */ > }; > > /include/ "dra7xx-clocks.dtsi" > diff --git a/arch/arm/boot/dts/dra72x.dtsi b/arch/arm/boot/dts/dra72x.dtsi > index e5a3d23a3df1..6ac8e3601499 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 */ > }; > }; > > diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi > index 10173fab1a15..eef981f4bcd5 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"; > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V2 1/2] ARM: dts: DRA7: Add bandgap and related thermal nodes 2015-03-27 6:02 ` Keerthy @ 2015-03-27 8:08 ` Keerthy 0 siblings, 0 replies; 7+ messages in thread From: Keerthy @ 2015-03-27 8:08 UTC (permalink / raw) To: Nishanth Menon, tony, bcousson, edubezval Cc: linux-kernel, linux-arm-kernel, devicetree, linux-omap, j-keerthy, t-kristo On Friday 27 March 2015 11:32 AM, Keerthy wrote: > > > On Tuesday 24 March 2015 01:09 AM, 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. Introduce CPU, GPU, core nodes >> for the moment as they are direct reuse of OMAP5 entities. >> >> NOTE: OMAP4 has a finer counter granularity, which allows for a delay >> of 1000ms in the thermal zone polling intervals. DRA7 have different >> counter mechanism, which allows at maximum a 500ms timer. Adjust the >> cpu thermal zone accordingly for DRA7. >> >> Signed-off-by: Keerthy <j-keerthy@ti.com> >> [t-kristo@ti.com: few reuse from OMAP5 entities] >> Signed-off-by: Tero Kristo <t-kristo@ti.com> >> Signed-off-by: Nishanth Menon <nm@ti.com> >> --- >> Changes since V1: >> - omap5-cpu-thermal.dtsi dropped >> - approach similar to omap5 >> - added core and gpu thermal dtsi(they can be reused) >> - Squashed patch #1 from v1 to patch #2 - this patch. >> - Not carrying forward ack due to change > > Thanks for updating Nishanth. Looks good to me. Tested on DRA7 EVM. Read the temperatures from all the 5 sensors they were sane. Loaded the CPU and saw the temperatures rise and fall with increase and decrease in the load. Tested-by: Keerthy <j-keerthy@ti.com> > > - Keerthy > >> >> V1: http://marc.info/?t=142688102700006&r=1&w=2 >> >> arch/arm/boot/dts/dra7.dtsi | 23 +++++++++++++++++++++++ >> arch/arm/boot/dts/dra72x.dtsi | 5 +++++ >> arch/arm/boot/dts/dra74x.dtsi | 5 +++++ >> 3 files changed, 33 insertions(+) >> >> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi >> index eea4a54d6cb3..2d6a7e3e001f 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>; >> @@ -1419,6 +1431,17 @@ >> status = "disabled"; >> }; >> }; >> + >> + thermal_zones: thermal-zones { >> + #include "omap4-cpu-thermal.dtsi" >> + #include "omap5-gpu-thermal.dtsi" >> + #include "omap5-core-thermal.dtsi" >> + }; >> + >> +}; >> + >> +&cpu_thermal { >> + polling-delay = <500>; /* milliseconds */ >> }; >> >> /include/ "dra7xx-clocks.dtsi" >> diff --git a/arch/arm/boot/dts/dra72x.dtsi >> b/arch/arm/boot/dts/dra72x.dtsi >> index e5a3d23a3df1..6ac8e3601499 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 */ >> }; >> }; >> >> diff --git a/arch/arm/boot/dts/dra74x.dtsi >> b/arch/arm/boot/dts/dra74x.dtsi >> index 10173fab1a15..eef981f4bcd5 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"; >> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH V2 2/2] ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102 2015-03-23 19:39 [PATCH V2 0/2] DRA7/X15: Thermal dts patches Nishanth Menon 2015-03-23 19:39 ` [PATCH V2 1/2] ARM: dts: DRA7: Add bandgap and related thermal nodes Nishanth Menon @ 2015-03-23 19:39 ` Nishanth Menon 2015-03-24 15:17 ` Eduardo Valentin 1 sibling, 1 reply; 7+ messages in thread From: Nishanth Menon @ 2015-03-23 19:39 UTC (permalink / raw) To: tony, bcousson, edubezval Cc: linux-kernel, linux-arm-kernel, devicetree, linux-omap, j-keerthy, t-kristo, nm 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> --- Changes since V1: - slight change in omap4-cpu-thermal for usage in am57xx-dtsi - Not carrying forward ack due to change V1: http://marc.info/?t=142688102700004&r=1&w=2 arch/arm/boot/dts/am57xx-beagle-x15.dts | 49 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/omap4-cpu-thermal.dtsi | 4 +-- 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 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>; + }; + }; + }; +}; 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 { /* sensor ID */ thermal-sensors = <&bandgap 0>; - trips { + cpu_trips: trips { cpu_alert0: cpu_alert { temperature = <100000>; /* millicelsius */ hysteresis = <2000>; /* millicelsius */ @@ -31,7 +31,7 @@ cpu_thermal: cpu_thermal { }; }; - cooling-maps { + cpu_cooling_maps: cooling-maps { map0 { trip = <&cpu_alert0>; cooling-device = -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH V2 2/2] ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102 2015-03-23 19:39 ` [PATCH V2 2/2] ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102 Nishanth Menon @ 2015-03-24 15:17 ` Eduardo Valentin [not found] ` <20150324151736.GE29155-ld4jwAGwUXQP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Eduardo Valentin @ 2015-03-24 15:17 UTC (permalink / raw) To: Nishanth Menon Cc: tony, bcousson, linux-kernel, linux-arm-kernel, devicetree, linux-omap, j-keerthy, t-kristo [-- Attachment #1: Type: text/plain, Size: 3794 bytes --] On Mon, Mar 23, 2015 at 02:39:39PM -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> > --- > Changes since V1: > - slight change in omap4-cpu-thermal for usage in am57xx-dtsi > - Not carrying forward ack due to change > > V1: http://marc.info/?t=142688102700004&r=1&w=2 > > arch/arm/boot/dts/am57xx-beagle-x15.dts | 49 ++++++++++++++++++++++++++++++ > arch/arm/boot/dts/omap4-cpu-thermal.dtsi | 4 +-- > 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 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>; > + }; > + }; > + }; > +}; > 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 { > /* sensor ID */ > thermal-sensors = <&bandgap 0>; > > - trips { > + cpu_trips: trips { > cpu_alert0: cpu_alert { > temperature = <100000>; /* millicelsius */ > hysteresis = <2000>; /* millicelsius */ > @@ -31,7 +31,7 @@ cpu_thermal: cpu_thermal { > }; > }; > > - cooling-maps { > + cpu_cooling_maps: cooling-maps { > map0 { > trip = <&cpu_alert0>; > cooling-device = > -- > 1.7.9.5 > [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20150324151736.GE29155-ld4jwAGwUXQP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>]
* Re: [PATCH V2 2/2] ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102 [not found] ` <20150324151736.GE29155-ld4jwAGwUXQP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org> @ 2015-03-26 19:03 ` Tony Lindgren 0 siblings, 0 replies; 7+ messages in thread From: Tony Lindgren @ 2015-03-26 19:03 UTC (permalink / raw) To: Eduardo Valentin Cc: Nishanth Menon, bcousson-rdvid1DuHRBWk0Htik3J/w, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, j-keerthy-l0cyMroinI0, t-kristo-l0cyMroinI0 * Eduardo Valentin <edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> [150324 08:17]: > On Mon, Mar 23, 2015 at 02:39:39PM -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-l0cyMroinI0@public.gmane.org> > > Acked-by: Eduardo Valentin <edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Applying both of these into omap-for-v4.1/fixes-not-urgent thanks. Tony -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-03-27 8:08 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-03-23 19:39 [PATCH V2 0/2] DRA7/X15: Thermal dts patches Nishanth Menon 2015-03-23 19:39 ` [PATCH V2 1/2] ARM: dts: DRA7: Add bandgap and related thermal nodes Nishanth Menon 2015-03-27 6:02 ` Keerthy 2015-03-27 8:08 ` Keerthy 2015-03-23 19:39 ` [PATCH V2 2/2] ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102 Nishanth Menon 2015-03-24 15:17 ` Eduardo Valentin [not found] ` <20150324151736.GE29155-ld4jwAGwUXQP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org> 2015-03-26 19:03 ` Tony Lindgren
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).