From 71baf3a48a2a318d9dc47ef655a3740492b950ff Mon Sep 17 00:00:00 2001 From: Subbaraman Narayanamurthy Date: Wed, 9 Mar 2016 18:03:04 -0800 Subject: power: Add snapshot of smb1351/smb135x charger DT bindings documentation This devicetree bindings documentation snapshot is taken as of msm-3.18 commit 85b7eb8ac225be (Merge "ASoC: soc-core: Fix integer overflow"). Change-Id: I50640b74ffe7b3aa29f9f6ca29a012c25c52d157 Signed-off-by: Subbaraman Narayanamurthy --- .../devicetree/bindings/power/smb1351-charger.txt | 113 +++++++++++++++++++++ .../devicetree/bindings/power/smb135x-charger.txt | 101 ++++++++++++++++++ 2 files changed, 214 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/smb1351-charger.txt create mode 100644 Documentation/devicetree/bindings/power/smb135x-charger.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/power/smb1351-charger.txt b/Documentation/devicetree/bindings/power/smb1351-charger.txt new file mode 100644 index 000000000000..ab0ac32e444e --- /dev/null +++ b/Documentation/devicetree/bindings/power/smb1351-charger.txt @@ -0,0 +1,113 @@ +Summit smb1351 battery charger + +SMB1351 is a single-cell battery charger. It can charge +the battery and power the system via the USB/AC adapter input. + +The smb1351 interface is via I2C bus. + +Required Properties: +- compatible Must be "qcom,smb1351-charger". +- reg The device 7-bit I2C address. + +Required Properties for standalone charger: +- regulator-name A string used as a descriptive name for OTG regulator. +- pinctrl-names The state name of the pin configuration. Only + support "default". +- pinctrl-0 The phandle of the pin configuration node in + pinctrl for smb_int_pin. + +Optional Properties: + +- interrupts This indicates the IRQ number of the GPIO + connected to the STAT pin. +- qcom,fastchg-current-max-ma Fast Charging current in mA. Supported range is + from 1000mA to 4500mA. +- qcom,chg-autonomous-mode This is a bool property and it indicates that the + charger is configured for autonomous operation and + does not require any software configuration. +- qcom,disable-apsd This is a bool property which disables automatic + power source detection (APSD). If this is set + charger detection is done by DCIN UV irq. +- qcom,charging-disabled This is a bool property which disables charging. +- qcom,using-pmic-therm This property indicates thermal pin connected to pmic or smb. +- qcom,bms-psy-name This is a string and it points to the bms + power supply name. +- qcom,iterm-ma Specifies the termination current to indicate end-of-charge. + Possible values in mA - 70, 100, 200, 300, 400, 500, 600, 700. +- qcom,iterm-disabled Disables the termination current feature. This is a bool + property. +- qcom,float-voltage-mv Float Voltage in mV - the maximum voltage up to which + the battery is charged. Supported range 3500mV to 4500mV +- qcom,recharge-mv Recharge threshold in mV - the offset from the float-volatge + as which the charger restarts charging. Possible + values are 50mV and 100mV. +- qcom,recharge-disabled Boolean value which disables the auto-recharge. +- qcom,bms-controlled-charging This property enables BMS to control EOC and + recharge. BMS and charger communicates with each + other via power_supply framework. This + property should be used with 'qcom,iterm-disabled' + to ensure EOC detection in charger is disabled. +- qcom,force-hvdcp-2p0 Boolean value which allows to force hvdcp working on 2.0 mode. +- qcom,parallel-charger Boolean value which enables the parallel charger. +- qcom,chg-vadc Corresponding VADC device's phandle. +- qcom,chg-adc_tm phandle to the corresponding VADC device to read the ADC channels. +- qcom,batt-cold-decidegc Cold battery temperature in decidegC. +- qcom,batt-hot-decidegc Hot battery temperature in decidegC. +- qcom,batt-missing-decidegc This is a property indicating battery missing temperature, if + higher than it, battery should exist. +- qcom,batt-warm-decidegc: Warm battery temperature in decidegC. After hitting this threshold, + "qcom,warm-bat-ma" defines maximum charging current and + "qcom,warm-bat-mv" defines maximum target voltage. +- qcom,batt-cool-decidegc: Cool battery temperature in decidegC. After hitting this threshold, + "qcom,cool-bat-ma" defines maximum charging current and + "qcom,cool-bat-mv" defines maximum target voltage. +- qcom,batt-warm-ma: Maximum warm battery charge current in milli-amps. +- qcom,batt-cool-ma: Maximum cool battery charge current in milli-amps. +- qcom,batt-warm-mv: Maximum warm battery target voltage in milli-volts. +- qcom,batt-cool-mv: Maximum cool battery target voltage in milli-volts. +- qcom,parallel-en-pin-polarity Specify the polarity of enable signal controlled + via pin in a parallel-charger configuration. + 0 - Active low and 1 - Active high. + If not specified the default value is active-low. + +Example for standalone charger: + +&i2c_4 { + smb1351_otg_supply: smb1351-charger@57 { + compatible = "qcom,smb1351-charger"; + reg = <0x57>; + interrupt-parent = <&msm_gpio>; + interrupts = <62 2>; + pinctrl-names = "default"; + pinctrl-0 = <&smb_int_default>; + qcom,float-voltage-mv = <4350>; + qcom,iterm-ma = <100>; + qcom,recharge-mv = <100>; + qcom,bms-psy-name = "bms"; + regulator-name = "smb1351_otg_vreg"; + qcom,using-pmic-therm; + qcom,chg-adc_tm = <&pm8916_adc_tm>; + qcom,chg-vadc = <&pm8916_vadc>; + qcom,batt-hot-decidegc = <550>; + qcom,batt-cold-decidegc = <0>; + qcom,batt-missing-decidegc = <(-200)>; + qcom,batt-warm-decidegc = <500>; + qcom,batt-cool-decidegc = <50>; + qcom,batt-warm-ma = <350>; + qcom,batt-cool-ma = <350>; + qcom,batt-warm-mv = <4200>; + qcom,batt-cool-mv = <4200>; + }; +}; + +Example for parallel charger: + +&i2c_11 { + smb1351-charger@1d { + compatible = "qcom,smb1351-charger"; + reg = <0x1d>; + qcom,parallel-charger; + qcom,float-voltage-mv = <4400>; + qcom,recharge-mv = <100>; + }; +}; diff --git a/Documentation/devicetree/bindings/power/smb135x-charger.txt b/Documentation/devicetree/bindings/power/smb135x-charger.txt new file mode 100644 index 000000000000..3eff91a1d112 --- /dev/null +++ b/Documentation/devicetree/bindings/power/smb135x-charger.txt @@ -0,0 +1,101 @@ +SMB135x battery charger + +SMB135x is a single-cell switching mode battery charger. It can charge +the battery and power the system via the USB and AC adapter input. + +The smb135x interface is via I2C bus. + +Required Properties: +- compatible: Must be "qcom,smb1357-charger", "qcom,smb1358-charger" + or "qcom,smb1359-charger". +- reg: The device 7-bit I2C address. + +Optional Properties: + +- interrupts This indicates the IRQ number of the GPIO + connected to the STAT pin. +- qcom,bms-psy-name the psy name to use for reporting battery capacity. If left + unspecified it uses a preprogrammed default value. +- qcom,float-voltage-mv Float Voltage in mV - the maximum voltage up to which + the battery is charged. Supported range 3600mV to 4500mV +- qcom,charging-timeout Maximum duration in minutes that a single charge + cycle may last. Supported values are: 0, 192, 384, + 768, and 1536. A value of 0 means that no + charge cycle timeout is used and charging can + continue indefinitely. +- qcom,dc-psy-type The type of charger connected to the DC path. + Can be "Mains" or "Wireless" +- qcom,dc-psy-ma The current in mA dc path can support. Must be specified if + dc-psy-type is specified. Valid range 300mA to 2000mA. +- qcom,charging-disabled Set this if charging should be disabled in the build + by default. Useful in usecases where battery current + needs to be profiled even when USB is present. +- qcom,recharge-thresh-mv Specifies the minimum voltage drop in millivolts + below the float voltage that is required in + order to initiate a new charging cycle. + Supported values are: 50, 100, 200 and 300mV. +- qcom,bmd-algo-disabled Indicates if the battery missing detection algorithm + is disabled. If this node is present SMB uses + the THERM pin for battery missing detection. +- qcom,iterm-ma Specifies the termination current to indicate end-of-charge. + Possible values in mA - 50, 100, 150, 200, 250, 300, 500, 600. +- qcom,iterm-disabled Disables the termination current feature. This is a bool + property. +- qcom,soft-vfloat-comp-disabled Set this property when the battery is powered via external + source and could go above the float voltage. smb135x chips + go in to unintentional reverse boost in such a situation and + the float voltage compensation needs to be disabled to avoid + that reverse boost. +- qcom,soft-current-comp-disabled Set this property to disable charging current compensation + if battery temperature exceeds soft JEITA thresholds. +- qcom,gamma-setting Array of gamma values for JEITA. The sequence is + <"Cold Hard" "Hot Hard" "Cold Soft" "Hot Soft">. Gamma value + indicates the ratio of the pull up resistors and NTC + resistor in battery pack. There are 4 options refering to + the graphic user interface. +- qcom,thermal-mitigation: Array of input current limit values for different + system thermal mitigation level. +- regulator-name A string used as a descriptive name for OTG regulator. +- therm-bias-supply The supply that provides bias voltage to the battery + thermistor. This is useful in designs that do not use the SYSON + pin to bias the thermistor. +- usb-pullup-supply The supply regulator that act as pull-up for USB data lines. +- qcom,parallel-charger: A flag to indicate if the charger merely assists for USB + charging. In this case the input current from USB is split + between a main charger and smb135x for reducing thermal impact + of high current charging from USB path. +- qcom,inhibit-disabled: Disables the charger-inhibit function. +- qcom,bms-controlled-charging: This property enables BMS to control EOC and + recharge. BMS and charger communicates with each + other via power_supply framework. This + property should be used with 'qcom,iterm-disabled' + to ensure EOC detection in charger is + disabled. +- qcom,fastchg-ma: Specifies the maximum fastcharge current. + The possible range for fastcharge current is + from 300mA to 3000mA. +- qcom,id-line-not-connected: Specifies if smb135x charger is not monitoring the USB_ID line. +- qcom,parallel-en-pin-polarity Specify the polarity of enable signal controlled + via pin in a parallel-charger configuration. + 0 - Active low and 1 - Active high. + If not specified the default value is active-low. + +Example: + i2c@f9967000 { + smb1357-charger@1b { + compatible = "qcom,smb1357-charger"; + reg = <0x1b>; + interrupt-parent = <&spmi_bus>; + interrupts = <0x00 0xCD 0>; + qcom,float-voltage-mv = <4200>; + qcom,iterm-ma = <100>; + qcom,dc-psy-type = <8>; + qcom,dc-psy-ma = <800>; + qcom,charging-disabled; + qcom,recharge-thresh-mv = <100>; + regulator-name = "smb1357-otg"; + qcom,thermal-mitigation = <1500 700 600 325>; + qcom,gamma-setting = <3 2 0 2>; + qcom,fastchg-ma = <3000>; + }; + }; -- cgit v1.2.3