Commit graph

916,475 commits

Author SHA1 Message Date
weiweij
b329f69c46 config: add usb-video driver
PROPAGATED from (CR)

CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=y

Change-Id: I9322e4de815faf477cffdde8efa912ab74031d23
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Robert Cabral <robertc@motorola.com>
Reviewed-on: https://gerrit.mot.com/1715152
Reviewed-on: https://gerrit.mot.com/1786699
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
2024-04-18 14:44:59 +08:00
weiweij
d1e0d1354b 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: Idf5d5445dcc599c21bedda64c7eff62f860ff05b
Reviewed-on: https://gerrit.mot.com/1278853
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/1471644
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1786700
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
2024-04-18 14:44:59 +08:00
Kenny Kessler
81e4c889aa usb/dwc3: msm: Enable all Debug Logs
Force all logs to print.
origin-CR: (CR)
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/1786719
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
2024-04-18 14:44:59 +08:00
Ravi Vembu
c209226dea usb: configfs: Reset the use_os_desc flag
os_desc support can be turned off via userspace. Kernel also
needs to correspondingly reset its state if userspace has changed
it. Otherwise this cause os descs to be advertised on drivers that
have no os desc support.

Change-Id: Iee760ba45ceea1f26f4e33b4e52c06be7fd20e44
Moto-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1750957
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zonghua Liu <a17671@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/1785336
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:58 +08:00
weimh1
99d798170e kernel/config: Enable RTB log on factory version
Enable RTB log on factory version.
  Some crash issues need RTB log to get more information.

Change-Id: I274d94d73221516f6cff55bb68ceaeca6b9a6291
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1786711
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:58 +08:00
Ravi Vembu
5d7a7200a4 usb: configfs: Implement secure attribute
Implement the secure attribute for locking USB access
from the gadget driver.

echo 1 > /sys/class/android_usb/android0/secure
will lock USB access and disable USB enumeration.

Change-Id: I9c7bcb27cfd4ce4f28520d938c604607ec6c2431
Moto-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1750996
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zonghua Liu <a17671@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/1785337
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:58 +08:00
Ravikumar Vembu
d19025e7dd usb: mass_storage: Add support for SC_REBOOT
Add support for a vendor specific SCSI pass through command to
trigger reboot.

SC_REBOOT (0xd7) - triggers reboot into fastboot mode
SC_REBOOT_1 (0xd8) - triggers reboot into normal mode.

Propagated from (CR)

Change-Id: I4fc4839968135a63c594dca69b1dc93699e4a9bc
Reviewed-on: https://gerrit.mot.com/1750946
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zonghua Liu <a17671@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/1785335
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:58 +08:00
weimh1
28c524fc00 kernel/config: Enable kernel configs for Android Enterprise
From Igor's review with Google, Google requires us to add the following
    kernel configs for customer build to enhance the security:

   CONFIG_SLUB_DEBUG=y
   # CONFIG_SLUB_DEBUG_ON is not set
   # CONFIG_SLUB_DEBUG_PANIC_ON is not set
   CONFIG_BUG_ON_DATA_CORRUPTION=y
   CONFIG_SCHED_STACK_END_CHECK=y

Change-Id: Ibccec957ebc66f31c77fddff1419b5bcb6c8f635
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1785753
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:58 +08:00
chenyb1
82b81ff810 therm: Disable THERMAL_STATISTICS
It cause (CR) if cooling device have many levels.
There are NOT any processes to use thermal statistics and it
occupy about 6.7K memory, so disable it, also see this CR.

Change-Id: Ie37378c0a45cb6573be49e6c18b6af18f39f1d74
Reviewed-on: https://gerrit.mot.com/1784457
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:58 +08:00
chenyb1
c5c976211d Showing CPU freq
The command "kpitrace --stdout --interval=1 --freq --no-proc-cpu"
is not showing freq for each CPU for Racer_turbo (kernel msm-4.19).

It happens because the following file is not present in device
/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state.

To get cpu power stats, CONFIG_CPU_FREQ_STAT should be enabled
in kernel config file.

Change-Id: I6929322cf7ef86a7b8beb19727251f2aa3df1e57
Reviewed-on: https://gerrit.mot.com/1784458
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Minghui Wei <weimh1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:58 +08:00
liuyc20
b4bf1d6d54 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

origin-CR: (CR)
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/1751275
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1785341
2024-04-18 14:44:58 +08:00
Ravi Vembu
8b3d7897c2 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/1751139
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1785339
2024-04-18 14:44:58 +08:00
jixj
670e79efe6 usb/gadget/f_fs: fix invalid ffs to cause ramdump
QC patch("usb: gadget: f_fs: Fix NULL pointer issues in ffs driver")
fix multiple mounted issue, it will return "ERR_PTR(-EBUSY)" in
ffs_data_new(), but ffs driver only check ffs if is a NULL point,
the next code using ffs still cause ramdump.

origin-CR: (CR)
Change-Id: Ib2d21b2854163883f07475ef97e1e09a1742c617
Reviewed-on: https://gerrit.mot.com/1313122
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1338906
Reviewed-on: https://gerrit.mot.com/1449057
Reviewed-on: https://gerrit.mot.com/1751135
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1785338
2024-04-18 14:44:58 +08:00
huangzq2
315a01917e disable SPLIT_RSS_COUNTING to fix zero RSS issue
rss in statm sometimes is zero value which will affect lmk kill
as it depends on the rss size of each process in lmkd.

Change-Id: Iee0bdf2534fee660e64d8e8221c4dc571e13921e
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1668699
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
(cherry picked from commit 09b4d0ed5f4710c7ee6f263a2faca67846565256)
Reviewed-on: https://gerrit.mot.com/1673149
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1783212
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:58 +08:00
chenyb1
8f4ce5da84 kernel/config enable fs eventpoll debug
Print thread ID and name of eventpoll wake up source for
debug purpose.

Change-Id: I4d97e74a3ba61bc33600f4c3a3c557ee4d1d0b87
Reviewed-on: https://gerrit.mot.com/1779375
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:58 +08:00
zhucc2
3f8f755df5 qcom: whitelist: Add necessary api for aw882xx_k419 dlkm
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: I81e08474e7a4196967a557cdd36fc0cad3b5da36
Reviewed-on: https://gerrit.mot.com/1783232
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:58 +08:00
zhucc2
d35f572129 qcom: whitelist: Add necessary api for Exfat dlkm.
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
2024-04-18 14:44:58 +08:00
mahj8
6f1c92bafb arm/config: disable smb1398 and smb1355
our project don't use parallel charging so
disable smb1398 and smb1355 driver

Change-Id: I0cd618770ef56af0b59b9a51c5177a0a432d8410
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1783169
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:58 +08:00
Konstantin Makariev
dfb79dcfd4 printk: increase log buffer size to 2k
Kernel command line print statement is truncated, need increase the
buffer size.

Change-Id: I0e353563a138e85de2fb84ca89074e564337967a
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1780859
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:58 +08:00
weiweij
e5431690a3 driver/tlmm: add gpiochip base value checking
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
2024-04-18 14:44:58 +08:00
Dmitry Ornatsky
418d89456b pinctrl: pinctrl-msm: do not dump unallocated GPIOs
Do not dump GPIOS that are not allocated by HLOS. This is a temporary
change to avoid TZ exceptions.

origin CR:(CR)
Change-Id: I7b231457d186cbdc0a900b153bc8b09e9ccffddd
Signed-off-by: Dmitry Ornatsky <cdo021c@motorola.com>
Reviewed-on: http://gerrit.mot.com/808904
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>
Reviewed-on: https://gerrit.mot.com/1230533
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiaopeng Li <lixp5@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1400180
Reviewed-on: https://gerrit.mot.com/1436604
Reviewed-on: https://gerrit.mot.com/1509717
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1780444
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:58 +08:00
liaohj
9fac50a858 usb audio: Let the usb sound card index from 1
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
2024-04-18 14:44:58 +08:00
liaohj
2e150ee1d0 soc: qcom: service-locator: enlarge timeout value
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
2024-04-18 14:44:58 +08:00
wengjun1
8da2da76a2 Update qcom whitelist for touchscreen
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
2024-04-18 14:44:57 +08:00
wangyq13
54189125c5 Backlight/wled: disable wled CABC under low brightness
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
2024-04-18 14:44:57 +08:00
houdz1
a51614615c wled: suppor for setting brightness step by step
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
2024-04-18 14:44:57 +08:00
jixj
12f62eb21d power/reset: Fix GKI build error
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
2024-04-18 14:44:57 +08:00
jixj
89731bcf70 arm64/configs: Enable uart console config for user sw
Add CONFIG_SERIAL_MSM_GENI_CONSOLE=y and we can use
"fastboot oem config console true" to open uart log.

Change-Id: Iec772f26501293af548084bc5cf163321e4b2e92
Reviewed-on: https://gerrit.mot.com/1779364
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:57 +08:00
jixj
45356fce97 arm64/configs: Enable uart console config for factory image
Add CONFIG_SERIAL_MSM_GENI_CONSOLE=y and we can use
"fastboot oem config console true" to open uart log.

Change-Id: I0aa1aa7d3610a9e0fdaa4e873ba9a7aeaa041cfa
Reviewed-on: https://gerrit.mot.com/1779363
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:57 +08:00
Shiyong Li
f842264982 fs: support debug of eventpoll wakeup source
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>
2024-04-18 14:44:57 +08:00
xuwt2
ff35fee51a mmc/sd: Add sys entry to read card speed
Card speed class and UHS speed grade is useful properies.
Thos properties can be read from SD status.

Change-Id: I0252dd63b661fd2c33849cf0033b08f367a928a9
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1395940
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1515687
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1779345
2024-04-18 14:44:57 +08:00
yuedl1
c4210a9934 ufs:fixed ufshcd wait doorbell clear timeout
when devfreq ufs, ufshcd wait doorbell clear timeout. some operations
maybe take time longer than 1s. such as unmap operation. so change
the timeout to 2s. error log as bellow:
01-07 09:50:34.508     0     0 E ufshcd-qcom 1d84000.ufshc: ufshcd_wait_for_doorbell_clr: timedout waiting for doorbell to clear (tm=0x0, tr=0x2000000)
01-07 09:50:34.508     0     0 E devfreq 1d84000.ufshc: dvfs failed with (-16) error

Change-Id: Ie33481603a6f96c710e0180bfdd61b7d88eb003b
Signed-off-by: yuedl1 <yuedl1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1554341
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Shi-Yong Li <a22381@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1779344
2024-04-18 14:44:57 +08:00
xizx
f97ae225f2 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/1778586
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:57 +08:00
Qing Chang
a7c7f70bb5 power: reset: Use warm reset for dload mode
dload mode requires memory contents to be maintained, so we have to use
warm reset during reboot.

Change-Id: Idb4a01685e7164cc6a5272d0287934bc6fe6307f
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1520641
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dong-Hua Yan <a18317@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1778585
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:57 +08:00
xizx
45f6f796b2 add system restart warm and panic mode
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>
2024-04-18 14:44:57 +08:00
Ryan Lattrel
f702a1f0dc msm-poweroff: Store restart reason
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>
2024-04-18 14:44:57 +08:00
Todd Poynor
9e9542e987 PM/Suspend:Print wall time at suspend entry and exit
Cherry pick this commit from defender to print "PM: suspend" with
wall time when enter and exit suspend.

Change-Id: I92f252414c013b018b9a392eae1ee039aa0e89dc
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: yangjq <yangjq@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1477734
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1778522
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:57 +08:00
wuwl10
a9922aa62d arm64/config: ibiza: enable qti nfc driver
Enable default qti nfc driver to bring up PN557
for Ibiza.

Change-Id: I40cf677cb4057711c87656714be7a450202c66ce
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1778379
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:57 +08:00
Ryan Lattrel
bfcc95d87a (CR): alarmtimer: add debug to identify alarmtimers
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>
2024-04-18 14:44:57 +08:00
Ryan Lattrel
c12db773b5 (CR): drivers: enable step-wise and qmi tz logs
Change step-wise temperature trip and qmi cdev logging
from debug to warning to better track thermal engine
changes.

Change-Id: Ieaf0c3b796e2aa321220ba2e0adb3b9f24c41d5b
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1339510
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1554966
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1778283
2024-04-18 14:44:57 +08:00
linyx10
6e40b6b76b Do not unload prov TZ app.
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
2024-04-18 14:44:57 +08:00
jixj
e1753b0bac arm64/defconfig: enable pstore
Enable pstore for kpanic logs.

CONFIG_PSTORE=y
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_RAM=y
CONFIG_PSTORE_PMSG=y

Change-Id: I7f1d1367b1e709c3613d75737e3dfc99b90e2eb1
Reviewed-on: https://gerrit.mot.com/1773807
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:57 +08:00
Xianshan Wang
6d1c3b7e79 defconfig: lito: turn off pstore compress
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>
2024-04-18 14:44:56 +08:00
jixj
3f86f1e242 include/dt-bindings: add a header file for ramoops
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
2024-04-18 14:44:56 +08:00
xizx
4b6ab20701 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/1771194
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:56 +08:00
Ling Jin
12017041d6 qpnp-power-on: Print system timestamp on Power key event
Print system timestamp on Power key press and release events.
This would make debugging easy

Ported from: https://gerrit.mot.com/#/c/1320467/

Change-Id: I2c810e4b59c2d3bd8a705d407a339d9efe6fad3d
Reviewed-on: https://gerrit.mot.com/1320467
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1456668
Reviewed-on: https://gerrit.mot.com/1771193
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:56 +08:00
liaohs
9be11bcf24 PMIC : print PMIC keys code default
Keys or combo Keys code from PMIC:
Power key, Volume down key and
Power Key + Volume down combo key .
Default print these code log to monitor PMIC interrupt.

Change-Id: Iaea43e97acc1c43bd5dda37664bf89572f012794
Reviewed-on: https://gerrit.mot.com/1302037
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/1470888
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1771188
2024-04-18 14:44:56 +08:00
liaohs
a34cb705aa pmic: add power-off reason registers value
add PMIC power-off reason registers' value :
PON_POFF_REASON1
PON_OFF_REASON
PON_FAULT_REASON1
PON_FAULT_REASON2
PON_S3_RESET_REASON

Change-Id: I696dd9fbda3e6df111aa8282827fabea4260d297
Reviewed-on: https://gerrit.mot.com/1287551
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/1470872
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1771184
2024-04-18 14:44:56 +08:00
yanyh2
7cd790dd94 Find the battery profile by serial number
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
2024-04-18 14:44:56 +08:00
xuwt2
afae98dffe smb5: Add syfs node to offer usb_dcp_icl_ua setting
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>
2024-04-18 14:44:56 +08:00