1 2 Previous Next 19 Replies Latest reply on Dec 19, 2014 3:14 AM by tintar

    Edison thermal_zones - clarification/documentation

    deium

      Can we get documentation or definition of the thermal_zones in /sys/class/thermal.

      root@ebob1:~# cat /sys/class/thermal/*/temp

      cat: read error: Invalid argument

      15625

      -11475   <====

      29000

      27000

      root@ebob2:~# cat /sys/class/thermal/*/temp

      cat: read error: Invalid argument

      17678

      -14850   <====

      30000

      30000

      I have never seen thermal_zone2 report a value before tonight.  Confirmed on 2 edisons.  Would be nice to just simply have a def/doc.

      ----- UPDATED ----

      root@ebob1:~# cat /sys/class/thermal/*/temp

      cat: read error: Invalid argument

      15336

      -28350   <====

      31000

      30000

      This question needs at minimum to let us know if this is hazardous to the Edison modules.

       

        • 1. Re: Edison thermal_zones - clarification/documentation
          mmi

          Probably we should take a look into intel_soc_thermal.c

           

           

          • 2. Re: Edison thermal_zones - clarification/documentation
            deium

            mmi, okay, I'll byte.   So, where is that said file?  ... still looking (@mmi does the file exist or did I get bit)

            • 3. Re: Edison thermal_zones - clarification/documentation
              Intel_Alvarado

              Hi deium,

              We will pass the suggestion to make more documentation about thermal zones to the appropriate team.

              Regards

              Sergio

              • 4. Re: Edison thermal_zones - clarification/documentation
                deium

                and is the entire intel_soc_*.c defined?  and that would be where?

                • 5. Re: Edison thermal_zones - clarification/documentation
                  deium

                  Intel_Alvarado, I appreciate the pass .. can anyone tell me if it is hazardous to the Edison module??

                  • 6. Re: Edison thermal_zones - clarification/documentation
                    mmi

                    deium

                    I had a similar thread some weeks ago:

                    CPU temperatures

                    and it was a suggestion of DiegoV_Intel

                    but until now it was not so important for me to search for this file (which must be a part of the kernel). I guess these unlogical values have no special meaning and it's only "some dust" in the C source.

                    • 7. Re: Edison thermal_zones - clarification/documentation
                      deium

                      mmi,

                      As you can tell my concern is if this is going to hurt the module.  I noticed that it is occurring if the one/both of the core temps  drop to 30C or below.

                      Still haven't found that file, (not sure yet if we have it ...

                      • 8. Re: Edison thermal_zones - clarification/documentation
                        jku

                        (EDIT: I give up on making this readable, I have no idea how to include code on this forum...)

                         

                        File is there in the built kernel sources (I guess in the massive kernel patch).

                         

                        static int show_temp(struct thermal_zone_device *tzd, long *temp)
                        {
                             struct thermal_device_info *td_info = tzd->devdata;
                             u32 val = read_soc_reg(PUNIT_TEMP_REG);
                        
                             /* Extract bits[0:7] or [8:15] using sensor_index */
                             *temp =  (val >> (8 * td_info->sensor_index)) & 0xFF;
                        
                             if (*temp == 0)
                                  return 0;
                        
                             /* Calibrate the temperature */
                             *temp = TJMAX_CODE - *temp + tjmax_temp;
                        
                             /* Convert to mC */
                             *temp *= 1000;
                        
                             return 0;}
                        

                         

                        Generally speaking "TjMax" is a model specific maximum temperature, and the actual register value should be a delta from TjMax. The "calibration" line does something a little more than calculation that but the only way to end up at negative values you saw would be very unexpected value in the temperature register.

                         

                        That said, there should be only two exposed temperatures -- your output has four lines... Are you sure you're looking at actual thermal sensor and not something else? What are the directories called and what do the "type" files say?

                        1 of 1 people found this helpful
                        • 9. Re: Edison thermal_zones - clarification/documentation
                          deium

                          jku,

                          the system file path is /sys/class/thermal/thermal_zoneX/temp where x is 0 through 4.  --> there are 5 zones, not four.

                          1, 3 and 4 usually hold values.

                             1: closely follows an ambient temperature .. could be battery recharge, could be dormant Quark

                             3 and 4: are presumed core tempatures of the Atom.

                          0 and 2 usually do not have a value and both usually report cat: read error: Invalid argument.

                          I previously understood the value was going to be in mC.

                           

                          So, when one/both of the core temps drop to 30C or below - that is when zone2 is seen to kick in

                          My Question:  Should this be an alarm state that cores must not drop below 30?  IS IT HAZARDOUS to the module.

                          Should we be paying attention to it - ie Edison is beyond thermal operational specs and it will cause damage?

                          THUS the stand point of documentation and/or definitions of the zones

                          • 10. Re: Edison thermal_zones - clarification/documentation
                            Helmut64

                            I used the following script which shows the devices;

                             

                            for i in /sys/class/thermal/*/temp

                            do

                            echo $i

                            cat $i

                            echo "---------------"

                            done

                             

                            My result is:

                            /sys/class/thermal/thermal_zone0/temp

                            cat: read error: Invalid argument

                            ---------------

                            /sys/class/thermal/thermal_zone1/temp

                            17171

                            ---------------

                            /sys/class/thermal/thermal_zone2/temp

                            cat: read error: Invalid argument

                            ---------------

                            /sys/class/thermal/thermal_zone3/temp

                            38000

                            ---------------

                            /sys/class/thermal/thermal_zone4/temp

                            35000

                             

                            I believe it is a good idea to add temp watching support into the "pwr_button_handler" daemon to log errors and shutdown if it gets too hot. I can do this but first I need to learn what the different zones are:

                             

                            zone1: I believe the outside temp which could be 17 celsius here.

                            zone2 and zone3 I have no idea but they are 38 and 35 celsius which is little.

                            • 11. Re: Edison thermal_zones - clarification/documentation
                              Intel_Alvarado

                              Hi deium,

                              I tested it on my board and got similar results to those posted by Helmut64 I got a

                              cat: read error: Invalid argument

                              on thermal zones 0 and 2, and values very similar in thermal zones 1,3 and 4.

                              Just as a suggestion, why don’t you try flashing your board and let us know the results. Maybe you are getting these values due to a software issue.

                              Regards

                              Sergio

                              • 12. Re: Edison thermal_zones - clarification/documentation
                                deium

                                Intel_Alvarado,

                                The boards have been flashed.  build_16

                                To replicate the results, All I need to do is open my window to get a breeze to cool my edisons down.

                                root@ebob1:~# cat /sys/class/thermal/*/temp  -- 2014.12.17 13:28 EST

                                cat: read error: Invalid argument

                                13887

                                cat: read error: Invalid argument <===== (usually seen)

                                42000

                                41000

                                and after a moment of fresh air cooling

                                root@ebob1:~# cat /sys/class/thermal/*/temp

                                cat: read error: Invalid argument

                                17986

                                -3375   <=====

                                30000

                                30000

                                root@ebob1:~# cat /sys/class/thermal/*/temp

                                cat: read error: Invalid argument

                                18398

                                15525   <=====

                                27000

                                27000

                                cease the fresh air

                                root@ebob1:~# cat /sys/class/thermal/*/temp

                                cat: read error: Invalid argument

                                17576

                                cat: read error: Invalid argument   <===== (returns to usual)

                                30000

                                31000

                                • 13. Re: Edison thermal_zones - clarification/documentation
                                  Helmut64

                                  I believe the Quark SoC has much in common with the Edison, some info may be of interest  in the Quark doc.

                                   

                                  Intel® Quark SoC X1000 Software Developer’s Manual for Linux

                                  https://communities.intel.com/servlet/JiveServlet/previewBody/22488-102-1-26046/Quark_SWDevManLx_330235_001.pdf

                                   

                                  I have not seen such a doc for the Edison, hopefully Intel will release more details. Also the power management P-States information would be helpful.

                                  • 14. Re: Edison thermal_zones - clarification/documentation
                                    jku

                                    the system file path is /sys/class/thermal/thermal_zoneX/temp where x is 0 through 4.  --> there are 5 zones, not four.


                                    Got it (don't have my edison here so couldn't check). In any case the intel_soc_thermal.c driver only provides two sensors.

                                    1 2 Previous Next