42f240d2a457834bcbdf4dc8b57237f97b5f5854.patch 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370
  1. diff -Nuar a/configs/ASRock/A300M-STX-DeskMini.conf b/configs/ASRock/A300M-STX-DeskMini.conf
  2. --- a/configs/ASRock/A300M-STX-DeskMini.conf 1970-01-01 02:00:00.000000000 +0200
  3. +++ b/configs/ASRock/A300M-STX-DeskMini.conf 2021-02-24 18:12:40.000000000 +0300
  4. @@ -0,0 +1,93 @@
  5. +# ASRock A300M-STX (as included in DeskMini A300 barebone)
  6. +# manufacturing date April 2020 (came with UEFI BIOS 3.60)
  7. +# board does have connectors for 2 fans (CPU_FAN1 and CPU_FAN2)
  8. +# board does have a connector for intrusion detection
  9. +# board does not have a speaker connector
  10. +# dmesg: "nct6775: Found NCT6793D or compatible chip at 0x2e:0x290"
  11. +
  12. +chip "nct6793-*"
  13. +
  14. + # board has no speaker connector
  15. + set beep_enable 0
  16. +
  17. + # voltages
  18. + label in0 "Vcore"
  19. + compute in0 @*2, @/2
  20. + set in0_min 0.16
  21. + set in0_max 1.46
  22. +
  23. + label in2 "AVCC"
  24. + set in2_min 3.30 * 0.90
  25. + set in2_max 3.30 * 1.10
  26. +
  27. + label in3 "+3.3V"
  28. + set in3_min 3.30 * 0.90
  29. + set in3_max 3.30 * 1.10
  30. +
  31. + label in7 "3VSB"
  32. + set in7_min 3.30 * 0.90
  33. + set in7_max 3.30 * 1.10
  34. +
  35. + label in8 "VBAT"
  36. + set in8_min 3.00 * 0.90
  37. + set in8_max 3.30 * 1.10
  38. +
  39. + label in9 "+12V"
  40. + compute in9 @*(53/8), @/(53/8)
  41. + set in9_min 12 * 0.90
  42. + set in9_max 12 * 1.10
  43. +
  44. + label in13 "+5V"
  45. + compute in13 @*(24/8), @/(24/8)
  46. + set in13_min 5 * 0.90
  47. + set in13_max 5 * 1.10
  48. +
  49. + # these have non-zero input, but are unknown
  50. + ignore in1
  51. + ignore in4
  52. + ignore in5
  53. + ignore in6
  54. + ignore in10
  55. + ignore in11
  56. + ignore in12
  57. + ignore in14
  58. +
  59. + # temperatures
  60. + # not sure about temp2 and temp3
  61. + label temp2 "VRM(?) temp"
  62. + set temp2_max 75
  63. + set temp2_max_hyst 70
  64. +
  65. + label temp3 "MB(?) temp"
  66. + set temp3_max 55
  67. + set temp3_max_hyst 50
  68. +
  69. + label temp7 "CPU temp"
  70. +
  71. + # other temps are zero or unreasonably high/low
  72. + ignore temp1
  73. + ignore temp4
  74. + ignore temp5
  75. + ignore temp6
  76. + ignore temp8
  77. + ignore temp9
  78. + ignore temp10
  79. +
  80. + # fans
  81. + label fan2 "CPU_FAN1"
  82. + set fan2_min 500
  83. +
  84. + label fan1 "CPU_FAN2"
  85. + set fan1_min 500
  86. +
  87. + # these don't have connectors
  88. + ignore fan3
  89. + ignore fan4
  90. + ignore fan5
  91. +
  92. + # intrusion
  93. + # the DeskMini A300 has an intrusion detection connector
  94. + # on board, but the case has no switch, so you might want to
  95. + # ignore these (don't know which one is actually connected)
  96. + label intrusion0 "intrusion0"
  97. + label intrusion1 "intrusion1"
  98. diff -Nuar a/configs/ASRock/B450-Gaming-ITX-ac.conf b/configs/ASRock/B450-Gaming-ITX-ac.conf
  99. --- a/configs/ASRock/B450-Gaming-ITX-ac.conf 1970-01-01 02:00:00.000000000 +0200
  100. +++ b/configs/ASRock/B450-Gaming-ITX-ac.conf 2021-02-24 18:12:40.000000000 +0300
  101. @@ -0,0 +1,100 @@
  102. +# ASRock B450 Gaming-ITX/ac
  103. +# manufacturing date July 2019 (came with Zen2-aware BIOS)
  104. +# board does have connectors for buzzer and 3 fans (2 case + 1 CPU)
  105. +# board does not have a connector for intrusion detection
  106. +# dmesg: "nct6775: Found NCT6792D or compatible chip at 0x2e:0x290"
  107. +
  108. +chip "nct6792-*"
  109. +
  110. + # beeping appears to not work
  111. + set beep_enable 1
  112. +
  113. + # voltages
  114. +
  115. + label in0 "Vcore"
  116. + compute in0 @*2, @/2
  117. + set in0_min 0.16
  118. + set in0_max 1.46
  119. + set in0_beep 1
  120. +
  121. + label in2 "AVCC"
  122. + set in2_min 3.30 * 0.90
  123. + set in2_max 3.30 * 1.10
  124. +
  125. + label in3 "+3.3V"
  126. + set in3_min 3.30 * 0.90
  127. + set in3_max 3.30 * 1.10
  128. +
  129. + label in7 "3VSB"
  130. + set in7_min 3.30 * 0.90
  131. + set in7_max 3.30 * 1.10
  132. +
  133. + label in8 "VBAT"
  134. + set in8_min 3.00 * 0.90
  135. + set in8_max 3.30 * 1.10
  136. +
  137. + label in9 "+12V"
  138. + compute in9 @*(53/8), @/(53/8)
  139. + set in9_min 12 * 0.90
  140. + set in9_max 12 * 1.10
  141. +
  142. + label in13 "+5V"
  143. + compute in13 @*(24/8), @/(24/8)
  144. + set in13_min 5 * 0.90
  145. + set in13_max 5 * 1.10
  146. +
  147. + # these are all zero
  148. + ignore in1
  149. + ignore in4
  150. + ignore in5
  151. + ignore in6
  152. + ignore in14
  153. +
  154. + # these have non-zero input, but are unknown
  155. + ignore in10
  156. + ignore in11
  157. + ignore in12
  158. +
  159. + # temperatures
  160. + # not sure about temp2 and temp3
  161. + label temp2 "VRM(?) temp"
  162. + set temp2_max 55
  163. + set temp2_max_hyst 50
  164. + set temp2_beep 1
  165. + label temp3 "MB(?) temp"
  166. + set temp3_max 55
  167. + set temp3_max_hyst 50
  168. + set temp3_beep 1
  169. + label temp7 "CPU temp"
  170. +
  171. + # temp2 has similar readings to temp3
  172. + # other temps are zero or unreasonably high/low
  173. + ignore temp1
  174. + ignore temp4
  175. + ignore temp5
  176. + ignore temp6
  177. + ignore temp8
  178. + ignore temp9
  179. + ignore temp10
  180. +
  181. + # fans
  182. +
  183. + label fan1 "CHA_FAN1"
  184. + set fan1_min 300
  185. + set fan1_beep 1
  186. + label fan2 "CPU_FAN1"
  187. + set fan2_min 600
  188. + set fan2_beep 1
  189. + label fan3 "CHA_FAN2"
  190. + set fan3_min 300
  191. + set fan3_beep 1
  192. +
  193. + # these are not on the mainboard
  194. + ignore fan4
  195. + ignore fan5
  196. +
  197. + # misc
  198. +
  199. + ignore intrusion0
  200. + ignore intrusion1
  201. +
  202. diff -Nuar a/configs/ASRock/Z390-Extreme4.conf b/configs/ASRock/Z390-Extreme4.conf
  203. --- a/configs/ASRock/Z390-Extreme4.conf 1970-01-01 02:00:00.000000000 +0200
  204. +++ b/configs/ASRock/Z390-Extreme4.conf 2021-02-24 18:12:40.000000000 +0300
  205. @@ -0,0 +1,107 @@
  206. +# ASRock Z3900 Extreme4
  207. +# 2019, contributed by Alex Cherkayev <doctor64@gmail.com>
  208. +#
  209. +# dmi: board_name: Z390 Extreme4
  210. +# dmi: board_vendor: ASRock
  211. +# dmi: bios_version: P4.00
  212. +# cpu: Intel(R) Core(TM) i7-9700K CPU
  213. +chip "nct6791-isa-*"
  214. +
  215. + # Fans
  216. + label fan1 "CHA Fan 3/WP"
  217. + label fan2 "CPU Fan 1"
  218. + label fan3 "CPU Fan 2/WP"
  219. + label fan4 "CHA Fan 1/WP"
  220. + label fan5 "CHA Fan 2/WP"
  221. +
  222. + # Temperatures
  223. + label temp1 "Motherboard"
  224. + set temp1_max 55
  225. + set temp1_max_hyst 50
  226. + label temp2 "CPU MB"
  227. + set temp2_max 100
  228. + set temp2_max_hyst 75
  229. +
  230. + # temp3 always 22
  231. + # temp4 102 in idle, 103 under load
  232. + # temp5 always 15
  233. + # temp6 always 12
  234. + ignore temp3
  235. + ignore temp4
  236. + ignore temp5
  237. + ignore temp6
  238. +
  239. + #PECI Agent 0 match CPU cores temp
  240. + label temp7 "CPU Core"
  241. +
  242. + # PCH_CHIP_CPU_MAX_TEMP PCH_CHIP_TEMP PCH_CPU_TEMP always 0.0C, ignore
  243. + ignore temp8
  244. + ignore temp9
  245. + ignore temp10
  246. +
  247. + # Voltages
  248. +
  249. + label in0 "VCore Voltage"
  250. + compute in0 @*2, @/2
  251. + set in0_min 0.40
  252. + set in0_max 1.40
  253. +
  254. + label in1 "+5V"
  255. + # deduced, not confirmed
  256. + compute in1 ((20/10)+1)*@, @/((20/10)+1)
  257. + set in1_min 5 * 0.95
  258. + set in1_max 5 * 1.05
  259. +
  260. + label in4 "+12V"
  261. + # deduced, not confirmed
  262. + compute in4 @*12, @/12
  263. + set in4_min 12 * 0.95
  264. + set in4_max 12 * 1.05
  265. +
  266. + #unknown, always 1.18V just set limits to remove alarm
  267. + set in5_min 1.1
  268. + set in5_max 1.3
  269. +
  270. + label in6 "PCH +1.0V"
  271. + # limit taken from intel 300 series pch datasheet
  272. + # set in6_min 0.99
  273. + # set in6_max 1.10
  274. + # verified by changing in bios, limit taken from bios
  275. + set in6_min 0.9
  276. + set in6_max 1.3
  277. +
  278. + label in9 "VCCST"
  279. + # verified by changing in bios, limit taken from bios
  280. + set in9_min 0.9
  281. + set in9_max 1.25
  282. +
  283. + # unknown, always 0.24V, just set limit to remove alarm
  284. + set in10_min 0.1
  285. + set in10_max 0.3
  286. +
  287. + label in11 "VCCIO"
  288. + # verified by changing in bios, limit taken from bios
  289. + # limit taken from bios
  290. + set in11_min 0.85
  291. + set in11_max 1.35
  292. +
  293. + label in12 "DRAM Voltage"
  294. + # verified by changing in bios, limit taken from bios
  295. + set in12_min 1.10
  296. + set in12_max 1.40
  297. +
  298. + label in13 "DRAM VPP"
  299. + # verified by changing in bios, limit taken from bios +- 0.1V
  300. + compute in13 @*2, @/2
  301. + set in13_min 2.4
  302. + set in13_max 2.8
  303. +
  304. + label in14 "VCCSA"
  305. + # verified by changing in bios, limit taken from bios
  306. + set in14_min 0.95
  307. + set in14_max 1.35
  308. +
  309. + # Potential things to filter
  310. + # These inputs are unused unless you have a case intrusion switch connected.
  311. + # ignore intrusion0
  312. + # ignore intrusion1
  313. diff -Nuar a/configs/ASRock/Z390M-ITX-ac.conf b/configs/ASRock/Z390M-ITX-ac.conf
  314. --- a/configs/ASRock/Z390M-ITX-ac.conf 1970-01-01 02:00:00.000000000 +0200
  315. +++ b/configs/ASRock/Z390M-ITX-ac.conf 2021-02-24 18:12:40.000000000 +0300
  316. @@ -0,0 +1,162 @@
  317. +# Board: ASRock Z390M-ITX/ac
  318. +# Contributed by: Aaron Bockelie
  319. +# Processor: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (6/158/10)
  320. +# Board has connectors for buzzer and 3 fans (2 case + 1 CPU)
  321. +# board does not have a connector for intrusion detection
  322. +# dmesg: "nct6775: Found NCT6793D or compatible chip at 0x2e:0x290"
  323. +
  324. +chip "nct6793-*"
  325. +
  326. + # Cross referenced with ASRock A-Tuning Application on 6/29/2020
  327. + # Install in Windows and see /Program Files (x86)/ASRock Utility/A-Tuning/Conf/Z390MITX.xml
  328. + # There is also an NCT3933U on the board for measuring the PCH and VCCST voltages, but it
  329. + # is not accessible due to no kernel driver for it.
  330. +
  331. + # Referenced from NCT677xF (NCT6793D) Data Sheet Page 57
  332. + # All the internal inputs of the ADC, AVSB, VBAT, 3VSB, and 3VCC utilize an integrated voltage
  333. + # divider with both resistors equal to 34K, yielding a voltage one half of the power supply.
  334. + # Vin = VCC * (34K/(34K+34K)=1.65V where VCC is set to 3.3V
  335. +
  336. + # ID NCTSpec NCTDesc ASRock Utility Description
  337. + # in0 index80 CPUVCORE CPU_INPUT_V (Interface IR35201)
  338. + # in1 index81 VIN1 <none>
  339. + # in2 index82 AVSB <none>
  340. + # in3 index83 3VCC P3P3_V
  341. + # in4 index84 VIN0 <none>
  342. + # in5 N/A N/A N/A
  343. + # in6 index86 VIN4 SIO3_V
  344. + # in7 index87 3VSB <none>
  345. + # in8 index88 VBAT <none>
  346. + # in9 index89 VTT <none>
  347. + # in10 index8a VIN5 <none>, SIO6_V
  348. + # in11 index8b VIN6 <none>, SIO4_V
  349. + # in12 index8c VIN2 P12_V, SIO1_V
  350. + # in13 index8d VIN3 P5P0_V, SIO2_V
  351. + # in14 index8e VIN7 SIO5_V
  352. +
  353. +
  354. + set beep_enable 1
  355. +
  356. + # voltages
  357. + # The CPUVCORE pin feeds directly into the ADC with no voltage divider since the nominal
  358. + # voltage on this pin is only 1.2V
  359. +
  360. + label in0 "Vcore"
  361. + compute in0 @*2, @/2
  362. + set in0_min 0.16
  363. + set in0_max 1.48
  364. + set in0_beep 1
  365. +
  366. + ignore in1
  367. +
  368. + label in2 "AVCC"
  369. + set in2_min 3.30 * 0.90
  370. + set in2_max 3.30 * 1.10
  371. +
  372. + label in3 "+3.3V"
  373. + set in3_min 3.30 * 0.90
  374. + set in3_max 3.30 * 1.10
  375. +
  376. + ignore in4
  377. +
  378. + ignore in5
  379. +
  380. + ignore in6
  381. +
  382. + label in7 "3VSB"
  383. + set in7_min 3.30 * 0.90
  384. + set in7_max 3.30 * 1.10
  385. +
  386. + # This is the CMOS battery.
  387. +
  388. + label in8 "VBATT"
  389. + set in8_min 3.3 * 0.75
  390. + set in8_max 3.3 * 1.10
  391. +
  392. + label in9 "VTT"
  393. + set in9_min 1.2 * 0.90
  394. + set in9_max 1.2 * 1.25
  395. +
  396. + ignore in10
  397. +
  398. + ignore in11
  399. +
  400. + label in12 "+12V"
  401. + #((56+10)/10)
  402. + compute in12 @*6.6, @/6.6
  403. + set in12_min 12 * 0.95
  404. + set in12_max 12 * 1.05
  405. +
  406. + label in13 "+5V"
  407. + compute in13 @*(24/8), @/(24/8)
  408. + set in13_min 5 * 0.90
  409. + set in13_max 5 * 1.10
  410. +
  411. + ignore in14
  412. +
  413. +
  414. + # temperatures
  415. + # see NCT677xF (NCT6793D) Data Sheet Section 8.5.3.4 Temperature Reading
  416. + # a customized nct6775 kernel driver is probably needed to reference the bank measurement method correctly
  417. + # it appears that the temp sensor registers are off by one with the default driver
  418. + # so SYSTIN is offset incorrectly and referenced as one of the AUXTIN values.
  419. +
  420. + # I have interpeted the NCT spec as
  421. + # ID NCTSpec Other Notes
  422. + # temp1 SYSTIN Incorrect driver mapping of AUXTIN0
  423. + # temp2 CPUTIN Actual CPU temperature verified physically
  424. + # temp3 AUXTIN0 Actual motherboard temperature verified physically
  425. + # temp4 AUXTIN1 Unused
  426. + # temp5 AUXTIN2 Unused
  427. + # temp6 AUXTIN3 Unused
  428. +
  429. + ignore temp1
  430. +
  431. + label temp2 "CPU"
  432. + set temp2_max 85
  433. + set temp2_max_hyst 50
  434. + #set temp2_beep 1
  435. +
  436. + label temp3 "MB"
  437. + set temp3_max 75
  438. + set temp3_max_hyst 50
  439. + #set temp3_beep 1
  440. +
  441. + ignore temp4
  442. +
  443. + ignore temp5
  444. +
  445. + ignore temp6
  446. +
  447. + label temp7 "CPU_PECI"
  448. + set temp7_max 85
  449. + set temp7_max_hyst 50
  450. + #set temp7_beep 1
  451. +
  452. + ignore temp8
  453. + ignore temp9
  454. + ignore temp10
  455. +
  456. + # fans
  457. + # thankfully, fan PWM counters seem to function out of the box.
  458. + # labels are based on the board documentation
  459. +
  460. + label fan1 "Chassis_Fan_1/Pump"
  461. + set fan1_min 300
  462. + set fan1_beep 1
  463. +
  464. + label fan2 "CPU_Fan_1"
  465. + set fan2_min 600
  466. + set fan2_beep 1
  467. +
  468. + label fan5 "Chassis_Fan_2"
  469. + set fan5_min 300
  470. + set fan5_beep 1
  471. +
  472. + # these are not on the mainboard
  473. + ignore fan3
  474. + ignore fan4
  475. +
  476. + # misc
  477. + #intrusion0 is actually available. When disabled in BIOS it returns OK
  478. + ignore intrusion1
  479. diff -Nuar a/configs/Asus/P10S-M_WS.conf b/configs/Asus/P10S-M_WS.conf
  480. --- a/configs/Asus/P10S-M_WS.conf 1970-01-01 02:00:00.000000000 +0200
  481. +++ b/configs/Asus/P10S-M_WS.conf 2021-02-24 18:12:40.000000000 +0300
  482. @@ -0,0 +1,61 @@
  483. +# Asus P10S-M WS
  484. +chip "nct6791-*"
  485. + ignore temp1 # -62.0 all the time
  486. + ignore temp2 # -45.0
  487. + ignore temp3 # 23.0 all the time
  488. + ignore temp4 # 26.0 all the time
  489. + ignore temp6 # -62.0
  490. + # temp8 - temp10 always 0
  491. + ignore temp8
  492. + ignore temp9
  493. + ignore temp10
  494. + label temp7 "CPU"
  495. + label temp5 "MB"
  496. +
  497. + label in0 "VCORE"
  498. +
  499. + ignore in2 # same as in3
  500. + ignore in5 # 2040 all the time
  501. + ignore in11 # same as VCCIO (in9)
  502. + ignore in13 # same as in9
  503. + ignore in14 # 2040 all the time
  504. +
  505. + label in1 "+5V"
  506. + compute in1 @ * 5, @ / 5
  507. + set in1_min 5 * 0.95
  508. + set in1_max 5 * 1.05
  509. +
  510. + label in3 "+3.3V"
  511. + set in3_min 3.3 * 0.95
  512. + set in3_max 3.3 * 1.05
  513. +
  514. + label in4 "+12V"
  515. + compute in4 @ * 12, @ / 12
  516. + set in4_min 12 * 0.95
  517. + set in4_max 12 * 1.05
  518. +
  519. + label in6 "VCCSA"
  520. +
  521. + label in7 "+3.3VSB"
  522. + set in7_min 3.3 * 0.95
  523. + set in7_max 3.3 * 1.05
  524. +
  525. + label in9 "VCCIO"
  526. +
  527. + label in10 "+5VSB"
  528. + compute in10 @ * 5, @ / 5
  529. + set in10_min 5 * 0.95
  530. + set in10_max 5 * 1.05
  531. +
  532. + label in12 "VDDQ_AB_CPU1"
  533. +
  534. + label fan1 "REAR_FAN"
  535. + label fan2 "CPU_FAN1"
  536. + label fan3 "FRNT_FAN1"
  537. + label fan4 "FRNT_FAN2"
  538. + label fan5 "FRNT_FAN3"
  539. + label fan6 "FRNT_FAN4"
  540. +
  541. + #ignore intrusion0
  542. + #ignore intrusion1
  543. + ignore beep_enable
  544. diff -Nuar a/configs/Asus/TUF-GAMING-X570-PLUS.conf b/configs/Asus/TUF-GAMING-X570-PLUS.conf
  545. --- a/configs/Asus/TUF-GAMING-X570-PLUS.conf 1970-01-01 02:00:00.000000000 +0200
  546. +++ b/configs/Asus/TUF-GAMING-X570-PLUS.conf 2021-02-24 18:12:40.000000000 +0300
  547. @@ -0,0 +1,61 @@
  548. +chip "nct6798-*"
  549. +# nct6798 values for Asus TUF GAMING X570-PLUS (WI-FI)
  550. +# I'm not entirely sure everything here is correct since no HW monitoring
  551. +# application under Windows shows all the names for all the found sensors.
  552. +# Some of the names and formulas are best guesstimates and could be wrong.
  553. +# You will have to unignore fans if you want them to be monitored.
  554. +
  555. +label in0 "Vcore"
  556. + set in0_min 0.2
  557. + set in0_max 1.5
  558. +
  559. +label in2 "AVSB"
  560. + set in2_min 3.3 * 0.95
  561. + set in2_max 3.3 * 1.05
  562. +
  563. +label in3 "3VCC"
  564. + set in3_min 3.3 * 0.95
  565. + set in3_max 3.3 * 1.05
  566. +
  567. +label in4 "+12V"
  568. + compute in4 @ * 12, @ / 12
  569. + set in4_min 12 * 0.95
  570. + set in4_max 12 * 1.05
  571. +
  572. +label in6 "+5V"
  573. + compute in6 @ * 5, @ / 5
  574. + set in6_min 5 * 0.95
  575. + set in6_max 5 * 1.05
  576. +
  577. +label in7 "3.3V"
  578. + set in7_min 3.3 * 0.95
  579. + set in7_max 3.3 * 1.05
  580. +
  581. +label in8 "Vbat"
  582. + set in8_min 3.3 * 0.95
  583. + set in8_max 3.3 * 1.05
  584. +
  585. +# always shows a constant value after boot - either 0.272 or 0.288
  586. +ignore in10
  587. +
  588. +# constant 0.544
  589. +ignore in11
  590. +
  591. +# constant 1.032
  592. +ignore in12
  593. +
  594. +label fan2 "CPU Fan"
  595. + set fan2_min 200
  596. +
  597. +# The X570 chipset is quite power hungry, so let's put 1000 in to be safe
  598. +label fan5 "CHA_FAN1"
  599. + set fan5_min 1000
  600. +
  601. +# Always show zeros
  602. +ignore temp8
  603. +ignore temp9
  604. +ignore temp10
  605. +
  606. +# The motherboard doesn't seem to have them physically connected or present
  607. +ignore intrusion0
  608. +ignore intrusion1
  609. diff -Nuar a/configs/Biostar/A960D+V2.conf b/configs/Biostar/A960D+V2.conf
  610. --- a/configs/Biostar/A960D+V2.conf 1970-01-01 02:00:00.000000000 +0200
  611. +++ b/configs/Biostar/A960D+V2.conf 2021-02-24 18:12:40.000000000 +0300
  612. @@ -0,0 +1,51 @@
  613. +# Configuration file contributed by Leandro Nini.
  614. +
  615. +
  616. +# libsensors configuration file
  617. +# -----------------------------
  618. +#
  619. +# This is a first attempt at a custom configuration file for the Biostar A960D+V2.
  620. +# This custom configuration file should be copied to /etc/sensors.d/Biostar-A960D+V2.conf.
  621. +#
  622. +# Custom configuration files for some specific mainboards can be found at
  623. +# https://github.com/lm-sensors/lm-sensors/tree/master/configs
  624. +
  625. +# READ THE MAN PAGE DOCUMENTATION OF 'sensors.conf' FOR MORE
  626. +# COMPLETE INFORMATION. ie:
  627. +
  628. +# man sensors.conf
  629. +
  630. +chip "it8728-*"
  631. +
  632. +# All labels set to match Biostar A960D+V2 BIOS displayed labels. See
  633. +# the 'PC Health' screen in the BIOS.
  634. +
  635. +# Voltage settings
  636. +
  637. + label in0 "CPU"
  638. + label in1 "DDR"
  639. + label in2 "+12V"
  640. + label in3 "+5V"
  641. + ignore in4
  642. + ignore in5
  643. + label in6 "Chip"
  644. +
  645. + compute in2 6.0*@,@/6.0
  646. + compute in3 ((15/10)+1)*@ , @/((15/10)+1)
  647. +
  648. +# Fan settings
  649. +
  650. + label fan1 "CPU Fan"
  651. + label fan2 "Sys1 Fan"
  652. + ignore fan3
  653. +
  654. +# Temperature sensor settings
  655. +
  656. + label temp1 "CPU Temp"
  657. + label temp3 "Sys Temp"
  658. +
  659. +# temp2 is not identified
  660. + ignore temp2
  661. +
  662. + ignore intrusion0
  663. +
  664. diff -Nuar a/configs/Gigabyte/GA-AB350-GAMING.conf b/configs/Gigabyte/GA-AB350-GAMING.conf
  665. --- a/configs/Gigabyte/GA-AB350-GAMING.conf 2019-10-17 18:43:18.000000000 +0300
  666. +++ b/configs/Gigabyte/GA-AB350-GAMING.conf 2021-02-24 18:12:40.000000000 +0300
  667. @@ -21,6 +21,12 @@
  668. label in0 "CPU Vcore"
  669. label in6 "DRAM Channel A/B"
  670. + ignore in1
  671. + ignore in2
  672. + ignore in3
  673. + ignore in4
  674. + ignore in5
  675. +
  676. # A configuration for the Super-IO chip it8792 can be taken from the configuration
  677. # file for the board GA-AB350-GAMING3 but has not been checked for this board
  678. @@ -29,3 +35,10 @@
  679. ignore fan2
  680. ignore fan3
  681. + ignore in0
  682. + ignore in1
  683. + ignore in2
  684. + ignore in3
  685. + ignore in4
  686. + ignore in5
  687. + ignore in6
  688. diff -Nuar a/configs/Gigabyte/GA-AB350N-GAMING-WIFI-REV1.0.conf b/configs/Gigabyte/GA-AB350N-GAMING-WIFI-REV1.0.conf
  689. --- a/configs/Gigabyte/GA-AB350N-GAMING-WIFI-REV1.0.conf 1970-01-01 02:00:00.000000000 +0200
  690. +++ b/configs/Gigabyte/GA-AB350N-GAMING-WIFI-REV1.0.conf 2021-02-24 18:12:40.000000000 +0300
  691. @@ -0,0 +1,91 @@
  692. +# GA-AB350N-Gaming WIFI (rev. 1.0)
  693. +
  694. +# dmi: board_name: AB350N-Gaming WIFI-CF
  695. +# dmi: board_vendor: Gigabyte Technology Co., Ltd.
  696. +# dmi: board_version: x.x
  697. +# dmi: bios_version: F50a
  698. +
  699. +chip "it8686-isa-0a40"
  700. + label temp1 "System 1"
  701. + label temp2 "Chipset"
  702. + label temp3 "CPU Socket"
  703. + label temp4 "PCI-EX16"
  704. + label temp5 "VRM MOS"
  705. + label temp6 "vSOC MOS"
  706. +
  707. + label in0 "CPU Vcore"
  708. + label in1 "+3.3v"
  709. + label in2 "+12v"
  710. + label in3 "+5v"
  711. + label in4 "CPU Vcore SOC"
  712. + label in5 "CPU VDDP"
  713. + label in6 "DRAM A/B"
  714. + label in7 "3VSB"
  715. + label in8 "Battery"
  716. +
  717. + label fan1 "CPU_FAN"
  718. + label fan2 "SYS_FAN1"
  719. +
  720. + compute in1 @*1.650,@/1.650
  721. + compute in2 @*6,@/6
  722. + compute in3 @*2.5,@/2.5
  723. +
  724. + set temp1_min 15
  725. + set temp1_max 65
  726. + set temp2_min 15
  727. + set temp2_max 80
  728. + set temp3_min 15
  729. + set temp3_max 85
  730. + set temp4_min 15
  731. + set temp4_max 30
  732. + set temp5_min 15
  733. + set temp5_max 95
  734. + set temp6_min 15
  735. + set temp6_max 90
  736. +
  737. + set in0_min 0.6
  738. + set in0_max 1.45
  739. + set in1_min 3.135
  740. + set in1_max 3.465
  741. + set in2_min 11.400
  742. + set in2_max 12.600
  743. + set in3_min 4.750
  744. + set in3_max 5.250
  745. + set in6_min 1.2 * 0.97
  746. + set in6_max 1.2 * 1.2
  747. + set in7_min 3.3 * 0.97
  748. + set in7_max 3.3 * 1.05
  749. +
  750. + set fan1_min 900
  751. + set fan2_min 900
  752. +
  753. +chip "it8792-isa-0a60"
  754. + label temp1 "PCI-EX8"
  755. + label temp2 "Temp 2"
  756. + label temp3 "System 2"
  757. +
  758. + label in0 "CPU Vcore"
  759. + label in1 "DDR VTT"
  760. + label in2 "Chipset Core"
  761. + label in3 "VIN3"
  762. + label in4 "CPU VDD18"
  763. + label in5 "DDR VPP"
  764. + label in7 "3VSB"
  765. + label in8 "VBAT"
  766. +
  767. + set temp1_min 15
  768. + set temp1_max 60
  769. + set temp2_min 15
  770. + set temp2_max 60
  771. + set temp3_min 15
  772. + set temp3_max 60
  773. +
  774. + set in0_min 0.6
  775. + set in0_max 1.45
  776. + set in7_min 3.135
  777. + set in7_max 3.465
  778. +
  779. + ignore in6
  780. + ignore fan1
  781. + ignore fan2
  782. + ignore fan3
  783. diff -Nuar a/configs/Gigabyte/GA-H170M-D3H.conf b/configs/Gigabyte/GA-H170M-D3H.conf
  784. --- a/configs/Gigabyte/GA-H170M-D3H.conf 1970-01-01 02:00:00.000000000 +0200
  785. +++ b/configs/Gigabyte/GA-H170M-D3H.conf 2021-02-24 18:12:40.000000000 +0300
  786. @@ -0,0 +1,30 @@
  787. +# Configuration for the Gigabyte GA-H170M-D3H (name from the manual) mainboard.
  788. +# Name from dmidecode -s baseboard-product-name: H170M-D3H-CF
  789. +# BIOS version: F23f
  790. +# Driver: it87
  791. +# added by dokutan, 2020
  792. +
  793. +chip "it8628-isa-*"
  794. +
  795. + ### voltage sensors
  796. + ### these labels are mostly determined by comparing the values to the values from the bios
  797. + # in1 - 1n5: i have no clue, the bios reports +5V and +12V values,
  798. + # the it87 kernel documentation suggests in3 might be internal to the chip
  799. + # label in0 "Vcore" # this value scales with CPU load but seems a bit low (~0.7V to 1.2V)
  800. + # label in2 "+12V" # in2*6 is exactly the +12V value from the bios
  801. + label in6 "Vmemory" # this is stable and the value from the bios
  802. +
  803. + ### fans
  804. + ### the mappings fan to label are all tested
  805. + label fan1 "CPU fan"
  806. + label fan2 "Case fan 1"
  807. + label fan3 "Case fan 2"
  808. + ignore fan4 # there are only 3 fan headers + CPU fan on this mainboard
  809. + label fan5 "Case fan 3"
  810. +
  811. + ### temperature sensors
  812. + ### these labels are determined by comparison with other sensors under different load scenarios
  813. + # temp5 correlates with CPU temp, but stays significantly lower
  814. + # temp1, temp4 and temp6 stay relatively low, even under CPU load
  815. + ignore temp2 # this always gives a reading of +127.0°C
  816. + label temp3 "CPU temp" # this might have a 1-2°C difference to the coretemp package sensor
  817. diff -Nuar a/configs/Lenovo/ThinkPad-T490s-i7.conf b/configs/Lenovo/ThinkPad-T490s-i7.conf
  818. --- a/configs/Lenovo/ThinkPad-T490s-i7.conf 1970-01-01 02:00:00.000000000 +0200
  819. +++ b/configs/Lenovo/ThinkPad-T490s-i7.conf 2021-02-24 18:12:40.000000000 +0300
  820. @@ -0,0 +1,41 @@
  821. +chip "ucsi_source_psy_USBC000:001-isa-*"
  822. + label in0 "Voltage"
  823. + label curr1 "Current"
  824. +
  825. +chip "pch_cannonlake-virtual-0"
  826. + label temp1 "Chipset"
  827. +
  828. +chip "BAT0-*"
  829. + label in0 "Internal battery"
  830. +
  831. +chip "ucsi_source_psy_USBC000:002-isa-*"
  832. + label in0 "Voltage"
  833. + label curr1 "Current"
  834. +
  835. +chip "iwlwifi_1-*"
  836. + label temp1 "WiFi Card"
  837. +
  838. +# The following labeling found here:
  839. +# https://www.kernel.org/doc/html/latest/admin-guide/laptops/thinkpad-acpi.html#temperature-sensors
  840. +chip "thinkpad-isa-*"
  841. + label fan1 "Fan speed"
  842. + label temp1 "Case (near CPU)"
  843. + label temp5 "Main battery: main sensor"
  844. + label temp11 "Power regulator"
  845. +
  846. + ignore temp2
  847. + ignore temp3
  848. + ignore temp4
  849. + ignore temp6
  850. + ignore temp7
  851. + ignore temp8
  852. + ignore temp9
  853. + ignore temp10
  854. + ignore temp12
  855. + ignore temp13
  856. + ignore temp14
  857. + ignore temp15
  858. + ignore temp16
  859. +
  860. +chip "acpitz-acpi-*"
  861. + label temp1 "Case (ACPI thermal zone)"
  862. diff -Nuar a/configs/Lenovo/ThinkPad-X1-Carbon.conf b/configs/Lenovo/ThinkPad-X1-Carbon.conf
  863. --- a/configs/Lenovo/ThinkPad-X1-Carbon.conf 1970-01-01 02:00:00.000000000 +0200
  864. +++ b/configs/Lenovo/ThinkPad-X1-Carbon.conf 2021-02-24 18:12:40.000000000 +0300
  865. @@ -0,0 +1,22 @@
  866. +# Tested with Lenovo ThinkPad X1 Carbon Gen 6
  867. +
  868. +chip "thinkpad-isa-0000"
  869. + # always zero
  870. + ignore temp2
  871. + ignore temp3
  872. + ignore temp4
  873. + ignore temp5
  874. + ignore temp6
  875. + ignore temp7
  876. + ignore temp8
  877. + ignore temp9
  878. + ignore temp10
  879. + ignore temp12
  880. + ignore temp13
  881. + ignore temp14
  882. + ignore temp15
  883. + ignore temp16
  884. +
  885. + label fan1 "Fan"
  886. + label temp1 "CPU"
  887. + label temp11 "Power circuitry"
  888. diff -Nuar a/configs/Lenovo/ThinkPad-X260-i5.conf b/configs/Lenovo/ThinkPad-X260-i5.conf
  889. --- a/configs/Lenovo/ThinkPad-X260-i5.conf 1970-01-01 02:00:00.000000000 +0200
  890. +++ b/configs/Lenovo/ThinkPad-X260-i5.conf 2021-02-24 18:12:40.000000000 +0300
  891. @@ -0,0 +1,31 @@
  892. +chip "iwlwifi_1-*"
  893. + label temp1 "WiFi Card"
  894. +
  895. +chip "thinkpad-isa-*"
  896. + label fan1 "Fan Speed"
  897. + label temp1 "Case (near CPU)"
  898. +
  899. + ignore temp2
  900. + ignore temp3
  901. + ignore temp4
  902. + ignore temp5
  903. + ignore temp6
  904. + ignore temp7
  905. + ignore temp8
  906. +
  907. +chip "BAT0-*"
  908. + label in0 "Internal Battery"
  909. +
  910. +chip "BAT1-*"
  911. + label in0 "Removable Battery"
  912. +
  913. +chip "coretemp-isa-*"
  914. + label temp1 "CPU Package"
  915. + label temp2 "CPU Core 0"
  916. + label temp3 "CPU Core 1"
  917. +
  918. +chip "pch_skylake-*"
  919. + label temp1 "Chipset/Southbridge"
  920. +
  921. +chip "acpitz-acpi-*"
  922. + label temp1 "Case (ACPI Thermal Zone)"
  923. diff -Nuar a/configs/MSI/MS-7B89-B450M-MORTAR.conf b/configs/MSI/MS-7B89-B450M-MORTAR.conf
  924. --- a/configs/MSI/MS-7B89-B450M-MORTAR.conf 1970-01-01 02:00:00.000000000 +0200
  925. +++ b/configs/MSI/MS-7B89-B450M-MORTAR.conf 2021-02-24 18:12:40.000000000 +0300
  926. @@ -0,0 +1,100 @@
  927. +# MS-7B89 B450-MORTAR config
  928. +#
  929. +# Based on MS-7A34 B350-TOMAHAWK config
  930. +# unknown labels taken from MS-7B79 X470 GAMING PRO config
  931. +#
  932. +# Tested on a B450M Mortar Titanium board,
  933. +# but it shares the same ID with the B450M Mortar board.
  934. +
  935. +chip "nct6797-*"
  936. + label in0 "Vcore"
  937. + set in0_min 0.4
  938. + set in0_max 1.45 # max recommended voltage
  939. +
  940. + label in1 "ATX 5V"
  941. + compute in1 ((12 / 3) + 1) * @, @ / ((12 / 3) + 1)
  942. + set in1_min 5 * 0.95
  943. + set in1_max 5 * 1.05
  944. +
  945. + label in2 "AVCC Analog"
  946. + set in2_min 3.3 * 0.95 # assume ATX ±5% is enough
  947. + set in2_max 3.3 * 1.05 # assume ATX ±5% is enough
  948. +
  949. + label in3 "ATX 3.3V"
  950. + set in3_min 3.3 * 0.95 # ATX 2.4
  951. + set in3_max 3.3 * 1.05 # ATX 2.4
  952. +
  953. + label in4 "ATX 12V"
  954. + compute in4 ((220 / 20) + 1) * @, @ / ((220 / 20) + 1)
  955. + set in4_min 12 * 0.95
  956. + set in4_max 12 * 1.05
  957. +
  958. + # no VIN8 input in this chip?
  959. + ignore in5
  960. +
  961. + # likely AUXTIN0 thermistor
  962. + ignore in6
  963. +
  964. + label in7 "3VSB Standby"
  965. + set in7_min 3.3 * 0.95 # assume ATX ±5% is enough
  966. + set in7_max 3.3 * 1.05 # assume ATX ±5% is enough
  967. +
  968. + label in8 "RTC Battery"
  969. + set in8_min 2.0 # from Intel 200-series chipset spec
  970. + set in8_max 3.4 # from random CR2032 datasheet
  971. +
  972. + label in9 "CPU 1.8V"
  973. + set in9_min 1.82 * 0.90
  974. + set in9_max 1.82 * 1.10
  975. +
  976. + # might read as 0V if a CPU without iGPU is installed
  977. + label in10 "CPU VDDP"
  978. +
  979. + # likely AUXTIN2 thermistor
  980. + ignore in11
  981. +
  982. + label in12 "Vsoc"
  983. + set in12_min 0.8
  984. + set in12_max 1.45 #max rating
  985. +
  986. + label in13 "Vdram"
  987. + compute in13 2 * @, @ / 2
  988. + set in13_min 1.1 # DDR min voltage
  989. + set in13_max 1.5 # DDR max voltage
  990. +
  991. + label in14 "5VSB Standby"
  992. + compute in14 ((768 / 330) + 1) * @, @ / ((768 / 330) + 1)
  993. + set in14_min 5 * 0.95
  994. + set in14_max 5 * 1.05
  995. +
  996. +
  997. + ignore fan1
  998. + label fan2 "CPU 1"
  999. + label fan3 "SYSTEM 1"
  1000. + label fan4 "SYSTEM 2"
  1001. + label fan5 "SYSTEM 3"
  1002. +
  1003. +
  1004. + label temp1 "Super I/O"
  1005. + label temp2 "SoC VRM"
  1006. + label temp3 "CPU VRM"
  1007. +
  1008. + # AUXTIN1 is used as VIN5
  1009. + ignore temp4
  1010. +
  1011. + # Termistor Chipset?
  1012. + label temp5 "PCH"
  1013. +
  1014. + # AUXTIN3 is used as VIN7
  1015. + ignore temp6
  1016. +
  1017. + # the same temperature as reported by k10temp
  1018. + label temp7 "CPU die"
  1019. +
  1020. + # stuck at 0°C
  1021. + ignore temp8
  1022. + ignore temp9
  1023. + ignore temp10
  1024. +
  1025. + # likely DEEP_S5 signal
  1026. + ignore intrusion1
  1027. diff -Nuar a/lib/sysfs.c b/lib/sysfs.c
  1028. --- a/lib/sysfs.c 2019-10-17 18:43:18.000000000 +0300
  1029. +++ b/lib/sysfs.c 2021-02-24 18:12:40.000000000 +0300
  1030. @@ -663,7 +663,7 @@
  1031. if ((!subsys || !strcmp(subsys, "platform") ||
  1032. !strcmp(subsys, "of_platform"))) {
  1033. /* must be new ISA (platform driver) */
  1034. - if (sscanf(dev_name, "%*[a-z0-9_].%d", &entry->chip.addr) != 1)
  1035. + if (sscanf(dev_name, "%*[a-zA-Z0-9_]%*1[.:]%d", &entry->chip.addr) != 1)
  1036. entry->chip.addr = 0;
  1037. entry->chip.bus.type = SENSORS_BUS_TYPE_ISA;
  1038. entry->chip.bus.nr = 0;
  1039. @@ -938,7 +938,7 @@
  1040. if (res == EOF) {
  1041. if (errno == EIO)
  1042. return -SENSORS_ERR_IO;
  1043. - else
  1044. + else
  1045. return -SENSORS_ERR_ACCESS_R;
  1046. }
  1047. *value /= get_type_scaling(subfeature->type);
  1048. @@ -972,7 +972,7 @@
  1049. if (res == EOF) {
  1050. if (errno == EIO)
  1051. return -SENSORS_ERR_IO;
  1052. - else
  1053. + else
  1054. return -SENSORS_ERR_ACCESS_W;
  1055. }
  1056. } else
  1057. diff -Nuar a/prog/detect/sensors-detect b/prog/detect/sensors-detect
  1058. --- a/prog/detect/sensors-detect 2019-10-17 18:43:18.000000000 +0300
  1059. +++ b/prog/detect/sensors-detect 2021-02-24 18:12:40.000000000 +0300
  1060. @@ -38,7 +38,7 @@
  1061. #########################
  1062. use constant NO_CACHE => 1;
  1063. -use constant LM_VERSION => '3.6.0';
  1064. +use constant LM_VERSION => '3.6.0+git';
  1065. use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
  1066. $i2c_addresses_to_scan @i2c_byte_cache %opt);
  1067. @@ -719,11 +719,6 @@
  1068. i2c_addrs => [0x2c..0x2e],
  1069. i2c_detect => sub { emc6w201_detect(@_); },
  1070. }, {
  1071. - name => "Winbond WPCD377I",
  1072. - driver => "not-a-sensor",
  1073. - i2c_addrs => [0x2c..0x2e],
  1074. - i2c_detect => sub { lm85_detect(@_, 7); },
  1075. - }, {
  1076. name => "Analog Devices ADT7462",
  1077. driver => "adt7462",
  1078. i2c_addrs => [0x5c, 0x58],
  1079. @@ -1392,6 +1387,11 @@
  1080. i2c_addrs => [0x73],
  1081. i2c_detect => sub { fsc_detect(@_, 7); },
  1082. }, {
  1083. + name => "FTS Teutates",
  1084. + driver => "ftsteutates",
  1085. + i2c_addrs => [0x73],
  1086. + i2c_detect => sub { fts_detect(@_); },
  1087. + }, {
  1088. name => "ALi M5879",
  1089. driver => "to-be-written",
  1090. i2c_addrs => [0x2c..0x2d],
  1091. @@ -1679,6 +1679,10 @@
  1092. i2c_addrs => [0x2c..0x2f],
  1093. i2c_detect => sub { w83791sd_detect(@_); },
  1094. }, {
  1095. + name => "Winbond WPCD377I",
  1096. + i2c_addrs => [0x2c..0x2e],
  1097. + i2c_detect => sub { lm85_detect(@_, 7); },
  1098. + }, {
  1099. name => "Fintek F75111R/RG/N (GPIO)",
  1100. i2c_addrs => [0x37, 0x4e],
  1101. i2c_detect => sub { fintek_detect(@_, 1); },
  1102. @@ -2268,7 +2272,7 @@
  1103. features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
  1104. }, {
  1105. name => "Nuvoton W83677HG-I (NCT5572D/NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
  1106. - driver => "w83627ehf",
  1107. + driver => sub { kernel_version_at_least(3, 10, 0) ? "nct6775" : "w83627ehf" },
  1108. devid => 0xB470,
  1109. devid_mask => 0xFFF0,
  1110. logdev => 0x0b,
  1111. @@ -2285,6 +2289,13 @@
  1112. logdev => 0x0b,
  1113. features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
  1114. }, {
  1115. + name => "Nuvoton NCT6687D eSIO",
  1116. + driver => "nct6683",
  1117. + devid => 0xD590,
  1118. + devid_mask => 0xFFF0,
  1119. + logdev => 0x0b,
  1120. + features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
  1121. + }, {
  1122. name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
  1123. driver => "nct6775",
  1124. devid => 0xC450,
  1125. @@ -2807,6 +2818,10 @@
  1126. driver => "k10temp",
  1127. detect => sub { hygon_pci_detect('1463') },
  1128. }, {
  1129. + name => "AMD Family 19h thermal sensors",
  1130. + driver => "k10temp",
  1131. + detect => sub { amd_pci_detect('1653') },
  1132. + }, {
  1133. name => "Intel digital thermal sensor",
  1134. driver => "coretemp",
  1135. detect => \&coretemp_detect,
  1136. @@ -4569,7 +4584,9 @@
  1137. sub chip_special_cases
  1138. {
  1139. # Some chip to driver mappings depend on the environment
  1140. - foreach my $chip (@chip_ids) {
  1141. + foreach my $chip (@chip_ids, @superio_ids_natsemi, @superio_ids_smsc,
  1142. + @superio_ids_smsc_ns, @superio_ids_winbond,
  1143. + @superio_ids_ite) {
  1144. if (ref($chip->{driver}) eq 'CODE') {
  1145. $chip->{driver} = $chip->{driver}->();
  1146. }
  1147. @@ -6363,6 +6380,33 @@
  1148. return 8;
  1149. }
  1150. +
  1151. +# Chip to detect: FTS Teutates
  1152. +# Registers used:
  1153. +# 0x00: Device ID
  1154. +# 0x01: Revision
  1155. +# 0x0C: Device Detection Register 1
  1156. +# 0x0D: Device Detection Register 2
  1157. +# 0x0E: Device Detection Register 3
  1158. +sub fts_detect
  1159. +{
  1160. + my ($file) = @_;
  1161. +
  1162. + # Device ID must be 0x11
  1163. + # 0x10 == Baseboard Management Controller
  1164. + # 0x01 == Teutates
  1165. + return unless i2c_smbus_read_byte_data($file, 0x00) == 0x11;
  1166. +
  1167. + # Revision must be greater or equal 0x2b to use device detection
  1168. + return unless i2c_smbus_read_byte_data($file, 0x01) >= 0x2b;
  1169. +
  1170. + # Device Detection Registers must be 0x17, 0x34, 0x54
  1171. + return unless i2c_smbus_read_byte_data($file, 0x0C) == 0x17
  1172. + and i2c_smbus_read_byte_data($file, 0x0D) == 0x34
  1173. + and i2c_smbus_read_byte_data($file, 0x0E) == 0x54;
  1174. +
  1175. + return 8;
  1176. +}
  1177. # Chip to detect: 0 = LM93, 1 = LM94
  1178. # Registers used:
  1179. diff -Nuar a/prog/detect/sensors-detect.8 b/prog/detect/sensors-detect.8
  1180. --- a/prog/detect/sensors-detect.8 2019-10-17 18:43:18.000000000 +0300
  1181. +++ b/prog/detect/sensors-detect.8 2021-02-24 18:12:40.000000000 +0300
  1182. @@ -38,6 +38,8 @@
  1183. questions. Note that this isn't necessarily safe as the internal logic may
  1184. lead to potentially dangerous probes being attempted. See the WARNING section
  1185. below.
  1186. +.IP "--stat"
  1187. +Display I2C address statistics.
  1188. .SH WARNING
  1189. sensors-detect needs to access the hardware for most of the chip detections.
  1190. diff -Nuar a/prog/init/fancontrol.service b/prog/init/fancontrol.service
  1191. --- a/prog/init/fancontrol.service 2019-10-17 18:43:18.000000000 +0300
  1192. +++ b/prog/init/fancontrol.service 2021-02-24 18:12:40.000000000 +0300
  1193. @@ -5,7 +5,7 @@
  1194. [Service]
  1195. Type=simple
  1196. -PIDFile=/var/run/fancontrol.pid
  1197. +PIDFile=/run/fancontrol.pid
  1198. ExecStart=/usr/sbin/fancontrol
  1199. [Install]
  1200. diff -Nuar a/prog/init/sensord.service b/prog/init/sensord.service
  1201. --- a/prog/init/sensord.service 2019-10-17 18:43:18.000000000 +0300
  1202. +++ b/prog/init/sensord.service 2021-02-24 18:12:40.000000000 +0300
  1203. @@ -5,7 +5,7 @@
  1204. [Service]
  1205. EnvironmentFile=/etc/sysconfig/sensord
  1206. Type=forking
  1207. -PIDFile=/var/run/sensord.pid
  1208. +PIDFile=/run/sensord.pid
  1209. ExecStart=/usr/sbin/sensord -i $INTERVAL -l $LOG_INTERVAL -f daemon
  1210. [Install]
  1211. diff -Nuar a/prog/pwm/fancontrol b/prog/pwm/fancontrol
  1212. --- a/prog/pwm/fancontrol 2019-10-17 18:43:18.000000000 +0300
  1213. +++ b/prog/pwm/fancontrol 2021-02-24 18:12:40.000000000 +0300
  1214. @@ -287,7 +287,7 @@
  1215. pwmo=${AFCPWM[$fcvcount]}
  1216. if [ ! -w $pwmo ]
  1217. then
  1218. - echo "Error: file $pwmo doesn't exist" >&2
  1219. + echo "Error: file $pwmo doesn't exist or isn't writable" >&2
  1220. outdated=1
  1221. fi
  1222. let fcvcount=$fcvcount+1
  1223. @@ -299,7 +299,7 @@
  1224. tsen=${AFCTEMP[$fcvcount]}
  1225. if [ ! -r $tsen ]
  1226. then
  1227. - echo "Error: file $tsen doesn't exist" >&2
  1228. + echo "Error: file $tsen doesn't exist or isn't readable" >&2
  1229. outdated=1
  1230. fi
  1231. let fcvcount=$fcvcount+1
  1232. @@ -313,7 +313,7 @@
  1233. do
  1234. if [ ! -r $fan ]
  1235. then
  1236. - echo "Error: file $fan doesn't exist" >&2
  1237. + echo "Error: file $fan doesn't exist or isn't readable" >&2
  1238. outdated=1
  1239. fi
  1240. done
  1241. @@ -323,7 +323,8 @@
  1242. if [ $outdated -eq 1 ]
  1243. then
  1244. echo >&2
  1245. - echo "At least one referenced file is missing. Either some required kernel" >&2
  1246. + echo "At least one referenced file is missing or doesn't have" >&2
  1247. + echo "correct privileges. Either some required kernel" >&2
  1248. echo "modules haven't been loaded, or your configuration file is outdated." >&2
  1249. echo "In the latter case, you should run pwmconfig again." >&2
  1250. fi
  1251. diff -Nuar a/prog/pwm/pwmconfig b/prog/pwm/pwmconfig
  1252. --- a/prog/pwm/pwmconfig 2019-10-17 18:43:18.000000000 +0300
  1253. +++ b/prog/pwm/pwmconfig 2021-02-24 18:12:40.000000000 +0300
  1254. @@ -29,7 +29,7 @@
  1255. #
  1256. #
  1257. -LM_VERSION='3.6.0'
  1258. +LM_VERSION='3.6.0+git'
  1259. PIDFILE="/var/run/fancontrol.pid"
  1260. if [ -f "$PIDFILE" ]
  1261. diff -Nuar a/prog/sensors/main.c b/prog/sensors/main.c
  1262. --- a/prog/sensors/main.c 2019-10-17 18:43:18.000000000 +0300
  1263. +++ b/prog/sensors/main.c 2021-02-24 18:12:40.000000000 +0300
  1264. @@ -54,15 +54,16 @@
  1265. static void print_long_help(void)
  1266. {
  1267. printf("Usage: %s [OPTION]... [CHIP]...\n", PROGRAM);
  1268. - puts(" -c, --config-file Specify a config file\n"
  1269. - " -h, --help Display this help text\n"
  1270. - " -s, --set Execute `set' statements (root only)\n"
  1271. - " -f, --fahrenheit Show temperatures in degrees fahrenheit\n"
  1272. - " -A, --no-adapter Do not show adapter for each chip\n"
  1273. - " --bus-list Generate bus statements for sensors.conf\n"
  1274. - " -u Raw output\n"
  1275. - " -j Json output\n"
  1276. - " -v, --version Display the program version\n"
  1277. + puts(" -c, --config-file Specify a config file\n"
  1278. + " -h, --help Display this help text\n"
  1279. + " -s, --set Execute `set' statements (root only)\n"
  1280. + " -f, --fahrenheit Show temperatures in degrees fahrenheit\n"
  1281. + " -A, --no-adapter Do not show adapter for each chip\n"
  1282. + " --bus-list Generate bus statements for sensors.conf\n"
  1283. + " -u Raw output\n"
  1284. + " -j Json output\n"
  1285. + " -v, --version Display the program version\n"
  1286. + " -n, --allow-no-sensors Do not fail if no sensors found\n"
  1287. "\n"
  1288. "Use `-' after `-c' to read the config file from stdin.\n"
  1289. "If no chips are specified, all chip info will be printed.\n"
  1290. @@ -270,7 +271,7 @@
  1291. int main(int argc, char *argv[])
  1292. {
  1293. - int c, i, err, do_bus_list;
  1294. + int c, i, err, do_bus_list, allow_no_sensors;
  1295. const char *config_file_name = NULL;
  1296. struct option long_opts[] = {
  1297. @@ -281,6 +282,7 @@
  1298. { "no-adapter", no_argument, NULL, 'A' },
  1299. { "config-file", required_argument, NULL, 'c' },
  1300. { "bus-list", no_argument, NULL, 'B' },
  1301. + { "allow-no-sensors", no_argument, NULL, 'n' },
  1302. { 0, 0, 0, 0 }
  1303. };
  1304. @@ -291,8 +293,9 @@
  1305. do_sets = 0;
  1306. do_bus_list = 0;
  1307. hide_adapter = 0;
  1308. + allow_no_sensors = 0;
  1309. while (1) {
  1310. - c = getopt_long(argc, argv, "hsvfAc:uj", long_opts, NULL);
  1311. + c = getopt_long(argc, argv, "hsvfAc:ujn", long_opts, NULL);
  1312. if (c == EOF)
  1313. break;
  1314. switch(c) {
  1315. @@ -327,6 +330,9 @@
  1316. case 'B':
  1317. do_bus_list = 1;
  1318. break;
  1319. + case 'n':
  1320. + allow_no_sensors = 1;
  1321. + break;
  1322. default:
  1323. fprintf(stderr,
  1324. "Internal error while parsing options!\n");
  1325. @@ -349,7 +355,9 @@
  1326. "No sensors found!\n"
  1327. "Make sure you loaded all the kernel drivers you need.\n"
  1328. "Try sensors-detect to find out which these are.\n");
  1329. - err = 1;
  1330. + if (!allow_no_sensors) {
  1331. + err = 1;
  1332. + }
  1333. }
  1334. } else {
  1335. int cnt = 0;
  1336. diff -Nuar a/prog/sensors/sensors.1 b/prog/sensors/sensors.1
  1337. --- a/prog/sensors/sensors.1 2019-10-17 18:43:18.000000000 +0300
  1338. +++ b/prog/sensors/sensors.1 2021-02-24 18:12:40.000000000 +0300
  1339. @@ -78,6 +78,8 @@
  1340. buses of the same type. As bus numbers are usually not guaranteed to be stable
  1341. over reboots, these statements let you refer to each bus by its name rather
  1342. than numbers.
  1343. +.IP "-n, --allow-no-sensors"
  1344. +Do not fail if no sensors found. The error message will be printed in the log.
  1345. .SH FILES
  1346. .I /etc/sensors3.conf
  1347. .br
  1348. diff -Nuar a/version.h b/version.h
  1349. --- a/version.h 2019-10-17 18:43:18.000000000 +0300
  1350. +++ b/version.h 2021-02-24 18:12:40.000000000 +0300
  1351. @@ -1 +1 @@
  1352. -#define LM_VERSION "3.6.0"
  1353. +#define LM_VERSION "3.6.0+git"