summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/hwmon/adt7475.yaml
blob: 051c976ab711f6a0473b54f9468d3c908e9ba97a (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
96
97
98
99
100
101
102
103
104
105
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/adt7475.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ADT7475 hwmon sensor

maintainers:
  - Jean Delvare <jdelvare@suse.com>

description: |
  The ADT7473, ADT7475, ADT7476, and ADT7490 are thermal monitors and multiple
  PWN fan controllers.

  They support monitoring and controlling up to four fans (the ADT7490 can only
  control up to three). They support reading a single on chip temperature
  sensor and two off chip temperature sensors (the ADT7490 additionally
  supports measuring up to three current external temperature sensors with
  series resistance cancellation (SRC)).

  Datasheets:
  https://www.onsemi.com/pub/Collateral/ADT7473-D.PDF
  https://www.onsemi.com/pub/Collateral/ADT7475-D.PDF
  https://www.onsemi.com/pub/Collateral/ADT7476-D.PDF
  https://www.onsemi.com/pub/Collateral/ADT7490-D.PDF

  Description taken from onsemiconductors specification sheets, with minor
  rephrasing.

properties:
  compatible:
    enum:
      - adi,adt7473
      - adi,adt7475
      - adi,adt7476
      - adi,adt7490

  reg:
    maxItems: 1

  adi,pwm-active-state:
    description: |
      Integer array, represents the active state of the pwm outputs If set to 0
      the pwm uses a logic low output for 100% duty cycle. If set to 1 the pwm
      uses a logic high output for 100% duty cycle.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 3
    maxItems: 3
    items:
      enum: [0, 1]
      default: 1

patternProperties:
  "^adi,bypass-attenuator-in[0-4]$":
    description: |
      Configures bypassing the individual voltage input attenuator. If
      set to 1 the attenuator is bypassed if set to 0 the attenuator is
      not bypassed. If the property is absent then the attenuator
      retains its configuration from the bios/bootloader.
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  "^adi,pin(5|10)-function$":
    description: |
      Configures the function for pin 5 on the adi,adt7473 and adi,adt7475. Or
      pin 10 on the adi,adt7476 and adi,adt7490.
    $ref: /schemas/types.yaml#/definitions/string
    enum:
      - pwm2
      - smbalert#

  "^adi,pin(9|14)-function$":
    description: |
      Configures the function for pin 9 on the adi,adt7473 and adi,adt7475. Or
      pin 14 on the adi,adt7476 and adi,adt7490
    $ref: /schemas/types.yaml#/definitions/string
    enum:
      - tach4
      - therm#
      - smbalert#
      - gpio

required:
  - compatible
  - reg

additionalProperties: false

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

      hwmon@2e {
        compatible = "adi,adt7476";
        reg = <0x2e>;
        adi,bypass-attenuator-in0 = <1>;
        adi,bypass-attenuator-in1 = <0>;
        adi,pwm-active-state = <1 0 1>;
        adi,pin10-function = "smbalert#";
        adi,pin14-function = "tach4";
      };
    };