summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/hwmon/adi,ltc4283.yaml
blob: 05e2132ad4d8621ab76ee89aa166c131fed08e85 (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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/adi,ltc4283.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: LTC4283 Negative Voltage Hot Swap Controller

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

description: |
  The LTC4283 negative voltage hot swap controller drives an external N-channel
  MOSFET to allow a board to be safely inserted and removed from a live
  backplane.

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

properties:
  compatible:
    enum:
      - adi,ltc4283

  reg:
    maxItems: 1

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

  adi,current-limit-sense-microvolt:
    description:
      The current limit sense voltage of the chip is adjustable between
      15mV and 30mV in 1mV steps. This effectively limits the current
      on the load.
    minimum: 15000
    maximum: 30000
    default: 15000

  adi,current-limit-foldback-factor:
    description:
      Specifies the foldback factor for the current limit. The current limit
      can be reduced (folded back) to one of four preset levels. The value
      represents the percentage of the current limit sense voltage to use
      during foldback. A value of 100 means no foldback.
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [10, 20, 50, 100]
    default: 100

  adi,cooling-delay-ms:
    description:
      Cooling time to apply after an overcurrent fault, FET bad or
      external fault.
    enum: [512, 1002, 2005, 4100, 8190, 16400, 32800, 65600]
    default: 512

  adi,fet-bad-timer-delay-ms:
    description:
      FET bad timer delay. After a FET bad status condition is detected,
      this timer is started. If the condition persists for the
      specified time, the FET is turned off and a fault is logged.
    enum: [256, 512, 1002, 2005]
    default: 256

  adi,power-good-reset-on-fet:
    description:
      If set, resets the power good status when the MOSFET is turned off.
      Otherwise, it resets when a low output voltage is detected.
    type: boolean

  adi,fet-turn-off-disable:
    description:
      If set, the MOSFET is not turned off when a FET fault is detected.
    type: boolean

  adi,tmr-pull-down-disable:
    description: Disables 2uA pull-down current on the TMR pin.
    type: boolean

  adi,dvdt-inrush-control-disable:
    description:
      Disables dV/dt inrush control during startup. In dV/dt mode, the inrush
      current is limited by controlling a constant output voltage ramp rate.
      When disabled, the inrush control mechanism is active current limiting.
    type: boolean

  adi,fault-log-enable:
    description:
      If set, enables logging fault registers and ADC data into EEPROM upon a
      fault.
    type: boolean

  adi,vpower-drns-enable:
    description:
      If set, enables the attenuated MOSFET drain voltage to be monitored. This
      effectively means that the MOSFET power is monitored. If not set, the
      attenuated input voltage (and hence input power) is monitored.
    type: boolean

  adi,external-fault-fet-off-enable:
    description: Turns MOSFET off following an external fault.
    type: boolean

  adi,undervoltage-retry-disable:
    description: Do not retry to turn on the MOSFET after an undervoltage fault.
    type: boolean

  adi,overvoltage-retry-disable:
    description: Do not retry to turn on the MOSFET after an overvoltage fault.
    type: boolean

  adi,external-fault-retry-enable:
    description: Retry to turn on the MOSFET after an external fault.
    type: boolean

  adi,overcurrent-retries:
    description: Configures auto-retry following an Overcurrent fault.
    $ref: /schemas/types.yaml#/definitions/string
    enum: [latch-off, "1", "7", unlimited]
    default: latch-off

  adi,fet-bad-retries:
    description:
      Configures auto-retry following a FET bad fault and a consequent MOSFET
      turn off.
    $ref: /schemas/types.yaml#/definitions/string
    enum: [latch-off, "1", "7", unlimited]
    default: latch-off

  adi,pgio1-func:
    description: Configures the function of the PGIO1 pin.
    $ref: /schemas/types.yaml#/definitions/string
    enum: [inverted_power_good, power_good, gpio]
    default: inverted_power_good

  adi,pgio2-func:
    description: Configures the function of the PGIO2 pin.
    $ref: /schemas/types.yaml#/definitions/string
    enum: [inverted_power_good, power_good, gpio, active_current_limiting]
    default: inverted_power_good

  adi,pgio3-func:
    description: Configures the function of the PGIO3 pin.
    $ref: /schemas/types.yaml#/definitions/string
    enum: [inverted_power_good_input, power_good_input, gpio]
    default: inverted_power_good_input

  adi,pgio4-func:
    description: Configures the function of the PGIO4 pin.
    $ref: /schemas/types.yaml#/definitions/string
    enum: [inverted_external_fault, external_fault, gpio]
    default: inverted_external_fault

  adi,gpio-on-adio1:
    description: If set, the ADIO1 pin is used as a GPIO.
    type: boolean

  adi,gpio-on-adio2:
    description: If set, the ADIO2 pin is used as a GPIO.
    type: boolean

  adi,gpio-on-adio3:
    description: If set, the ADIO3 pin is used as a GPIO.
    type: boolean

  adi,gpio-on-adio4:
    description: If set, the ADIO4 pin is used as a GPIO.
    type: boolean

  gpio-controller: true

  '#gpio-cells':
    const: 2

dependencies:
  adi,gpio-on-adio1:
    - gpio-controller
    - '#gpio-cells'
  adi,gpio-on-adio2:
    - gpio-controller
    - '#gpio-cells'
  adi,gpio-on-adio3:
    - gpio-controller
    - '#gpio-cells'
  adi,gpio-on-adio4:
    - gpio-controller
    - '#gpio-cells'
  adi,external-fault-retry-enable:
    - adi,pgio4-func
  adi,external-fault-fet-off-enable:
    - adi,pgio4-func

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

allOf:
  - if:
      properties:
        adi,pgio1-func:
          const: gpio
      required:
        - adi,pgio1-func
    then:
      required:
        - gpio-controller
        - '#gpio-cells'

  - if:
      properties:
        adi,pgio2-func:
          const: gpio
      required:
        - adi,pgio2-func
    then:
      required:
        - gpio-controller
        - '#gpio-cells'

  - if:
      properties:
        adi,pgio3-func:
          const: gpio
      required:
        - adi,pgio3-func
    then:
      required:
        - gpio-controller
        - '#gpio-cells'

  - if:
      properties:
        adi,pgio4-func:
          const: gpio
      required:
        - adi,pgio4-func
    then:
      properties:
        adi,external-fault-retry-enable: false
        adi,external-fault-fet-off-enable: false
      required:
        - gpio-controller
        - '#gpio-cells'

additionalProperties: false

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

        swap-controller@15 {
            compatible = "adi,ltc4283";
            reg = <0x15>;

            adi,rsense-nano-ohms = <500>;
            adi,current-limit-sense-microvolt = <25000>;
            adi,current-limit-foldback-factor = <10>;
            adi,cooling-delay-ms = <8190>;
            adi,fet-bad-timer-delay-ms = <512>;

            adi,external-fault-fet-off-enable;
            adi,pgio4-func = "external_fault";

            adi,gpio-on-adio1;
            adi,pgio1-func = "gpio";
            gpio-controller;
            #gpio-cells = <2>;
        };
    };
...