diff options
author | Linus Torvalds | 2015-11-05 12:28:15 -0800 |
---|---|---|
committer | Linus Torvalds | 2015-11-05 12:28:15 -0800 |
commit | 400c5bd5a5b1faf3089322ace58b974446a8ddc3 (patch) | |
tree | 78594fc5e426c68b322adc11bd62a417267811eb /Documentation | |
parent | 9bd9fa6c147e68fc4dc3b35893979720ba7d0321 (diff) | |
parent | 6bd03ce3c12a22d86f59070f1da15aaa2bde8a51 (diff) |
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()
...
Diffstat (limited to 'Documentation')
5 files changed, 283 insertions, 5 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power index 369d2a2d7d3e..fa05719f9981 100644 --- a/Documentation/ABI/testing/sysfs-class-power +++ b/Documentation/ABI/testing/sysfs-class-power @@ -74,3 +74,61 @@ Description: Valid values: - 0 - 70 (minutes), step by 10 (rounded down) + +What: /sys/class/power_supply/bq24257-charger/ovp_voltage +Date: October 2015 +KernelVersion: 4.4.0 +Contact: Andreas Dannenberg <dannenberg@ti.com> +Description: + This entry configures the overvoltage protection feature of bq24257- + type charger devices. This feature protects the device and other + components against damage from overvoltage on the input supply. See + device datasheet for details. + + Valid values: + - 6000000, 6500000, 7000000, 8000000, 9000000, 9500000, 10000000, + 10500000 (all uV) + +What: /sys/class/power_supply/bq24257-charger/in_dpm_voltage +Date: October 2015 +KernelVersion: 4.4.0 +Contact: Andreas Dannenberg <dannenberg@ti.com> +Description: + This entry configures the input dynamic power path management voltage of + bq24257-type charger devices. Once the supply drops to the configured + voltage, the input current limit is reduced down to prevent the further + drop of the supply. When the IC enters this mode, the charge current is + lower than the set value. See device datasheet for details. + + Valid values: + - 4200000, 4280000, 4360000, 4440000, 4520000, 4600000, 4680000, + 4760000 (all uV) + +What: /sys/class/power_supply/bq24257-charger/high_impedance_enable +Date: October 2015 +KernelVersion: 4.4.0 +Contact: Andreas Dannenberg <dannenberg@ti.com> +Description: + This entry allows enabling the high-impedance mode of bq24257-type + charger devices. If enabled, it places the charger IC into low power + standby mode with the switch mode controller disabled. When disabled, + the charger operates normally. See device datasheet for details. + + Valid values: + - 1: enabled + - 0: disabled + +What: /sys/class/power_supply/bq24257-charger/sysoff_enable +Date: October 2015 +KernelVersion: 4.4.0 +Contact: Andreas Dannenberg <dannenberg@ti.com> +Description: + This entry allows enabling the sysoff mode of bq24257-type charger + devices. If enabled and the input is removed, the internal battery FET + is turned off in order to reduce the leakage from the BAT pin to less + than 1uA. Note that on some devices/systems this disconnects the battery + from the system. See device datasheet for details. + + Valid values: + - 1: enabled + - 0: disabled diff --git a/Documentation/devicetree/bindings/power/bq24257.txt b/Documentation/devicetree/bindings/power/bq24257.txt index 5c9d3940d07c..d693702c9c1e 100644 --- a/Documentation/devicetree/bindings/power/bq24257.txt +++ b/Documentation/devicetree/bindings/power/bq24257.txt @@ -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>; +}; diff --git a/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt b/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt new file mode 100644 index 000000000000..862f4a49dc49 --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt @@ -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"; + }; +}; diff --git a/Documentation/devicetree/bindings/power_supply/qcom_smbb.txt b/Documentation/devicetree/bindings/power_supply/qcom_smbb.txt new file mode 100644 index 000000000000..65b88fac854b --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/qcom_smbb.txt @@ -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>; +}; diff --git a/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt new file mode 100644 index 000000000000..98d131acee95 --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt @@ -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"; + }; |