80p248477linuxandroidpmicchargersoftwareuserguide 1848228326 PDF
80p248477linuxandroidpmicchargersoftwareuserguide 1848228326 PDF
80p248477linuxandroidpmicchargersoftwareuserguide 1848228326 PDF
NO PUBLIC DISCLOSURE PERMITTED: Please report postings of this document on public servers or websites to:
DocCtrlAgent@qualcomm.com.
Restricted Distribution: Not to be distributed to anyone who is not an employee of either Qualcomm Technologies, Inc. or its
affiliated companies without the express approval of Qualcomm Configuration Management.
Not to be used, copied, reproduced, or modified in whole or in part, nor its contents revealed in any manner to others without the
express written permission of Qualcomm Technologies, Inc.
Qualcomm, MSM, Quick Charge, and WiPower are trademarks of Qualcomm Incorporated, registered in the United States and
other countries. Other product and brand names may be trademarks or registered trademarks of their respective owners.
This technical data may be subject to U.S. and international export, re-export, or transfer (“export”) laws. Diversion contrary to U.S.
and international law is strictly prohibited.
1 Introduction...................................................................................................... 6
1.1 Purpose.......................................................................................................................... 6
1.2 Conventions .................................................................................................................. 6
1.3 Technical assistance ...................................................................................................... 6
5 Debug ............................................................................................................. 38
5.1 ADB ............................................................................................................................ 38
5.2 Log messages .............................................................................................................. 39
5.3 Case opening guidelines ............................................................................................. 39
6 FAQs ............................................................................................................... 40
6.1 How do I enable charging on the Pre-ES2 software? ................................................. 40
B References..................................................................................................... 47
B.1 Related documents ..................................................................................................... 47
B.2 Acronyms and terms .................................................................................................. 47
Figures
Figure 2-1 Hardware architecture ................................................................................................................ 9
Figure 2-2 Charger cycle plot .................................................................................................................... 14
Figure 2-3 BC1.2 algorithm flow............................................................................................................... 16
Figure 2-4 Float voltage compensation based on battery temperature conditions ..................................... 20
Figure 2-5 Charge current compensation based on battery temperature conditions .................................. 20
Figure 2-6 JEITA flowchart ....................................................................................................................... 21
Figure 2-7 Parallel charging application with SMB1381 .......................................................................... 22
Figure 2-8 9 V and 5 V charging time comparison.................................................................................... 23
Figure 2-9 Reverse boost (OTG/HDMI/MHL) functional flowchart ........................................................ 25
Figure 2-10 Supporting simultaneous charging and OTG operation ......................................................... 26
Figure 3-1 Software architecture................................................................................................................ 27
Figure 4-1 Charger presence detection flowchart ...................................................................................... 32
Figure 4-2 Type-C detection flowchart ...................................................................................................... 34
Figure 4-3 Battery condition detection flowchart ...................................................................................... 35
Tables
Table 2-1 BC1.2 power source types detected ............................................................................................ 15
Table 2-2 Battery current limit configuration registers.............................................................................. 18
Table 3-1 Battery processes ....................................................................................................................... 28
Table 3-2 USB processes ........................................................................................................................... 28
Table 3-3 Parameter processes................................................................................................................... 30
Table 3-4 Optional device tree settings...................................................................................................... 30
Table 4-1 Battery condition interrupts ....................................................................................................... 35
1.1 Purpose
This document describes the PMI8998 charger concept and objectives. Details provided include
software requirements, design, and verification of the charging feature.
This document is intended for software developers implementing the charging feature to comply
with feature and software design requirements. This document is also intended for test engineers
to design test plans for charging.
1.2 Conventions
Function declarations, function names, type declarations, attributes, and code samples appear in a
different font, for example, #include.
Code variables appear in angle brackets, for example, <number>.
Commands to be entered appear in a different font, for example, copy a:*.* b:.
If you are viewing this document using a color monitor, or if you print this document to a color
printer, red boldface indicates code that is to be added, and blue strikethrough indicates code
that is to be replaced or removed.
Shading indicates content that has been added or changed in this revision of the document.
The PMI8998 is a switch-mode Li-ion battery charger, input and output power controller for
portable devices. The device is used with systems using single-cell Li-ion and Li-polymer battery
packs.
The device is fully programmable via the SPMI interface. Nonvolatile configuration registers
enable device configuration in different power-up states and are used to reconfigure those settings
during operation.
CAUTION: The software is coded assuming that USBIN is at a higher priority than DCIN. Changing this
code might cause issues.
PMI8998 can use the battery as the input source and provide power to the peripherals compliant
with the USB On-the-Go (OTG) specification. To enable OTG mode, reverse the internal path
and use the USB_IN input as an output, providing 5.0 V and up to 1500 mA.
The OTG_EN bit (register 0x1140[0]) is set via the regulator framework software. This bit is
controlled by the USB software for OTG Host mode support and Type-C downstream-facing port
(DFP) mode to supply VBUS.
Battery charging
PMI8998 is compatible with the Alliance for Wireless Power (A4WP) version 1.2 WiPower™
wireless charging specification. When configured in this mode, the DC_IN input limits the
minimum programmable input impedance and maximum input power to 5 W per the A4WP
specification.
For the WiPower applications, the PMI8998 pairs with the Stark divide-by-two charge pump,
which communicates the power transmitting unit (PTU) state and charge pump
divide-by-two/pass-through mode through the CHG_OK and DIV2_EN pins.
IC protection
In addition to safety timers and cell temperature protection, PMI8998 includes a wide range of IC
protection features as follows:
Input and output over-voltage/over-current protection
Thermal shutdown
Charger current or float voltage compensation
Automatic battery discharge
Battery missing detection
An open-drain STAT output indicates various status and fault conditions, which are selected via
the STAT output configuration register.
Figure 2-1 shows the PMI8998 hardware architecture.
WIPWR_RECHG
To QCA
CHARGE_REQ
PMI8998 Charger
WIPWR_CHG_OK
WIPWR_DIV2_EN
WIPWR_RST_N
IDT P9027 Qi/ VCONN_EN To PM GPIO
PMA Wireless VCONN
Charging Rx 28V OVP BOOT_PWR
VDDCAP LDO
VCONN_IN VCONN (5V-6V) 4.7μF
Control 10V
(10V)
40mΩ
A4WP Wireless DC_IN DC_IN_MID
Stark AFE 2 3
Charging PRU 2.2μF
5V-10.3V 4.7uF
16V
16V
Logic/ VPH_PWR
Control + 4
6V
From PM8998 KYPDPWR_N NV Memory Charge FET CP
KPD_PWR_N Control and 5mΩ
current sense VBATT_PWR
SYS_OK
4
To PM8998 PON_1
CBATT 10μF 6.3V
VBATT_SNS_P
FMB1 Battery voltage
To MSM8998 EDL pin To FG IBATT_SNS_M
sense BATT_THERM_BIAS RSNS
FMB2 VBATT_SNS_N (Optional)
To PM8998 CBL_PWR_N To FG IBATT_SNS_P
68.1k
Battery Therm
Monitor
BATT_THERM
USBPHY_ON
To 3rd party USB PHY PON Battery
VREG_S4_1p8 Battery Pack
Identification BATT_ID
To SMB1380 EN for 100k CHG_STAT
parallel charging ID
External Therm
EN_CHG Monitor AUX_THERM
AUX_THERM_BIAS
Precharging phase
When the battery voltage crosses the 2.1 V level, the charger precharges the battery to safely
charge the deeply discharged cells.
The precharge constant current is programmable from 0 mA to 1575 mA in 25 mA steps in
PRE_CHARGE_CURRENT_CFG. The CHARGER remains in this mode until the battery
voltage reaches the precharge to fast-charge voltage threshold programmed in
PRE_TO_FAST_CHARGE_THRESHOLD.
If the precharge to fast-charge voltage threshold is not exceeded before the precharge timer
expires, the charge cycle is terminated, and a corresponding timeout fault signal is asserted.
The precharge current setting is typically programmed to C/10, but can vary by battery pack.
NOTE: When this feature is enabled, the automatic recharge threshold is overridden to the same
threshold if it is set higher than the inhibit threshold.
NOTE: When not used for ID detection or MIPI BIF, the ID must be connected to GND for normal
operation.
4.50 10
Battery Voltage
4.00
Charge Current
Input current Float Voltage
3.50 Vfloat (prog) 1
Battery Voltage (V)
Non-compliant OCP
charger connected?
Yes BC1.2 event
No
Primary detection:
Is the charger
Rerun DCD timer to CDP/DCP
SDP or CDP/DCP?
detect floating charger
SDP
OR
Slow plug-in timer
event (default)*
Secondary detection:
Is the charger
CDP CDP or DCP? DCP
2.3.1 Type-C
When programmed to operate in USB Type-C mode, the PMI8998 charger is fully compliant
with USB Type-C as defined in the USB Battery Charging 1.2 Compliance Plan specification
(www.usb.org).
PMI8998 operates in the following modes:
Dual Role Power (DRP) mode
Power Sink mode (up to 3 A input current, 4.8 A with USB Power Delivery (PD))
Power Source mode (up to 1.5 A output current, 2.0 A with USB PD)
PMI8998 supports the following:
Cable orientation detection for SuperSpeed USB (using the CC_OUT pin and register, analog
audio adapters, and debug mode (Rp/Rp only)
USB PD 3.0 (conditional FR_SWAP support)
Supply Vconn as required for active cables, AMAs, and passive e-marked cables
In addition to USB Type-C compliance, the charger includes Factory mode detection that
leverages the USB Type-C CC interface to enter a Factory Configuration mode.
USB_IN input
The AICL algorithm sets the maximum input current limit to 500 mA for USB_IN connections.
The charger must wait for BC 1.2 detection to complete before the power source is confirmed to
be capable of more than 500 mA (maximum for a USB 2.0 SDP and the worst case scenario). See
Section 2.2 for information on the BC 1.2 algorithm.
During BC 1.2 detection, the AICL algorithm remains enabled if one of the following occurs:
BC 1.2 detects a noncompliant charger (current limit < 500 mA)
A high-resistance cable is connected to USB_IN, which causes a large DC voltage drop
After BC 1.2 detection is completed, the new maximum input current limit is set to the value
programmed in high current register 0x1370[7:0] depending on the detection results.
Outside of these register configurations, the soft JEITA conditions alter the battery charging
current limitation, as described in Section 2.4.1. Refer to PM8998, PM8005, and PMI8998 Power
Management ICS Design Guidelines (80-P1086-5).
2.4.1 JEITA
The PMI8998 fuel gauge manages all battery thermal monitoring. The fuel gauge takes automatic
battery temperature measurements every 1.5 seconds. If the battery temperature exceeds a
preprogrammed soft or hard thermal threshold, an IRQ is generated and sent to the charger
module. There is no built-in hysteresis in the thresholds, but this hysteresis is added by
independent adjustment in software.
The temperature sensing I/O (THERM) is used for adaptive charge current or float voltage
control (that is, charge current and float voltage compensation). These features enable PMI8998
to charge the battery at a reduced current and voltage when the battery pack temperature is
between the soft and hard over-/under-temperature limits, making the device compatible with the
latest JIS8714 and JEITA standards.
The soft hot and cold temperature limits are programmable in the fuel gauge module (refer to
Linux Android PMIC Fuel Gauge Software User Guide (80-P2484-74). The corresponding soft
charge current and soft float voltage settings are also programmable.
If the battery voltage is greater than the compensated float voltage value, charging is disabled
because the termination current has been reached (see Figure 2-6). After the battery temperature
returns to the normal range, charging is only re-enabled if the battery voltage is less than the
automatic recharge voltage threshold.
If the programmed soft-limit charge current reduction value is less than the programmed
termination current value, a false termination event occurs during a JEITA soft-limit condition.
This occurs because the charge current reduces to less than the termination current value. To
avoid this event, ensure that the termination current setting is always higher than the soft-limit
current reduction setting.
I/O (THERM) also prevents excessive battery temperatures during charging. If the temperature
hard limits are exceeded and the JEITA hard limit function is enabled, battery charging is
suspended while safety timers maintain their values but are paused. During this mode, the FET
between the battery and the system is turned on only for the system to be powered by the battery,
but not for charging. The corresponding cold hard limit status and IRQ or hot hard limit status
and IRQ is asserted.
After the temperature level returns to the safe operating range (with hysteresis), charging is
automatically re-enabled, the corresponding fault bit is reset, and safety timers continue counting.
The corresponding status bit is not latched and changes in real time (with hysteresis) as the
temperature moves in or out of the temperature limits.
Charging does not start at all if the battery temperature is outside the specified temperature limits
when charging is enabled (that is, before the hold-off timer has expired).
AUX_THERM_
BIAS
68.1k
SMB1381
THERM2_RMT
Type-C connector
temp (optional)
System
1.0 μH 1.0 μH
VPH
22 μF 22 μF
PMI8998 SMB1381
EN_CHG
BOOT_PWR = 5V
R_UP
STAT THERM2_RMT
Fuel Gauge
AUX_THERM_ (Ibatt, Vbatt,
BIAS temp) Vbatt_PWR Vbatt_PWR
68.1k
AUX_THERM
ISNS_SMB_M VCHG
Phone back
cover (optional) ISNS_SMB_P VDISCHG
Battery
Pack
ID
2.6.2 USB PD
The PMI8998 features a USB PD PHY. The PD PHY is used in both Power Source and Sink
modes to communicate over a single CC line with a connected PD-capable device. Because the
rate of PD communication is faster than the debounce the PMI8998 charger uses to detect a CC
voltage change, this communication co-exists with Rp and Rd. USB PD communication is
initiated as soon as the CC lines are debounced and an Rp value of medium/high current is
detected on either CC line.
NOTE: USB PD communication is not allowed with the Rp standard, because this USB connection is no
longer supported and the pull-up resistance is not strong enough to maintain PD signal integrity.
PR_SWAP
Power role swap (PR_SWAP) makes the charger the power source if it was originally the power
sink, and vice versa. When swapping power roles, the Rp and Rd current sources/resistors swap
to indicate the change of power role. Additionally, if Vconn is being supplied, the source of
Vconn must not change to avoid disruption in power.
An example use case is a dongle with a charging port connected to a PMI8998 device. In this
case, the PMI8998 would provide Vbus and Vconn initially, but the dongle would initiate a
PR_SWAP if a user plugs in a charger to its charging port.
VCONN_SWAP
Vconn swap (VCONN_SWAP) changes the device providing Vconn power, either the Source or
the Sink. An example use case is an active cable connected to a powered USB hub. Because the
hub always has power, the phone requests the hub to power Vconn.
DR_SWAP
Data role swap (DR_SWAP) is the legacy USB equivalent of changing host and device roles. Is
USB Type-C and PD, this is called the upstream facing port (device or UFP) and downstream
facing port (Host or DFP).
This command only swaps the UFP and DFP roles – DR_SWAP has nothing to do with the
power flow direction.
FR_SWAP
Fast role swap (FR_SWAP) is conditionally supported by the PMI8998, because the timing
requirement allows little time to execute the swap. If the current power source is suddenly
removed, this command quickly swaps power roles.
If a powered USB hub provides Vbus and Vconn to all connected devices, FR_SWAP forces a
connected phone to provide both of these power rails within 150 µs if a user suddenly removes
the power. This prevents interruption in data and video when the power removal event occurs.
When the audio boost is configured for OTG operation, an external OVP/OCP chip must be used
to protect the converter and provide current limiting. The configuration in Figure 2-10 enables
simultaneous wireless (DC_IN) charging and OTG support, for applications that do not require
the audio boost.
Software handles the following use cases:
1. Interrupt issued when there is a change in Rid on PMI8998.
2. If an OTG device is detected, the following sequence is executed by software:
a. Enable the USB Suspend mode in PMI8998. It prevents the switcher from enabling when
USB_IN in present.
b. Enable the audio boost.
c. Enable USB3OTG_VBUS_EN (GPIO5) to turn on the external OVP switch.
3. When the OTG device is removed, the following sequence is executed by software:
a. Disable USB3OTG_VBUS_EN (GPIO5) to turn off the external OVP switch.
b. Disable the audio boost.
c. Disable the USB Suspend mode in PMI8998.
Kernel
PMIC charger driver PMIC FG driver USB driver SMB charger driver
[Battery, DC] [BMS] [USB] [Parallel]
ADC ADC
3.2.1 Battery
The battery processes are available via sysfs:
/sys/class/power_supply/battery
3.2.2 USB
/sys/class/power_supply/usb
Process Description
type Type of charger adapter detected (if present)
POWER_SUPPLY_TYPE_UNKNOWN – No charger
POWER_SUPPLY_TYPE_USB – SDP
POWER_SUPPLY_TYPE_USB_CDP – CDP
POWER_SUPPLY_TYPE_USB_DCP – OCP is treated as DCP
POWER_SUPPLY_TYPE_USB_DCP – Floated wall chargers treated as DCP
POWER_SUPPLY_TYPE_USB_DCP – DCP
POWER_SUPPLY_TYPE_USB_HVDCP – HVDCP2/QuickCharge 2.0
POWER_SUPPLY_TYPE_USB_HVDCP_3 – HVDCP3/QuickCharge 3.0
typec_mode Current USB Type-C mode for UFP or DFP of the PMI8998 (if Type-C is
detected)
PMI8998 in UFP mode:
POWER_SUPPLY_TYPEC_NONE – No Type-C present
POWER_SUPPLY_TYPEC_SOURCE_DEFAULT – PMI8998 presenting UFP
with a default power Type-C current capability detected
POWER_SUPPLY_TYPEC_SOURCE_MEDIUM – PMI8998 presenting UFP
with a Medium power 1.5 A Type-C current capability detected
POWER_SUPPLY_TYPEC_SOURCE_HIGH – PMI8998 presenting UFP with
a High power 3 A Type-C current capability detected
PMI8998 in DFP mode:
POWER_SUPPLY_TYPEC_NONE – No Type-C present
POWER_SUPPLY_TYPEC_SINK_AUDIO_ADAPTER – PMI8998 presenting
DFP for an audio adapter
POWER_SUPPLY_TYPEC_SINK_DEBUG_ACCESSORY – PMI8998
presenting DFP for a debug accessory
POWER_SUPPLY_TYPEC_SINK_POWERED_CABLE – PMI8998 presenting
DFP for a powered cable
POWER_SUPPLY_TYPEC_SINK – PMI8998 presenting DFP for an attached
UFP Type-C device
POWER_SUPPLY_TYPEC_SINK_POWERED_CABLE_ONLY – PMI8998
presenting DFP for an attached powered cable with no Type-C UFP device
attached on the other cable end
typec_power_role VBUS charger presence status on:
USBIN POWER_SUPPLY_TYPEC_PR_NONE – No type-C present
USBIN POWER_SUPPLY_TYPEC_PR_DUAL – PMI8998 is DFP
USBIN POWER_SUPPLY_TYPEC_PR_SINK – PMI8998 is UFP
USBIN POWER_SUPPLY_TYPEC_PR_SOURCE – PMI8998 is DFPF
typec_cc_orientation Indicates the orientation of the Type-C cable (if present) based on the PMI8998
CC_OUT pin:
0 – No Type-C attached
1 – CC1 attached
2 – CC2 attached
pd_allowed USB power delivery allowed status (not allowed if Quick Charge is detected
because QuickCharge takes priority)
pd_active Active status of USB PD
3.2.3 Parameters
/sys/module/qcom,qpnp-smb2/parameters
NOTE: The qcom,suspend-input setting is in the default software device tree for pre-ES2. This
setting prevents all charging. To enable charging, remove this setting from the device tree.
4.1.1 BMD
PMI8998 provides three options for battery missing detection (BMD) (address – 70, register:
BM_CFG[2:0]):
BATT_THERM – Battery pack thermal monitor
BATT_ID – Battery identification pin
BMA – Algorithm that checks for battery terminal pin presence
When not used, BATT_THERM must be connected to GND for normal operation.
When not used (for ID detection or MIPI BIF), BATT_ID must be connected to GND for normal
operation.
Refer to Section 2.1.6 for more information.
type in software. The USB_PHY power supply is not updated until type detection is completed.
See Section 4.3.
YES
NO
NOTE: This input current is lowered during runtime depending on a number of conditions, but the
current is never allowed to exceed these device tree settings.
4.3.1 qcom,suspend-input
Boolean flag indicating that the ccharger must not draw current from its input sources (USB,
DC).
Usage Optional
Value type <empty>
Example
/arch/arm/boot/dts/qcom/msm-pmicobalt.dtsi
pmicobalt_charger: qcom,qpnp-smb2 {
compatible = "qcom,qpnp-smb2";
#address-cells = <1>;
#size-cells = <1>;
qcom,pmic-revid = <&pmicobalt_revid>;
dpdm-supply = <&qusb_phy0>;
NOTE: The qcom,suspend-input setting is in the default software device tree for pre-ES2. This setting
prevents all charging, to enable charging, remove this from the device tree.
4.3.2 qcom,usb-icl-ua
Specifies the USB input current limit in micro-amps.
Usage Optional
Value type <u32>
Example
/arch/arm/boot/dts/qcom/msm-pmicobalt.dtsi
pmicobalt_charger: qcom,qpnp-smb2 {
compatible = "qcom,qpnp-smb2";
#address-cells = <1>;
#size-cells = <1>;
qcom,pmic-revid = <&pmicobalt_revid>;
4.3.3 qcom,dc-icl-ua
Specifies the DC input current limit in micro-amps.
Usage Optional
Value type <u32>
Example
/arch/arm/boot/dts/qcom/msm-pmicobalt.dtsi
pmicobalt_charger: qcom,qpnp-smb2 {
compatible = "qcom,qpnp-smb2";
#address-cells = <1>;
#size-cells = <1>;
qcom,pmic-revid = <&pmicobalt_revid>;
4.3.4 Type-C
Input current limitations based on Type-C cable capability detection is done completely in
hardware. The type-c-change interrupt notifies software of Type-C detection. The
smblib_handle_usb_typec_change() interrupt handler runs if there is a change in Type-C presence
detection. Figure 4-2 outlines the code flow for Type-C detection. Hardware limits current.
TYPE_C_CHANGE IRQ
[smblib_handle_usb_typec_change()]
Is CC_OUT Hi-Z?
(TYPE_C_STATUS_4_REG[0]
CC_OUT is Hi-Z, handle charger removal
Yes =0)?
[smblib_detach_usb()]
[smblib_handle_typec_cc()]
No
No
Yes
Update usb_psy
[power_supply_changed(chg->usb_psy)]
bat-temp IRQ
bat-ocp IRQ
bat-ov IRQ Update the battery power_supply
Battery condition
bat-low IRQ since charging conditions have changed
interrupt triggers
bat-therm-or-id-missing [power_supply_changed(chg->batt_psy)]
bat-terminal-missing
[smblib_handle_batt_psy_changed()]
4.4.1 qcom,fcc-max-ua
Specifies the maximum fast charge current in micro-amps.
Usage Optional
Value type <u32>
Example
/arch/arm/boot/dts/qcom/msm-pmicobalt.dtsi
pmicobalt_charger: qcom,qpnp-smb2 {
compatible = "qcom,qpnp-smb2";
#address-cells = <1>;
#size-cells = <1>;
qcom,pmic-revid = <&pmicobalt_revid>;
smb2_vconn: qcom,smb2-vconn {
regulator-name = "smb2-vconn";
};
/arch/arm/boot/dts/qcom/msm-pmicobalt.dtsi
pmicobalt_pdphy: qcom,usb-pdphy@1700 {
compatible = "qcom,qpnp-pdphy";
reg = <0x1700 0x100>;
vdd-pdphy-supply = <&pmcobalt_l24>;
vbus-supply = <&smb2_vbus>;
vcon-supply = <&smb2_vconn>;
For information on Linux kernel regulator controls, refer to MSM8998.LA Linux Voltage
Regulator Software User Guide (80-P2484-79).
Enable or disable the VBUS supply for OTG or Type-C (PMI8998 as DFP)
smblib_vbus_regulator_enable()
Enables the OTG_EN bit in the OTG_CMD_OTG register (0x1140[0]=1).
smblib_vbus_regulator_disable()
Disables the OTG_EN bit in the OTG_CMD_OTG register (0x1140[0]=0).
smblib_vconn_regulator_disable()
Disables the VCONN_EN bit in the TYPE_C_INTRPT_ENB_SOFTWARE_CTRL register
(0x1368[3]=0).
5.1 ADB
Use the Android debug bridge (adb) shell to capture dumps from the following sources:
PMI8998 register
USB
Battery power_supply sysfs nodes
5. Disconnect the device from the PC USB, and run the following commands (replace
192.168.68.167 with the device IP address):
cat data
echo 0x21500 > address
cat data
echo 0x21600 > address
cat data
echo 0x21700 > address
cat data
Run the following commands in the adb shell (must be reissued every power cycle):
adb root && adb wait-for-device
adb shell
echo 0xFF > /sys/module/qcom,qpnp-smb2/parameters/__debug_mask
2. Collect the kernel logs using the following adb shell command:
pmicobalt_charger: qcom,qpnp-smb2 {
compatible = "qcom,qpnp-smb2";
#address-cells = <1>;
#size-cells = <1>;
qcom,pmic-revid = <&pmicobalt_revid>;
The input current limits by charger type in the following table only applies to 2.0 silicon for PMI8998 (not 1.0 silicon).
Use BC1.2 for
Type-C Legacy ICL min ICL start
BC1.2 result DCP, OCP, or ICL max (mA) Charger type
result cable? (mA) (mA)
floating?
SDP_100 / Standard Yes N/A 25 100/150 100/150 Legacy charger with Type-A to Type-C
USB100 (disabled) current cable
SDP_100 / Medium No N/A 25 500 max(ICL_CFG, Type-C 1.5 A charger with Type-C to
USB100 (disabled) current 1500 mA) Type-C cable
SDP_100 / Medium Yes N/A 25 100/150 100/150 SDP charger with noncompliant legacy
USB100 (disabled) current Type-A to Type-C cable
SDP_100 / High No N/A 25 500 max(ICL_CFG, Type-C 3.0 A charger with Type-C to
USB100 (disabled) current 3000 mA) Type-C cable
SDP_100 / High Yes N/A 25 100/150 100/150 SDP charger with noncompliant legacy
USB100 (disabled) current Type-A to Type-C cable
SDP_500 / Standard Yes N/A 25 500 500/900 Legacy charger with Type-A to Type-C
USB500 (disabled) current cable
SDP_500 / Medium No N/A 25 500 max(ICL_CFG, Type-C 1.5 A charger with Type-C to
USB500 (disabled) current 1500 mA) Type-C cable
SDP_500 / Medium Yes N/A 25 500 500/900 SDP charger with noncompliant legacy
USB500 (disabled) current Type-A to Type-C cable
SDP_500 / High No N/A 25 500 max(ICL_CFG, Type-C 3.0 A charger with Type-C to
USB500 (disabled) current 3000 mA) Type-C cable
SDP_500 / High Yes N/A 25 500 500/900 SDP charger with noncompliant legacy
USB500 (disabled) current Type-A to Type-C cable
USBAC (disabled) Standard Yes N/A 25 500 max(ICL_CFG, Legacy charger with Type-A to Type-C
current 1500 mA) cable
USBAC (disabled) Medium No N/A 25 500 max(ICL_CFG, Type-C 1.5 A charger with Type-C to
current 1500 mA) Type-C cable