<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Kernel prints warnings/error while temperature goes below zero degree celcius in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-prints-warnings-error-while-temperature-goes-below-zero/m-p/1594327#M201114</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201020"&gt;@roshanmohammed&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Please refer the&amp;nbsp;&lt;SPAN&gt;imx_set_alarm_temp function and it's calltrace.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. Please check your&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;thermal-zones in dts.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2023 02:30:43 GMT</pubDate>
    <dc:creator>Zhiming_Liu</dc:creator>
    <dc:date>2023-02-07T02:30:43Z</dc:date>
    <item>
      <title>Kernel prints warnings/error while temperature goes below zero degree celcius</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-prints-warnings-error-while-temperature-goes-below-zero/m-p/1593447#M201038</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Board: i.MX6ULL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Version: Yocto 5.4.15&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;On boot at cold (below zero degree celcius) temperatures, I am getting the following kernel stack traces, but the module kept booting:&lt;/P&gt;&lt;P&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.873145] ------------[ cut here ]------------ [ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.877807] WARNING: CPU: 0 PID: 63 at kernel/irq/chip.c:242 __irq_startup+0xa8/0xac&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.885554] Modules linked in: [ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.888622] CPU: 0 PID: 63 Comm: kworker/0:2 Not tainted 5.4.70 #2&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.894805] Hardware name: Freescale i.MX6 UL/ULL (Device Tree)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.900738] Workqueue: events deferred_probe_work_func&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.905906] [&amp;lt;8010efc0&amp;gt;] (unwind_backtrace) from [&amp;lt;8010c170&amp;gt;] (show_stack+0x10/0x14)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.913666] [&amp;lt;8010c170&amp;gt;] (show_stack) from [&amp;lt;8012686c&amp;gt;] (__warn+0xcc/0xe4)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.920557] [&amp;lt;8012686c&amp;gt;] (__warn) from [&amp;lt;801268fc&amp;gt;] (warn_slowpath_fmt+0x78/0xa8)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.928055] [&amp;lt;801268fc&amp;gt;] (warn_slowpath_fmt) from [&amp;lt;801698f8&amp;gt;] (__irq_startup+0xa8/0xac)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.936159] [&amp;lt;801698f8&amp;gt;] (__irq_startup) from [&amp;lt;8016993c&amp;gt;] (irq_startup+0x40/0x5c)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.943742] [&amp;lt;8016993c&amp;gt;] (irq_startup) from [&amp;lt;8016667c&amp;gt;] (enable_irq+0x44/0xa0)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.951066] [&amp;lt;8016667c&amp;gt;] (enable_irq) from [&amp;lt;80575288&amp;gt;] (imx_get_temp+0x188/0x2bc)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.958654] [&amp;lt;80575288&amp;gt;] (imx_get_temp) from [&amp;lt;80572a44&amp;gt;] (thermal_zone_get_temp+0x48/0x68)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.967020] [&amp;lt;80572a44&amp;gt;] (thermal_zone_get_temp) from [&amp;lt;8056f8ac&amp;gt;] (thermal_zone_device_update.part.0+0x28/0x168)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.977293] [&amp;lt;8056f8ac&amp;gt;] (thermal_zone_device_update.part.0) from [&amp;lt;80570330&amp;gt;] (thermal_zone_device_register+0x4d8/0x600)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.988260] [&amp;lt;80570330&amp;gt;] (thermal_zone_device_register) from [&amp;lt;80575828&amp;gt;] (imx_thermal_probe+0x330/0x5d4)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;1.997840] [&amp;lt;80575828&amp;gt;] (imx_thermal_probe) from [&amp;lt;8049244c&amp;gt;] (platform_drv_probe+0x48/0x98)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.006378] [&amp;lt;8049244c&amp;gt;] (platform_drv_probe) from [&amp;lt;8048ff38&amp;gt;] (really_probe+0x258/0x4bc)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.014654] [&amp;lt;8048ff38&amp;gt;] (really_probe) from [&amp;lt;804905a4&amp;gt;] (driver_probe_device+0x78/0x1c4)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.022929] [&amp;lt;804905a4&amp;gt;] (driver_probe_device) from [&amp;lt;8048db40&amp;gt;] (bus_for_each_drv+0x80/0xd0)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.031465] [&amp;lt;8048db40&amp;gt;] (bus_for_each_drv) from [&amp;lt;8049026c&amp;gt;] (__device_attach+0xd0/0x1d4)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.039739] [&amp;lt;8049026c&amp;gt;] (__device_attach) from [&amp;lt;8048ee58&amp;gt;] (bus_probe_device+0x84/0x8c)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.047928] [&amp;lt;8048ee58&amp;gt;] (bus_probe_device) from [&amp;lt;8048f31c&amp;gt;] (deferred_probe_work_func+0x74/0xb4)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.056899] [&amp;lt;8048f31c&amp;gt;] (deferred_probe_work_func) from [&amp;lt;8013f8cc&amp;gt;] (process_one_work+0x1b0/0x43c)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.066044] [&amp;lt;8013f8cc&amp;gt;] (process_one_work) from [&amp;lt;8013fde0&amp;gt;] (worker_thread+0x288/0x60c)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.074233] [&amp;lt;8013fde0&amp;gt;] (worker_thread) from [&amp;lt;80145508&amp;gt;] (kthread+0x174/0x17c)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.081641] [&amp;lt;80145508&amp;gt;] (kthread) from [&amp;lt;801010e8&amp;gt;] (ret_from_fork+0x14/0x2c)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.088871] Exception stack(0x9c4fdfb0 to 0x9c4fdff8)&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.093930] dfa0: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;00000000 00000000 00000000 00000000&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.102118] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.110302] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000&lt;BR /&gt;[ &amp;nbsp;&amp;nbsp;&amp;nbsp;2.116921] ---[ end trace 0e110773c6f3345c ]---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the meaning of these prints? Is there any patch available for resolving this issue?&lt;/P&gt;&lt;P&gt;I want to add some more points to it.&lt;/P&gt;&lt;P&gt;I saw the register 'Tempsensor Control Register 2' to which I can set 'LOW_ALARM_VALUE' . Please the register details.&lt;/P&gt;&lt;P&gt;Address: 20C_8000h base + 290h offset + (4d × i), where i=0d to 3d .&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="roshanmohammed_1-1675689602411.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/209735iC376872261190170/image-size/medium?v=v2&amp;amp;px=400" role="button" title="roshanmohammed_1-1675689602411.png" alt="roshanmohammed_1-1675689602411.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saw in the linux driver that the register value is 290h+4. It indicates the variable i is 1 and the value setting to this register is 0xfff. From the experiments I understood that this setting is for zero degree celcius (As per our testing with the help of chamber. We are seeing the warning/error kernel prints on boot up whenever temperature is on or below zero degree celcius).&lt;/P&gt;&lt;P&gt;What is the mechanism for setting the&amp;nbsp;'LOW_ALARM_VALUE' to -35 degrees.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 13:20:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Kernel-prints-warnings-error-while-temperature-goes-below-zero/m-p/1593447#M201038</guid>
      <dc:creator>roshanmohammed</dc:creator>
      <dc:date>2023-02-06T13:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel prints warnings/error while temperature goes below zero degree celcius</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-prints-warnings-error-while-temperature-goes-below-zero/m-p/1594327#M201114</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201020"&gt;@roshanmohammed&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Please refer the&amp;nbsp;&lt;SPAN&gt;imx_set_alarm_temp function and it's calltrace.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. Please check your&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;thermal-zones in dts.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 02:30:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Kernel-prints-warnings-error-while-temperature-goes-below-zero/m-p/1594327#M201114</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2023-02-07T02:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel prints warnings/error while temperature goes below zero degree celcius</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-prints-warnings-error-while-temperature-goes-below-zero/m-p/1594789#M201162</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/151788"&gt;@Zhiming_Liu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;imx_set_alarm_temp function is below&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;static void imx_set_alarm_temp(struct imx_thermal_data *data,&lt;BR /&gt;int alarm_temp)&lt;BR /&gt;{&lt;BR /&gt;struct regmap *map = data-&amp;gt;tempmon;&lt;BR /&gt;const struct thermal_soc_data *soc_data = data-&amp;gt;socdata;&lt;BR /&gt;int alarm_value;&lt;/P&gt;&lt;P&gt;data-&amp;gt;alarm_temp = alarm_temp;&lt;/P&gt;&lt;P&gt;if (data-&amp;gt;socdata-&amp;gt;version == TEMPMON_IMX7D)&lt;BR /&gt;alarm_value = alarm_temp / 1000 + data-&amp;gt;c1 - 25;&lt;BR /&gt;else&lt;BR /&gt;alarm_value = (data-&amp;gt;c2 - alarm_temp) / data-&amp;gt;c1;&lt;BR /&gt;regmap_write(map, soc_data-&amp;gt;high_alarm_ctrl + REG_CLR,&lt;BR /&gt;soc_data-&amp;gt;high_alarm_mask);&lt;BR /&gt;regmap_write(map, soc_data-&amp;gt;high_alarm_ctrl + REG_SET,&lt;BR /&gt;alarm_value &amp;lt;&amp;lt; soc_data-&amp;gt;high_alarm_shift);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;I am not seeing any setting for the low temperature in this function. Writing to the Address: 20C_8000h base + 180h&amp;nbsp;offset + (4d × i), where i=0d to 3d .&lt;/P&gt;&lt;P&gt;Low temperature is setting in the below driver part I think&lt;/P&gt;&lt;P&gt;/* make sure the IRQ flag is clear before enabling irq on i.MX6SX */&lt;BR /&gt;if (data-&amp;gt;socdata-&amp;gt;version == TEMPMON_IMX6SX) {&lt;BR /&gt;regmap_write(map, IMX6_MISC1 + REG_CLR,&lt;BR /&gt;IMX6_MISC1_IRQ_TEMPHIGH | IMX6_MISC1_IRQ_TEMPLOW&lt;BR /&gt;| IMX6_MISC1_IRQ_TEMPPANIC);&lt;BR /&gt;/*&lt;BR /&gt;* reset value of LOW ALARM is incorrect, set it to lowest&lt;BR /&gt;* value to avoid false trigger of low alarm.&lt;BR /&gt;*/&lt;BR /&gt;regmap_write(map, data-&amp;gt;socdata-&amp;gt;low_alarm_ctrl + REG_SET,&lt;BR /&gt;data-&amp;gt;socdata-&amp;gt;low_alarm_mask);&lt;/P&gt;&lt;P&gt;Writing to the Address: 20C_8000h base + 290h offset + (4d × i), where i=0d to 3d .&lt;/P&gt;&lt;P&gt;I am getting a value 0xfff while reading the address. REG_SET value is 0x4.&lt;/P&gt;&lt;P&gt;In this case, kernel warnings are coming below zero degree celcius.&lt;/P&gt;&lt;P&gt;Driver is not reading temperature zone value from dtsi file and dtsi file does not contains temperature zones also.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 14:01:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Kernel-prints-warnings-error-while-temperature-goes-below-zero/m-p/1594789#M201162</guid>
      <dc:creator>roshanmohammed</dc:creator>
      <dc:date>2023-02-07T14:01:27Z</dc:date>
    </item>
  </channel>
</rss>

