diff options
author | Swetha Chikkaboraiah <c_schikk@qti.qualcomm.com> | 2021-01-06 16:04:34 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-01-10 05:37:47 -0800 |
commit | 349ab7eb5ee0fdf32a34619a29aaebb949b0492a (patch) | |
tree | 3c6165f9e28c3bcc5ae5ef3cb04217c066af0a8c /bindings/power | |
parent | 2b65c92e51c0c0ccd5ff7c36de6b000ed8936a06 (diff) | |
download | devicetree-349ab7eb5ee0fdf32a34619a29aaebb949b0492a.tar.gz |
dt-bindings: Add documentation for MSM8917/MSM8937
Add documentation for MSM8917/MSM8937 related nodes.
Change-Id: I7bbb6df7653e2ee554089aa216303ebf2371630a
Diffstat (limited to 'bindings/power')
-rw-r--r-- | bindings/power/supply/qcom/qpnp-linear-charger.txt | 210 | ||||
-rw-r--r-- | bindings/power/supply/qcom/qpnp-typec.txt | 61 | ||||
-rw-r--r-- | bindings/power/supply/qcom/qpnp-vm-bms.txt | 177 | ||||
-rw-r--r-- | bindings/power/supply/qcom/smb1360-charger-fg.txt | 256 |
4 files changed, 704 insertions, 0 deletions
diff --git a/bindings/power/supply/qcom/qpnp-linear-charger.txt b/bindings/power/supply/qcom/qpnp-linear-charger.txt new file mode 100644 index 00000000..e2540015 --- /dev/null +++ b/bindings/power/supply/qcom/qpnp-linear-charger.txt @@ -0,0 +1,210 @@ +Qualcomm Technologies, Inc. QPNP Linear Charger Specific Bindings. + +The charger module supports the linear battery charger peripherals. + +There are four different peripherals in the charger module. +Each of these peripherals are implemented as subnodes. + +- qcom,chgr: Supports charging control and status reporting +- qcom,bat-if: Battery status reporting such as presence and + temperature reporting. +- qcom,usb-chgpth: USB charge path detection and input current + limiting configuration. +- qcom,chg-misc: Miscellaneous features such as comparator override + features etc. + +Parent node required properties: +- qcom,vddmax-mv: Target voltage of battery in mV. +- qcom,vddsafe-mv: Maximum Vdd voltage in mV. +- qcom,vinmin-mv: Minimum input voltage in mV. +- qcom,ibatsafe-ma: Safety battery current setting + +Parent node optional properties: +- qcom,vbatweak-uv: Weak battery voltage threshold in uV, + above which fast charging can start. + The supported voltage range is from + 3000000uV to 3581250uV with a step + size of 18750000 uV. +- qcom,charging-disabled: Set this property to disable charging + by default. +- qcom,use-default-batt-values: Set this flag to force reporting of + fake battery. +- qcom,warm-bat-decidegc: Warm battery temperature in decidegC. +- qcom,cool-bat-decidegc: Cool battery temperature in decidegC. + Note that if both warm and cool + battery temperatures are set, the + corresponding ibatmax and bat-mv + properties are required to be set. +- qcom,ibatmax-cool-ma: Maximum cool battery charge current. +- qcom,ibatmax-warm-ma: Maximum warm battery charge current. +- qcom,warm-bat-mv: Warm temperature battery target + voltage. +- qcom,cool-bat-mv: Cool temperature battery target + voltage. +- qcom,thermal-mitigation: Array of ibatmax values for different + system thermal mitigation level. +- qcom,tchg-mins: Maximum total software initialized + charge time. +- qcom,bpd-detection: Select a battery presence detection + scheme by specifying either "bpd_thm" + "bpd_id" or "bpd_thm_id". "bpd_thm" + selects the temperature pin, "bpd_id" + uses the id pin for battery presence + detection, "bpd_thm_id" selects both. + If the property is not set, the + temperatue pin will be used. +- qcom,btc-disabled: If flag is set battery hot and cold + monitoring is disabled in hardware. + This monitoring is turned on by + default. +- qcom,batt-hot-percentage: Specify a supported hot threshold + percentage. + Supported thresholds: 25% and 35%. If + none is specified hardware defaults + will be used. +- qcom,batt-cold-percentage: Specify a supported cold threshold + percentage. Supported thresholds: 70% + and 80%. If none is specified + hardwaredefaults will be used. +- qcom,chg-adc_tm Corresponding ADC TM device's phandle + to set recurring measurements and + receive notification for batt_therm. +-qcom,float-charge If specified enable float charging. +- qcom,chg-vadc Corresponding VADC device's phandle. +- qcom,charger-detect-eoc If specified charger hardware will + detect end-of-charge. + If not specified charger driver + depends on BMSfor end-of-charge + detection. +- qcom,disable-vbatdet-based-recharge If specified disable VBATDET irq + and charging can only be resumed + if charger is re-inserted or SOC + falls below resume SOC. + This property should always be used + along with the BMS property: + "qcom,disable-suspend-on-usb". +- qcom,use-external-charger If specified the LBC module will + be disabled and the driver will not + register. It also enables BID for + BPD and disables BTC. Declare this node + only if you are using an external charger + and not the PMIC internal LBC. +- qcom,chgr-led-support There is a current sink device in linear + charger module, it is used to control a + led which can act as a charger led as well + as a general notification led. +- qcom,parallel-charger This is a bool property to indicate the + LBC will operate as a secondary charger + in the parallel mode. If this is enabled + the charging operations will be controlled by + the primary-charger. +- qcom,collapsible-chgr-support If specified the collapsible charger feature + will be supported. LBC will disable VIN_MIN + comparator and use chg_gone interrupt to + detect charger removal. + + +Sub node required structure: +- A qcom,charger node must be a child of an SPMI node that has specified + the spmi-dev-container property. Each subnode reflects + a hardware peripheral which adds a unique set of features + to the collective charging device. For example USB detection + and the battery interface are each separate peripherals and + each should be their own subnode. + +Sub node required properties: +- compatible: Must be "qcom,qpnp-linear-charger". +- reg: Specifies the SPMI address and size for this + peripheral. +- interrupts: Specifies the interrupt associated with the + peripheral. +- interrupt-names: Specifies the interrupt names for the peripheral. + Every available interrupt needs to have an associated + name with it to indentify its purpose. + + The following lists each subnode and their + corresponding required interrupt names: + + qcom,usb-chgpth: + - usbin-valid + + The following interrupts are available: + + qcom,usb-chgpth: + - usbin-valid: Indicates valid USB + connection. + - coarse-det-usb: Coarse detect interrupt + triggers at low voltage on + USB_IN. + - chg-gone: Triggers on VCHG line. + - overtemp: Triggers on over temperature + condition + + qcom,chgr: + - chg-done: Triggers on charge completion. + - chg-failed: Notifies of charge failures. + - fast-chg-on: Notifies of fast charging. + - vbat-det-lo: Triggers on vbat-det-lo + voltage. + +Example: + pm8916-chg: qcom,charger { + spmi-dev-container; + compatible = "qcom,qpnp-linear-charger"; + #address-cells = <1>; + #size-cells = <1>; + + qcom,vddmax-mv = <4200>; + qcom,vddsafe-mv = <4200>; + qcom,vinmin-mv = <4200>; + qcom,ibatsafe-ma = <1440>; + qcom,vbatweak-uv = <3200>; + qcom,thermal-mitigation = <1500 700 600 325>; + qcom,cool-bat-decidegc = <100>; + qcom,warm-bat-decidegc = <450>; + qcom,cool-bat-mv = <4100>; + qcom,ibatmax-warm-ma = <360>; + qcom,ibatmax-cool-ma = <360>; + qcom,warm-bat-mv = <4100>; + qcom,batt-hot-percentage = <25>; + qcom,batt-cold-percentage = <85>; + qcom,tchg-mins = <152>; + qcom,resume-soc = <99>; + qcom,btc-disabled = <0>; + qcom,chg-vadc = <&pm8916_vadc>; + + qcom,chgr@1000 { + reg = <0x1000 0x100>; + interrupts = <0x0 0x10 0x7>, + <0x0 0x10 0x6>, + <0x0 0x10 0x5>, + <0x0 0x10 0x0>; + + interrupt-names = "chg-done", + "chg-failed", + "fast-chg-on", + "vbat-det-lo"; + }; + + qcom,bat-if@1200 { + reg = <0x1200 0x100>; + interrupts = <0x0 0x12 0x1>, + <0x0 0x12 0x0>; + + interrupt-names = "bat-temp-ok", + "batt-pres"; + }; + + qcom,usb-chgpth@1300 { + reg = <0x1300 0x100>; + interrupts = <0 0x13 0x2>, + <0 0x13 0x1>; + + interrupt-names = "chg-gone", + "usbin-valid"; + }; + + qcom,chg-misc@1600 { + reg = <0x1600 0x100>; + }; + }; diff --git a/bindings/power/supply/qcom/qpnp-typec.txt b/bindings/power/supply/qcom/qpnp-typec.txt new file mode 100644 index 00000000..aa4d2f1e --- /dev/null +++ b/bindings/power/supply/qcom/qpnp-typec.txt @@ -0,0 +1,61 @@ +QPNP USB Type-C module + +QPNP USB Type-C module supports USB type-c ports and detection of +USB Type-C chargers that can supply upto 3A Vbus current for charging. + +The QPNP USB Type-C interfaces via the SPMI bus. + +Required properties : +- compatible : Must be "qcom,qpnp-typec" +- reg: The SPMI address for this peripheral +- interrupts: Specifies the interrupt associated with the peripheral. +- interrupt-names: Specifies the interrupt names for the peripheral. Every + available interrupt needs to have an associated name + with it to indentify its purpose. + + - vrd-change: Triggers on change in current + capability of charger. + - ufp-detach: Triggers on cable detach in + UFP mode. + - ufp-detect: Triggers on charger insertion. + - dfp-detach: Triggers on cable detach in + DFP mode. + - dfp-detect: Triggers on OTG cable insertion. + - vbus-err: Triggers if VBUS is not + detected within 275 msec after + CC detection in UFP mode. + - vconn-oc: Triggers on VCONN overcurrent + in DFP mode with active cable. + +Optional properties: +- pinctrl-names : This should be defined if a target uses pinctrl framework + for SSMUX control pin. See "pinctrl" in + Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt. + It should specify the names of the configs that pinctrl can install in driver. + Following are the pinctrl config that can be installed: + "typec_ssmux_config" : Default configuration of pins. +- <supply-name>-supply: handle to the regulator device tree node. + "supply-name" is "ss-mux" regulator to drive super-speed MUX chip. +- qcom,role-reversal-supported : A boolean property that when present enables + support of dual role class. + +Example: + qcom,qpnp-typec@bf00 { + compatible = "qcom,qpnp-typec"; + reg = <0xbf00 0x100>; + interrupts = <0x0 0xbf 0x0>, + <0x0 0xbf 0x1>, + <0x0 0xbf 0x2>, + <0x0 0xbf 0x3>, + <0x0 0xbf 0x4>, + <0x0 0xbf 0x6>, + <0x0 0xbf 0x7>; + + interrupt-names = "vrd-change", + "ufp-detach", + "ufp-detect", + "dfp-detach", + "dfp-detect", + "vbus-err", + "vconn-oc"; + }; diff --git a/bindings/power/supply/qcom/qpnp-vm-bms.txt b/bindings/power/supply/qcom/qpnp-vm-bms.txt new file mode 100644 index 00000000..84bdd8aa --- /dev/null +++ b/bindings/power/supply/qcom/qpnp-vm-bms.txt @@ -0,0 +1,177 @@ +Qualcomm Technologies, Inc. QPNP Voltage-Mode(VM) PMIC Battery Management System + +QPNP PMIC VM BMS provides interface to clients to read properties related +to the battery. Its main function is to calculate the SOC (state of charge) +of the battery based on periodic sampling of the VBAT (battery voltage). + +Parent node required properties: +- compatible : Must be "qcom,qpnp-vm-bms" for the BM driver. +- reg : Offset and length of the PMIC peripheral register map. +- interrupts : The interrupt mappings. + The format should be + <slave-id peripheral-id interrupt-number>. +- interrupt-names : names for the mapped bms interrupt + The following interrupts are required: + 0 : leave CV state + 1 : enter CV state + 2 : good ocv generated + 3 : ocv_thr + 4 : fifo update + 5 : fsm state chnaged + +Additionally, optional subnodes may be included: +- qcom,batt-pres-status : A subnode with a register address for the SMBB + battery interface's BATT_PRES_STATUS register. If this node is + added, then the BMS will try to detect offmode battery removal + via the battery interface's offmode battery removal circuit. +- qcom,battery-data : A phandle to a node containing the available batterydata + profiles. See the batterydata bindings documentation for more + details. + +Parent node required properties: +- qcom,v-cutoff-uv : cutoff voltage where the battery is considered dead in + micro-volts. +- qcom,max-voltage-uv : maximum voltage for the battery in micro-volts. +- qcom,r-conn-mohm : connector resistance in milli-ohms. +- qcom,shutdown-soc-valid-limit : If the ocv upon restart is within this + distance of the shutdown ocv, the BMS will try to force + the new SoC to the old one to provide charge continuity. + That is to say, + if (abs(shutdown-soc - current-soc) < limit) + then use old SoC. +- qcom,low-soc-calculate-soc-threshold : The SoC threshold for when + the periodic calculate_soc work speeds up. This ensures + SoC is updated in userspace constantly when we are near + shutdown. +- qcom,low-voltage-threshold : The battery voltage threshold in micro-volts for + when the BMS tries to wake up and hold a wakelock to + ensure a clean shutdown. +- qcom,low-voltage-calculate-soc-ms : The time period between subsequent + SoC recalculations when the current voltage is below + qcom,low-voltage threshold. This takes precedence over + qcom,low-soc-calculate-soc-ms. +- qcom,low-soc-calculate-soc-ms : The time period between subsequent + SoC recalculations when the current SoC is below + qcom,low-soc-calculate-soc-threshold. This takes + precedence over qcom,calculate-soc-ms. +- qcom,calculate-soc-ms : The time period between subsequent SoC + recalculations when the current SoC is above or equal + qcom,low-soc-calculate-soc-threshold. +- qcom,bms-vadc: Corresponding VADC device's phandle. +- qcom,bms-adc_tm: Corresponding ADC_TM device's phandle to set recurring + measurements and receive notifications for vbatt. +- qcom,pmic-revid : Phandle pointing to the revision peripheral node. + +Parent node Optional properties +- qcom,s1-sample-interval-ms: The sampling rate in ms of the accumulator in state + S1. (i.e) the rate at which the accumulator is being + filled with vbat samples. Minimum value = 0 and + Maximum value = 2550ms. +- qcom,s2-sample-interval-ms: The sampling rate in ms of the accumulator in state + S2. (i.e) the rate at which the accumulator is being + filled with vbat samples. Minimum value = 0 and + Maximum value = 2550ms. +- qcom,s1-sample-count: The number of samples to be accululated for one FIFO in + state S1. Possible values are - 0, 4, 8, 16, 32, 64, 128, + 256. +- qcom,s2-sample-count: The number of samples to be accululated for one FIFO in + state S2. Possible values are - 0, 4, 8, 16, 32, 64, 128, + 256. +- qcom,s1-fifo-legth: Number of FIFO's to be filled in state S1, to generate + the fifo_update_done interrupt. Possile values - 0 to 8 +- qcom,s2-fifo-legth: Number of FIFO's to be filled in state S2, to generate + the fifo_update_done interrupt. Possible values- 0 to 8 +- qcom,force-s3-on-suspend : Bool property to force the BMS into S3 (sleep) state + while entering into system suspend. +- qcom,force-bms-active-on-charger: Bool property to keep BMS FSM active + if charger is present. +- qcom,report-charger-eoc : Bool property to indicate if BMS needs to indicate + EOC to charger. +- qcom,ignore-shutdown-soc: A boolean that controls whether BMS will + try to force the startup SoC to be the same as the + shutdown SoC. Defining it will make BMS ignore the + shutdown SoC. +- qcom,use-voltage-soc : A boolean that controls whether BMS will use + voltage-based SoC instead of a coulomb counter based + one. Voltage-based SoC will not guarantee linearity. +- qcom,disable-bms : Bool property to disable the VMBMS hardware module. + Enable this property if BMS is not supported or an external + fuel gauge is used. +- qcom,s3-ocv-tolerence-uv : The S3 state OCV tolerence threshold in uV. The + LSB value is 300uV and maximum value is 76500uV. +- qcom,low-soc-fifo-length : The fifo length (of S2 STATE) to be used at lower + SOCs. If this value is not specified the system uses + default length. +- qcom,resume-soc: Capacity in percent at which charging should resume + when a fully charged battery drops below this level. +- qcom,low-temp-threshold : The temperature threshold below which the IBAT + averaging and UUC smoothening is disabled. This value + is in deci-degrees centigrade. If not specified it + defaults to 0. +- qcom,ibat-avg-samples : The number of samples to be averaged for IBAT + estimation. If not specified it defaults to 16. + The possible values are 1 to 16. +- qcom,batt-aging-comp : A boolean that defines if battery aging compensation + is enabled. +- qcom,use-reported-soc : Bool property to enable the reported_soc logic. To + enable this feature, qcom,resume-soc must be defined as + a proper value. The BMS is also required to control the + charging, discharging and recharging. + +qcom,batt-pres-status node required properties: +- reg : offset and length of the PMIC LBC battery interface BATT_PRES_STATUS + register. + +qcom,qpnp-chg-pres required properties: +- reg : offset and length of the PMIC LBC charger interafce CHARGER_OPTION + register. + +Example: +pm8916_bms: qcom,qpnp-vm-bms { + spmi-dev-container; + compatible = "qcom,qpnp-vm-bms"; + #address-cells = <1>; + #size-cells = <1>; + status = "disabled"; + + qcom,v-cutoff-uv = <3400000>; + qcom,max-voltage-uv = <4200000>; + qcom,r-conn-mohm = <18>; + qcom,shutdown-soc-valid-limit = <20>; + qcom,low-soc-calculate-soc-threshold = <15>; + qcom,low-voltage-threshold = <3420000>; + qcom,low-voltage-calculate-soc-ms = <1000>; + qcom,low-soc-calculate-soc-ms = <5000>; + qcom,low-soc-fifo-length = <2>; + qcom,calculate-soc-ms = <20000>; + qcom,s3-ocv-tolerence-uv = <1200>; + qcom,volatge-soc-timeout-ms = <60000>; + qcom,battery-data = <&mtp_batterydata>; + qcom,bms-vadc = <&pm8916_vadc>; + qcom,bms-adc_tm = <&pm8916_adc_tm>; + + qcom,batt-pres-status@1208 { + reg = <0x1208 0x1>; + } + + qcom,qpnp-chg-pres@1208 { + reg = <0x1108 0x1>; + } + + qcom,bms-bms@4000 { + reg = <0x4000 0x100>; + interrupts = <0x0 0x40 0x0>, + <0x0 0x40 0x1>, + <0x0 0x40 0x2>, + <0x0 0x40 0x3>, + <0x0 0x40 0x4>, + <0x0 0x40 0x5>, + + interrupt-names = "leave_cv", + "enter_cv", + "good_ocv", + "ocv_thr", + "fifo_updtaed", + "fsm_state_change"; + }; +}; diff --git a/bindings/power/supply/qcom/smb1360-charger-fg.txt b/bindings/power/supply/qcom/smb1360-charger-fg.txt new file mode 100644 index 00000000..a82da42c --- /dev/null +++ b/bindings/power/supply/qcom/smb1360-charger-fg.txt @@ -0,0 +1,256 @@ +SMB1360 battery charger and fuel gauge + +SMB1360 is a single path switch-mode battery charger and +fuel gauge. The charger has a max current rating of 1.5A. +The fuel gauge uses voltage + coulomb counting to report +the state of charge. + +The smb1360 interface is via I2C bus. + +Required Properties: +- compatible: Must be "qcom,smb1360-charger-fg" +- reg: The device 7-bit I2C address. + +Optional Properties: + +- interrupts This indicates the IRQ numbers of the GPIOs + connected to the STAT and usb-id pins. +- interrupt-names The irq names should be smb1360_stat_irq and + smb1360_usb_id_irq.The stat irq is mandatory + and usb_id irq is optional. +- pinctrl-names: The state name of the pin configuration. Only + support: "default". +- pinctrl-0: The phandles of the pin configuration node in + pinctrl for smb_int_pin and usb-id pin. + For details of pinctrl properties, please refer to: + "Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt" +- qcom,float-voltage-mv Float Voltage in mV - the maximum voltage up to which + the battery is charged. Supported range 3460V to 4360V +- 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,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,recharge-disabled Disabled the auto-recharge function +- qcom,iterm-ma Specifies the termination current to indicate end-of-charge. + Possible values in mA - 25, 50, 75, 100, 125, 150, 175, 200 +- qcom,iterm-disabled Disables the termination current feature. This is a bool + property. +- qcom,chg-inhibit-disabled Disables the charger-inhibit function. +- qcom,disable-ov-ends-chg-cycle + The boolean property to indicate if the ov-ends-charge-cycle + feature is disabled. If the feature is disabled, charging + could be resumed from battery OV (over voltage) status; otherwise, + charging cycle will be terminated after battery OV event and + won't be resumed until disable/enable charging. +- qcom,batt-id-disabled Disabled the batt-id function. Doing this will + disable the ability of RID based battery profile selection. +- qcom,fg-delta-soc The delta in SOC which will generate an interrupt +- qcom,fg-soc-max SOC value (max) at which an interrupt is generated. + This can be used to alert the system when the + battery reaches a specific (maximum) SOC value. +- qcom,fg-soc-min SOC value (min) at which an interrupt is generated. + This can be used to alert the system when the + battery reaches a specific (minimum) SOC value. +- qcom,fg-voltage-min-mv The minimum volatge at which an interrupt is generated. + This can be used as an alert mechanism. +- qcom,fg-voltage-empty-mv The voltage which indicates the battery is empty. +- qcom,thermal-mitigation: Array of input current limit values for different + system thermal mitigation level. +- qcom,stat-pulsed-irq: A boolean flag to indicate the state-irq pin will generate pulse + signal when interrupt happened. If this property is not specified, + the default configuration is static level irq. +- qcom,shdn-after-pwroff: A bool property to configure smb1360 for shutdown at power-off. +- qcom,empty-soc-disabled: A bool property to indicate whether stop updating empty_soc flag. + System reports 0% SOC when empty_soc being set. +- qcom,awake-min-soc A bool property to indicate whether the system is prevented from + sleeping when SOC is under the min_soc threshold. +- qcom,batt-profile-select A boolean flag to indicate of battery-profile + selection is enabled. +- qcom,profile-a-rid-kohm The battery-ID resistor (RID) in Kohm supported by + profile-A of SMB1360. This should be specified + if 'batt-profile-select' is defined. +- qcom,profile-b-rid-kohm The battery-ID resistor (RID) in Kohm supported by + profile-B of SMB1360. This should be specified + if 'batt-profile-select' is defined. +- qcom,batt-id-vref-uv The reference voltage on the battery-ID line + specified in micro-volts. +- qcom,batt-id-rpullup-kohm The pull-up resistor connected on the battery-ID + (vref) line. +- qcom,smb1360-vadc VADC device phandle (used for reading the RID) +- qcom,fg-batt-capacity-mah The new battery capacity to be supported. + This updates the ACTUAL and NOMINAL CAPACITY + of the profile. +- qcom,fg-cc-soc-coeff The CC_TO_SOC_COEFF of the new battery capacity. + This is updated only if 'fg-batt-capacity-mah' + is specified. This value is calculated from the + batt-capacity and then encoded as floating number. + cc_soc_coeff = HALF_ENCODING(8192 / batt-capacity) +- qcom,fg-cutoff-voltage-mv This is the minimum allowed system voltage. The + FG will report SOC = 0 at this volatge. This + value is in mv. +- qcom,fg-iterm-ma This is termination current at which the + Monotonic SOC reports 100. The value passed here + is negated in the driver (assuming that the iterm + is always -ve). This value is in mA. +- qcom,fg-ibatt-standby-ma This is the minimum current value for the SOC to + be above 0% at the cutoff voltage. This value + is in mA. +- qcom,fg-cc-to-cv-mv This is the voltage at which the FG transitions + from CC to CV. This value should never be + higher than the float volatge. Its in mV. +- qcom,thermistor-c1-coeff This is the NTC thermistor C1 coeff for the + thermistor inside the battery. This value is + 16-bit float encoded value determined from the + NTC-c1_coeff mapping. +- qcom,otg-batt-curr-limit This property defines the current threshold draw + from battery when device working at OTG mode. + The possible values are: 350, 550, 950, 1500mA. +- qcom,fg-auto-recharge-soc This property defines the auto recharging SOC threshold. +- qcom,min-icl-100ma A bool property to set the minimum ICL current + to 100mA. If this property is not set the minimum + ICL is set to 500mA in all the scenarios. +- qcom,config-hard-thresholds This property indicates if cold and hot thresholds need be modified. + If it's not defined, default temp thresholds will be used. If this + defined, it's required to specify the "qcom,hot-bat-decidegc" and + "qcom,cold-bat-decidegc" values. If this defined, the serial properties + (qcom,otp-hard-jeita-config, qcom,otp-hot-bat-decidegc, + qcom,otp-cold-bat-decidegc) mustn't be defined. +- qcom,hot-bat-decidegc Hot battery temperature in decidegC. This property should only be + defined when "qcom,config-hard-thresholds" defined, and the value + must be out of range [0, 55]. +- qcom,cold-bat-decidegc Cold battery temperature in decidegC. This property should only be + defined when "qcom,config-hard-thresholds" defined, and the value + must be out of range [0, 55]. +- qcom,otp-hard-jeita-config This property indicates if cold and hot thresholds need be modified. + If it's not defined, default temp thresholds [0, 55] will be used. + If this defined, it's required to specify the "qcom,otp-hot-bat-decidegc" + and "qcom,otp-cold-bat-decidegc" values. If this is defined, the serial + properties (qcom,config-hard-thresholds, qcom,hot-bat-decidegc, + qcom,cold-bat-decidegc) mustn't be defined. +- qcom,otp-hot-bat-decidegc Hot battery temperature in decidegC. This property could only be + defined when qcom,config-otp-hard-jeita exist. +- qcom,otp-cold-bat-decidegc Cold battery temperature in decidegC. This property could only be + defined when qcom,config-otp-hard-jeita exist. +- qcom,otp-hard-jeita-hysteresis This property contains two intergers to define the temperature + hysteresis (in decidegC unit) for hard cold and hard hot. + This property could only be defined when qcom,config-otp-hard-jeita exist. +- qcom,soft-jeita-supported This property indicates whether soft jeita supported. +- qcom,warm-bat-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. + This property must be in range [0, 55] if needed. +- qcom,cool-bat-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. + This property must be in range [0, 55] if needed. +- qcom,warm-bat-mv Maximum warm battery target voltage in milli-volts. +- qcom,cool-bat-mv Maximum cool battery target voltage in milli-volts. +- qcom,warm-bat-ma Maximum warm battery charge current in milli-amps. +- qcom,cool-bat-ma Maximum cool battery charge current in milli-amps. +- qcom,fg-reset-at-pon This is a bool property which indicates if the + FG reset at power-on is enabled. +- qcom,fg-reset-thresold-mv This value indicates the voltage threshold to + reset the FG. This value is compared against + the difference between in predicted voltage and + current voltage. If this value is not specified + a default value of 50mV is used. Unit is in milli-volts. +- qcom,rsense-10mhom A bool property to indicate the Rsense resistor + configuration. If set, the Rsense is 10mOhm else + its 20mOhm. +- qcom,otg-fet-present A bool property to indicate that a pMOS FET is present + to boost the OTG current. On enabling this the max OTG + current supported is 3x(qcom,otg-batt-curr-limit). +- qcom,otg-fet-enable-gpio GPIO for enabling and disabling OTG FET. + Following should be the PMIC gpio configuration: + { + qcom,mode = <1>; //Digital output + qcom,pull = <0>; //Pull up configuration + qcom,vin-sel = <0>; //Voltage level: VPH_PWR + qcom,src-sel = <0>; //Pin function: GPIO + qcom,master-en = <1>; //Enable + } + Please go through the documentation for PMIC gpio + configuration details: + Documentation/devicetree/bindings/gpio/qpnp-pin.txt +- qcom,usb-id-gpio GPIO for usb-id detection.This property is mandatory + if usb-id irq is specified. +- qcom,parallel-charging-enabled: A bool property which enables SMB1360 to + operate in the parallel mode. SMB1360 acts + as the primary charger. +- qcom,max-parallel-current-ma: This is the max charging current which can be + drawn from the secondary charger. If this is + not specified this value defaults to 540mA. + The overall current charging current is + 1500mA(from SMB) + qcom,max-parallel-current-ma. + +Example: + i2c@f9967000 { + smb1360-chg-fg@1b { + compatible = "qcom,smb1360-chg-fg"; + reg = <0x1b>; + interrupt-parent = <&spmi_bus>; + interrupts = <0x00 0xcd 0>, + <0 0xc3 0 3>; + interrupt-names = "smb1360_stat_irq", + "smb1360_usb_id_irq"; + pinctrl-names = "default"; + pinctrl-0 = <&smb_int_default>, + <&usb_id_default>; + + /* battery-profile selection properties */ + qcom,batt-profile-select; + qcom,smb1360-vadc = <&pm8916_vadc>; + qcom,batt-id-vref-uv = <1800000>; + qcom,batt-id-rpullup-kohm = <100>; + qcom,profile-a-rid-kohm = <78>; + qcom,profile-b-rid-kohm = <200>; + + /* battery capacity */ + qcom,fg-batt-capacity-mah = <4000>; + qcom,fg-cc-soc-coeff = <0x8009>; + + qcom,fg-cutoff-voltage-mv = <3300>; + qcom,fg-iterm-ma = <100>; + qcom,fg-ibatt-standby-ma = <200>; + qcom,fg-cc-to-cv-mv = <4180>; + qcom,thermistor-c1-coeff = <0x86DB>; + + qcom,float-voltage-mv = <4200>; + qcom,iterm-ma = <100>; + qcom,charging-disabled; + qcom,recharge-thresh-mv = <100>; + qcom,fg-soc-max = <85>; + qcom,fg-soc-min = <15>; + qcom,fg-auto-recharge-soc = <99>; + qcom,thermal-mitigation = <1500 700 300 0>; + qcom,config-hard-thresholds; + qcom,hot-bat-decidegc = <650>; + qcom,cold-bat-decidegc = <(-100)>; + qcom,soft-jeita-supported; + qcom,warm-bat-decidegc = <450>; + qcom,cool-bat-decidegc = <100>; + qcom,otp-hard-jeita-config; + qcom,otp-hot-bat-decidegc = <550>; + qcom,otp-cold-bat-decidegc = <0>; + qcom,otp-hard-jeita-hysteresis = <0, 50>; + qcom,warm-bat-mv = <4100>; + qcom,cool-bat-mv = <4100>; + qcom,warm-bat-ma = <750>; + qcom,cool-bat-ma = <750>; + + qcom,otg-batt-curr-limit = <950>; + qcom,fg-reset-at-pon; + + qcom,otg-fet-present; + qcom,otg-fet-enable-gpio = <&pm8916_gpios 3 0>; + qcom,usb-id-gpio = <&pm8916_gpios 4 0>; + }; + }; |