thermal_zone0: Resource temporarily unavailable

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

thermal_zone0: Resource temporarily unavailable

2,606 Views
ben_taylor
Contributor I

Hi,
      We are developing a product based on the MIMX8MM6CVTKZAA processor and have been encountering an issue with the thermal management unit. The issue manifests itself when you try to access the temp as follows:

cat: /sys/class/thermal/thermal_zone0/temp: Resource temporarily unavailable
The software build is sourced from
git://source.codeaurora.org/external/imx/linux-imx.git
branch: imx_4.19.35_1.0.0
revision: e9cc1fc7624cb504147ad4945d60e73530eea7a7
The DTS entry for the thermal management unit is as follows:
        tmu: tmu@30260000 {
                compatible = "fsl,imx8mm-tmu";
                reg = <0x0 0x30260000 0x0 0x10000>;
                clocks = <&clk IMX8MM_CLK_TMU_ROOT>;
                interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
                #thermal-sensor-cells = <0>;
        };

        thermal-zones {
                /* cpu thermal */
                cpu-thermal {
                        polling-delay-passive = <250>;
                        polling-delay = <2000>;
                        thermal-sensors = <&tmu>;
                        trips {
                                cpu_alert0: trip0 {
                                        temperature = <85000>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };

                                cpu_crit0: trip1 {
                                        temperature = <95000>;
                                        hysteresis = <2000>;
                                        type = "critical";
                                };
                        };

                        cooling-maps {
                                map0 {
                                        trip = <&cpu_alert0>;
                                        cooling-device =
                                        <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
                };
        };
I have also tried the same image on the i.MX8M Mini EVK board and the same command correctly reports the temperature. From what I have read in the reference manual the temperature management system appears to be internal to the processor and therefore shouldn't be impacted be external hardware changes, is this the case? Has the above error been encountered before, in which case is there a known resolution for it?
Many thanks in advance for your help.
Regards
Ben Taylor
0 Kudos
Reply
5 Replies

841 Views
sunpei1992
Contributor I

I also encountered the same problem. After I changed #define TEMP_LOW_LIMIT 10 to -40, 0 will be displayed all the time after 0℃, and negative values cannot be displayed. Could you please tell me how to modify it so that it can be displayed correctly?

 

0 Kudos
Reply

2,525 Views
igorpadykov
NXP Employee
NXP Employee

Hi Ben

there may be two reasons:

- hardware, please check pins TSENSOR_TEST_OUT is left open

and TSENSOR_RES_EXT is tied to ground via a 100k 1% resistor(as in EVK board).

-software, since temperature range is defined as 10°C to 105°C

according to Table 9. Operating ranges i.MX 8M Mini Applications Processor Datasheet for Industrial Products

temperature driver imx8mm_thermal.c checks it,  triggering the resource not available
error message :

#define TEMP_LOW_LIMIT    10

pastedImage_2.jpg

imx8mm_thermal.c\thermal\drivers - linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

518 Views
Few
Contributor I

Hi @igorpadykov,

Why does the temperature sensing have a range of 10 to 105°C?

A temperature range of -40 to 105° is specified for the industrial temperature grade. The TMU of the iMX8MM therefore does not provide any values for very low ambient temperatures.

 

Thanks.

0 Kudos
Reply

919 Views
mengfei
Contributor III

hello,

Do you know what to pay attention to in IMX8MP?  A similar issue occurred with the IMX8MP

0 Kudos
Reply

903 Views
mengfei
Contributor III

I found a solution, after the probe function in the TMU driver code is executed, the bit 30 of the TMU_TER is 1, it need 0, so edit code: "val |= TER_EN" -> "val = TER_EN + 1"

0 Kudos
Reply