Add DT binding documentation for qpnp-qg Qguage device. Change-Id: I5b68e4b12f86bc2953d1369ff51d28aed26752b9 Signed-off-by: Aryan Modi <quic_aryamodi@quicinc.com>
188 lines
5.2 KiB
YAML
188 lines
5.2 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/power/supply/qcom/qpnp-qg.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Qualcomm Technologies, Inc. QPNP PMIC QGAUGE (QG) Device
|
|
|
|
maintainers:
|
|
- Rakesh Kota <quic_kotarake@quicinc.com>
|
|
- Jishnu Prakash <quic_jprakash@quicinc.com>
|
|
- Kamal Wadhwa <quic_kamalw@quicinc.com>
|
|
|
|
description: |
|
|
QPNP PMIC QGAUGE device provides the ability to gauge the State-of-Charge
|
|
of the battery. It provides an interface to the clients to read various
|
|
battery related parameters.
|
|
|
|
Required Node Structure: |
|
|
Qgauge device must be described in two level of nodes. The first level
|
|
describes the properties of the Qgauge device and the second level
|
|
describes the peripherals managed/used of the module.
|
|
|
|
properties:
|
|
compatible:
|
|
enum:
|
|
- qcom,pm6150-qg
|
|
- qcom,qpnp-qg-lite
|
|
- qcom,pmi632-qg
|
|
- qcom,pm7250b-qg
|
|
|
|
"#address-cells":
|
|
const: 1
|
|
|
|
"#size-cells":
|
|
const: 0
|
|
|
|
"#io-channel-cells":
|
|
const: 1
|
|
|
|
qcom,vbatt-cutoff-mv:
|
|
description: |
|
|
The battery voltage threshold (in mV) at which the
|
|
the Qgauge algorithm converges to 0 SOC. If not specified
|
|
the default value is 3400 mV.
|
|
|
|
qcom,vbatt-low-mv:
|
|
description: |
|
|
The battery voltage threshold (in mV) at which the
|
|
the VBAT_LOW interrupt fires. Software can take necessary
|
|
the action when this interrupt fires. If not specified
|
|
the default value is 3500 mV.
|
|
|
|
qcom,vbatt-low-cold-mv:
|
|
description: |
|
|
The battery voltage threshold (in mV) at which the
|
|
the VBAT_LOW interrupt fires. The threshold is only
|
|
applied at cold temperature specified by
|
|
'qcom,cold-temp-threshold'. Software can take necessary
|
|
the action when this interrupt fires. If not specified
|
|
the default value is 3800 mV.
|
|
|
|
qcom,vbatt-empty-mv:
|
|
description: |
|
|
The battery voltage threshold (in mV) at which the
|
|
vbatt-empty interrupt fires. The SOC is forced to 0
|
|
when this interrupt fires. If not specified, the
|
|
default value is 3200 mV.
|
|
|
|
qcom,vbatt-empty-cold-mv:
|
|
description: |
|
|
The battery voltage threshold (in mV) at which the
|
|
vbatt-empty interrupt fires. This threshold is only
|
|
applied at cold temperature specified by
|
|
'qcom,cold-temp-threshold'. The SOC is forced to 0
|
|
when this interrupt fires. If not specified, the
|
|
default value is 3000 mV.
|
|
|
|
qcom,s3-entry-fifo-length:
|
|
description: |
|
|
The minimum number if FIFO samples which have to qualify the
|
|
S3 IBAT entry threshold (qcom,s3-entry-ibat-ua) for QG
|
|
to enter into S3 state.
|
|
Minimum Value = 1 Maximum Value = 8. The hardware default
|
|
is configured to 3.
|
|
|
|
io-channels:
|
|
description: |
|
|
IIO channel specifiers for each name in io-channel-names.
|
|
|
|
io-channel-names:
|
|
description: |
|
|
Names of the IIO channels that are used by QG device.
|
|
|
|
additionalProperties: false
|
|
|
|
required:
|
|
- compatible
|
|
- io-channels
|
|
- io-channel-names
|
|
|
|
patternProperties:
|
|
"^qcom,qgauge@[0-9a-f].*$":
|
|
type: object
|
|
|
|
properties:
|
|
reg:
|
|
description: Addresses and sizes for the specified peripheral.
|
|
|
|
interrupts:
|
|
description: Interrupt mapping as per the interrupt encoding.
|
|
|
|
interrupt-names:
|
|
description: |
|
|
Interrupt names. This list must match up 1-to-1 with the
|
|
interrupts specified in the 'interrupts' property.
|
|
|
|
required:
|
|
- reg
|
|
- interrupts
|
|
- interrupt-names
|
|
|
|
additionalProperties: false
|
|
|
|
"^qcom,qg-sdam@[0-9a-f].*$":
|
|
type: object
|
|
|
|
properties:
|
|
reg:
|
|
description: Addresses and sizes for the specified peripheral.
|
|
|
|
required:
|
|
- reg
|
|
|
|
additionalProperties: false
|
|
|
|
examples:
|
|
- |
|
|
qpnp,qg {
|
|
compatible = "qcom,pm6150-qg";
|
|
depends-on-supply = <&pm6150_vadc>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
#io-channel-cells = <1>;
|
|
|
|
qcom,vbatt-cutoff-mv = <3200>;
|
|
qcom,vbatt-low-mv = <3300>;
|
|
qcom,vbatt-low-cold-mv = <3700>;
|
|
qcom,vbatt-empty-mv = <3000>;
|
|
qcom,vbatt-empty-cold-mv = <3000>;
|
|
qcom,s3-entry-fifo-length = <2>;
|
|
|
|
io-channels = <&pm6150_vadc ADC5_BAT_THERM_100K_PU>,
|
|
<&pm6150_vadc ADC5_BAT_ID_100K_PU>,
|
|
<&pm6150_charger PSY_IIO_INPUT_CURRENT_LIMITED>,
|
|
<&pm6150_charger PSY_IIO_RECHARGE_SOC>,
|
|
<&pm6150_charger PSY_IIO_FORCE_RECHARGE>,
|
|
<&pm6150_charger PSY_IIO_CHARGE_DONE>;
|
|
io-channel-names = "batt-therm",
|
|
"batt-id",
|
|
"input_current_limited",
|
|
"recharge_soc",
|
|
"force_recharge",
|
|
"charge_done";
|
|
|
|
qcom,qgauge@4800 {
|
|
status = "okay";
|
|
reg = <0x4800>;
|
|
interrupts =
|
|
<0x0 0x48 0x0 IRQ_TYPE_EDGE_BOTH>,
|
|
<0x0 0x48 0x1 IRQ_TYPE_EDGE_BOTH>,
|
|
<0x0 0x48 0x2 IRQ_TYPE_EDGE_RISING>,
|
|
<0x0 0x48 0x3 IRQ_TYPE_EDGE_RISING>,
|
|
<0x0 0x48 0x4 IRQ_TYPE_EDGE_RISING>;
|
|
interrupt-names = "qg-batt-missing",
|
|
"qg-vbat-low",
|
|
"qg-vbat-empty",
|
|
"qg-fifo-done",
|
|
"qg-good-ocv";
|
|
};
|
|
|
|
qcom,qg-sdam@b600 {
|
|
status = "okay";
|
|
reg = <0xb600>;
|
|
};
|
|
};
|
|
...
|