blob: 7f30cfc87350676a8fbf2d35914b87b9404f053b [file] [log] [blame]
Tom Rini93743d22024-04-01 09:08:13 -04001# 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
7title: Fan connected to GPIO lines
8
9maintainers:
10 - Rob Herring <robh@kernel.org>
11
12properties:
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
42required:
43 - compatible
44 - gpios
45 - gpio-fan,speed-map
46
47additionalProperties: false
48
49examples:
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 };