summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/hwmon/gmt,g762.yaml
blob: 8e1bffd252e63297e764e99a094ae4ffc60f469e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/gmt,g762.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: GMT G761/G762/G763 PWM Fan controller

maintainers:
  - Christian Marangi <ansuelsmth@gmail.com>

description: |
  GMT G761/G762/G763 PWM Fan controller.

  G761 supports an internal-clock hence the clocks property is optional.
  If not defined, internal-clock will be used. (31KHz is the clock of
  the internal crystal oscillator)

  If an optional property is not set in DT, then current value is kept
  unmodified (e.g. bootloader installed value).

  Additional information on operational parameters for the device is available
  in Documentation/hwmon/g762.rst. A detailed datasheet for the device is available
  at http://natisbad.org/NAS/refs/GMT_EDS-762_763-080710-0.2.pdf.

properties:
  compatible:
    enum:
      - gmt,g761
      - gmt,g762
      - gmt,g763

  reg:
    maxItems: 1

  clocks:
    description: a fixed clock providing input clock frequency on CLK
      pin of the chip.
    maxItems: 1

  fan_startv:
    description: Fan startup voltage step
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3]

  pwm_polarity:
    description: PWM polarity (positive or negative duty)
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  fan_gear_mode:
    description: FAN gear mode. Configure High speed fan setting factor
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2]

required:
  - compatible
  - reg

if:
  properties:
    compatible:
      contains:
        enum:
          - gmt,g762
          - gmt,g763
then:
  required:
    - clocks

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        g762@3e {
            compatible = "gmt,g762";
            reg = <0x3e>;
            clocks = <&g762_clk>;
            fan_gear_mode = <0>;
            fan_startv = <1>;
            pwm_polarity = <0>;
        };

        g761@1e {
            compatible = "gmt,g761";
            reg = <0x1e>;
            fan_gear_mode = <0>;
            fan_startv = <1>;
            pwm_polarity = <0>;
        };
    };