1 DT binding document for INA3221 iio/meter driver.
4 - compatible: Must be "ti,ina3221x".
5 - reg: I2C slave address of device.
7 - ti,trigger-config: Trigger configuration for the device in trigger mode.
8 - ti,continuous-config: Device configuration in continuous mode. In this mode
9 device will keep scanning the inputs.
10 - address-cells: Number of address in child node. Must be 1.
11 - size-cells: Size of address cell. Must be 0.
14 Device has 3 input channels and channel specific information
15 is provided through the child node. Each channel will have different child
16 node. The channel number is identified by the reg properties on each of node.
17 Required subnode properties:
18 - reg: channel number. 0 for channel 0, 1 for channel 1 and 2 for channel 2.
19 - ti,rail-mae: Name of the channel in string.
21 Optional subnode properties:
22 - ti,current-warning-limit-ma: Cureent warning limit for the given channel.
23 - ti,current-critical-limit-ma: Current critical limit for the given channel.
24 - ti,shunt-resistor-mohm: Shunt register in milli ohm.
26 IIO channel properties:
27 It follows same mechanism for iio properties detailed on ../iio-bindings.txt
28 The iio cells size must be 1.
29 #io-channel-cells = <1>;
30 The ina3221 driver provides following monitoring:
31 voltage, current, current_trigger, power, power_trigger.
32 The sequence of index assigned in drivers are:
33 voltage, current, current_trigger, power, power_trigger
34 The above monitoring is provided for channel 0, 1 and 2.
36 in_voltage0_input, in_current0_input, in_current0_trigger_input
37 in_power0_input, in_power0_trigger_input
38 in_voltage1_input, in_current1_input, in_current1_trigger_input,
39 in_power1_input, in_power1_trigger_input
40 in_voltage2_input, in_current2_input, in_current2_trigger_input,
41 in_power2_input,in_power2_trigger_input
42 The channel index are in above sequence starting from 0.
44 To ease the DT entry, the macros are added in header dt-bindings/iio/meter/ina3221x.h
45 The Voltage/current/power macros are defines and can be use with INA3221_CHAN_INDEX to
47 Example: For Channel 0, normal power it is INA3221_CHAN_INDEX(0, POWER, NORMAL)
48 for channel 2, normal current it is INA3221_CHAN_INDEX(2, CURRENT, NORMAL).
50 The typical macro for voltage/current and powers are:
51 INA3221_VOLTAGE, INA3221_CURRENT, INA3221_POWER
52 The typical macro for normal/trigger are INA3221_NORMAL and INA3221_TRIGGER.
54 The INA3221_CHAN_INDEX defined as:
55 #define INA3221_CHAN_INDEX(chan, type, add) (chan * 5 + INA3221_##type + INA3221_##add)
59 compatible = "ti,ina3221x";
61 ti,trigger-config = <0x7003>;
62 ti,continuous-config = <0x7c07>;
65 #io-channel-cells = <1>;
69 ti,rail-name = "VDD_BAT";
70 ti,current-warning-limit-ma = <8000>;
71 ti,current-critical-limit-ma = <9000>;
72 ti,shunt-resistor-mohm = <1>;
77 ti,rail-name = "VDD_CPU";
78 ti,shunt-resistor-mohm = <1>;
83 ti,rail-name = "VDD_GPU";
84 ti,shunt-resistor-mohm = <1>;
90 io-channels = <&ina3221x INA3221_CHAN_INDEX(0, CURRENT, NORMAL)>;
91 io-channel-names = "battery-current"