Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/
Started by Jojo, April 03, 2014, 03:10:02 am
bash Temperature_Logger.sh 5
Temperature logging started in file "Temp_log_hh:mm:ss"...hh:mm:ss TT.t°C <- changing continouslyLogging stopped at hh:mm:ss
Quote from: ssvb on April 03, 2014, 04:32:35 amThis is not the temperature of a TP controller exposed at /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input. It's the temperature of a PMU chip AXP209, which is located rather far from the A10/A20 SoC on the Cubieboard PCB.
QuoteYes, CT has a temperature sensor ... or kind of ... built in to the touch pannel controller. There are two ways of accessing it:Use Pats Kernel version 3.4.79. You find the sensor data at "/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input". Divide the value read by 1000 to get degrees Celsius.
Quote from: ssvb on April 03, 2014, 05:08:19 amAnd http://www.cubieforums.com/index.php?topic=2004.msg12920#msg12920 says that the TP temperature sensor should be exposed at /sys/devices/platform/a20-tp-hwmon/temp1_input if you apply the patch from the google groups link. We are just dealing with different temperature sensors here
Quote from: Jojo on April 03, 2014, 02:04:09 pmCould you (ssvb) please explain me (or give me a hint) how I have to apply the patch to have access to the sensor? Do I have to recompile the kernel?
Quote from: ssvb on April 04, 2014, 12:33:21 amQuote from: Jojo on April 03, 2014, 02:04:09 pmCould you (ssvb) please explain me (or give me a hint) how I have to apply the patch to have access to the sensor? Do I have to recompile the kernel?Yes, you (or somebody else) needs to apply that patch and compile the kernel. Also disabling touchscreen drivers would be necessary and enabling CONFIG_SENSORS_A20_TP_HWMON=y in the kernel config. However, as I can see from the comments, this was just he initial revision of the patch and it had some issues. Actually, the support for this temperature sensor (as part of the touchscreen driver) has been already submitted to the mainline kernel - https://www.mail-archive.com/[email]email@example.com[/email]/msg00312.htmlWe might want to backport it to 3.4 too.The old initial revision of the driver also works. And it indeed seems to report the right temperature for the A20 chip itself. This can be easily verified (I have done this already) by following these steps:1. Run something heavy on the CPU, so that it heats up.2. Watch the reported numbers from both temperature sensors and touch the A20 chip with your finger for a little bit. The reported temperature for the sensor corresponding to the A20 chip should instantly drop by something like ~5C.3. Watch the reported numbers from both temperature sensors and touch the PMU chip with your finger for a little bit.. It is a small rectangular chip near the barrel shaped power plug on the cubieboard. The reported temperature for the sensor corresponding to the AXP209 chip should instantly drop by something like ~5C.The temperatures of AXP209 and A20 are actually very similar and usually don't differ much from each other (if the CPU is using a lot of power, then the PMU chip temperature also goes up). But they are still not exactly the same.In any case, we have temperature sensors for each of these two hottest chips on the board. All the bases are covered
Quote from: Jojo on April 04, 2014, 02:57:35 amThanks a lot for these information! For me all this sounds very complicated .
axp20_mfd-i2c-0-34Adapter: sunxi-i2c.0ACIN voltage: +5.14 V (avg = +5.13 V)VBUS voltage: +0.01 V (avg = +0.01 V)AXP20X temperature: +30.9 C (low = -144.7 C, high = +264.8 C)ACIN+VBUS power: 1.02 W (avg = 1.05 W)ACIN current: +0.20 A (avg = +0.20 A)VBUS current: +0.00 A (avg = +0.00 A)a20_tp-isa-0000Adapter: ISA adaptertemp1: +34.8 C (low = -144.7 C, high = +264.8 C)
Quote from: ssvb on April 04, 2014, 08:16:52 amQuote from: Jojo on April 04, 2014, 02:57:35 amThanks a lot for these information! For me all this sounds very complicated .Well, all the complexity is just downloading the patch, applying it and compiling the kernel. Do you want somebody to provide a kernel binary for you?
Quote from: Jojo on April 04, 2014, 05:55:41 pmBut about the patch... I think I am just blind! I have found no "button" or something like that to download it
wget -O cpu-thermal-sensor.path https://groups.google.com/forum/message/raw?msg=linux-sunxi/2zoxTcepPVo/q4f3D1ZEm8cJgit am cpu-thermal-sensor.path