summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)AuthorFilesLines
2021-07-01Merge branch 'dev-5.10' into dev-5.10-inteldev-5.10.46-intelJae Hyun Yoo1-0/+9
This is the 5.10.46 stable release. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-06-24Merge tag 'v5.10.46' into dev-5.10Joel Stanley1-0/+9
This is the 5.10.46 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-06-23hwmon: (scpi-hwmon) shows the negative temperature properlyRiwen Lu1-0/+9
[ Upstream commit 78d13552346289bad4a9bf8eabb5eec5e5a321a5 ] The scpi hwmon shows the sub-zero temperature in an unsigned integer, which would confuse the users when the machine works in low temperature environment. This shows the sub-zero temperature in an signed value and users can get it properly from sensors. Signed-off-by: Riwen Lu <luriwen@kylinos.cn> Tested-by: Xin Chen <chenxin@kylinos.cn> Link: https://lore.kernel.org/r/20210604030959.736379-1-luriwen@kylinos.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-16Merge branch 'dev-5.10' into dev-5.10-intelJae Hyun Yoo2-4/+4
This is the 5.10.43 stable release Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-06-10Merge tag 'v5.10.43' into dev-5.10Joel Stanley2-4/+4
This is the 5.10.43 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-06-10hwmon: (pmbus/isl68137) remove READ_TEMPERATURE_3 for RAA228228Grant Peltier1-2/+2
[ Upstream commit 2a29db088c7ae7121801a0d7a60740ed2d18c4f3 ] The initial version of the RAA228228 datasheet claimed that the device supported READ_TEMPERATURE_3 but not READ_TEMPERATURE_1. It has since been discovered that the datasheet was incorrect. The RAA228228 does support READ_TEMPERATURE_1 but does not support READ_TEMPERATURE_3. Signed-off-by: Grant Peltier <grantpeltier93@gmail.com> Fixes: 51fb91ed5a6f ("hwmon: (pmbus/isl68137) remove READ_TEMPERATURE_1 telemetry for RAA228228") Link: https://lore.kernel.org/r/20210514211954.GA24646@raspberrypi Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-10hwmon: (dell-smm-hwmon) Fix index valuesArmin Wolf1-2/+2
[ Upstream commit 35d470b5fbc9f82feb77b56bb0d5d0b5cd73e9da ] When support for up to 10 temp sensors and for disabling automatic BIOS fan control was added, noone updated the index values used for disallowing fan support and fan type calls. Fix those values. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20210513154546.12430-1-W_Armin@gmx.de Fixes: 1bb46a20e73b ("hwmon: (dell-smm) Support up to 10 temp sensors") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-09Merge branch 'dev-5.10' into dev-5.10-intelJae Hyun Yoo1-9/+2
This is the 5.10.42 stable release. Also, this commit merges OpenBMC upstream changes. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-06-04Merge tag 'v5.10.42' into dev-5.10Joel Stanley1-9/+2
This is the 5.10.42 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-05-26Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe"Greg Kroah-Hartman1-9/+2
commit 99ae3417672a6d4a3bf68d4fc43d7c6ca074d477 upstream. This reverts commit 9aa3aa15f4c2f74f47afd6c5db4b420fadf3f315. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, it was determined that this commit is not needed at all so just revert it. Also, the call to lm80_init_client() was not properly handled, so if error handling is needed in the lm80_probe() function, then it should be done properly, not half-baked like the commit being reverted here did. Cc: Kangjie Lu <kjlu@umn.edu> Fixes: 9aa3aa15f4c2 ("hwmon: (lm80) fix a missing check of bus read in lm80 probe") Cc: stable <stable@vger.kernel.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210503115736.2104747-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-26Merge branch 'dev-5.10' into dev-5.10-intelJae Hyun Yoo3-3/+13
This is the 5.10.39 stable release Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-05-24Merge tag 'v5.10.39' into dev-5.10Joel Stanley3-3/+13
This is the 5.10.39 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-05-21hwmon: peci: clear time window configurationZbigniew Lukwinski2-0/+3
This patch makes time window setting to be cleared when disabling power capping just like others settings. Change-Id: I3a5fc9c1eb6a5787d131bf69cc18a5dae94a99f0 Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
2021-05-21hwmon: peci: timestamps for sensors correctionZbigniew Lukwinski2-16/+5
This patch makes timestaps catching to happen just after PECI transaction. It makes reading more accurate since PECI request can hang while waiting in PECI driver queue. Change-Id: I1a356caa59148a5cebcfcdf89211038bfadb40d3 Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
2021-05-19hwmon: (occ) Fix poll rate limitingEddie James2-3/+4
[ Upstream commit 5216dff22dc2bbbbe6f00335f9fd2879670e753b ] The poll rate limiter time was initialized at zero. This breaks the comparison in time_after if jiffies is large. Switch to storing the next update time rather than the previous time, and initialize the time when the device is probed. Fixes: c10e753d43eb ("hwmon (occ): Add sensor types and versions") Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20210429151336.18980-1-eajames@linux.ibm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14hwmon: (pmbus/pxe1610) don't bail out when not all pages are activePaul Fertser1-0/+9
[ Upstream commit f025314306ae17a3fdaf2874d7e878ce19cea363 ] Certain VRs might be configured to use only the first output channel and so the mode for the second will be 0. Handle this gracefully. Fixes: b9fa0a3acfd8 ("hwmon: (pmbus/core) Add support for vid mode detection per page bases") Signed-off-by: Paul Fertser <fercerpav@gmail.com> Link: https://lore.kernel.org/r/20210416102926.13614-1-fercerpav@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-08fixup! hwmon: Add PECI cputemp driverJae Hyun Yoo1-42/+41
This commit refines the driver to use the PCS 9 reading for generic module readings. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> Change-Id: Idbf155c6b2dbd6f44d7e6bbe53a2b98bdf45e8f2
2021-04-13Merge branch 'dev-5.10' into dev-5.10-intelJae Hyun Yoo4-2/+266
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-04-06hwmon: (occ) Print response status in first poll error messageEddie James1-2/+3
In order to better debug problems starting up the driver, print the response status from the OCC in the error logged when the first poll command fails. OpenBMC-Staging-Count: 1 Signed-off-by: Eddie James <eajames@linux.ibm.com> Acked-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210209171235.20624-5-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-04-06hwmon: (occ) Start sequence number at oneEddie James1-0/+2
Initialize the sequence number at one, rather than zero, in order to prevent false matches with the zero-initialized OCC SRAM buffer before the OCC is fully initialized. OpenBMC-Staging-Count: 1 Signed-off-by: Eddie James <eajames@linux.ibm.com> Acked-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210209171235.20624-4-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-04-06hwmon: (sbtsi) Add basic support for SB-TSI sensorsKun Yi3-0/+261
SB Temperature Sensor Interface (SB-TSI) is an SMBus compatible interface that reports AMD SoC's Ttcl (normalized temperature), and resembles a typical 8-pin remote temperature sensor's I2C interface to BMC. This commit adds basic support using this interface to read CPU temperature, and read/write high/low CPU temp thresholds. To instantiate this driver on an AMD CPU with SB-TSI support, the i2c bus number would be the bus connected from the board management controller (BMC) to the CPU. The i2c address is specified in Section 6.3.1 of the spec [1]: The SB-TSI address is normally 98h for socket 0 and 90h for socket 1, but it could vary based on hardware address select pins. [1]: https://www.amd.com/system/files/TechDocs/56255_OSRR.pdf Test status: tested reading temp1_input, and reading/writing temp1_max/min. OpenBMC-Staging-Count: 1 Signed-off-by: Kun Yi <kunyi@google.com> Link: https://lore.kernel.org/r/20201211215427.3281681-2-kunyi@google.com Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-03-15Merge branch 'dev-5.10' into dev-5.10-intelJae Hyun Yoo31-44/+22
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-03-12hwmon: (pmbus/ibm-cffps) Set the PMBUS_NO_CAPABILITY flagEddie James1-1/+1
Several power supplies supported by the IBM CFFPS driver don't report valid data in the CAPABILITY register. This results in PEC being enabled when it's not supported by the device, and since the automatic version detection might fail, disable use of the CAPABILITY register across the board for this driver. Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20201222152640.27749-3-eajames@linux.ibm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> (cherry picked from commit f7a652182cc7f07cf658b8eee8d545ac109fd02e) Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-03-12hwmon: (pmbus) Add a PMBUS_NO_CAPABILITY platform data flagEddie James1-3/+5
Some PMBus chips don't respond with valid data when reading the CAPABILITY register. Add a flag that device drivers can set so that the PMBus core driver doesn't use CAPABILITY to determine it's behavior. Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20201222152640.27749-2-eajames@linux.ibm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> (cherry picked from commit e5befc024cb4515d815662ed8746712cc5366bfc) Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-03-12hwmon: (pmbus) shrink code and remove pmbus_do_remove()Bartosz Golaszewski30-40/+9
The only action currently performed in pmbus_do_remove() is removing the debugfs hierarchy. We can schedule a devm action at probe time and remove pmbus_do_remove() entirely from all pmbus drivers. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20201026105352.20359-1-brgl@bgdev.pl [groeck: Removed references to pmbus_do_remove from documentation] Signed-off-by: Guenter Roeck <linux@roeck-us.net> (cherry picked from commit 3bce071a301f44ffd08bada9b2e8238b625f8f8c) Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-03-11hwmon: peci: cleanupOlender, Agata3-44/+30
Add cleanup fixes after implementing energy sensor for all modules: cpu, dimm, platform to make all files consistent. Signed-off-by: Olender, Agata <agata.olender@intel.com>
2021-03-11hwmon: peci: Stop reading DRAM_MIN_PWRZbigniew Lukwinski1-33/+9
This commit is about disabling reading DRAM_MIN_PWR from DRAM_POWER_INFO PCS. Starting from SPR DRAM_MIN_PWR is deprecated. BIOS does not update DRAM min power anymore. Value of 0 shall be reported as DRAM min power. Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
2021-03-11hwmon: peci: TDP used for max DRAM powerZbigniew Lukwinski2-30/+4
This commit replaces 'Maximal DRAM Power' (MSR@61Ch - MSR_DRAM_POWER_INFO_HIGH) with the 'Spec DRAM Power'('TDP') (MSR@61Ch - MSR_DRAM_POWER_INFO_LOW) while maximal DRAM power calculation. This is to be compliant with SPS ME Node Manager. In case package power it already works with the same way - TDP is taken as maximal power. Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
2021-03-11mfd: peci: Add ICX-D generation infoSaravanan Palanisamy2-0/+3
This commit adds CPU generation info for ICX-D Xeon family. Signed-off-by: Saravanan Palanisamy <saravanan.palanisamy@intel.com> Signed-off-by: Anoop S <anoopx.s@intel.com>
2021-03-11mfd: peci: Add ICX generation infoJae Hyun Yoo2-17/+126
This commit adds CPU generation info for ICX family. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-03-11hwmon: (aspeed-pwm-tacho) Add pwm chip driver supportJae Hyun Yoo1-0/+124
This commit adds pwm chip driver support into aspeed-g6-pwm-tacho driver to enable beep speaker driver. The pwm chip driver cannot be added as a separate platform driver because it makes resource conflicts with existing pwm-tacho driver so it uses hacky tweak on the existing driver. Note: Do not try upstream this hacky implementation. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> Change-Id: I22ad12be2ae3a061d7942fec813cdb11be321db7
2021-03-11hwmon: peci: add energy sensor to peci-dimmpowerOlender, Agata1-56/+232
Add support for energy consumption of DIMMs sensor. Energy is reported in micro Joules and exposed under energyN_input file. Signed-off-by: Olender, Agata <agata.olender@intel.com>
2021-03-11hwmon: peci: cumulative energy sensorOlender, Agata2-69/+133
Change energy sensor to cumulative energy sensor. Actually energy sensor implementation works as simply translation for value read from PCS register to microjoules. With this change, energy sensor will behave as accumulative sensor> After every read on energyN_input file new energy sample will be gathered, and the difference between new sample and previous one will be added to sensor value. This approach solves problems with counters overflow and interpretation of the energy sensor value. Signed-off-by: Olender, Agata <agata.olender@intel.com>
2021-03-11hwmon: peci: adjust energy sensor value to S32 typeOlender, Agata1-2/+2
Adjust energy sensor to be 31 bits counter and return only positive values using S32 type - that is a part of common sensor struct for all hwmon peci sensors. Signed-off-by: Olender, Agata <agata.olender@intel.com>
2021-03-11hwmon: peci: add energy sensor to peci-cpupowerOlender, Agata3-149/+335
Add support for energy consumption of CPU package sensor. Energy is reported in micro Joules and exposed under energyN_input file. Signed-off-by: Olender, Agata <agata.olender@intel.com>
2021-03-11hwmon: peci: dimmpower implementationZbigniew Lukwinski3-0/+517
1. Peci dimmpower module implementation. 2. Enable DIMM avarage power, power limit, power limit max setting, power limit min setting reading and expose them under power1_avarage, power1_cap, power1_cap_max, power1_cap_min in sysfs. 3. Enable DIMM power limit writing through power1_cap. Tested: * on WilsonCity platform, * power1_avarage, power1_cap, power1_cap_max and power1_cap_min work as expected Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
2021-03-11hwmon: peci: cpupower extensionZbigniew Lukwinski2-118/+436
1. Use hwmon peci pcs utils to refactor peci cpupower module. 2. Enable CPU power limit, power limit max (TDP) setting, power limit min setting reading and expose them under power1_cap, power1_cap_max, power1_cap_min. 3. Enable CPU power limit writing through power1_cap. Tested: * on WilsonCity platform, * power1_avarage works as before the change, * power1_cap, power1_cap_max, power1_cap_min work as expected. Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
2021-03-11hwmon: peci: PCS utilsZbigniew Lukwinski2-6/+555
1. Helpers for reading/writing PCS registers added. 2. PECI sensor configuration structure definition and helpers added. 3. New PECI PCS index and parameters definitions added. Tested: * on WilsonCity platform * hwmon/peci modules work as before the change Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
2021-03-11pwm and tach driver changes for ast2600Ayushi Smriti1-157/+171
This commit includes additions/changes in driver code to support 9 PWM outputs and 9 fan tachometer inputs for ast2600 as per archer city usage Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com>
2021-03-11arm: ast2600: add pwm_tacho driver from aspeedVernon Mauery3-0/+1037
Add the pwm_tacho driver from Aspeed to get pwm working until an upstream PWM/Tacho driver is available. This was copied from the v5.02 BSP from Aspeed. Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
2021-03-11pmbus: add 'fault' and 'beep' attributesJae Hyun Yoo2-0/+31
This commit adds two more attirbutes to reflect MFR_SPECIFIC bit in the STATUS_WORD and 'Unit Off For Insufficient Input Voltage' bit in the STATUS_INPUT into 'fault' and 'beep' attributes respectively. The attributes will be enumerated as 'inX_fault' and 'inX_beep' in a 'vin' group. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-03-11aspeed-pwm-tacho: change default fan speedJames Feist1-1/+1
Change it from max to 58% Signed-off-by: James Feist <james.feist@linux.intel.com>
2021-03-11Add peci-cpupower driverZhikuiRen3-0/+246
peci-cpupower reads CPU energy counter through peci and computes average power in mW since last read. Signed-off-by: ZhikuiRen <zhikui.ren@intel.com>
2021-03-11peci-cputemp: label CPU cores from zero instead of oneZev Weiss1-1/+1
Zero-based numbering is more consistent with all other cpu/core numbering I'm aware of (including the PECI spec). OpenBMC-Staging-Count: 1 Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Reviewed-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> Link: https://lore.kernel.org/r/20200926212734.23836-3-zev@bewilderbeest.net
2021-03-11hwmon: Add PECI dimmtemp driverJae Hyun Yoo3-0/+455
This commit adds PECI dimmtemp hwmon driver. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> Reviewed-by: Haiyue Wang <haiyue.wang@linux.intel.com> Reviewed-by: James Feist <james.feist@linux.intel.com> Reviewed-by: Vernon Mauery <vernon.mauery@linux.intel.com>
2021-03-11hwmon: Add PECI cputemp driverJae Hyun Yoo4-0/+534
This commit adds PECI cputemp hwmon driver. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> Reviewed-by: Haiyue Wang <haiyue.wang@linux.intel.com> Reviewed-by: James Feist <james.feist@linux.intel.com> Reviewed-by: Vernon Mauery <vernon.mauery@linux.intel.com>
2021-03-04Merge tag 'v5.10.20' into dev-5.10Joel Stanley1-0/+7
This is the 5.10.20 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-26hwmon: (dell-smm) Add XPS 15 L502X to fan control blacklistThomas Hebb1-0/+7
commit 4008bc7d39537bb3be166d8a3129c4980e1dd7dc upstream. It has been reported[0] that the Dell XPS 15 L502X exhibits similar freezing behavior to the other systems[1] on this blacklist. The issue was exposed by a prior change of mine to automatically load dell_smm_hwmon on a wider set of XPS models. To fix the regression, add this model to the blacklist. [0] https://bugzilla.kernel.org/show_bug.cgi?id=211081 [1] https://bugzilla.kernel.org/show_bug.cgi?id=195751 Fixes: b8a13e5e8f37 ("hwmon: (dell-smm) Use one DMI match for all XPS models") Cc: stable@vger.kernel.org Reported-by: Bob Hepple <bob.hepple@gmail.com> Tested-by: Bob Hepple <bob.hepple@gmail.com> Signed-off-by: Thomas Hebb <tommyhebb@gmail.com> Reviewed-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/a09eea7616881d40d2db2fb5fa2770dc6166bdae.1611456351.git.tommyhebb@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-09hwmon: (occ) Add new temperature sensor typeEddie James1-0/+65
The latest version of the On-Chip Controller (OCC) has a different format for the temperature sensor data. Add a new temperature sensor version to handle this data. OpenBMC-Staging-Count: 4 Signed-off-by: Eddie James <eajames@linux.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-02-09pmbus (max31785): Wrap all I2C accessors in one-shot failure handlersAndrew Jeffery1-42/+165
The MAX31785(A) has shown erratic behaviour across multiple system designs, unexpectedly clock stretching and NAKing transactions. Perform a one-shot retry if necessary for all access attempts. OpenBMC-Staging-Count: 13 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Tested-by: George Keishing <gkeishin@in.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au>