xref: /freebsd/sys/contrib/device-tree/Bindings/hwmon/adi,ltc4282.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1*01950c46SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*01950c46SEmmanuel Vadot%YAML 1.2
3*01950c46SEmmanuel Vadot---
4*01950c46SEmmanuel Vadot$id: http://devicetree.org/schemas/hwmon/adi,ltc4282.yaml#
5*01950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*01950c46SEmmanuel Vadot
7*01950c46SEmmanuel Vadottitle: Analog Devices LTC4282 I2C High Current Hot Swap Controller over I2C
8*01950c46SEmmanuel Vadot
9*01950c46SEmmanuel Vadotmaintainers:
10*01950c46SEmmanuel Vadot  - Nuno Sa <nuno.sa@analog.com>
11*01950c46SEmmanuel Vadot
12*01950c46SEmmanuel Vadotdescription: |
13*01950c46SEmmanuel Vadot  Analog Devices LTC4282 I2C High Current Hot Swap Controller over I2C.
14*01950c46SEmmanuel Vadot
15*01950c46SEmmanuel Vadot  https://www.analog.com/media/en/technical-documentation/data-sheets/ltc4282.pdf
16*01950c46SEmmanuel Vadot
17*01950c46SEmmanuel Vadotproperties:
18*01950c46SEmmanuel Vadot  compatible:
19*01950c46SEmmanuel Vadot    enum:
20*01950c46SEmmanuel Vadot      - adi,ltc4282
21*01950c46SEmmanuel Vadot
22*01950c46SEmmanuel Vadot  reg:
23*01950c46SEmmanuel Vadot    maxItems: 1
24*01950c46SEmmanuel Vadot
25*01950c46SEmmanuel Vadot  vdd-supply: true
26*01950c46SEmmanuel Vadot
27*01950c46SEmmanuel Vadot  clocks:
28*01950c46SEmmanuel Vadot    maxItems: 1
29*01950c46SEmmanuel Vadot
30*01950c46SEmmanuel Vadot  '#clock-cells':
31*01950c46SEmmanuel Vadot    const: 0
32*01950c46SEmmanuel Vadot
33*01950c46SEmmanuel Vadot  adi,rsense-nano-ohms:
34*01950c46SEmmanuel Vadot    description: Value of the sense resistor.
35*01950c46SEmmanuel Vadot
36*01950c46SEmmanuel Vadot  adi,vin-mode-microvolt:
37*01950c46SEmmanuel Vadot    description:
38*01950c46SEmmanuel Vadot      Selects operating range for the Undervoltage, Overvoltage and Foldback
39*01950c46SEmmanuel Vadot      pins. Also for the ADC. Should be set to the nominal input voltage.
40*01950c46SEmmanuel Vadot    enum: [3300000, 5000000, 12000000, 24000000]
41*01950c46SEmmanuel Vadot    default: 12000000
42*01950c46SEmmanuel Vadot
43*01950c46SEmmanuel Vadot  adi,fet-bad-timeout-ms:
44*01950c46SEmmanuel Vadot    description:
45*01950c46SEmmanuel Vadot      From the moment a FET bad conditions is present, this property selects the
46*01950c46SEmmanuel Vadot      wait time/timeout for a FET-bad fault to be signaled. Setting this to 0,
47*01950c46SEmmanuel Vadot      disables FET bad faults to be reported.
48*01950c46SEmmanuel Vadot    default: 255
49*01950c46SEmmanuel Vadot    maximum: 255
50*01950c46SEmmanuel Vadot
51*01950c46SEmmanuel Vadot  adi,overvoltage-dividers:
52*01950c46SEmmanuel Vadot    description: |
53*01950c46SEmmanuel Vadot      Select which dividers to use for VDD Overvoltage detection. Note that
54*01950c46SEmmanuel Vadot      when the internal dividers are used the threshold is referenced to VDD.
55*01950c46SEmmanuel Vadot      The percentages in the datasheet are misleading since the actual values
56*01950c46SEmmanuel Vadot      to look for are in the "Absolute Maximum Ratings" table in the
57*01950c46SEmmanuel Vadot      "Comparator Inputs" section. In there there's a line for each of the 5%,
58*01950c46SEmmanuel Vadot      10% and 15% settings with the actual min, typical and max tolerances.
59*01950c46SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
60*01950c46SEmmanuel Vadot    enum: [external, vdd_5_percent, vdd_10_percent, vdd_15_percent]
61*01950c46SEmmanuel Vadot    default: external
62*01950c46SEmmanuel Vadot
63*01950c46SEmmanuel Vadot  adi,undervoltage-dividers:
64*01950c46SEmmanuel Vadot    description: |
65*01950c46SEmmanuel Vadot      Select which dividers to use for VDD Overvoltage detection. Note that
66*01950c46SEmmanuel Vadot      when the internal dividers are used the threshold is referenced to VDD.
67*01950c46SEmmanuel Vadot      The percentages in the datasheet are misleading since the actual values
68*01950c46SEmmanuel Vadot      to look for are in the "Absolute Maximum Ratings" table in the
69*01950c46SEmmanuel Vadot      "Comparator Inputs" section. In there there's a line for each of the 5%,
70*01950c46SEmmanuel Vadot      10% and 15% settings with the actual min, typical and max tolerances.
71*01950c46SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
72*01950c46SEmmanuel Vadot    enum: [external, vdd_5_percent, vdd_10_percent, vdd_15_percent]
73*01950c46SEmmanuel Vadot    default: external
74*01950c46SEmmanuel Vadot
75*01950c46SEmmanuel Vadot  adi,current-limit-sense-microvolt:
76*01950c46SEmmanuel Vadot    description:
77*01950c46SEmmanuel Vadot      The current limit sense voltage of the chip is adjustable between
78*01950c46SEmmanuel Vadot      12.5mV and 34.4mV in 3.1mV steps. This effectively limits the current
79*01950c46SEmmanuel Vadot      on the load.
80*01950c46SEmmanuel Vadot    enum: [12500, 15625, 18750, 21875, 25000, 28125, 31250, 34375]
81*01950c46SEmmanuel Vadot    default: 25000
82*01950c46SEmmanuel Vadot
83*01950c46SEmmanuel Vadot  adi,overcurrent-retry:
84*01950c46SEmmanuel Vadot    description:
85*01950c46SEmmanuel Vadot      If set, enables the chip to auto-retry 256 timer cycles after an
86*01950c46SEmmanuel Vadot      Overcurrent fault.
87*01950c46SEmmanuel Vadot    type: boolean
88*01950c46SEmmanuel Vadot
89*01950c46SEmmanuel Vadot  adi,overvoltage-retry-disable:
90*01950c46SEmmanuel Vadot    description:
91*01950c46SEmmanuel Vadot      If set, disables the chip to auto-retry 50ms after an Overvoltage fault.
92*01950c46SEmmanuel Vadot      It's enabled by default.
93*01950c46SEmmanuel Vadot    type: boolean
94*01950c46SEmmanuel Vadot
95*01950c46SEmmanuel Vadot  adi,undervoltage-retry-disable:
96*01950c46SEmmanuel Vadot    description:
97*01950c46SEmmanuel Vadot      If set, disables the chip to auto-retry 50ms after an Undervoltage fault.
98*01950c46SEmmanuel Vadot      It's enabled by default.
99*01950c46SEmmanuel Vadot    type: boolean
100*01950c46SEmmanuel Vadot
101*01950c46SEmmanuel Vadot  adi,fault-log-enable:
102*01950c46SEmmanuel Vadot    description:
103*01950c46SEmmanuel Vadot      If set, enables the FAULT_LOG and ADC_ALERT_LOG registers to be written
104*01950c46SEmmanuel Vadot      to the EEPROM when a fault bit transitions high and hence, will be
105*01950c46SEmmanuel Vadot      available after a power cycle (the chip loads the contents of
106*01950c46SEmmanuel Vadot      the EE_FAULT_LOG register - the one in EEPROM - into FAULT_LOG at boot).
107*01950c46SEmmanuel Vadot    type: boolean
108*01950c46SEmmanuel Vadot
109*01950c46SEmmanuel Vadot  adi,gpio1-mode:
110*01950c46SEmmanuel Vadot    description: Defines the function of the Pin. It can indicate that power is
111*01950c46SEmmanuel Vadot      good (PULL the pin low when power is not good) or that power is bad (Go
112*01950c46SEmmanuel Vadot      into high-z when power is not good).
113*01950c46SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
114*01950c46SEmmanuel Vadot    enum: [power_bad, power_good]
115*01950c46SEmmanuel Vadot    default: power_good
116*01950c46SEmmanuel Vadot
117*01950c46SEmmanuel Vadot  adi,gpio2-mode:
118*01950c46SEmmanuel Vadot    description: Defines the function of the Pin. It can be set as the input for
119*01950c46SEmmanuel Vadot      the ADC or indicating that the MOSFET is in stress (dissipating power).
120*01950c46SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
121*01950c46SEmmanuel Vadot    enum: [adc_input, stress_fet]
122*01950c46SEmmanuel Vadot    default: adc_input
123*01950c46SEmmanuel Vadot
124*01950c46SEmmanuel Vadot  adi,gpio3-monitor-enable:
125*01950c46SEmmanuel Vadot    description: If set, gpio3 is set as input for the ADC instead of gpio2.
126*01950c46SEmmanuel Vadot    type: boolean
127*01950c46SEmmanuel Vadot
128*01950c46SEmmanuel VadotallOf:
129*01950c46SEmmanuel Vadot  - if:
130*01950c46SEmmanuel Vadot      required:
131*01950c46SEmmanuel Vadot        - adi,gpio3-monitor-enable
132*01950c46SEmmanuel Vadot    then:
133*01950c46SEmmanuel Vadot      properties:
134*01950c46SEmmanuel Vadot        adi,gpio2-mode:
135*01950c46SEmmanuel Vadot          const: stress_fet
136*01950c46SEmmanuel Vadot
137*01950c46SEmmanuel Vadotrequired:
138*01950c46SEmmanuel Vadot  - compatible
139*01950c46SEmmanuel Vadot  - reg
140*01950c46SEmmanuel Vadot  - adi,rsense-nano-ohms
141*01950c46SEmmanuel Vadot
142*01950c46SEmmanuel VadotadditionalProperties: false
143*01950c46SEmmanuel Vadot
144*01950c46SEmmanuel Vadotexamples:
145*01950c46SEmmanuel Vadot  - |
146*01950c46SEmmanuel Vadot    i2c {
147*01950c46SEmmanuel Vadot        #address-cells = <1>;
148*01950c46SEmmanuel Vadot        #size-cells = <0>;
149*01950c46SEmmanuel Vadot
150*01950c46SEmmanuel Vadot        hwmon@50 {
151*01950c46SEmmanuel Vadot            compatible = "adi,ltc4282";
152*01950c46SEmmanuel Vadot            reg = <0x50>;
153*01950c46SEmmanuel Vadot            adi,rsense-nano-ohms = <500>;
154*01950c46SEmmanuel Vadot
155*01950c46SEmmanuel Vadot            adi,gpio1-mode = "power_good";
156*01950c46SEmmanuel Vadot            adi,gpio2-mode = "adc_input";
157*01950c46SEmmanuel Vadot        };
158*01950c46SEmmanuel Vadot    };
159*01950c46SEmmanuel Vadot...
160