Commit Graph
821941 Commits
Author SHA1 Message Date
zhanggb 17edefa33b Kernel: add sys node for panel supplier
Moto hardware revision need panel supplier info. Add sys node for
in drm connector to support it.

Change-Id: I81342a7edbf32b87a67f0ff3c9b3cf00cedbd020
Reviewed-on: https://gerrit.mot.com/1540960
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1583969
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
2023-06-01 00:47:11 -03:00
Bang Nguyen 26d9c731a0 gpu/drm: Create panelRegDA sysfs to expose panel's reg
Since ALS sensor's Firmware needs to keep track the PWM duty cycle of
each panels' version, therefore the panels' register 0xDA will be used
to identify the PWM duty cycle programmed in each panels' version.
The new /sys/class/drm/card0-DSI1/panelRegDA sysfs will be created.

Change-Id: I8abc7f31067614ce410348757aa8f75392788fb8
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1514795
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1583968
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
2023-06-01 00:47:11 -03:00
xizx e6dfda2e39 pwrkey: change printk level to output to console
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/1584163
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
2023-06-01 00:47:11 -03:00
xizx 001270581f Reboot: trigger warm reset when receive hw_warmreset cmd
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/1584107
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
2023-06-01 00:47:11 -03:00
huangzq2 9e80af3bec disable CONFIG_DEBUG_CONSOLE_UNHASHED_POINTERS for sts test
Change-Id: I82cbba3df1b17688f57db81b9d13b40d73dda2e0
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1562120
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:11 -03:00
chailu1 a75a2aa78f Revert (CR): power: smb5: Clear HDC AICL
High duty cycleused for AICL/adaptive algorithm
Qcom default is enable, if disable perhaps cause
remain voltage while remove USB cable

Mot-CRs-fixed: (CR)

Change-Id: I686e503a44de890250b95a1ff0dc7c86c1081979
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1553135
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:11 -03:00
zhangly19 81eec63dad arm/defconfig: borneo: init kernel deconfig
add borneo kernel config

Change-Id: I58003116f99619025f1033cdf41a1d6fdc0851f3
Reviewed-on: https://gerrit.mot.com/1548517
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yiwen Liu <liuyw2@motorola.com>
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:11 -03:00
wangwang1 36f2d05926 guam serials: remove kernel config for PASR
kernel configs enabled to support PASR which can hotplug RAM banks
we don't have multiple RAM slots in devices, disable this feature
to avoid potential performance penalty

Change-Id: Ia6012bb0ab887b64ee5976c278949ace9c2354aa
Reviewed-on: https://gerrit.mot.com/1549420
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:11 -03:00
zhaoxp3 b2f8ddf75a Revert "mm, vmstat: hide /proc/pagetypeinfo from normal users"
This reverts commit 6c944fc51f.

Change-Id: I92b732f1a3c51bada8db2d6e606344f3ead5cd0f
Moto-CRs-fixed: (CR)
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1543986
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:11 -03:00
zhaoxp3 ca75b9e966 arm/defconfig: guamna: init kernel deconfig
add guamna kernel config

Change-Id: I4523f7636d0043d54717b38a472baa37544dff03
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1540905
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:11 -03:00
zhaoxp3 43858f10e0 arm/defconfig: add 32bit debug config
define arm and arm64 specific debug config

Change-Id: Ib56827bf9550739f236b4a52b8e0f94b213ec060
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1539598
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:11 -03:00
zhaoxp3 2bb28e781c defconfig.mk: add arch specific debug
support 32bit device
and share common debug config
Change-Id: I00e0cecefaaa0b67e25276dde60ba9fb8a533969
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1539596
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:11 -03:00
lulei1 c0db61f2e7 enable psi for guam guamp
Change-Id: I62c1f54e33e59dd60bb35411e828f8e86a9ae199
Reviewed-on: https://gerrit.mot.com/1538649
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:11 -03:00
huangzq2 a1f22e95d6 Revert "defconfig: disable MEMCG for bengal 32"
This reverts commit 6b4ee95cbd.

Change-Id: I5c1c09912e34909211cb13a914cf965117c8fa6e
Reviewed-on: https://gerrit.mot.com/1536521
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
yanyh2 d1bb1a5c2c Fix QC rebase issue for dual role sysfs access issue
As the USB hal service is the root user, so it is the same user as the
dual role sysfs node, and it is OK to change the sysfs node access mode
dynamicly for PD. Otherwise the sysfs node will lose sysfs node mode
update.

Revert "Revert "usb: phy: dual-role: update sysfs attrs when changed""

This reverts commit 4dabf448ae341dd492b45eb0f82fdd77ee5ef584.

Change-Id: Id3651703b4e250ac6af6cb3dc94d3ca328a3a259
Reviewed-on: https://gerrit.mot.com/1257104
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1413206
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1536373
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
2023-06-01 00:47:10 -03:00
xizx e9daf31317 ion: display ion total size in debufs node
after list all ion dma-buffer, cacluate the total size,
and display it in the end.

Change-Id: I108ebe7aa3560538b1f24033dc219e8215720069
Reviewed-on: https://gerrit.mot.com/1535658
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Shanghui Zhang <zhangsh@motorola.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
zhangzl7 1dca9978e3 ion: dmabuf improve debugfs
Improvements made to ION to add an additional debugfs file
to display allocation/reference information for all ION buffers.

Change-Id: Ife122fb3357c549ce962e7b7ead8d2447d352885
Signed-off-by: zhangzl7 <zhangzl7@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1535657
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
xuwei9 d85ff23cb4 kernel:support huawei p10 5A cable
Huawei 5A cable is one sepcial designed cable
as debug accessory cable.
for supporting it, enalble debug cable charging.

Porting from https://gerrit.moto.com/#/c/1447696
             https://gerrit.moto.com/#/c/1500769

Change-Id: Ibac57e482cbda5999b8fd4455c8986ec7c365ba2
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1535670
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
a17671 b52b1d6754 bengal:Enable dual role usb interface
Dual role class usb interface is
Needed for MicroB products

Change-Id: I7040da253829ead2a4de2635d6529f091ebe3e56
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1534064
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
a17671 dd6f66d0ba smb5:Add dual role class support in smb5
Charging driver needs to support dual role class
Products so USB hal 1.0 could work properly

Change-Id: I02b0d104791c422372aff24b6889978997c6a4b4
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1534063
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
a17671 c80a102f02 usb:Add dual role class support
USB hal 1.0 needs dual role class support
For MicroB USB products

Change-Id: Ia48350bea2ba217e1524f4c36b5e3288d8a436d9
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1534062
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
Shiyong Li 44bd4a147a sdcardfs: don't depend on reserved_mb to check free space
Even if reserving nothing in sdcardfs, lower fs statfs info is still
needed to avoid APP overwriting media storage.

port (CR) from P.

Change-Id: I63e87c3b34c739aeff2dcdd5e6fb3f34c4270cfa
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1435235
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1531815
Reviewed-by: Zonghua Liu <a17671@motorola.com>
2023-06-01 00:47:10 -03:00
Shiyong Li 9a7ae86cc9 sdcardfs: check the free space before creating files
User can create zero byte files even sdcardfs hits the reserved limit
that will consume blocks for the file name and eventually use up all
memeory. Check the avaliable free space before creating files.

port (CR) from P.

Change-Id: Ib902844f2e6e6c638184895e3f4fa7282acc8333
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1435234
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1531814
Reviewed-by: Shi-Yong Li <a22381@motorola.com>
2023-06-01 00:47:10 -03:00
Shiyong Li b987498275 sdcardfs: copy inode size while getting attributes
Copy inode size from lower file system while getting attributes, or file
size is wrong for those files that have already existed before.

port (CR) from P.

Change-Id: I0c61e09ff2223d492518b6b4de320f6c640b2115
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1435233
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1531813
Reviewed-by: Zonghua Liu <a17671@motorola.com>
2023-06-01 00:47:10 -03:00
zhangj10 2d38e5c53e : remove nfc function for guam
changelist: remove nfc config for guam
                   not support nfc

Change-Id: I5575bf68c4741efb6db65958b6bf83dbd4975e40
Signed-off-by: zhangj10 <zhangj10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1532121
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Lu Lu <lulu2@lenovo.com>
2023-06-01 00:47:10 -03:00
xuwei9 5ec82e6090 charger:allow APSD re-run at factory usb detection
Factory mode usb enumeration slow
Allow APSD re-run at factory mode

Change-Id: Id95427a04e5bd45279f3275cfb57981e072dff1c
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1530969
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
lulu2 8c7db8f0f0 CONFIG_FPR_FPC disable for rebase fingerprint fix
Change-Id: Ic4232c1df4f539195530d390158c5b6a7c32a7c3
Reviewed-on: https://gerrit.mot.com/1534501
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Lu Lu <lulu2@lenovo.com>
2023-06-01 00:47:10 -03:00
Andrew Wheeler 00beb389a9 defconfig.mk: Don't force make defconfig
Forcing the re-make of defconfig causes a ton of stuff to get
rebuilt during dirty builds.  So don't do it.

Change-Id: I945fc8bfe3f2a52c3a8069fa016fc6f948f1b30f
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1529110
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
zhaoxp3 a137fc5035 gitignore: ignore dts link
Ignore commit history for softlink
arch/arm64/boot/dts/vendor
So that there won't be extra sync failure
once kernel gets update.
Change-Id: I2c0cdd5fd5763d742e22bc577994331396feae19
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1524582
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
jixu dda4d1a6ad guamp: arm64/dtsi enable regulator_fixed_voltage
-- Enable CONFIG_REGULATOR_FIXED_VOLTAGE
-- Camera macro AF driver LDO enabled needed

Change-Id: Id827744e0768583d32855ff7a69b4a48f5d362c4
Signed-off-by: jixu <jixu@motorola.com>
Reviewed-on: https://gerrit.mot.com/1521069
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhilong Wang <wangzl30@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
luodw1 96ac3c6c18 power: Add wakeup source in battery historian logging
Change-Id: I194ceccd10e455da8c58a2c96e4339557024b142
Signed-off-by: luodw1 <luodw1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1523886
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
zhaoxp3 e3a5fdf0f3 arm64/defconfig: enable softlockup panic for debug
enable softlockup panic for debug
remove duplicated option
Change-Id: Ief23a78fffdefb13dfee92c9863c62cd2dfae0d1
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1522506
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
zhangj10 9746c26d18 : arm64/defconfig : enable NFC
changelist
    enable NFC config


Change-Id: Ia4e17046fc95588e940e7ce2c0510f0d471f4698
Signed-off-by: zhangj10 <zhangj10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1518991
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Lu Lu <lulu2@lenovo.com>
2023-06-01 00:47:10 -03:00
xuwei9 1b96407e54 kernel:add OCP charger current limitation
Add Other charger port current
limitaion

Change-Id: I8ab0b2eaa5bbe2756594b4288024b841df4e5483
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1517843
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:10 -03:00
dengwei1 bf5eabcbd7 guam: add touch module support
add touch module
support

Change-Id: I6d86a65f9eda5ae6d2af53ad17ff4421990bbd12
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1515456
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:09 -03:00
Lei Chen 3d05723955 Revert "(CR): config: disable CONFIG_PANIC_ON_REFCOUNT_ERROR"
This reverts commit 06b7802261ddec2212369109df674b12981181c3.

Change-Id: I87909be01da86795b90661cf2373af8955486c15
Reviewed-on: https://gerrit.mot.com/1514012
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:09 -03:00
zhaoxp3 1334d5592b arm64/defconfig: disable debug config
remove unused touch driver
disable debug options

Change-Id: Iae9623ab8df0bad56d214d2f18366c22addc0294
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1512672
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
2023-06-01 00:47:09 -03:00
chenl18 800da5bc37 config: disable CONFIG_PANIC_ON_REFCOUNT_ERROR
Disable CONFIG_PANIC_ON_REFCOUNT_ERROR to avoid panic from
rmmmoding goodix_fod_mmi.

Change-Id: Ie02cd5d6feca17ebd92e887efe8dfabb3ee619e9
Signed-off-by: chenl18 <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1513033
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:09 -03:00
zhaoxp3 1ccf517704 arm64/configs: sm4250: Enable USB console
There are quite some use cases where we need live serial logs to
analyze issues on close phones without physical debugging UART
port exposed. Having the capability of re-directing serial logs
over USB is helpful for both general development and return analysis
scenarios where we have to avoid HW changes as much as possible.

The 2 new configs will add the capability of re-directing serial logs
to USB CDC ACM interface, though it is up to init's decision as for
whether to activate the capability based on bootloader's input.

Change-Id: Ic7b7846671292a7bb8b13051b2c233bd26b24ae9
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1510439
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
2023-06-01 00:47:09 -03:00
Qing Chang eb8f514a8b tty: msm_geni_serial: Support the match() callback
The new match() callback for earlycon is to tell whether earlycon and
the "real" console are the same device.

Change-Id: I8b54d5d9f1d737650d0890fc9f596080c8b1aaf2
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1472629
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1474156
Reviewed-on: https://gerrit.mot.com/1509729
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
2023-06-01 00:47:09 -03:00
Qing Chang 7b6dfedec4 printk: Keep boot console on if enabled
Without this change, the boot console has strong assumption of the state of
the "real" console, so when PM kicks in during early boot stage, resources
(l(CR) clocks, GPIOs, etc) for the boot console may be turned off if the "real"
console sharing these resources is not enabled, which will lead to malfuntion
of boot console.

Change-Id: I19a58d76c99e0fb7bff0d9dc06a2b0f9066063e2
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1472630
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1474157
Reviewed-on: https://gerrit.mot.com/1509725
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
2023-06-01 00:47:09 -03:00
zhaoxp3 280c7b9502 arm64/config: support UAS of usb storage
With UAS (USB Attached SCSI), the tested Samsung SSD read and write
speed gets 3x and 2x respectively on Nash.

Testing results for Samsung 256GB Portable SSD T5:
Seq. read:  244 MB/s v.s. 84 MB/s
Seq. write: 161 MB/s v.s. 94 MB/s

Port of (CR) on kernel 4.4.

Change-Id: I53fcc1a18977041215989aa93fc2b0c82354a17c
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1511645
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:09 -03:00
zhaoxp3 889c770cc3 arm64/defconfig: enable usbnet drivers
Enable the usbnet framework and drivers to support
USB net.

Change-Id: I4bc66d8c34de6d20cc01044d9efbe97bdf71999c
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1511644
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:09 -03:00
a17671 8b24262499 usb:configfs:Set udc_name NULL if attach failed
If the probing of UDC controller failed
udc_name shall be NULL to avoid double unregistration
and the panic
It could happen in some corner case

Change-Id: I2e6e4168a505b86d8f1b57db53be91acc608ee97
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1438349
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1457371
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
(cherry picked from commit 9fc2515cb3fe8ffdf26f04c0a58a57552e50b6f3)
Reviewed-on: https://gerrit.mot.com/1459030
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1463803
Reviewed-on: https://gerrit.mot.com/1511643
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
2023-06-01 00:47:09 -03:00
Kenny Kessler e9d9047bd4 usb/dwc3: msm: Enable all Debug Logs
Force all logs to print.

The USB DWC3 is very important and tracking dmesg
is much easier when everything is ON.

Port-of: https://gerrit.mot.com/1307019

Change-Id: Iebde3d9feadde8a3e92acb10baeb97c5ba7e07cf
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1332192
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1391225
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1449174
Reviewed-on: https://gerrit.mot.com/1511642
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
2023-06-01 00:47:09 -03:00
liuyc20 a56ba64469 gadget: bcdUSB version back to 2.0 when not SuperSpeed
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>
2023-06-01 00:47:09 -03:00
Yonghua Yan a3db809d7c usb: configfs: synchronize the secure and udc_name state
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>
2023-06-01 00:47:06 -03:00
Yonghua Yan a4fd173df1 usb: configfs: skip unregister gadget in secure
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>
2023-06-01 00:47:06 -03:00
Jerry Zhang fbd97d639f usb: gadget: f_mtp: Return error if count is negative
If the user passes in a negative file size in a int64,
this will compare to be smaller than buffer length,
and it will get truncated to form a read length that
is larger than the buffer length.

To fix, return -EINVAL if the count argument is negative,
so the loop will never happen.

Mot-CRs-fixed: (CR)
CVE-fixed: CVE-2017-13163
Bug: 37429972

Test: Test with PoC
Change-Id: I5Montanae38e6fbe2c17eb8c493f9eb81df6cfd780a4
Signed-off-by: Jerry Zhang <zhangjerry@google.com>
Signed-off-by: Amarendra Reddy <amarenr@motorola.com>
Reviewed-on: https://gerrit.mot.com/1090092
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1167331
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1262843
Reviewed-on: https://gerrit.mot.com/1338862
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1449108
Reviewed-on: https://gerrit.mot.com/1511638
Reviewed-by: Zonghua Liu <a17671@motorola.com>
2023-06-01 00:47:06 -03:00
Ravi Vembu bcf6a699d1 usb: gadget: storage: Support READ_TOC for MacOS
Modify READ_TOC handling to add support for both Windows and MacOS
host environments.

Change-Id: I4bf3c6a8fbec95387608869efbacb6f0537c7bbf
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Moto-CRs-fixed: (CR)
Reviewed-on: http://gerrit.mot.com/864910
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Signed-off-by: Rav(CR) Vembu <raviv@motorola.com>
Reviewed-on: https://gerrit.mot.com/944111
Reviewed-on: https://gerrit.mot.com/1167320
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/1262841
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1338861
Reviewed-on: https://gerrit.mot.com/1449077
Reviewed-on: https://gerrit.mot.com/1511637
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
2023-06-01 00:47:06 -03:00