summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/hwmon/adi,ltc4282.yaml
blob: 4854b95a93e3411e3c548d9fac9a4e656f6eacca (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/adi,ltc4282.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices LTC4282 I2C High Current Hot Swap Controller over I2C

maintainers:
  - Nuno Sa <nuno.sa@analog.com>

description: |
  Analog Devices LTC4282 I2C High Current Hot Swap Controller over I2C.

  https://www.analog.com/media/en/technical-documentation/data-sheets/ltc4282.pdf

properties:
  compatible:
    enum:
      - adi,ltc4282

  reg:
    maxItems: 1

  vdd-supply: true

  clocks:
    maxItems: 1

  '#clock-cells':
    const: 0

  adi,rsense-nano-ohms:
    description: Value of the sense resistor.

  adi,vin-mode-microvolt:
    description:
      Selects operating range for the Undervoltage, Overvoltage and Foldback
      pins. Also for the ADC. Should be set to the nominal input voltage.
    enum: [3300000, 5000000, 12000000, 24000000]
    default: 12000000

  adi,fet-bad-timeout-ms:
    description:
      From the moment a FET bad conditions is present, this property selects the
      wait time/timeout for a FET-bad fault to be signaled. Setting this to 0,
      disables FET bad faults to be reported.
    default: 255
    maximum: 255

  adi,overvoltage-dividers:
    description: |
      Select which dividers to use for VDD Overvoltage detection. Note that
      when the internal dividers are used the threshold is referenced to VDD.
      The percentages in the datasheet are misleading since the actual values
      to look for are in the "Absolute Maximum Ratings" table in the
      "Comparator Inputs" section. In there there's a line for each of the 5%,
      10% and 15% settings with the actual min, typical and max tolerances.
    $ref: /schemas/types.yaml#/definitions/string
    enum: [external, vdd_5_percent, vdd_10_percent, vdd_15_percent]
    default: external

  adi,undervoltage-dividers:
    description: |
      Select which dividers to use for VDD Overvoltage detection. Note that
      when the internal dividers are used the threshold is referenced to VDD.
      The percentages in the datasheet are misleading since the actual values
      to look for are in the "Absolute Maximum Ratings" table in the
      "Comparator Inputs" section. In there there's a line for each of the 5%,
      10% and 15% settings with the actual min, typical and max tolerances.
    $ref: /schemas/types.yaml#/definitions/string
    enum: [external, vdd_5_percent, vdd_10_percent, vdd_15_percent]
    default: external

  adi,current-limit-sense-microvolt:
    description:
      The current limit sense voltage of the chip is adjustable between
      12.5mV and 34.4mV in 3.1mV steps. This effectively limits the current
      on the load.
    enum: [12500, 15625, 18750, 21875, 25000, 28125, 31250, 34375]
    default: 25000

  adi,overcurrent-retry:
    description:
      If set, enables the chip to auto-retry 256 timer cycles after an
      Overcurrent fault.
    type: boolean

  adi,overvoltage-retry-disable:
    description:
      If set, disables the chip to auto-retry 50ms after an Overvoltage fault.
      It's enabled by default.
    type: boolean

  adi,undervoltage-retry-disable:
    description:
      If set, disables the chip to auto-retry 50ms after an Undervoltage fault.
      It's enabled by default.
    type: boolean

  adi,fault-log-enable:
    description:
      If set, enables the FAULT_LOG and ADC_ALERT_LOG registers to be written
      to the EEPROM when a fault bit transitions high and hence, will be
      available after a power cycle (the chip loads the contents of
      the EE_FAULT_LOG register - the one in EEPROM - into FAULT_LOG at boot).
    type: boolean

  adi,gpio1-mode:
    description: Defines the function of the Pin. It can indicate that power is
      good (PULL the pin low when power is not good) or that power is bad (Go
      into high-z when power is not good).
    $ref: /schemas/types.yaml#/definitions/string
    enum: [power_bad, power_good]
    default: power_good

  adi,gpio2-mode:
    description: Defines the function of the Pin. It can be set as the input for
      the ADC or indicating that the MOSFET is in stress (dissipating power).
    $ref: /schemas/types.yaml#/definitions/string
    enum: [adc_input, stress_fet]
    default: adc_input

  adi,gpio3-monitor-enable:
    description: If set, gpio3 is set as input for the ADC instead of gpio2.
    type: boolean

allOf:
  - if:
      required:
        - adi,gpio3-monitor-enable
    then:
      properties:
        adi,gpio2-mode:
          const: stress_fet

required:
  - compatible
  - reg
  - adi,rsense-nano-ohms

additionalProperties: false

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

        hwmon@50 {
            compatible = "adi,ltc4282";
            reg = <0x50>;
            adi,rsense-nano-ohms = <500>;

            adi,gpio1-mode = "power_good";
            adi,gpio2-mode = "adc_input";
        };
    };
...