* Freescale IMX6 active cooling
@ 2015-11-16 9:43 Catalin Crenguta
2015-11-16 14:51 ` Fabio Estevam
0 siblings, 1 reply; 7+ messages in thread
From: Catalin Crenguta @ 2015-11-16 9:43 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
I'm trying to use a GPIO Fan to cool down a Riotboard (I.MX6 Solo).
I've read [0], investigated the driver which provides the on-die
temperature ( fsl,imx6q-tempmon [1]) but it seems to provide the
temperature by creating a thermal zone (relevant dts: [2][3][4]).
I don't know how I should proceed:
1) Should I research how can I attach a cooling device to this already
existing thermal zone? (I believe it involves modifying the existing
driver by adding new device tree handles)
2) Should I create another thermal zone, use the existing driver to
get the temperature and bind to a cooling device?
3) Should I modify the existing driver to not create a thermal zone
and move the creation in the device tree using the of-thermal driver ?
Best regards,
Catalin Crenguta
[0] http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/thermal/thermal.txt
[1] http://lxr.free-electrons.com/source/drivers/thermal/imx_thermal.c
[2] http://lxr.free-electrons.com/source/arch/arm/boot/dts/imx6dl-riotboard.dts
[3] http://lxr.free-electrons.com/source/arch/arm/boot/dts/imx6dl.dtsi
[4] http://lxr.free-electrons.com/source/arch/arm/boot/dts/imx6qdl.dtsi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Freescale IMX6 active cooling
2015-11-16 9:43 Freescale IMX6 active cooling Catalin Crenguta
@ 2015-11-16 14:51 ` Fabio Estevam
2015-11-17 9:38 ` Jon Nettleton
0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2015-11-16 14:51 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 16, 2015 at 7:43 AM, Catalin Crenguta
<catalin.crenguta@gmail.com> wrote:
> Hello,
>
> I'm trying to use a GPIO Fan to cool down a Riotboard (I.MX6 Solo).
> I've read [0], investigated the driver which provides the on-die
> temperature ( fsl,imx6q-tempmon [1]) but it seems to provide the
> temperature by creating a thermal zone (relevant dts: [2][3][4]).
> I don't know how I should proceed:
> 1) Should I research how can I attach a cooling device to this already
> existing thermal zone? (I believe it involves modifying the existing
> driver by adding new device tree handles)
> 2) Should I create another thermal zone, use the existing driver to
> get the temperature and bind to a cooling device?
> 3) Should I modify the existing driver to not create a thermal zone
> and move the creation in the device tree using the of-thermal driver ?
Maybe you could add the following folks on Cc?
THERMAL/CPU_COOLING
M: Amit Daniel Kachhap <amit.kachhap@gmail.com>
M: Viresh Kumar <viresh.kumar@linaro.org>
M: Javi Merino <javi.merino@arm.com>
L: linux-pm at vger.kernel.org
S: Supported
F: Documentation/thermal/cpu-cooling-api.txt
F: drivers/thermal/cpu_cooling.c
F: include/linux/cpu_cooling.h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Freescale IMX6 active cooling
2015-11-16 14:51 ` Fabio Estevam
@ 2015-11-17 9:38 ` Jon Nettleton
2015-11-17 12:49 ` Catalin Crenguta
0 siblings, 1 reply; 7+ messages in thread
From: Jon Nettleton @ 2015-11-17 9:38 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 16, 2015 at 3:51 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Mon, Nov 16, 2015 at 7:43 AM, Catalin Crenguta
> <catalin.crenguta@gmail.com> wrote:
>> Hello,
>>
>> I'm trying to use a GPIO Fan to cool down a Riotboard (I.MX6 Solo).
>> I've read [0], investigated the driver which provides the on-die
>> temperature ( fsl,imx6q-tempmon [1]) but it seems to provide the
>> temperature by creating a thermal zone (relevant dts: [2][3][4]).
>> I don't know how I should proceed:
>> 1) Should I research how can I attach a cooling device to this already
>> existing thermal zone? (I believe it involves modifying the existing
>> driver by adding new device tree handles)
>> 2) Should I create another thermal zone, use the existing driver to
>> get the temperature and bind to a cooling device?
>> 3) Should I modify the existing driver to not create a thermal zone
>> and move the creation in the device tree using the of-thermal driver ?
>
> Maybe you could add the following folks on Cc?
>
> THERMAL/CPU_COOLING
> M: Amit Daniel Kachhap <amit.kachhap@gmail.com>
> M: Viresh Kumar <viresh.kumar@linaro.org>
> M: Javi Merino <javi.merino@arm.com>
> L: linux-pm at vger.kernel.org
> S: Supported
> F: Documentation/thermal/cpu-cooling-api.txt
> F: drivers/thermal/cpu_cooling.c
> F: include/linux/cpu_cooling.h
>
> _______________________________________________
I would recommend you take a look at the work that xobs did for the
Novena Heirloom. If you look at this branch starting around Aug 3 you
can see where he has converted iMX6 to use generic thermal zones and
adds support for for an active cooling device/fan.
https://github.com/xobs/novena-linux/commits/v3.19-novena-etnadrm-r3?page=3
-Jon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Freescale IMX6 active cooling
2015-11-17 9:38 ` Jon Nettleton
@ 2015-11-17 12:49 ` Catalin Crenguta
2015-11-18 4:53 ` Sean Cross
0 siblings, 1 reply; 7+ messages in thread
From: Catalin Crenguta @ 2015-11-17 12:49 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Nov 17, 2015 at 11:38 AM, Jon Nettleton <jon.nettleton@gmail.com> wrote:
> I would recommend you take a look at the work that xobs did for the
> Novena Heirloom. If you look at this branch starting around Aug 3 you
> can see where he has converted iMX6 to use generic thermal zones and
> adds support for for an active cooling device/fan.
> https://github.com/xobs/novena-linux/commits/v3.19-novena-etnadrm-r3?page=3
>
> -Jon
Thank you!
I have patched my 4.3 kernel (they don't apply cleanly but they are
straight forward to modify), added a gpio-fan and the corresponding
thermal-zone in my DTB and it works!
Sean Cross, are you interested in bringing this to mainline?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Freescale IMX6 active cooling
2015-11-17 12:49 ` Catalin Crenguta
@ 2015-11-18 4:53 ` Sean Cross
2015-11-18 10:00 ` Catalin Crenguta
0 siblings, 1 reply; 7+ messages in thread
From: Sean Cross @ 2015-11-18 4:53 UTC (permalink / raw)
To: linux-arm-kernel
On 17/11/2015 8:49 PM, Catalin Crenguta wrote:
> On Tue, Nov 17, 2015 at 11:38 AM, Jon Nettleton <jon.nettleton@gmail.com> wrote:
>> I would recommend you take a look at the work that xobs did for the
>> Novena Heirloom. If you look at this branch starting around Aug 3 you
>> can see where he has converted iMX6 to use generic thermal zones and
>> adds support for for an active cooling device/fan.
>> https://github.com/xobs/novena-linux/commits/v3.19-novena-etnadrm-r3?page=3
>>
>> -Jon
> Thank you!
> I have patched my 4.3 kernel (they don't apply cleanly but they are
> straight forward to modify), added a gpio-fan and the corresponding
> thermal-zone in my DTB and it works!
> Sean Cross, are you interested in bringing this to mainline?
Yes, this does seem like the sort of thing that should make it into
mainline.
Would you like me to submit it as a patch against 4.3? I'm unclear how
much should be added.
For example, the current code talks directly to the cpufreq cooling
system, but that becomes unnecessary if using generic thermal zones,
since the zones will bind cpufreq to the thermal sensor. Then again,
with such a patch, boards that do not explicitly update their device
tree to support generic thermal zones will need to have their entries
updated.
Perhaps the correct order of patches is:
1) Add generic thermal zone support
2) Remove zone and cdev from imx_thermal
3) Add cpufreq-cooling to imx6
4) Add cpufreq-cooling to all other SoCs that support imx_thermal
5) Add default generic thermal zone support to imx6qdl.dtsi
Comments on how it should be handled?
Sean
^ permalink raw reply [flat|nested] 7+ messages in thread
* Freescale IMX6 active cooling
2015-11-18 4:53 ` Sean Cross
@ 2015-11-18 10:00 ` Catalin Crenguta
2015-11-18 21:56 ` Eduardo Valentin
0 siblings, 1 reply; 7+ messages in thread
From: Catalin Crenguta @ 2015-11-18 10:00 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Nov 18, 2015 at 6:53 AM, Sean Cross <xobs@kosagi.com> wrote:
> Perhaps the correct order of patches is:
>
> 1) Add generic thermal zone support
> 2) Remove zone and cdev from imx_thermal
> 3) Add cpufreq-cooling to imx6
> 4) Add cpufreq-cooling to all other SoCs that support imx_thermal
> 5) Add default generic thermal zone support to imx6qdl.dtsi
In my opinion, I guess a patch series containing this would be good.
Thanks again!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Freescale IMX6 active cooling
2015-11-18 10:00 ` Catalin Crenguta
@ 2015-11-18 21:56 ` Eduardo Valentin
0 siblings, 0 replies; 7+ messages in thread
From: Eduardo Valentin @ 2015-11-18 21:56 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Wed, Nov 18, 2015 at 12:00:05PM +0200, Catalin Crenguta wrote:
> On Wed, Nov 18, 2015 at 6:53 AM, Sean Cross <xobs@kosagi.com> wrote:
> > Perhaps the correct order of patches is:
> >
> > 1) Add generic thermal zone support
> > 2) Remove zone and cdev from imx_thermal
> > 3) Add cpufreq-cooling to imx6
> > 4) Add cpufreq-cooling to all other SoCs that support imx_thermal
> > 5) Add default generic thermal zone support to imx6qdl.dtsi
> In my opinion, I guess a patch series containing this would be good.
The recommendation is for you to use of-thermal, yes. In that way you
may benefit of describing your thermal hw specific data over DT. And you
can benefit of the existing cooling devices that have DT cooling
descriptors too, such as gpio-fan, and cpufreq-cooling, yes.
To use cpufreq-cooling, you may want to make sure your device works with
cpufreq-dt driver.
I would appreciate if you could clean up the IMX code to use the DT way
of describing thermal.
BR,
>
> Thanks again!
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo at vger.kernel.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-11-18 21:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 9:43 Freescale IMX6 active cooling Catalin Crenguta
2015-11-16 14:51 ` Fabio Estevam
2015-11-17 9:38 ` Jon Nettleton
2015-11-17 12:49 ` Catalin Crenguta
2015-11-18 4:53 ` Sean Cross
2015-11-18 10:00 ` Catalin Crenguta
2015-11-18 21:56 ` 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).