Merge tag 'block-6.13-20242901' of git://git.kernel.dk/linux
[drm/drm-misc.git] / Documentation / devicetree / bindings / hwmon / gpio-fan.yaml
blob7f30cfc87350676a8fbf2d35914b87b9404f053b
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#
7 title: Fan connected to GPIO lines
9 maintainers:
10   - Rob Herring <robh@kernel.org>
12 properties:
13   compatible:
14     const: gpio-fan
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
23   alarm-gpios:
24     maxItems: 1
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.
39   '#cooling-cells':
40     const: 2
42 required:
43   - compatible
44   - gpios
45   - gpio-fan,speed-map
47 additionalProperties: false
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     };