summaryrefslogtreecommitdiff
path: root/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%
AgeCommit message (Collapse)AuthorFilesLines
2018-08-23[Subtree] Bring openbmc machines to top levelDave Cobbley18-812/+0
The new subtree model brings the subtrees up from the openbmc-machines layer. Change-Id: I58a03ae1be374bc79ae1438e65e888375d12d0c0 Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2018-05-22wspoon: Remove GPU power sensorsMatt Spinler1-36/+0
The power values being displayed were basically instantaneous readings as measured by the APSS monitor device, and as such could show a lot of peaks and valleys that would be undesirable to surface. In the future they may get added back in with some averaging done. In the meantime, the user can use the nvidia-smi command line tool on the host to get the proper power values. Tested: No GPU power sensors in D-Bus. Resolves openbmc/openbmc#3183 Change-Id: Ie2d92560867f29dbf852c53c55b8d371f5fef06f Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2018-05-22wspoon: Copy in the MAX31785 hwmon config fileMatt Spinler1-2/+2
The code will now copy the correct air or water cooled config file to the correct name so phosphor-hwmon can find it. It was just a link before, but that would cause problems with code updates as this directory is preserved, so if older code was put back on the link would point to nothing and phosphor-hwmon would never start for the MAX31785. Now with the copy the old code can still pick up this file. The only hole this has is if someone goes from the new code back to the old code, and then swaps air/water cooling, as the old code will then pick up the config file generated by the newer code, which now won't match the actual config. This would be a very unlikely scenario. Change-Id: I45db3c3ac8265caae30163a4e90035189e861e82 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2018-05-15wspoon: Find OCC power labels using function IDsMatt Spinler1-70/+86
Change to using an indirect lookup with the *_function_id file to determine what the OCC's hwmon power values represent, similar to how the OCC temps used the *_label files. The current code was hardcoding them, assuming hwmon would number them the same every time, but that is not the case. The function IDs are documented here: https://github.com/open-power/docs/blob/master/occ/OCC_P9_FW_Interfaces.pdf Resolves openbmc/openbmc#3152 Change-Id: Id4c50c7175a8108c317d9c301ad4a682a4f4c89f Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2018-05-02wspoon: Add critical thresholds for fan speedsMatt Spinler2-0/+42
The values are just outside of the allowed margins of the fan floor and max speed values. Tested: Test that the thresholds show up in the web UI and that the web UI shows when they have been crossed. Resolves openbmc/openbmc#3114 Change-Id: I6420252d98b974921d6858dbecb3b52f5a8c646a Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2018-05-02wspoon: Start hwmon differently for the MAX31785Matt Spinler4-0/+10
Add a new udev rule to start the phosphor-hwmon instance for the MAX31785 fan controller differently than other hwmon devices. Also introduce different hwmon config files for air and water cooled systems where the water cooled system doesn't use fan 1. The new udev rule starts a service that will check the cooling type and then link in the appropriate config file before starting the actual phosphor-hwmon service. Note that this phosphor-hwmon service is still stopped the same as any other phosphor-hwmon service. Tested: Test that phosphor-hwmon is started using the correct config files on air and water cooled systems. Change-Id: Ia93d97df024e7b6bff5eb379ddea4730fe34b55b Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2018-05-02wspoon: Add service to help start MAX31785 hwmonMatt Spinler1-0/+9
This service will be started in the udev rule for the MAX31785 hotplug add event. It will wait for the phosphor-cooling-type service to be done, and then run the script to start the phosphor-hwmon instance for the MAX31785 fan controller after it chooses the correct config file to use. Tested: Test that this service correctly runs the script and that phosphor-hwmon does get started. Change-Id: I4495f7073d63004d4dd8333df8964d69beaae4ea Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2018-05-02wspoon: Script to help start MAX31785 hwmon daemonMatt Spinler1-0/+26
The phosphor-hwmon instance for the MAX31785 fan controller chip needs to use different config files based on if the system is air or water cooled, since different numbers of fans are used. This script will check the cooling type, link in the correct file based on that cooling type, and then start the actual hwmon service. Tested: Tested as part of end to end testing of this feature. Change-Id: Ie3efee5d3c6671911b505223152d32f3f5c5c259 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2018-04-25Witherspoon: Change hwmon GPU power labelsMatt Spinler1-6/+6
Match up the GPU power sensor labels with the temperature ones, so they are both GPU0 through GPU5 instead of P0_GPU0 through P1_GPU2. Resolves openbmc/openbmc#3111 Change-Id: I509349049b8528415084e45c09200c16d2628a31 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2018-04-10wspoon: Remove OCC sensors on EAGAINsMatthew Barth2-0/+4
When an EAGAIN return code(11) is returned for any sensor from an OCC, remove that sensor from dbus. Functionally requires: https://gerrit.openbmc-project.xyz/#/c/9893/ Tested: OCC sensors are removed from dbus when EAGAIN is returned Change-Id: I2fee78ff7876b8750555454436dd7b53eb3a0e78 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
2018-03-23kernel: Move to 4.13 kernelJoel Stanley2-0/+0
We have 236 commits, 127 files changed, 17766 insertions(+), 2128 deletions(-). Some of these are backports from upstream. This list does not include patches from the 4.13 stable releases, but we do include those in the dev-4.13 branch. 1 Alexey Khoroshilov 34 Andrew Jeffery 1 Arnd Bergmann 1 Benjamin Herrenschmidt 1 Bhumika Goyal 1 Brad Bishop 1 Brendan Higgins 11 Christopher Bostic 1 Cyril Bur 14 Cédric Le Goater 49 Edward A. James 3 Gavin Shan 1 Guenter Roeck 8 Ivan Mikhaylov 1 Jacek Anaszewski 1 James Feist 7 Jeremy Kerr 72 Joel Stanley 2 Julia Lawall 1 Ken Chen 6 Lei YU 3 Milton Miller 1 Mykola Kostenok 1 Patrick Venture 2 Philipp Zabel 1 Rick Altherr 11 Samuel Mendoza-Jonas 2 Wei Yongjun 1 Xo Wang 1 Yong Li Note that the 4.13 branch is EOL'd by the Linux community, and as such should not be used for any products beyond development. React to removal of occ hwmon instances from device trees with a new startup/shutdown mechanism for phosphor-hwmon. To fix this, a helper script will be used to start the service that will pass the service the device tree name if it is present, or the udev device path if it isn't. This script will still run from the udev rule as before, but it will stop and start the service itself without using the SYSTEMD_WANTS attribute. As the path to the hwmon environment file matches the service template argument, the paths for the OCC .conf files need to change to match the device path instead of the previous device tree path. Note that the pure device path would have the hwmon instance number in it, but since that can't be known ahead of time it is stripped off by the script that starts the service. In addition, the pure device path for the OCCs contain several ':'s, meaning the associated environment files would also need to. However, Yocto/Bitbake cannot handle a ':' in a file path, so they are converted to '--'s by the script that starts the service and phosphor-hwmon will convert them back internally when it starts. The service file also needed some changes now that the service lifetime is no longer controlled by systemd via SYSTEMD_WANTS. This script will be called by a udev rule to start and stop phosphor-hwmon when the hwmon device driver is started and stopped. It is passed both the device path and the OF_FULLNAME device tree attribute. If OF_FULLNAME is present, it will start the service with that as its template argument, otherwise it will use the device path. This is to handle devices that aren't in the device tree so they won't have OF_FULLNAME. If a '/hwmon/hwmonN' is in the path it is removed, as this path is also used as a path to an environment file and so must be known ahead of time, which the hwmon instance N is not. If there is a ':' in the path name, it is converted to a '--'. Yocto/Bitbake cannot handle a ':' in file paths. Resolves openbmc/openbmc#2953 Change-Id: I815be4d6d9e1cbea8428bb1bb8c332776ee71ece Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Matt Spinler <spinler@us.ibm.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2018-02-27Set Witherspoon hwmon target modeMatt Spinler1-0/+1
Set the target mode for the MAX31785 fan controller device to be RPM mode so phosphor-hwmon doesn't also create an interface for PWM control. Resolves openbmc/openbmc#2940 Tested: Used this config file with the corresponding phosphor-hwmon changes and ensured the correct interface was created. Change-Id: I6a1361e0264dde252b838c6428fae8b921e0d381 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-11-29wspoon: add more OCC hwmon temps of mode 'label'Matt Spinler2-1/+13
There should be 38 temps total that are of mode 'label', not 32. This mode directs the code to read the label files to determine what the tempX_input temperature values actually represent. The 38 are: 24 core + 8 DIMM + 6 GPU (3 GPUs, core + mem temp for each) Resolves openbmc/openbmc#2674 Change-Id: Ic10568ace0cdd991ae02475e498f3d179a1b148b Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-11-29Fix power supply presence informationBrandon Wyman2-10/+10
While testing missing power supply, the bottom power supply in the MRW is labeled as psu1, which would obviously map to powersupply1, but when that supply was removed and a power on attempted, the call out was for powerupply0. A simple rename of the labels does not work out right, due to the filenames, so swizzling the GPIO and I2C information. Resolves: openbmc/openbmc#2563 Change-Id: Iaed300becace2409e04c0097be9e2d7fa497dee3 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
2017-11-01wspoon: Apply offset to ambient temp sensorMatthew Barth2-0/+2
According to thermal characterization, the ambient temperature sensor requires a -2C offset applied to reflect the correct ambient temperature. Change-Id: I354988013d51ee57403fa68c3fa5120e59d16b74 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
2017-10-24Add OCC default threshold valuesMatt Spinler2-0/+455
These will show up in D-Bus, and cause the corresponding D-Bus alarm properties to get set when crossed. Users can always set their own threshold values on D-Bus if desired. Resolves openbmc/openbmc#2387 Change-Id: I3b8e0eb8466f07f66f185b8d1378cee5683edd7f Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-10-24Add power supply default threshold valuesMatt Spinler2-0/+38
These will show up in D-Bus, and cause the corresponding D-Bus alarm properties to get set when crossed. Users can always set their own threshold values on D-Bus if desired. Change-Id: I96f8d36597ce0c304964590bb24e9946206b2f5d Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-10-23Add IR35221 default temperature threshold valuesMatt Spinler4-0/+36
These will show up in D-Bus, and cause the corresponding D-Bus alarm properties to get set when crossed. Users can always set their own threshold values on D-Bus if desired. Change-Id: Ic2d146ee61c92ce029dfba98537a55a28aae47cc Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-10-23Add TMP275 default temperature threshold valuesMatt Spinler1-0/+4
These will show up in D-Bus, and cause the corresponding D-Bus alarm properties to get set when crossed. Users can always set their own threshold values on D-Bus if desired. Change-Id: Ic6a06e691f5dd46893a02a1c81792f17e63d4eb5 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-10-23Add DPS310 default temperature threshold valuesMatt Spinler1-0/+4
These will show up in D-Bus, and cause the corresponding D-Bus alarm properties to get set when crossed. Users can always set their own threshold values on D-Bus if desired. Change-Id: I0a22b9288de6617a8341720ce4146c9ddd1f93c6 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-10-23Add BMP280 default temperature threshold valuesMatt Spinler1-0/+4
These will show up in D-Bus, and cause the corresponding D-Bus alarm properties to get set when crossed. Users can always set their own threshold values on D-Bus if desired. Change-Id: I9cd2663feed9cd9a343c1b986e3aa6d2d564c2cd Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-10-19Update hwmon labels for 2 OCC propertiesMatt Spinler1-2/+2
Change the names of the power value the OCC reports for APSS channels 14 and 15. Channel 14 actually reports the fan + disk power, and 15 does IO power. Change-Id: I8a2769482a0948489a409aea380c238f490f9a8d Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-10-09Add phosphor-hwmon config file for the PCIE tempMatt Spinler1-0/+1
Adding this so phosphor-hwmon will put this temp on D-Bus so fan control and others can use it. It's provided by a TMP275 at bus 9, address 0x4A. It measures the air temperature by the PCIE slots. Resolves openbmc/openbmc#2411 Change-Id: I3ea16201fd63cb240b53c0a37aa0eaf3aabecead Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-09-12witherspoon - Add GPU core & memory sensorsMatthew Barth2-0/+12
Added GPU core and memory temperature sensors to hwmon config files for each OCC. Change-Id: Id4f7cffd06ab8085d94f828d8fa5efd1653efe35 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
2017-08-24wspoon: Run max31785 firmware revision checkerBrad Bishop1-0/+3
Run the MAX31785 firmware revision checking MSL (minimum ship level) script on Witherspoon systems. MSL can be used to prevent downlevel fan cards escapes from manufacturing environments. The script is configured to run on the way to BMC standby and sets the MSL interfacee property on the configured fan inventory items. Validation of the fan MSL interface is beyond the scope of this commit. On Witherspoon, MSL enforcement is enabled by default. For information on disabling the MSL consult: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Control/MinimumShipLevel.interface.yaml Change-Id: Iaf5dbf8fc29bd497c9b2e610ba23ee98ee749d24 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2017-08-21Add power supply hwmon config filesMatt Spinler2-0/+8
Puts current, voltage, and power properties on D-Bus for the two power supplies. Resolves openbmc/openbmc#2115 Change-Id: I52e85297a70f40854e141db9a25358511033ac02 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2017-07-28kernel: new Maxim MAX31785A driverJoel Stanley1-4/+4
Andrew has cooked us up a proper pmbus MAX31785A driver. This bumps the kernel to include that driver, the device tree updates for the new bindings, and a userspace change for Witherspoon. The userspace change was reviewed and got five +1's: phosphor-hwmon: Update Witherspoon fan labels for PMBus driver The reimplementation of the max37185 fan controller driver uses the Linux PMBus subsystem, which exposes the installed number of fans rather than all supported fan IO. https://gerrit.openbmc-project.xyz/#/c/5564/ It is included in this commit so the system remains bisectable. Andrew Jeffery (6): dt-bindings: hwmon: pmbus: Add Maxim MAX31785 documentation ARM: dts: aspeed: witherspoon: Update max31785 node hwmon: pmbus: Add fan control support hwmon: Remove MAX31785 implementation pmbus: Add driver for Maxim MAX31785 Intelligent Fan Controller ARM: dts: aspeed: Witherspoon has a MAX31785A fan controller Joel Stanley (2): ARM: dts: aspeed: romulus: Update max31785 node ARM: dts: aspeed: firestone: Update max31785 node Change-Id: I7a7b86f5ee6ff38803d4f62c3d3ac99edbea45fb Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-07-18wspoon: Add secondary fan rotor sensorsBrad Bishop1-0/+4
Create DBus objects for these additional sensors and update application configuration to consume them. Resolves: openbmc/openbmc#1188 Change-Id: If0c75ba9a2cae7811694379649756e1310e9a25a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2017-07-14wspoon: Rename fan sensor objectsBrad Bishop1-4/+4
Add a _0 prefix to fan sensor objects to reflect their dual rotor feedback sensing nature. Change-Id: I6de29b16c806d8e2b584c769af5f01e4ed5528f5 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2017-07-13wspoon: Inhibit phosphor-hwmon-config-mrwBrad Bishop1-0/+4
Use a hardcoded hwmon config file for the Witherspoon max31785 chip. Hopefully somewhat temporary workaround of missing tags in the Witherspoon MRW. Change-Id: Ibf03b6c566d600b34b52a0288e1c511b9ff07e4e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2017-06-16Add occ power readings into phosphor-hwmonAndrew Geissler1-0/+15
Change-Id: Idc97fe65513ba52eeab63aa9dfb7022188ac65db Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
2017-06-16Adjust occ hwmon conf file to match with sysfsAndrew Geissler2-0/+0
The occ has some special characteristics, in this case its sysfs path ends with occ-hwmon@<instance> in order to support the other layers of drivers (i.e. occ fifo). The hwmon conf file needs to match with the sysfs path so aligning it with this change. Change-Id: Id582ac6f2184d04841456d56f0e6bcab07027e4d Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
2017-06-13Remove attribute name from hwmon confAndrew Geissler6-72/+72
The hwmon conf files should have the sensor mapping, not the attribute names Resolves openbmc/openbmc#1778 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com> Change-Id: I84a367a7b7ae69243073b2bb3c4838c44abe8434
2017-06-12Add in OCC hwmon config fileAndrew Geissler2-0/+128
OCC hwmon sensor support is more complicated then other hwmon sensors. It requires that software look at the label and include that in the generated dbus sensor. A separate commit in phosphor-hwmon will handle this new function. The hwmon conf file indicates this new functionial requirement to hwmon by including a new MODE_*=label for each sensor that requires this function. Resolves openbmc/openbmc#1183 Change-Id: I55bff27d3eab478559ae42e290dfe74e2f627e12 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
2017-06-12Add in IR35221 hwon config fileAndrew Geissler4-0/+8
The IR35221 is a new chip which provides temperature information on the VRMs installed in the system. Change-Id: I49e24e14f74400e948c2ed98132ebf5ef66346ff Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
2017-06-12Add in DPS310 hwmon config fileAndrew Geissler1-0/+1
The DPS310 is a new chip coming soon to provide ambient temperature to the openbmc. The config file may need a few tweaks when the chip arrives but this at least provides a base that will not hurt anything. Change-Id: Id5264ddcab7245f9ec9b3dbb5898f76ccf45e82b Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
2017-06-07Create configuration file for BMP280 ambientBrandon Wyman1-0/+1
Change-Id: If5137be315dd7b8f087b79f75a9e5e1f2f112113 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>