mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
power supply and reset changes for the v4.4 series
* new AXP20X USB Power driver * new Qualcomm SMBB driver * new TPS65217 Charger driver * BQ24257: add BQ24250/BQ24251 support * overhaul bq27x00 battery driver, rename to bq27xxx * misc. fixes and cleanups -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCgAGBQJWOn8oAAoJENju1/PIO/qahrEP/RPHXvTxtYv8YvhaFbqcr07x 11gRB8RRthKK5woC3s70QKlMtcHijFeCwKuacut+7tfgK2oZDIm+Bd43Pl93aypU Yk4oTwop5OyrLsGIGiTIPPV9HTwr4q69Or2Q91mqUAUe2wGB5uCuJiJmCowUwfZs piv+ISLSOcH+i1bTx3hQ7h7axsdAlaSz2o1JprZaxm3rM67M8zF1ZHSK7wlpAeBa DiDrtUvEDCeLL8dmCA9xkFV4yFB9T+KNh0730N2RY+zlZS6WjSpzryqwsUWWyQ6h U9gFgcs+DjVaGHuMsIX2zm7xXfXHgUBtXdSQoCBhpSrZsdufMsT/8VQqVZ0yqpXL pQ2EXy63k6tXnXEyAKTA0tAOX/WZNfmmNblkea4JiyZULn7b/WH09waMZUBJqe84 Yn3SatVdGDN4nawsivzdiM3zR9/WTE9R3DmEeAE+g1RRsSraNwWlkzpDXcmnWmbc DoprnjLsDJfqL3/1ysF2V2I4B26Bws73qq6UUjJ4KEGWf8Y1fVawxrbcYmnrvg1K zW/saEgtl70FYqtee/0lIqTpjOZRX/O6QH5i8p7VC8cUzftX0Twc8MvfvpamDywX Cr1Y7pIMEhc6TFUP5lOzx9xJelA5PHJMpAT+02fh6YXMAzCcBUzL113rY5zBrVVl gce0iHDKAybmvww77z1r =0be4 -----END PGP SIGNATURE----- Merge tag 'for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - new AXP20X USB Power driver - new Qualcomm SMBB driver - new TPS65217 Charger driver - BQ24257: add BQ24250/BQ24251 support - overhaul bq27x00 battery driver, rename to bq27xxx - misc fixes and cleanups * tag 'for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (54 commits) power: bq27xxx_battery: Remove unneeded dependency in Kconfig power: bq27xxx_battery: move irq handler to i2c section power: bq27xxx_battery: fix platform probe twl4030_charger: add missing iio dependency power_supply: charger-manager: add missing of_node_put Documentation: power: bq24257: Document exported sysfs entries power: bq24257: Add various device-specific sysfs properties power: bq24257: Allow input current limit sysfs access power: bq24257: Add input DPM voltage threshold setting support power: bq24257: Add over voltage protection setting support power: bq24257: Add SW-based approach for Power Good determination power: bq24257: Allow manual setting of input current limit power: bq24257: Add bit definition for temp sense enable power: bq24257: Add basic support for bq24250/bq24251 dt: power: bq24257-charger: Cover additional devices power: bq24257: Simplify bq24257_power_supply_init() power: bq24257: Use managed power supply register power: bq24257: Streamline input current limit setup power: bq24257: Remove IRQ config through stat-gpios power: bq27xxx_battery: fix signedness bug in bq27xxx_battery_read_health() ...
This commit is contained in:
commit
400c5bd5a5
39 changed files with 3818 additions and 1474 deletions
|
|
@ -1,21 +1,64 @@
|
|||
Binding for TI bq24257 Li-Ion Charger
|
||||
Binding for TI bq24250/bq24251/bq24257 Li-Ion Charger
|
||||
|
||||
Required properties:
|
||||
- compatible: Should contain one of the following:
|
||||
* "ti,bq24250"
|
||||
* "ti,bq24251"
|
||||
* "ti,bq24257"
|
||||
- reg: integer, i2c address of the device.
|
||||
- reg: integer, i2c address of the device.
|
||||
- interrupt-parent: Should be the phandle for the interrupt controller. Use in
|
||||
conjunction with "interrupts".
|
||||
- interrupts: Interrupt mapping for GPIO IRQ (configure for both edges). Use in
|
||||
conjunction with "interrupt-parent".
|
||||
- ti,battery-regulation-voltage: integer, maximum charging voltage in uV.
|
||||
- ti,charge-current: integer, maximum charging current in uA.
|
||||
- ti,termination-current: integer, charge will be terminated when current in
|
||||
constant-voltage phase drops below this value (in uA).
|
||||
- ti,charge-current: integer, maximum charging current in uA.
|
||||
- ti,termination-current: integer, charge will be terminated when current in
|
||||
constant-voltage phase drops below this value (in uA).
|
||||
|
||||
Optional properties:
|
||||
- pg-gpios: GPIO used for connecting the bq2425x device PG (Power Good) pin.
|
||||
This pin is not available on all devices however it should be used if
|
||||
possible as this is the recommended way to obtain the charger's input PG
|
||||
state. If this pin is not specified a software-based approach for PG
|
||||
detection is used.
|
||||
- ti,current-limit: The maximum current to be drawn from the charger's input
|
||||
(in uA). If this property is not specified, the input limit current is
|
||||
set automatically using USB D+/D- signal based charger type detection.
|
||||
If the hardware does not support the D+/D- based detection, a default
|
||||
of 500,000 is used (=500mA) instead.
|
||||
- ti,ovp-voltage: Configures the over voltage protection voltage (in uV). If
|
||||
not specified a default of 6,5000,000 (=6.5V) is used.
|
||||
- ti,in-dpm-voltage: Configures the threshold input voltage for the dynamic
|
||||
power path management (in uV). If not specified a default of 4,360,000
|
||||
(=4.36V) is used.
|
||||
|
||||
Example:
|
||||
|
||||
bq24257 {
|
||||
compatible = "ti,bq24257";
|
||||
reg = <0x6a>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <16 IRQ_TYPE_EDGE_BOTH>;
|
||||
|
||||
pg-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
ti,battery-regulation-voltage = <4200000>;
|
||||
ti,charge-current = <1000000>;
|
||||
ti,termination-current = <50000>;
|
||||
};
|
||||
|
||||
Example:
|
||||
|
||||
bq24250 {
|
||||
compatible = "ti,bq24250";
|
||||
reg = <0x6a>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <16 IRQ_TYPE_EDGE_BOTH>;
|
||||
|
||||
ti,battery-regulation-voltage = <4200000>;
|
||||
ti,charge-current = <500000>;
|
||||
ti,termination-current = <50000>;
|
||||
ti,current-limit = <900000>;
|
||||
ti,ovp-voltage = <9500000>;
|
||||
ti,in-dpm-voltage = <4440000>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
AXP20x USB power supply
|
||||
|
||||
Required Properties:
|
||||
-compatible: "x-powers,axp202-usb-power-supply"
|
||||
|
||||
This node is a subnode of the axp20x PMIC.
|
||||
|
||||
Example:
|
||||
|
||||
axp209: pmic@34 {
|
||||
compatible = "x-powers,axp209";
|
||||
reg = <0x34>;
|
||||
interrupt-parent = <&nmi_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
||||
regulators {
|
||||
x-powers,dcdc-freq = <1500>;
|
||||
|
||||
vdd_cpu: dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1450000>;
|
||||
regulator-name = "vdd-cpu";
|
||||
};
|
||||
|
||||
...
|
||||
};
|
||||
|
||||
usb-power-supply: usb-power-supply {
|
||||
compatible = "x-powers,axp202-usb-power-supply";
|
||||
};
|
||||
};
|
||||
131
Documentation/devicetree/bindings/power_supply/qcom_smbb.txt
Normal file
131
Documentation/devicetree/bindings/power_supply/qcom_smbb.txt
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
Qualcomm Switch-Mode Battery Charger and Boost
|
||||
|
||||
PROPERTIES
|
||||
- compatible:
|
||||
Usage: required
|
||||
Value type: <stringlist>
|
||||
Description: Must be one of:
|
||||
- "qcom,pm8941-charger"
|
||||
|
||||
- reg:
|
||||
Usage: required
|
||||
Value type: <prop-encoded-array>
|
||||
Description: Base address of registers for SMBB block
|
||||
|
||||
- interrupts:
|
||||
Usage: required
|
||||
Value type: <prop-encoded-array>
|
||||
Description: The format of the specifier is defined by the binding document
|
||||
describing the node's interrupt parent. Must contain one
|
||||
specifier for each of the following interrupts, in order:
|
||||
- charge done
|
||||
- charge fast mode
|
||||
- charge trickle mode
|
||||
- battery temperature ok
|
||||
- battery present
|
||||
- charger disconnected
|
||||
- USB-in valid
|
||||
- DC-in valid
|
||||
|
||||
- interrupt-names:
|
||||
Usage: required
|
||||
Value type: <stringlist>
|
||||
Description: Must contain the following list, strictly ordered:
|
||||
"chg-done",
|
||||
"chg-fast",
|
||||
"chg-trkl",
|
||||
"bat-temp-ok",
|
||||
"bat-present",
|
||||
"chg-gone",
|
||||
"usb-valid",
|
||||
"dc-valid"
|
||||
|
||||
- qcom,fast-charge-current-limit:
|
||||
Usage: optional (default: 1A, or pre-configured value)
|
||||
Value type: <u32>; uA; range [100mA : 3A]
|
||||
Description: Maximum charge current; May be clamped to safety limits.
|
||||
|
||||
- qcom,fast-charge-low-threshold-voltage:
|
||||
Usage: optional (default: 3.2V, or pre-configured value)
|
||||
Value type: <u32>; uV; range [2.1V : 3.6V]
|
||||
Description: Battery voltage limit above which fast charging may operate;
|
||||
Below this value linear or switch-mode auto-trickle-charging
|
||||
will operate.
|
||||
|
||||
- qcom,fast-charge-high-threshold-voltage:
|
||||
Usage: optional (default: 4.2V, or pre-configured value)
|
||||
Value type: <u32>; uV; range [3.24V : 5V]
|
||||
Description: Battery voltage limit below which fast charging may operate;
|
||||
The fast charger will attempt to charge the battery to this
|
||||
voltage. May be clamped to safety limits.
|
||||
|
||||
- qcom,fast-charge-safe-voltage:
|
||||
Usage: optional (default: 4.2V, or pre-configured value)
|
||||
Value type: <u32>; uV; range [3.24V : 5V]
|
||||
Description: Maximum safe battery voltage; May be pre-set by bootloader, in
|
||||
which case, setting this will harmlessly fail. The property
|
||||
'fast-charge-high-watermark' will be clamped by this value.
|
||||
|
||||
- qcom,fast-charge-safe-current:
|
||||
Usage: optional (default: 1A, or pre-configured value)
|
||||
Value type: <u32>; uA; range [100mA : 3A]
|
||||
Description: Maximum safe battery charge current; May pre-set by bootloader,
|
||||
in which case, setting this will harmlessly fail. The property
|
||||
'qcom,fast-charge-current-limit' will be clamped by this value.
|
||||
|
||||
- qcom,auto-recharge-threshold-voltage:
|
||||
Usage: optional (default: 4.1V, or pre-configured value)
|
||||
Value type: <u32>; uV; range [3.24V : 5V]
|
||||
Description: Battery voltage limit below which auto-recharge functionality
|
||||
will restart charging after end-of-charge; The high cutoff
|
||||
limit for auto-recharge is 5% above this value.
|
||||
|
||||
- qcom,minimum-input-voltage:
|
||||
Usage: optional (default: 4.3V, or pre-configured value)
|
||||
Value type: <u32>; uV; range [4.2V : 9.6V]
|
||||
Description: Input voltage level above which charging may operate
|
||||
|
||||
- qcom,dc-current-limit:
|
||||
Usage: optional (default: 100mA, or pre-configured value)
|
||||
Value type: <u32>; uA; range [100mA : 2.5A]
|
||||
Description: Default DC charge current limit
|
||||
|
||||
- qcom,disable-dc:
|
||||
Usage: optional (default: false)
|
||||
Value type: boolean: <u32> or <empty>
|
||||
Description: Disable DC charger
|
||||
|
||||
- qcom,jeita-extended-temp-range:
|
||||
Usage: optional (default: false)
|
||||
Value type: boolean: <u32> or <empty>
|
||||
Description: Enable JEITA extended temperature range; This does *not*
|
||||
adjust the maximum charge voltage or current in the extended
|
||||
temperature range. It only allows charging when the battery
|
||||
is in the extended temperature range. Voltage/current
|
||||
regulation must be done externally to fully comply with
|
||||
the JEITA safety guidelines if this flag is set.
|
||||
|
||||
EXAMPLE
|
||||
charger@1000 {
|
||||
compatible = "qcom,pm8941-charger";
|
||||
reg = <0x1000 0x700>;
|
||||
interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
|
||||
interrupt-names = "chg-done",
|
||||
"chg-fast",
|
||||
"chg-trkl",
|
||||
"bat-temp-ok",
|
||||
"bat-present",
|
||||
"chg-gone",
|
||||
"usb-valid",
|
||||
"dc-valid";
|
||||
|
||||
qcom,fast-charge-current-limit = <1000000>;
|
||||
qcom,dc-charge-current-limit = <1000000>;
|
||||
};
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
TPS65217 Charger
|
||||
|
||||
Required Properties:
|
||||
-compatible: "ti,tps65217-charger"
|
||||
|
||||
This node is a subnode of the tps65217 PMIC.
|
||||
|
||||
Example:
|
||||
|
||||
tps65217-charger {
|
||||
compatible = "ti,tps65090-charger";
|
||||
};
|
||||
Loading…
Reference in a new issue