Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 1 | # Phosphor Fan Presence (PFP) example configuration file. |
| 2 | # |
| 3 | # The configuration represents an array of fans the application |
| 4 | # should check for presence. The name attribute is required |
| 5 | # and is used as the PrettyName attribute for the |
| 6 | # xyz.openbmc_project.Inventory.Item interface. Path is required |
| 7 | # and is the location where the fan inventory object will be |
| 8 | # created. Additional configuration directives described below |
| 9 | # in the examples. |
| 10 | |
| 11 | - name: Example Fan0 |
| 12 | description: > |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 13 | 'Example fan with tach feedback detection method. |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 14 | |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 15 | Fans without any special presence detection hardware can use one or more |
| 16 | tach speed sensor feedbacks as an indicator of presence. Listed sensors |
| 17 | are expected to be found in the /xyz/openbmc_project/sensors/fan_tach |
| 18 | namespace as required by the OpenBMC DBus API. |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 19 | |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 20 | Supported policy types are fallback or anyof.' |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 21 | path: /system/chassis/motherboard/fan0 |
| 22 | methods: |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 23 | - type: tach |
| 24 | sensors: |
| 25 | - fan0 |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 26 | |
| 27 | - name: Example Fan1 |
| 28 | description: > |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 29 | 'Example fan with gpio detection method. |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 30 | |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 31 | Fans with dedicated gpios can use the gpio detection method. The gpio |
| 32 | detection uses Linux gpio-keys: the event number must be provided via the |
| 33 | key property.' |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 34 | path: /system/chassis/motherboard/fan1 |
| 35 | methods: |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 36 | - type: gpio |
| 37 | key: 123 |
| 38 | physpath: /sys/devices/foo/bar |
| 39 | devpath: /dev/input/by-path/platform-gpio-keys-event |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 40 | |
| 41 | - name: Example Fan2 |
| 42 | description: > |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 43 | 'Example fan with fallback redundancy policy. |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 44 | |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 45 | Multiple detection methods for a single fan are allowed. When multiple |
| 46 | detection methods are provided a redundancy algorithm must be specified |
| 47 | with the rpolicy attribute. |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 48 | |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 49 | Note that the redundancy policy algorithm may or may not factor the order |
| 50 | the detection methods are listed into its logic. |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 51 | |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 52 | The fallback algorithm falls back to subsequently listed detection methods |
| 53 | when the first method does not detect a fan and the second method does.' |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 54 | path: /system/chassis/motherboard/fan2 |
| 55 | methods: |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 56 | - type: gpio |
| 57 | key: 124 |
| 58 | physpath: /sys/devices/foo/bar |
| 59 | devpath: /dev/input/by-path/platform-gpio-keys-polled-event |
| 60 | - type: tach |
| 61 | sensors: |
| 62 | - fan2 |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 63 | rpolicy: |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 64 | type: fallback |
Brad Bishop | 5593560 | 2017-06-13 13:31:24 -0400 | [diff] [blame] | 65 | |
Brad Bishop | fcbedca | 2017-07-25 19:59:46 -0400 | [diff] [blame] | 66 | - name: Example Fan3 |
| 67 | description: > |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 68 | 'Example fan with anyof redundancy policy. |
Brad Bishop | fcbedca | 2017-07-25 19:59:46 -0400 | [diff] [blame] | 69 | |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 70 | The anyof algorithm reports true if any redundancy set component sensors |
| 71 | report true.' |
Brad Bishop | fcbedca | 2017-07-25 19:59:46 -0400 | [diff] [blame] | 72 | path: /system/chassis/motherboard/fan3 |
| 73 | methods: |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 74 | - type: gpio |
| 75 | key: 125 |
| 76 | physpath: /sys/devices/foo/bar |
| 77 | devpath: /dev/input/by-path/platform-gpio-keys-polled-event |
| 78 | - type: tach |
| 79 | sensors: |
| 80 | - fan3 |
Brad Bishop | fcbedca | 2017-07-25 19:59:46 -0400 | [diff] [blame] | 81 | rpolicy: |
Patrick Williams | a49e3f1 | 2022-12-08 06:12:40 -0600 | [diff] [blame] | 82 | type: anyof |