The new added api is necessary for building Exfat DLKM. All of
them could be found in the latest abi_gki_aarch64*.xml file.
Change-Id: I53a02ecd583a83b6d44b37e869f8d33784094e00
Reviewed-on: https://gerrit.mot.com/1783216
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
origin CR: (CR)
For nomal gpiochip add logic, gpiochip base value will be down from
1278. And as a result, tlmm gpiochip base value may be a random
value next to 1278. If we want to use tlmm gpio as its real number(
for example, number 21 for gpio21), tlmm gpiochip base must be 0.
So we add this logic to check if its base value need to be defined by
dts configuration.
Change-Id: Ic4ccdf9791673ce81ea49a8653449adabe0b0a4f
Signed-off-by: weiweij <weiweij@motorola.com>
Reviewed-on: https://gerrit.mot.com/1509841
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1780451
Prop from (CR)
If we have usb digital headphone pulled in during bootup. It will occupy
index 0. primary sound card can only use index 1. But in our most audio
code, We assume the primary sound card is 0. This will cause no sound
issue when we use primary sound card to playback and record.
Change-Id: If6635c4b7adef0925af8145d4b728f3cc481b9ad
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1780715
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuesheng Huang <huangys@motorola.com>
Submit-Approved: Jira Key
pick from (CR)
Some dogfood users reported call has no sound problem, it happens on
the first bootup after BOTA upgrading, if reboot again, everything will
be okay.
According to kernel log, filesystem mount timed out, causes locator
service timed out.
[libfs_mgr]Retrying mount (source=/dev/block/bootdevice/by-name/
userdata,target=/data,type=f2fs)=-1(11): Try again
servloc : init_service_locator: init_service_locator:wait for locator
service timed out
After discussing with Qcom, they suggest to enlarge this timeout value.
Change-Id: I73386e97fca953775f88e6f673c9bab6b9aabd06
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1780699
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Yuesheng Huang <huangys@motorola.com>
Submit-Approved: Jira Key
The "kobject_get_path" functions can be found in the latest google
whitelist, so update the qcom whitelist for touchscreen.
Change-Id: Iddf594aa3376c3473398127439de8c42026d48cc
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1780553
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
For Pmi7150, when cabc enabled , there is backlight flicker,
under the low brightness ,the issue is caused by the accuracy
of wled accumulation.
Qcom do not recommend use cabc under the low brightness.
(CR) wled: disable cabc when bl off or bl lower than threshold
Disable cabc when bl off or bl value lower than threshold
Enable wled when bl value bigger than threshold
Port of : 9738ea6226f244dc7b97ac90226707c2c5e249cb
ce90bd688748bf7aa9e84b1e40e883456a1a2378
Change-Id: Ia8a2e1c954482f633d308a3c1f730bee15d3f0b8
Reviewed-on: https://gerrit.mot.com/1778412
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
WLED_SINK work at different mode with the different brightness.
When swithing between these modes, that will cuase ovp and ocp issue.
This is hardware issue from qcom.Qcom can not fix it with hardware
solution,So add brightness step control workaround for pfm issue.
We define the step with "qcom,wled-bl-step-sequence"
Port of: 6fa66a51e95748f92919ad7e647e13b162dbc2c4
Change-Id: Ib252f2b47819b3e358c5f995d577a5e0085c3f8f
Reviewed-on: https://gerrit.mot.com/1778397
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
When build GKI, this driver will be built as module but "__setup"
is unavailable for module, so remove it on GKI
Change-Id: Ia49f07220c2515e19bd04f78bd7ffaf4bd316d20
Reviewed-on: https://gerrit.mot.com/1779563
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
While eventpoll waking up from suspend, just very vague information gets
printed as below, which is not helpful to track wake up source:
[ 292.536658,2] last active wakeup source: eventpoll
Append process command name and PID to wake source name at registering
to make the name more informative. With this change, log would be l(CR):
[ 130.478865,2] last active wakeup source: eventpoll-healthd-905
Change-Id: I0b0d4bbb3396a11a533141e87f08f10454260411
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/987224
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1533155
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1779323
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
The "hw_warmreset" reboot command, it indicates the kernel to trigger
warm reset for saving lastkmsg. After the system warm reboot, the AP
will save last kmsg logs and call a clean cold reboot with the
"post-hw_warmreset" command.
Change-Id: I3a25735a4e9ff0ab72c05d3ba2914d80477d30dc
Reviewed-on: https://gerrit.mot.com/1536789
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1778586
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
add two debug interfaces:
1.when set cmdline "sys_restart_mode=warm", the kernel will reset with
WARM way.
2.when set cmdline "sys_restart_mode=panic", the kernel will enter into
ramdump when it normal reset.
Change-Id: Id70063bac7d0951622c6e074c2ba2ec024374022
Signed-off-by: xizx <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1117501
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1345290
Reviewed-on: https://gerrit.mot.com/1406867
Reviewed-on: https://gerrit.mot.com/1463612
Reviewed-on: https://gerrit.mot.com/1778583
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
After cold reset is introduced, the phone is cold reset instead of
warm reset, such as panic. In this case, the power up reason saved
in shared memory will be lost. Consequently, the power up reason on
next boot up time will be normal boot instead of correct ones. To
resolve this issue, we can use the two spared pmic registers which
are power lost safe to save the restart reason for these cases.
Motorola definition of AP panic bit set in extra info pmic reg
conflicts with QC definition of Warm reboot bit set in extra info reg
move Mot bit to available position to avoid conflict
Force a cold reboot for the command "adb reboot bootloader"
to avoid the warm boot when user tries to continue boot from boot menu.
For early kernel panic before PMIC is initialized, the function
qpnp_pon_store_extra_reset_info will fail. Need to set IMEM flag
for fail safe in this case.
For post-panic, post-wdt, post-pmicwdt reboot, we do cold reset.
And set the PMIC register accordingly, to nofity BL the special
reboot behavior.
Configure panic as warm restart, so that we have chance to get panic logs.
According to SR 01277290, 0x88D and 0x88E are spare registers for PMIC
where we could store oem specific reset information
Ported from: https://gerrit.mot.com/#/c/1211826/
Change-Id: Id3a010b8a52e72180685b1f92491d9616b2cb714
Signed-off-by: Andrew Abbott <drewa@motorola.com>
Reviewed-on: https://gerrit.mot.com/1446282
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1778582
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Based on KBA-200505201040
Print out timer wake-up info to debug the sources
of pm8xxx_rtc_alarm wake-ups.
Change-Id: I39f24dad0613a08844eefcd25076831589256e52
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1668046
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1778266
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
From (CR)
This app manages secure state as set by bootloader. Reloading would
clear the state. This solution is limted by some alternate
way to force unloading our prov TA and then restarting it
outside bootloader.
Change-Id: Ic219f60d12ce202a55af70dfa95c1c7d7cfdf121
Signed-off-by: linyx10 <linyx10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1774860
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Binsheng Que <quebs2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Disable compression of the pstore,
so the bootloader can read it more easily.
Change-Id: If2d33f1b097f6612a0d810eae79354b086251b19
Signed-off-by: Xianshan Wang <wangxs8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1462923
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1773806
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
ramoops,wdog,tzlog,annotate address are continues, it is easy
to make mistakes for manual calculation address.
Change-Id: If0666017363d2a3d7840f4e2fe197a03c589fec2
Reviewed-on: https://gerrit.mot.com/1773394
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
In user version, Moto kernel policy will mask all KERN_INFO
log to console, so change the power key press or release event
log level to make it work in user versions.
Change-Id: Ia4e7c33819f1e50b6a7778ea186bd1c83890b818
Reviewed-on: https://gerrit.mot.com/1545783
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1771194
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Support the way to find the battery profile by serial
number of battery in battid utags.
Change-Id: I05b3368e151b153ba20417b34cd1c73cfe3c9754
Signed-off-by: yanyh2 <yanyh2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1178205
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1338748
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/1447561
Reviewed-on: https://gerrit.mot.com/1771166
To provide a sysfs node to reset the usb_dcp_icl_ua threshold,
For handle different DCP icl setting for different SKU regions,
Add a sysfs node in smb5 for that.
Force rerun APSD after rewriting usb_dcp_icl_ua
Change-Id: If7fcd97de95457dea5bcabcb41612bd1c9abdecb
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1686899
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1771138
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
kernel panic occurs in smb5_prob when the usb_dcp is not set
in vhw.xml.
modify error handing in smb5_parse_dt_mmi to avoid this case
Change-Id: I12218ef1c067c5c23dd689c9fb88eb41ef8fa606
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1681297
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1771131
Read usb_dcp configration from the properity of "mmi.usb_dcp"
the setting is in vhw.xml.
Different sku have different requirements for DCP current
Change-Id: Id01a4aa02b69b273a272835054ce1d97b50f3ff9
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1673650
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1771130
the usb_icl_votable has been voted at policy-engine through
the PD communication protocol, In smblib_pd_contract_work,
we actually needn't override its setting, if want to re-vote it,
the value must not be greater than the result after PD contract.
Change-Id: I4a9c7c52709c60fa51a6d1aa2125bbafb52e81df
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1636223
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1771126
Base on Kernel built-in Moto PD controlling policy, pdo select depends
on PD voltage max, so the product should decide which USB PD voltage is
allowed, including the USB PD input power(Hardcode 18W in current code).
Different product design may require different USB PD voltage allowance
and USB PD input power max allowance.
Current Moto PD controlling policy only applies to FIXED pdo but not
programmable pdo(PPS), which requires periodic PD output power
acknowledgement(at least 10s interval). So it has to redesign current
Moto PD controlling policy to support PPS pdo selection.
In order to avoid any PD controlling policy conflict with third party
disable the PD controlling policy modification interfaces for user space
(may be used by hvdcp_opti daemon in Qcom platform).
Change-Id: I7565e187e2619252bc6d611b7f4aabc90b72c687
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1461008
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1771065
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
add sdam-magic-number parameter to judge if using
the different battery profile. we need clear sdam when
using different battery profile.
Change-Id: I248edf52f767abbadb1934328b88f8048af4a782
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1549720
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1553272
Reviewed-on: https://gerrit.mot.com/1771064
As icl override has been done in sdp icl setting, so
there is no need to set icl override again after sdp
icl settting.
The icl override for the second time will use HW_AUTO_MODE
so the HC mode in register 0x1366 will be enabled.
In that case, the USB ICL settled will exceed 500mA with SDP
APSD result if a non-standard USBA-C cable is attached.
When use this USB cable, the typec orientation cannot be detected
as it always shows 0, but typec mode can be detected.
pm7250b_charger: smblib_update_usb_type: APSD=SDP PD=0 QC3P5=0
pm7250b_charger: smblib_icl_change_work: icl_settled=2450000
Change-Id: I3dee9b17a296d1f3a7f57f78a0162ced02f71c7e
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1544008
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1771041
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Old ticket (CR)
MMI Factory mode needs to be followed so change base QCOM.
This patch is needed to ensure that from the time smb5
loads to the mmi DLKM loads there is no charging.
Only needed for Factory purposes.
Change-Id: I3011dbfc3382d382be2fb3c07c02597bfa953d77
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1255092
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1526255
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-on: https://gerrit.mot.com/1771036
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
In current factory environment, after USB OTG test(USB pins will be reconnected),
the typec mode detection is prior to vbus detection sometimes, and the
typec mode will be DEFAULT.
Then after the first time of apsd, the apsd result and real_charger_type
become SDP.
As a workaround for APSD detection issue, there will be APSD rerun if
the first APSD is SDP.
If there comes a usb_source_change irq right after apsd rerun, the pd policy
will receive the usb power change event and check the typec mode,
and real_charger_type, finally, it starts the USB enumeration as
typec mode greater than DEFAULT and real_charger_type is SDP.
At that time, APSD rerun and USB enumeration may collide and make conflict,
which is the reason why the second APSD gets a wrong result(DCP/HVDCP2)
and USB connection gets lost.
In order to avoid this situation, reset the real_charger_type to unknown
when rerun apsd, so that the USB enumeration will not be triggered by
pd policy unexpectedly but by charger driver.
Change-Id: Ifdde0a847ef18518a204f67843e61c6b5a9e7401
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1523010
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1771030
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
ICL is set to 1000ma when BC1.2 result is OCP charger
with med or high type-c rp current.
(think plus usb-c book charger pack)
So don't override USB icl when type-c rp current is med or high.
Change-Id: Id3f9daedfbcf905b99612ba1977b2c710a764cba
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/1465715
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1503915
Reviewed-on: https://gerrit.mot.com/1770998
Sometimes, a charger may be detected as SDP after apsd for the first
it plugins, add rerun APSD to reduce the APSD failure for the first
time.
Set the initial USB ICL to 500mA in case USB controller never complete
enumeration to set the target ICL.
Change-Id: I60aedd478fe890f1c40a202e3b0df4e64658cMontana
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1420421
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1502930
Reviewed-on: https://gerrit.mot.com/1770982
When use the CC pin floated USB cable to connect to
PC or charger, typec mode cannot be detected, so it
cannot use the typec removal when USB cable is removed.
Since this USB cable make the device function as micro
usb, so just call the micro usb removal.
Change-Id: I6cf9fbcffa1fe05bade64dfce9309977e782eba4
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1390306
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1770289
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Limit the usb icl to 1000mA for OCP chargers(BELKIN 5V/1A)
to avoid sudden vbus loss when the current load over 1000mA.
Change-Id: Iad650afcb0263e861171223967d3ab5a688346c3
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1371196
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1770268
Attach Turbo charger to a phone, its screen shows the messages:
"Charging", followed by "Slowly Charging" and then finally
"TurboPower connected". Display messages are confusing.
This is because the USB ICL takes a period time to get settled
down from low icl to the target icl.
So here just return the target ICL to avoid this situation.
Change-Id: I1a3e4641c31fde6b59cc017e01b26a6ea12c6d15
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1364059
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1770261
Commit "update parallel algorithm for ICL change" breaks type-C
Analog Audio adapter detection at boot time. Avoid re-running
AICL at boot (when icl_ua is unitialized) and also minimize
the wait time for AICL to complete.
refer to https://gerrit.mot.com/994075
Change-Id: I7ce1d76a9e10684f478cfff36cd631ed4066143b
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/1270015
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1770260
When connect the device to the typec port of a PC with high
or medium source advertise, the USB ICL is overridden by USB
phy voter with 500mA.
But for non-legacy typec, the typec source advertise should be prior
to usb bc1.2. So add condition check when set the USB ICL vote from
USB driver, if there is high or mid typec source advertise, and just
skip the USB driver ICL voter.
Change-Id: I519cf1afec40857ca640727fee6cc11f262af492
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1355853
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1770259