Add a file point interface to let tcmd could force wls
chg when usb&wls connected at the same time.
Change-Id: I545cc4d7ac8ffa562596ed85706b62fcacc718dd
Reviewed-on: https://gerrit.mot.com/2263182
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
For special factory test, USB DP/DM may should not be
operated when VBUS status changed. So we will add
DP/DM operation ignore options in power supply property.
Change-Id: I226c02cf126ecae9308804334c1bdbfb933d7bac
Reviewed-on: https://gerrit.mot.com/2263246
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
For original code from vender, some registers are defined
incorrectly. We should fix them as CPS4019's data sheet.
Change-Id: I2e5004a0578cbcd92ee046cea7e8d1af6e6900f3
Reviewed-on: https://gerrit.mot.com/2262811
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
all mmi power supply defined in mmi_discrete_power_supply.h
to remove discrete defined in many files.
Change-Id: I41c978961072f7aedf398df0984467d3d7d089b1
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2261274
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Wei <weiweij@motorola.com>
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Use delta OCV to limit the charging current to improve the controlling
policy accuracy as battery SOC may be incorrect for FG issue.
Change-Id: I55eda8f32d833ece0b281732b34bd4357fbdb6ef
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2259903
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
To implement 68w fast charging , the adapter would be
provide the maximum 11v/6.2A APDO to phone.
In USB Power Delivery Specificatin, the PPS Source shall
deliver the Maximum Current only up to 5A,
therfore, to achieve 11v/6.2A APDO, the moto private charge
protocol need to be developed,
Use VDM(Vendor-defined message) to exchange the authenticaion
information between PD charger and phone.
and Use HMAC-Sha256 encryption algorithms to ensure authentication
security.
Change-Id: I5d7561fece060adfdb21d24de90277dddab10b55
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2252818
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
For cps4019 driver will call the fucntions in mmi_discrete_charger,
so we should add the relatvie dependence.
Change-Id: I8dc350da427ca076c2be3feaa1e7390fd557edbf
Reviewed-on: https://gerrit.mot.com/2258487
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Adding discrete charger symbol, to let wls4019 driver
could use interfaces in charger class. And the name of
main_charger is configured in dts file.
Change-Id: Ic74d77f6645c0b166feaafb3ee354b7d12323ccc
Reviewed-on: https://gerrit.mot.com/2255421
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
kernel_neon_begin and kernel_neon_end didn't disable preemption,
then SIMD and VFP instructions will be executed in a non-preemptible
section.
Use integer instead will be safer and effective.
Change-Id: I02db0845fcbd135f25423f38c72c7a9d1622e450
Reviewed-on: https://gerrit.mot.com/2256755
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Qiong Xie <xieq2@motorola.com>
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
Added sysfs_notify call and make status & position show methods
waiting for updated values
Change-Id: Ib19dd3e362a70b6c5217821a46a2f3eb679452ac
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2244143
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Added support for the following:
1) status and position changes
2) sensor data polling
3) allow polling status and position in HAL
Change-Id: I73d7c46f0ff7fbdaf703f16d0500c634fae1e721
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2237771
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Support for accelerated motion. Only distinct status reported.
Added position interface to shutdown motor based on signal from
sensors
Change-Id: I44f7eeb4b86f84c2542c0c29feec42bb7b346e16
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2231441
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Initial driver code for TI DRV8424 stepper motor. Based on AW8646
from Awinic. This is just to create an entry point. Needs a lot
of work
Change-Id: Ied7eb3f05801f457494feff098c3b78b3813d30b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2231338
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
For original usage, function check_chip_id is used to decide
whether FW need to be upgraded. But we have change it by
FW version checking. So this function will not used any more.
We should remove it.
Change-Id: Idbf875a8491f8321755c56f9b8cc5f2310409214
Reviewed-on: https://gerrit.mot.com/2255040
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
In normal use, we may need to update FW to fix some
chip bugs. So we need to add fw check logic to decide
if the FW should be updated. And the latest FW version
is defined in dts file.
Change-Id: I4642dcd311b2fe6dc85c316efd88fa50d50e6a76
Reviewed-on: https://gerrit.mot.com/2254034
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
1. Consider the battery is absent if battery temperature
is lower than -30 degree C.
2. Disable bq27426 register dump for debugging in heartbeat
work.
3. Change the heartbeat work interval to 60s.
Change-Id: I043c6a28f998668a0dad7f39b75f21fb1b3c6f1f
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2253210
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
As I_BDEV cannot be used in GKI build before
kernel version 5.15, so add kernel version
check when use I_BDEV.
Change-Id: I7f02b64434559d4a1e00a2c8ea6b38bb1288957b
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2252790
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
the NTC connect to pmk8003.
miami use this NTC to monitor the battery temperature.
the fg get this batt_temp and report to power_supply
Change-Id: Ic983a64ebc971e8873173bec5610168496d07c45
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2252160
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
SM8550 product use kernel 5.15, and utags driver build errors:
1.BIO_MAX_PAGES has been rename to BIO_MAX_VECS
.../drivers/misc/utag/utags.c:171:41: error: use of undeclared identifier 'BIO_MAX_PAGES'
num = (left_pages >= BIO_MAX_PAGES) ? BIO_MAX_PAGES : left_pages;
2. get_fs and set_fs() are not exported from 5.15
drivers/misc/utag/utags.c:1268:7: error: implicit declaration of function 'get_fs' [-Werror,-Wim
fs = get_fs();
3. uselss fp variable that is not used
Change-Id: Ia031b5042124a608cdcf956795bd2e0bd6844689
Reviewed-on: https://gerrit.mot.com/2237918
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
When wls charger connected, charger core will get charger type
from "online" property of wls. And set relative charging current
as dts configuration "mmi,wls-max-icl-ua".
Change-Id: Ie20fd2fb44a4dda15fc5d94e227a5a29a0eed6b2
Reviewed-on: https://gerrit.mot.com/2250276
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
Add status judgment for register reading, If register reading return an
error, we should regard it as status "false".
Change-Id: I6072ac01dcf531256e036bdc9814e0c5f9ffeb14
Reviewed-on: https://gerrit.mot.com/2251647
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
Unprotected floating point operation in kernel might corrupt
NEON register and cause many random native crashes.
Add kernel_neon_begin and kenrel_neon_end to protect floating
point operation in wt6670f module.
Change-Id: I2a3a4a3ac1ce78513211ca669eb25c808653f0cc
Reviewed-on: https://gerrit.mot.com/2251071
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
set reset high
as vendor
Change-Id: I8c526e740f2fadaeca9784a2866bc58ad7a1cc99
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2251003
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
no charger type detect after power on
schedule charger type detect in rt9471_probe()
Change-Id: I4d0c01fd3c68c0716baadf8563555a172e945bb9
Signed-off-by: longc102 <longc102@motorola.com>
Reviewed-on: https://gerrit.mot.com/2249214
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qiong Xie <xieq2@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
Different project use different wireless chip,
Need to define new wireless dump info struct,
Add WIRELESS_CPS4035B macro definition.
Update new wireless dump info base on WIRELESS_CPS4035B
Change-Id: Iadb02771c420540c5ac119a9c32fe9adcbb25536
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2248230
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
details;
No vibration when media controls working
Change-Id: Id8820adc0d0eb5c8dfc20a27df87a1410e307278
Signed-off-by: kankan5 <kankan5@motorola.com>
Reviewed-on: https://gerrit.mot.com/2246470
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenghai Pan <panzh2@lenovo.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
CQA test fail at battery info
if ic status is ready, charge status should be not charging
Change-Id: Ifd83cd1dc2c122a70f1b90e275405e3448986cf7
Signed-off-by: longc102 <longc102@motorola.com>
Reviewed-on: https://gerrit.mot.com/2247969
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qiong Xie <xieq2@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
In order to improve the accuracy of load switch controlling policy
use battery OCV instead of vbat to calculate the delta battery voltage
based on vbat, current and ESR.
Add panic debounce when decide to turn off load switch for high
battery voltage diff between flip and main battery.
Change-Id: Ib9b374952a8f6400e008953b123b4878b17fbe4f
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2247225
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Support init bm ulog to print the bm ulog at init
stage to dump adsp init log at bm ulog driver probe.
The adsp init log will help to address the issue during
adsp module init stage.
Change-Id: I4c1a79da57f73463d885ff25466444c73036f43b
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2246243
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
FOD:
Do not disable Zero Tap when FOD is not enabled.
Change-Id: Ica9d40e412ecdc00df44d0ed09103b7cda997092
Signed-off-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-on: https://gerrit.mot.com/2246137
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key