PageRenderTime 19ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Documentation/devicetree/bindings/power/qpnp-fg.txt

https://gitlab.com/webhaikal/SenseiFerrari
Plain Text | 138 lines | 121 code | 17 blank | 0 comment | 0 complexity | ced79b4ffe9a7c4cf89af00fb9dba371 MD5 | raw file
  1QTI's QPNP PMIC Fuel Gauge Device
  2
  3QPNP PMIC FG provides interface to clients to read properties related
  4to the battery. Its main function is to retrieve the State of Charge (SOC),
  5a 0-100 percentage representing the amount of charge left in the battery.
  6
  7There are two required peripherals in the FG driver, both implemented as
  8subnodes in the example. These peripherals must not be disabled if the FG
  9device is to enabled:
 10
 11- qcom,fg-soc : The main FG device. Supports battery fuel gauge controls and
 12		sensors.
 13- qcom,fg-batt : The FG battery device supports interrupts and controls with
 14		respect to the state of the connected battery.For example: the
 15		peripheral informs the driver if the battery has been identified
 16		by the fuel gauge based on a given battery resistance range.
 17
 18Optionally ADC nodes can be added
 19- qcom,fg-adc-vbat : A subnode with a register address for the FG_ADC_USR
 20		peripheral which is used mainly for battery current limiting (BCL).
 21		This node maps out the VBAT reading register which allows to have
 22		a +/- 32 mV accurate reading of VBAT.
 23- qcom,fg-adc-ibat : A subnode with a register address for the FG_ADC_USR
 24		peripheral which is used mainly for battery current limiting (BCL).
 25		This node maps out the IBAT current reading register which allows
 26		to have a +/- 32 mA accurate reading of IBAT.
 27
 28Parent node required properties:
 29- compatible : should be "qcom,qpnp-fg" for the FG driver.
 30
 31Parent node optional properties:
 32- qcom,warm-bat-decidegc:		Warm battery temperature in decidegC.
 33- qcom,cool-bat-decidegc:		Cool battery temperature in decidegC.
 34- qcom,hot-bat-decidegc:		Hot battery temperature in decidegC.
 35- qcom,cold-bat-decidegc:		Cold battery temperature in decidegC.
 36- qcom,ext-sense-type:			Current sense channel used by the FG.
 37					Set this to use external rsense.
 38- qcom,thermal-coefficients:		Byte array of thermal coefficients for
 39					reading battery thermistor. This should
 40					be exactly 6 bytes in length.
 41					Example: [01 02 03 04 05 06]
 42- qcom,resume-soc:			soc to resume charging in percentage.
 43- qcom,use-otp-profile:			Specify this flag to avoid RAM loading
 44					any battery profile.
 45
 46qcom,fg-soc node required properties:
 47- reg : offset and length of the PMIC peripheral register map.
 48- interrupts : the interrupt mappings.
 49		The format should be
 50		<slave-id peripheral-id interrupt-number>.
 51- interrupt-names : names for the mapped fg soc interrupts
 52		The following interrupts are required:
 53		0: high-soc
 54		1: low-soc
 55		2: full-soc
 56		3: empty-soc
 57		4: delta-soc
 58		5: first-est-done
 59		6: sw-fallbk-ocv
 60		7: sw-fallbk-new-battrt-sts
 61
 62qcom,fg-memif node required properties:
 63- reg : offset and length of the PMIC peripheral register map.
 64- interrupts : the interrupt mappings.
 65		The format should be
 66		<slave-id peripheral-id interrupt-number>.
 67- interrupt-names : names for the mapped fg adc interrupts
 68		The following interrupts are required:
 69		0: mem-avail
 70
 71Example:
 72pmi8994_fg: qcom,fg {
 73	spmi-dev-container;
 74	compatible = "qcom,qpnp-fg";
 75	#address-cells = <1>;
 76	#size-cells = <1>;
 77	status = "disabled";
 78
 79	qcom,fg-soc@4000 {
 80		reg = <0x4000 0x100>;
 81		interrupts =	<0x2 0x40 0x0>,
 82				<0x2 0x40 0x1>,
 83				<0x2 0x40 0x2>,
 84				<0x2 0x40 0x3>,
 85				<0x2 0x40 0x4>,
 86				<0x2 0x40 0x5>,
 87				<0x2 0x40 0x6>,
 88				<0x2 0x40 0x7>;
 89
 90		interrupt-names =	"high-soc",
 91					"low-soc",
 92					"full-soc",
 93					"empty-soc",
 94					"delta-soc",
 95					"first-est-done",
 96					"sw-fallbk-ocv",
 97					"sw-fallbk-new-battrt-sts",
 98					"fg-soc-irq-count";
 99	};
100
101	qcom,fg-batt@4100 {
102		reg = <0x4100 0x100>;
103		interrupts =	<0x2 0x41 0x0>,
104				<0x2 0x41 0x1>,
105				<0x2 0x41 0x2>,
106				<0x2 0x41 0x3>,
107				<0x2 0x41 0x4>,
108				<0x2 0x41 0x5>,
109				<0x2 0x41 0x6>,
110				<0x2 0x41 0x7>;
111
112		interrupt-names =	"soft-cold",
113					"soft-hot",
114					"vbatt-low",
115					"batt-ided",
116					"batt-id-req",
117					"batt-unknown",
118					"batt-missing",
119					"batt-match";
120	};
121
122	qcom,fg-adc-vbat@4254 {
123		reg = <0x4254 0x1>;
124	};
125
126	qcom,fg-adc-ibat@4255 {
127		reg = <0x4255 0x1>;
128	};
129
130	qcom,fg-memif@4400 {
131		reg = <0x4400 0x100>;
132		interrupts =	<0x2 0x44 0x0>,
133				<0x2 0x44 0x1>;
134
135		interrupt-names =	"mem-avail",
136					"data-rcvry-sug";
137	};
138};