xref: /linux/Documentation/devicetree/bindings/hwmon/adi,ltc4283.yaml (revision 9611c0ce215a66770ccbe5c126bf57ba8c31bcad)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/hwmon/adi,ltc4283.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: LTC4283 Negative Voltage Hot Swap Controller
8
9maintainers:
10  - Nuno Sá <nuno.sa@analog.com>
11
12description: |
13  The LTC4283 negative voltage hot swap controller drives an external N-channel
14  MOSFET to allow a board to be safely inserted and removed from a live
15  backplane.
16
17  https://www.analog.com/media/en/technical-documentation/data-sheets/ltc4283.pdf
18
19properties:
20  compatible:
21    enum:
22      - adi,ltc4283
23
24  reg:
25    maxItems: 1
26
27  adi,rsense-nano-ohms:
28    description: Value of the sense resistor.
29
30  adi,current-limit-sense-microvolt:
31    description:
32      The current limit sense voltage of the chip is adjustable between
33      15mV and 30mV in 1mV steps. This effectively limits the current
34      on the load.
35    minimum: 15000
36    maximum: 30000
37    default: 15000
38
39  adi,current-limit-foldback-factor:
40    description:
41      Specifies the foldback factor for the current limit. The current limit
42      can be reduced (folded back) to one of four preset levels. The value
43      represents the percentage of the current limit sense voltage to use
44      during foldback. A value of 100 means no foldback.
45    $ref: /schemas/types.yaml#/definitions/uint32
46    enum: [10, 20, 50, 100]
47    default: 100
48
49  adi,cooling-delay-ms:
50    description:
51      Cooling time to apply after an overcurrent fault, FET bad or
52      external fault.
53    enum: [512, 1002, 2005, 4100, 8190, 16400, 32800, 65600]
54    default: 512
55
56  adi,fet-bad-timer-delay-ms:
57    description:
58      FET bad timer delay. After a FET bad status condition is detected,
59      this timer is started. If the condition persists for the
60      specified time, the FET is turned off and a fault is logged.
61    enum: [256, 512, 1002, 2005]
62    default: 256
63
64  adi,power-good-reset-on-fet:
65    description:
66      If set, resets the power good status when the MOSFET is turned off.
67      Otherwise, it resets when a low output voltage is detected.
68    type: boolean
69
70  adi,fet-turn-off-disable:
71    description:
72      If set, the MOSFET is not turned off when a FET fault is detected.
73    type: boolean
74
75  adi,tmr-pull-down-disable:
76    description: Disables 2uA pull-down current on the TMR pin.
77    type: boolean
78
79  adi,dvdt-inrush-control-disable:
80    description:
81      Disables dV/dt inrush control during startup. In dV/dt mode, the inrush
82      current is limited by controlling a constant output voltage ramp rate.
83      When disabled, the inrush control mechanism is active current limiting.
84    type: boolean
85
86  adi,fault-log-enable:
87    description:
88      If set, enables logging fault registers and ADC data into EEPROM upon a
89      fault.
90    type: boolean
91
92  adi,vpower-drns-enable:
93    description:
94      If set, enables the attenuated MOSFET drain voltage to be monitored. This
95      effectively means that the MOSFET power is monitored. If not set, the
96      attenuated input voltage (and hence input power) is monitored.
97    type: boolean
98
99  adi,external-fault-fet-off-enable:
100    description: Turns MOSFET off following an external fault.
101    type: boolean
102
103  adi,undervoltage-retry-disable:
104    description: Do not retry to turn on the MOSFET after an undervoltage fault.
105    type: boolean
106
107  adi,overvoltage-retry-disable:
108    description: Do not retry to turn on the MOSFET after an overvoltage fault.
109    type: boolean
110
111  adi,external-fault-retry-enable:
112    description: Retry to turn on the MOSFET after an external fault.
113    type: boolean
114
115  adi,overcurrent-retries:
116    description: Configures auto-retry following an Overcurrent fault.
117    $ref: /schemas/types.yaml#/definitions/string
118    enum: [latch-off, "1", "7", unlimited]
119    default: latch-off
120
121  adi,fet-bad-retries:
122    description:
123      Configures auto-retry following a FET bad fault and a consequent MOSFET
124      turn off.
125    $ref: /schemas/types.yaml#/definitions/string
126    enum: [latch-off, "1", "7", unlimited]
127    default: latch-off
128
129  adi,pgio1-func:
130    description: Configures the function of the PGIO1 pin.
131    $ref: /schemas/types.yaml#/definitions/string
132    enum: [inverted_power_good, power_good, gpio]
133    default: inverted_power_good
134
135  adi,pgio2-func:
136    description: Configures the function of the PGIO2 pin.
137    $ref: /schemas/types.yaml#/definitions/string
138    enum: [inverted_power_good, power_good, gpio, active_current_limiting]
139    default: inverted_power_good
140
141  adi,pgio3-func:
142    description: Configures the function of the PGIO3 pin.
143    $ref: /schemas/types.yaml#/definitions/string
144    enum: [inverted_power_good_input, power_good_input, gpio]
145    default: inverted_power_good_input
146
147  adi,pgio4-func:
148    description: Configures the function of the PGIO4 pin.
149    $ref: /schemas/types.yaml#/definitions/string
150    enum: [inverted_external_fault, external_fault, gpio]
151    default: inverted_external_fault
152
153  adi,gpio-on-adio1:
154    description: If set, the ADIO1 pin is used as a GPIO.
155    type: boolean
156
157  adi,gpio-on-adio2:
158    description: If set, the ADIO2 pin is used as a GPIO.
159    type: boolean
160
161  adi,gpio-on-adio3:
162    description: If set, the ADIO3 pin is used as a GPIO.
163    type: boolean
164
165  adi,gpio-on-adio4:
166    description: If set, the ADIO4 pin is used as a GPIO.
167    type: boolean
168
169  gpio-controller: true
170
171  '#gpio-cells':
172    const: 2
173
174dependencies:
175  adi,gpio-on-adio1:
176    - gpio-controller
177    - '#gpio-cells'
178  adi,gpio-on-adio2:
179    - gpio-controller
180    - '#gpio-cells'
181  adi,gpio-on-adio3:
182    - gpio-controller
183    - '#gpio-cells'
184  adi,gpio-on-adio4:
185    - gpio-controller
186    - '#gpio-cells'
187  adi,external-fault-retry-enable:
188    - adi,pgio4-func
189  adi,external-fault-fet-off-enable:
190    - adi,pgio4-func
191
192required:
193  - compatible
194  - reg
195  - adi,rsense-nano-ohms
196
197allOf:
198  - if:
199      properties:
200        adi,pgio1-func:
201          const: gpio
202      required:
203        - adi,pgio1-func
204    then:
205      required:
206        - gpio-controller
207        - '#gpio-cells'
208
209  - if:
210      properties:
211        adi,pgio2-func:
212          const: gpio
213      required:
214        - adi,pgio2-func
215    then:
216      required:
217        - gpio-controller
218        - '#gpio-cells'
219
220  - if:
221      properties:
222        adi,pgio3-func:
223          const: gpio
224      required:
225        - adi,pgio3-func
226    then:
227      required:
228        - gpio-controller
229        - '#gpio-cells'
230
231  - if:
232      properties:
233        adi,pgio4-func:
234          const: gpio
235      required:
236        - adi,pgio4-func
237    then:
238      properties:
239        adi,external-fault-retry-enable: false
240        adi,external-fault-fet-off-enable: false
241      required:
242        - gpio-controller
243        - '#gpio-cells'
244
245additionalProperties: false
246
247examples:
248  - |
249    i2c {
250        #address-cells = <1>;
251        #size-cells = <0>;
252
253        swap-controller@15 {
254            compatible = "adi,ltc4283";
255            reg = <0x15>;
256
257            adi,rsense-nano-ohms = <500>;
258            adi,current-limit-sense-microvolt = <25000>;
259            adi,current-limit-foldback-factor = <10>;
260            adi,cooling-delay-ms = <8190>;
261            adi,fet-bad-timer-delay-ms = <512>;
262
263            adi,external-fault-fet-off-enable;
264            adi,pgio4-func = "external_fault";
265
266            adi,gpio-on-adio1;
267            adi,pgio1-func = "gpio";
268            gpio-controller;
269            #gpio-cells = <2>;
270        };
271    };
272...
273