Lm-sensors support


(Frank W.) #1

Hi, is lm-sensors supported? which chip can be used to get lm-sensors data?

regards Frank


(Frank W.) #2

Did i need to add a i2c-config to dts like here?

which bus has the sensors attached? Any additional Kernel-modules?


(Frank W.) #3

added only I2C_CHARDEV-option to kernel and got this:

Linux bpi-r2 4.14.0-00004-gbeba822 #1 SMP Tue Dec 12 12:13:30 CET 2017 armv7l
root@bpi-r2:~# sensors-detect
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)
# Kernel: 4.14.0-00004-gbeba822 armv7l
# Processor: ARMv7 Processor rev 3 (v7l) (//)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): 
modprobe: FATAL: Module cpuid not found in directory /lib/modules/4.14.0-00004-2
Failed to load module cpuid.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Intel digital thermal sensor...                             No
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): 
Sorry, no supported PCI bus adapters found.
Module i2c-dev loaded successfully.

Next adapter: i2c-mt65xx (i2c-0)
Do you want to scan it? (YES/no/selectively): 

Next adapter: i2c-mt65xx (i2c-1)
Do you want to scan it? (YES/no/selectively): 

Sorry, no sensors were detected.
Either your system has no sensors, or they are not supported, or
they are connected to an I2C or SMBus adapter that is not
supported. If you find out what chips are on your board, check
http://www.lm-sensors.org/wiki/Devices for driver status.

do i need a separate driver for mt65xx? or miss i something in dts?


(dorabmon) #4

Which i2c device you used here on your board ?


(Frank W.) #5

no external device, want to read internal sensors, or are there none?

i2c-0 and i2c-1 seems to be the i2c-busses on gpio, right?


(dorabmon) #6

There i2c-mt65xx is bus driver, so they have to be used along with external devices.


(dorabmon) #7

Only sensor available on bpi-r2 as I knew is thermal sensor for cpu which is being accessed through on-chip bus called auxadc, you could find this in dts files to know more.


(Frank W.) #8

found it in mt7623.dtsi, but how to access it?

	auxadc: adc@11001000 {
		compatible = "mediatek,mt7623-auxadc",
			     "mediatek,mt2701-auxadc";
		reg = <0 0x11001000 0 0x1000>;
		clocks = <&pericfg CLK_PERI_AUXADC>;
		clock-names = "main";
		#io-channel-cells = <1>;
};

seems that it is enabled by default (no status=disabled), nothing found in bananapi.dts


(Frank W.) #9

Maybe this is related: http://lists.infradead.org/pipermail/linux-mediatek/2016-August/006638.html

thermal-block in dts is existing,but how to read the values?

It seems that also a driver must be activated in kernel (mtk_thermal):

http://elixir.free-electrons.com/linux/v4.14.6/source/drivers/thermal/Makefile


(Frank W.) #10

added module MTK_TERMAL, but no success…

root@bpi-r2:~# modprobe mtk-thermal                                             
root@bpi-r2:~# lsmod                                                            
Module                  Size  Used by                                           
i2c_dev                20480  0                                                 
mt76x2e                61440  0                                                 
mt76                   32768  1 mt76x2e                                         
mtk_thermal            16384  0                                                 
thermal_sys            61440  1 mtk_thermal                                     
pwm_mediatek           16384  0                                                 
ip_tables              24576  0                                                 
x_tables               28672  1 ip_tables                                       
ipv6                  409600  18                                                
root@bpi-r2:~# sensors-detect                                                   
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)                      
# Kernel: 4.14.11-00002-ga352d6b armv7l                                         
# Processor: ARMv7 Processor rev 3 (v7l) (//)                                   
                                                                                
This program will help you determine which kernel modules you need              
to load to use lm_sensors most effectively. It is generally safe                
and recommended to accept the default answers to all questions,                 
unless you know what you're doing.                                              
                                                                                
Some south bridges, CPUs or memory controllers contain embedded sensors.        
Do you want to scan for them? This is totally safe. (YES/no):                   
modprobe: FATAL: Module cpuid not found in directory /lib/modules/4.14.11-00002b
Failed to load module cpuid.                                                    
Silicon Integrated Systems SIS5595...                       No                  
VIA VT82C686 Integrated Sensors...                          No                  
VIA VT8231 Integrated Sensors...                            No                  
AMD K8 thermal sensors...                                   No                  
AMD Family 10h thermal sensors...                           No                  
AMD Family 11h thermal sensors...                           No                  
AMD Family 12h and 14h thermal sensors...                   No                  
AMD Family 15h thermal sensors...                           No                  
AMD Family 16h thermal sensors...                           No                  
AMD Family 15h power sensors...                             No                  
AMD Family 16h power sensors...                             No                  
Intel digital thermal sensor...                             No                  
Intel AMB FB-DIMM thermal sensor...                         No                  
Intel 5500/5520/X58 thermal sensor...                       No                  
VIA C7 thermal sensor...                                    No                  
VIA Nano thermal sensor...                                  No                  
                                                                                
Lastly, we can probe the I2C/SMBus adapters for connected hardware              
monitoring devices. This is the most risky part, and while it works             
reasonably well on most systems, it has been reported to cause trouble          
on some systems.                             

i’ve found no config-option for CPUID, only CPUIDLE for different platforms…

searched also through sysfs and tried that which seems also not correct:

root@bpi-r2:~# cat /sys/class/thermal/thermal_zone0/temp                        
0 

maybe it needs this:

Symbol: CPU_THERMAL [=n]
Prompt: generic cpu cooling support 

?


(Frank W.) #11

any Idea how to read out CPU-Temp?


(Frank W.) #12

had included and loaded now thermal_sys, mtk_thermal and mt6577_auxadc but sensors-detect does not find anything

anyone knows how to get at least the CPU-Temp?


(Andrzej) #13

Any success to read CPU temp?


(Frank W.) #14

I still have no clue how to read from auxadc :pensive: