Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/hwmon/gpio-fan.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Fan connected to GPIO lines |
| 8 | |
| 9 | maintainers: |
| 10 | - Rob Herring <robh@kernel.org> |
| 11 | |
| 12 | properties: |
| 13 | compatible: |
| 14 | const: gpio-fan |
| 15 | |
| 16 | gpios: |
| 17 | description: | |
| 18 | Specifies the pins that map to bits in the control value, |
| 19 | ordered MSB-->LSB. |
| 20 | minItems: 1 |
| 21 | maxItems: 7 |
| 22 | |
| 23 | alarm-gpios: |
| 24 | maxItems: 1 |
| 25 | |
| 26 | gpio-fan,speed-map: |
| 27 | $ref: /schemas/types.yaml#/definitions/uint32-matrix |
| 28 | minItems: 2 |
| 29 | maxItems: 127 |
| 30 | items: |
| 31 | items: |
| 32 | - description: fan speed in RPMs |
| 33 | - description: control value |
| 34 | description: | |
| 35 | A mapping of possible fan RPM speeds and the |
| 36 | control value that should be set to achieve them. This array |
| 37 | must have the RPM values in ascending order. |
| 38 | |
| 39 | '#cooling-cells': |
| 40 | const: 2 |
| 41 | |
| 42 | required: |
| 43 | - compatible |
| 44 | - gpios |
| 45 | - gpio-fan,speed-map |
| 46 | |
| 47 | additionalProperties: false |
| 48 | |
| 49 | examples: |
| 50 | - | |
| 51 | gpio-fan { |
| 52 | compatible = "gpio-fan"; |
| 53 | gpios = <&gpio2 14 1 |
| 54 | &gpio2 13 1>; |
| 55 | gpio-fan,speed-map = < 0 0>, |
| 56 | <3000 1>, |
| 57 | <6000 2>; |
| 58 | alarm-gpios = <&gpio2 15 1>; |
| 59 | #cooling-cells = <2>; /* min followed by max */ |
| 60 | }; |