Some of PC USB3.0 port don't support bcdUSB 2.1 version.
But the phone bcdUSB will focus on bcdUSB 2.1.then USB gadget will
reset continually.Change bcdUSB to 2.0 to compat all PC USB port type.
07-02 08:05:34.853 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt
07-02 08:05:35.182 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt
07-02 08:05:35.415 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt
07-02 08:05:35.647 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt
07-02 08:05:44.171 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt
Change-Id: Icb46a95226caecc9778c6889a85654f97fa85012
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1383246
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
Reviewed-on: https://gerrit.mot.com/1449152
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-on: https://gerrit.mot.com/1511641
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
The gadget driver unregister/probe is not allowed to reentry
for the same udc.
As the conditions for gadget driver unregister/probe entry,
gadget secure and udc_name status should be synchronized.
Otherwise, in old implement code logic, there is still a chance
to fall into trouble of gadget driver unregister/probe reentry
for the same udc.
Change-Id: I6eb30a36eab84afd656f5bee9678e8d44933c6bc
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1287442
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1338870
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1449122
Reviewed-on: https://gerrit.mot.com/1511640
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
There will be gadget driver unregister twice in USB secure
when try to set the UDC to none from userspace, which will cause
kernel panic in 4.9 kernel version, as there is a feature
about pending gadget driver list being added in this version.
As a solution, make sure gadget driver unregister or probe only
once over secure mode entry or usb configure from userspace.
Kernel BUG at ffffff8093067140 [verbose debug info unavailable]
Internal error: Accessing user space memory outside uaccess.h
routines: 96000045 [#1] PREEMPT SMP
PC is at usb_gadget_unregister_driver+0x88/0xf0
LR is at usb_gadget_unregister_driver+0x30/0xf0
Change-Id: I77dfbd4162c7a4d96bbe297Montana4c99e876f5cf88
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1287125
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1338869
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1449121
Reviewed-on: https://gerrit.mot.com/1511639
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Moto diag driver built-in or DLKM requires DIAG_OVER_TTY
for both user and userdebug version.
Change-Id: I5f6bec18700f3fd8a5198266625837b8830fa10e
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1510729
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
Touch driver can call the api to set the touch state.
And panel driver can call the api to get the touch state.
And when the touch state is not 0,
we can not power down panel.
Change-Id: I3cb0dceeb7ff9b0f731c0ce2d9f2fea2e648d223
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499392
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509882
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
This is designed to allow other drivers to know about panel events. It
also enables drivers to inject synchronous operations into the panel
state flow, by blocking the panel state changes at various points.
An example of this would be if a driver would l(CR) to know when a panel
is on and do an operation before the video stream to that panel begins.
Signed-off-by: Jared Suttles <jsuttles@motorola.com>
Reviewed-by: Shi-Yong Li <a22381@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Joseph Swantek <jswantek@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Change-Id: I94594c93e2b989ff93271f116e010baaf774c6de
Reviewed-on: https://gerrit.mot.com/1469162
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1470251
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Reviewed-on: https://gerrit.mot.com/1509864
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
For the Secure UI feature, the display feature, which allows host to
read-back its internal memory buffer, should be disable. The MIPI DSI
command 0x2E (read_memory_start) and 0x3E (read_memory_continue) will
be disable.
Port from: bde6847
Change-Id: Ifc2579051e8005de5e915aad1bccd883c681572f
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444417
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509784
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Provide a small convenience wrapper that set the display 2bytes
brightness
Port from: 4a5c926
Change-Id: Iadfcb1d6cdf4866391f36ee970d79840e109fe9a
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1410287
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509783
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Enable pstore config to save dmesg on panic and
watchdog
Change-Id: Ib593b780fcf10059c4e795491756646747528058
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1510456
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
Add dynamic aspect to the status property. Conditional status
references another property and changes availability of the device
node based on the value of the referenced property. This allows
to manipulate the device tree at boot. For example, change availability
of certain devices based on a property set by the bootloader under
"/chosen" node. Syntax allows partial match of specified property
value by adding keyword "contains" in front of values list.
Propagation of (CR).
Change-Id: I3a69fe1b95c2e140feff54edb7048a5610a94d0c
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1439246
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509716
Reviewed-by: Wang Wang <wangwang1@lenovo.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/1446282
Change-Id: I6704c801435c6586dbe64259c214dcdc926b07cf
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499584
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
Export some pmic-voter interfaces for dlkm usage as well
as create access functions that are exported for dlkm to
manipulate the struct.
ported from https://gerrit.mot.com/1200744
Change-Id: I073a4e976f8cd184fa20b262eba9bc962a4a1bb2
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499583
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
Moto kernel config does not really take effect during
building MSI.
Set to PRODUCT_SPECIFIC_DEFCONFIGS to KERNEL_DEFCONFIG,
So that MSI build can commonize.
It's for build failure
+++
FAILED: ninja:
'kernel/msm-4.19/arch/arm64/configs/vendor/ext_config/moto-kona.config',
needed by
'out/target/product/msi/obj/kernel/msm-4.19/mapphone_defconfig', missing
and no known rule to make it
ninja failed with: exit status 1
+++
Change-Id: I59710763d8a88a89e6e592dcfde53c7e5486d195
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499582
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
Add ext_config feature to extend qcom's defconfig
There make files can compose some kconfig files into one
Change-Id: Ic1444100f61300e7ee16a81c73afde3dac81da0a
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499581
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key