Lines Matching +full:target +full:- +full:12 +full:v +full:- +full:supply
1 # Sensor Support for OpenBMC using phosphor-hwmon
3 This document describes sensors provided by [phosphor-hwmon][15]. An alternate
4 method is to use the suite of applications provided by [dbus-sensors][16]. While
5 the configuration details between the two methods differ, the D-Bus
10 map sensors to [D-Bus][1] objects. The D-Bus object will broadcast the
15 ## D-Bus
18 Service xyz.openbmc_project.Hwmon-<hash>.Hwmon1
27 - **<type\>** : The [HWMon class][2] name in lower case.
29 - Examples include `temperature, fan_tach, voltage`.
31 - **<label\>** : User defined name of the sensor.
32 - Examples include `ambient, cpu0, fan5`
34 **Note**: The label shall comply with "Valid Object Paths" of [D-Bus Spec][3],
35 that shall only contain the ASCII characters "[A-Z][a-z][0-9]\_".
47 sensor information on D-Bus.
57 #### D-Bus object paths
59 The association links the following D-Bus object paths together:
61 - Chassis inventory item object path
62 - List of sensor object paths for sensors within the chassis
66 - "all_sensors"
67 - Contains the list of all sensors for this chassis
68 - "chassis"
69 - Contains the chassis associated with this sensor
73 - /xyz/openbmc_project/inventory/system/chassis/all_sensors
74 - "endpoints" property contains
75 - /xyz/openbmc_project/sensors/fan_tach/fan0_0
76 - /xyz/openbmc_project/sensors/fan_tach/fan0_1
77 - /xyz/openbmc_project/sensors/temperature/ambient
78 - /xyz/openbmc_project/sensors/voltage/p0_vdn_voltage
79 - /xyz/openbmc_project/sensors/fan_tach/fan0_0/chassis
80 - "endpoints" property contains
81 - /xyz/openbmc_project/inventory/system/chassis
83 ### Association Type #2: Linking a low-level hardware item to its sensors
85 A sensor is usually related to a low-level hardware item, such as a fan, power
86 supply, VRM, or CPU. The Redfish sensor support can obtain the following
89 - Presence ([Inventory.Item interface][12])
90 - Functional state ([OperationalStatus interface][13])
91 - Manufacturer, Model, PartNumber, SerialNumber ([Decorator.Asset
94 For this reason, an ObjectMapper association is used to link a low-level
96 temperature and output voltage sensors, or a dual-rotor fan could have two tach
99 #### D-Bus object paths
101 The association links the following D-Bus object paths together:
103 - Low-level hardware inventory item object path
104 - List of sensor object paths for sensors related to that hardware item
108 - "sensors"
109 - Contains the list of sensors for this low-level hardware item
110 - "inventory"
111 - Contains the low-level hardware inventory item for this sensor
115 - /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/sensors
116 - "endpoints" property contains
117 - /xyz/openbmc_project/sensors/fan_tach/fan0_0
118 - /xyz/openbmc_project/sensors/fan_tach/fan0_1
119 - /xyz/openbmc_project/sensors/fan_tach/fan0_0/inventory
120 - "endpoints" property contains
121 - /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0
129 described below the [phosphor-dbus-interfaces][5] parent directory.
132 [openbmc/phosphor-dbus-interfaces/xyz/openbmc_project/Sensor/Threshold/Warning.yaml][6]
134 Maps to D-Bus interface
137 Each 'name' property in the YAML file maps directly to D-Bus properties.
145 - name: WarningHigh
147 - name: WarningLow
149 - name: WarningAlarmHigh
151 - name: WarningAlarmLow
158 busctl --system introspect xyz.openbmc_project.Hwmon-3301914901.Hwmon1 \
162 .WarningAlarmHigh property b false emits-change writable
163 .WarningAlarmLow property b false emits-change writable
164 .WarningHigh property x 40000 emits-change writable
165 .WarningLow property x 10000 emits-change writable
173 "Scale": -3,
185 Aside from the `xyz.openbmc_project.Sensor` interfaces, the sensor D-Bus objects
189 - Provides a Target property to set a fan RPM value
191 - Provides a Target property to set a fan PWM value
193 - Provides a Functional property that tracks the state of any fault files
197 Any property value change broadcasts a signal on D-Bus. When a value trips past
198 a threshold, an additional D-Bus signal is sent.
203 | ---- | --- | ------------------------------------------------------------------------------------…
216 HWMon sensors are defined in the `recipes-phosphor/sensor/phosphor-hwmon%` path
230 recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@c0/tmp423@4c.conf
236 /sys/firmware/devicetree/base/ahb/apb/bus@1e78a000/i2c-bus@c0/tmp423@4c
241 for the OCC device on an OpenPOWER system. Note how a '--' replaces a ':' in the
245 recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00-…
251 /sys/devices/platform/gpio-fsi/fsi0/slave@00:00/00:00:00:06/sbefifo1-dev0/occ-hwmon.1
252 /etc/default/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--06/sbefifo1-dev0/oc…
255 In order for the sensor to be exposed to D-Bus, the configuration file must
262 # = Association number (i.e. 1-n)
267 | -------------- | -------------------------------------- |
275 | ---------------------- | ---------------------------- |
284 values must be described in 10<sup>-3</sup> degrees Celsius.
298 The phosphor-hwmon code supports these additional config file entries:
354 reading the hardware, the corresponding sensor object will be removed from D-Bus
364 Allows one to choose the fan target mode, either RPM or PWM, if the device
390 [example YAML](https://github.com/openbmc/phosphor-host-ipmid/blob/master/scripts/sensor-example.ya…
400 - y: the 'final value' as reported by IPMItool
401 - x: 8 bits, unsigned, reading data encoded in IPMI response packet
402 - M: 10 bits, signed integer multiplier, `multiplierM` in YAML
403 - B: 10 bits, signed additive offset, `offsetB` in YAML
404 - bExp: 4 bits, signed, `bExp` in YAML
405 - rExp: 4 bits, signed, `rExp` in YAML
407 In addition, phosphor-ipmi-host configuration also supports `scale` property,
414 Supported range: [0, 255 * M * 10^(scale - rExp)]
415 Resolution: M * 10^(scale - rExp)
417 For a concrete example, let's say a voltage sensor reports between 0 to 5.0V.
425 rExp: -3
426 scale: -3
429 so for a DBus sensor value of 4986 meaning 4.986V, phosphor-ipmi-host would
434 rExp: -3
440 y = 20 * 249 * 10^-3 = 4.98 (V)
447 [1]: https://dbus.freedesktop.org/doc/dbus-tutorial.html
448 [2]: https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
449 [3]: https://dbus.freedesktop.org/doc/dbus-specification.html#basic-types
451 https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/yaml/xyz/openbmc_project/Sensor
452 [5]: https://github.com/openbmc/phosphor-dbus-interfaces
454 …https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Sensor/Th…
455 [7]: https://github.com/openbmc/openbmc/tree/master/meta-openbmc-machines
457 …nbmc/openbmc/blob/master/meta-ibm/meta-palmetto/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon…
458 [9]: https://lists.ozlabs.org/pipermail/openbmc/2016-November/005309.html
461 https://github.com/openbmc/docs/blob/master/architecture/object-mapper.md#associations
462 [12]:
463 …https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Inventory…
465 …https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/State/Dec…
467 …https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Inventory…
468 [15]: https://github.com/openbmc/phosphor-hwmon
469 [16]: https://github.com/openbmc/dbus-sensors