Commit graph

916,475 commits

Author SHA1 Message Date
xuwt2
e6d15ef2b3 smb5: modify error handing in smb5_parse_dt_mmi
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
2024-04-18 14:44:56 +08:00
xuwt2
c34aae49b0 smb5: Add DCP curr settings
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
2024-04-18 14:44:56 +08:00
xuwt2
9a07f7885f power: smb5-lib: Vote USB_ICL after PD active
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
2024-04-18 14:44:56 +08:00
xuwt2
c1717e45fa smb5: Only allow Moto pd policy to set pdo voltage max
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>
2024-04-18 14:44:56 +08:00
mahj8
dc8fd61192 qg: add sdam-magic-number parameter
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
2024-04-18 14:44:56 +08:00
yanyh2
3b3a3844ac skip icl override again after setting sdp icl
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>
2024-04-18 14:44:56 +08:00
Kenny Kessler
466554f884 power: qcom: smb5: Add MMI Factory Mode
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>
2024-04-18 14:44:56 +08:00
yanyh2
5ad50d8650 Reset USB real_charger_type to unknown for apsd rerun
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>
2024-04-18 14:44:56 +08:00
Haijian Ma
e9fc550caf smb5-lib: fixed BC1.2 current override type-c current
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
2024-04-18 14:44:56 +08:00
yanyh2
aa30dcf596 smb5: rerun apsd right after the first time apsd done
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
2024-04-18 14:44:56 +08:00
mahj8
018560f4b8 smb5: adjust USBIN OV debounce condition
Adjust the USBIN OV debounce trigger condition.
Use chg_done help to decide charge FULL state.

Change-Id: If8d77be7884e809aab859ce45ef4238565a27338
Reviewed-on: https://gerrit.mot.com/1770943
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:56 +08:00
Yonghua Yan
89ecc01a29 smb5: handle cc pin floated cable removal
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>
2024-04-18 14:44:55 +08:00
Yonghua Yan
a8e77d8c58 smb5: limit usb icl to 1000mA for OCP type
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
2024-04-18 14:44:55 +08:00
Yonghua Yan
44bf0b8116 smb5: report effective icl value for current max
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
2024-04-18 14:44:55 +08:00
Haijian Ma
62e7b0c46d battery: Fix Type-C audio adapter detection at boot.
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
2024-04-18 14:44:55 +08:00
Yonghua Yan
e31bf366e3 smb5-lib: Skip USB ICL vote for high or medium typec
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
2024-04-18 14:44:55 +08:00
Cesar Santos
431ef6f563 drivers: qcom: Support debug accessory in sink mode
Huawai P10 5A cable is considered a debug accessory cable in sink mode, so
charging in such conditions needs to be configured by setting proper PMIC
registers.

Porter from: https://gerrit.mot.com/#/c/1447696/

Change-Id: I978911ae93436c8b073fa092548e13f673262bb9
Signed-off-by: Cesar Santos <cmsantos@motorola.com>
Reviewed-on: https://gerrit.mot.com/1463313
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dong-Hua Yan <a18317@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1770258
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:55 +08:00
xuwt2
c20f525d75 qpnp-smb5: enable IRQ and MISC debug_mask
Enable the debug log or IRQ and MISC charger event
for charger issue dignosis

Change-Id: I68743f335eb4805bf4216035ac864811e5cc7452
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1492207
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/1770257
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:55 +08:00
xuwt2
1baac9bfe0 smb5-lib: Remove Force_5V setting in PD active
PD adapter allowance voltage was setted to FORCE_5V,
that cause PD can't charge under the vbus up to 9v
this issue is introduced by QCom Rebase.
use QCOM_BASE to isolate FORCE_5V setting in PD active

Change-Id: I73d925b87e657f62516d7d3ee475f4ef0306195d
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1460627
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
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/1770256
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:55 +08:00
cmsantos
c6b24a9e8b qpnp-smb5: Add a parent supply for vconn
VCONN can be turned on even without VBUS (which turns on the
5V supply). Hence add a parent supply for VCONN.

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

Change-Id: I37b4fe5d0b2a38Montanad6674b496582519b8c35e47
Signed-off-by: cmsantos <cmsantos@motorola.com>
Reviewed-on: https://gerrit.mot.com/1447502
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Curtis Porter <porterc@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1770255
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:55 +08:00
mahj8
c51b3de0de smb5-lib: config QC2.0 charging current 1.5A
QC2.0 adapter only support 1.6A output current, so config
1.5A for QC2.0 charger.

refer to https://gerrit.mot.com/1430172

Change-Id: I05bad6d5f9f59ccb19beb987271bc412c12ff7f1
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1770254
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:55 +08:00
Haijian Ma
f59ce68e55 smb5: get correct HW current
In factory mode, mmi init input current 3A, so get ICL state is 3A.
so mmi get HW current is 3A with SDP.
HW current should base on charger type, don't base on
ICL state.

Change-Id: I3b0aab68392f863115721f96f3dd4788dc9e0df7
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/1419455
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1770253
2024-04-18 14:44:55 +08:00
mahj8
cdb6ff52ea pd-policy: Only select FIXED pdo in usbpd_select_pdo_match
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).

pdo selection is only available in sink power role, so just return
unsupported to tell the caller not try any more.

refer to https://gerrit.mot.com/1461360

Change-Id: I675a1f21e6547b1e4e8af01c5f4ebe4a89972c41
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1770250
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:55 +08:00
mahj8
667b71ea21 usb: pd: Add PDO Selection
The PDO selection should be done by either the Kernel or User Space.
Setup a callback that selects the PDO based on what the Voltage Max
is set to when the function is called.

refer to https://gerrit.mot.com/1403781
Based on Gerrit https://gerrit.mot.com/#/c/1301690/

Change-Id: I54a14b47e79637c681cc24c78a75a1206ecd903e
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1770248
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:55 +08:00
mahj8
a0ecbc9a1b power: supply/qcom: smb5-lib: Select PDO
The charger driver should directly call into the policy
engine and select the proper PDO.  Otherwise the first PDO
is selected.

refer to https://gerrit.mot.com/1403773
Based on Gerrit https://gerrit.mot.com/#/c/1301691/

Change-Id: I73a2ef923393977e202aebc142d09c4301de4fbe
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1770246
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:55 +08:00
Kenny Kessler
0637aeab60 power: pmic-voter: Export Interfaces
Export some pmic-voter interfaces for dlkm usage as well
as create access functions that are exported for dlkm to
manipulate the struct.

Change-Id: I306c65c9890bd69dc49fcd722ac0981ddb908dc6
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1200744
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>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1770243
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:55 +08:00
jixj
c5cf78e9ba enable ibiza dts
- add IBIZA_DT for ibiza
- enable CONFIG_IBIZA_DTB

Change-Id: I93c2db316131c85195731016116fe0df66fc5695
Reviewed-on: https://gerrit.mot.com/1771104
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:55 +08:00
weimh1
d4fb0ad41c kernel/config: add product specific config files
1.add debug-holi-ibiza.config for product debug config
  2.add moto-holi-ibiza.config for product specific config
  3.add factory-holi-ibiza.config for product factory config

Change-Id: I6b6eb65e9e19ed455447e609987438cd6b554b0c
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1771042
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:55 +08:00
jixj
ddf492709b arm64/confgs: Enable denver dts
Enable CONFIG_DENVER_DTB to only build denver dts,
reduce the dtb image size.

Change-Id: I512ec05ae8e45b14d26a3bc9dde91ce84e5c72cc
Reviewed-on: https://gerrit.mot.com/1770156
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:55 +08:00
weimh1
dee1ae4006 kernel/config: merge moto fragment configs
Kernel configs compose of several parts.These parts will be merged into
	one final file such as "holi-qgki-debug_defconfig".
    The rule of Moto-product-config files from high order is:
      product debug config
      platform debug config,
      product config
      platform config

    Here is an example of product "denver" based on 4350
    platform (holi):

    1. factory build config list with order:
    factory-holi-denver.config
    factory-holi.config
    moto-holi-denver.config
    moto-holi.config

    2. userdebug build config list with order:
    debug-holi-denver.config
    debug-holi.config
    moto-holi-denver.config
    moto-holi.config

    3. user version config list with order:
    moto-holi-denver.config
    moto-holi.config

Change-Id: Ie7512300581337ae6768bdfa618613a797f3c10f
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1769363
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:55 +08:00
jixj
0f89da7576 soc: qcom: kconfig opt to build denver dtbs
Introduce a new configuration DENVER_DTB that will allow the
target to only build denver devices.

Change-Id: I766404bb7792c217d37eecd3a543d866fc018fae
Reviewed-on: https://gerrit.mot.com/1762925
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:54 +08:00
jixj
d3e7540280 soc: qcom: kconfig opt to build moto dtbs
Introduce a new configuration MMI_DEVICE_DTBS that will allow the
target to only build Motorola devices.

Change-Id: I8eb2d1586dd2d99c696a3e198e5809a12cab6ad9
Reviewed-on: https://gerrit.mot.com/1762924
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:44:54 +08:00
Bang Nguyen
4e61dd033c Add new macro MIPI_DSI_MSG_READ
Add a new macro MIPI_DSI_MSG_READ (bit 4) in drm_mipi_dsi.h for
MIPI DSI READ Message

Change-Id: I8d6ed4aa10b915f7ff74339c8bdabe061c09ecd5
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1697680
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Shuo Yan <shuoyan@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:54 +08:00
litong
2e75049063 workaround for the error of "__symbol_put " undefined
ERROR: "__symbol_put" [../../motorola/kernel/modules/drivers/input/
	touchscreen/touchscreen_mmi/touchscreen_mmi.ko] undefined!
ERROR: "__symbol_get" [../../motorola/kernel/modules/drivers/input/
	touchscreen/touchscreen_mmi/touchscreen_mmi.ko] undefined!

Change-Id: I5ae7f9e395c61a1cd7f4b7ee7e914880ad767448
Reviewed-on: https://gerrit.mot.com/1745785
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1755124
Reviewed-by: Lianlu Chen <chenll4@lenovo.com>
2024-04-18 14:44:54 +08:00
Sudheer Papothi
1188d4ea63 ASoC: msm: qdsp6v2: Handles additional flac metadata
Currently, metadata such as min/max block size is sent only for first
stream in FLAC gapless playback. This causes incorrect configuration
and, subsequently, framedrops in decoding of second stream and onwards
by sending these additional flac metadata, dsp receives stream-wise
metadata and decodes without dropping

Change-Id: Ibd4a9b24180622422ed719b075fd47bcd4ad0c9b
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
(cherry picked from commit feb23f7f5d63d7b890ba481d0b466b6e9a5eed15)
Reviewed-on: https://gerrit.mot.com/1752137
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Lianlu Chen <chenll4@lenovo.com>
2024-04-18 14:44:54 +08:00
yangqh5
b9ebcb8b43 Init denver kernel config
Change-Id: I72e78a9919b7f42b3b7f7624e7e40e25255b669e
Reviewed-on: https://gerrit.mot.com/1752050
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Lianlu Chen <chenll4@lenovo.com>
2024-04-18 14:44:54 +08:00
huangzq2
94d568a93d Revert "mm: fix unexpected zeroed page mapping with zram swap"
This reverts commit f098f8b982.

Change-Id: I02afb5f962700b250c870eaf347ec425ea72e514
2024-04-18 14:44:54 +08:00
Linux Build Service Account
eb52301813 Merge 920dbdcff7 on remote branch
Change-Id: I2a9ae48f966a5cc28de8aa25ec173763a3a876b4
2024-03-08 19:08:39 -08:00
Vivek Kumar
920dbdcff7 defconfig: arm64: Disable trimming non-whitelisted symbols
Disable trimming of non-whitelisted symbols for all defconfigs.

Change-Id: I11f8c5a2835b79cad31ff36e04f618f22c22e84b
Signed-off-by: Vivek Kumar <quic_vivekuma@quicinc.com>
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
2024-03-05 13:38:03 +05:30
qctecmdr
89f4076c51 Merge "soc: qcom: add out of bound check for AON fifo" 2024-03-04 12:13:25 -08:00
qctecmdr
5028cb01e9 Merge "rpmsg: slatecom: maintain rx_size to read" 2024-03-04 09:00:19 -08:00
qctecmdr
89ebcc83ba Merge "bus: mhi: Fix potential out-of-bound access" 2024-03-04 02:03:00 -08:00
Ajit Kumar
0950011ce6 soc: qcom: add out of bound check for AON fifo
Add out of bound check while parsing the SPI
slave-to-master fifo.

Change-Id: I14f707307fa277b2f8a7b543d3cc5e9ebac885db
Signed-off-by: Ajit Kumar <quic_kajit@quicinc.com>
2024-03-04 01:58:55 -08:00
Kaushal Hooda
ab0f86134f rpmsg: slatecom: maintain rx_size to read
For cmd close_ack or open request where rx_size is being
incrementing with respect to offset might lead to out of
bound read from rx_data.

Decrease rx_size as we process commands.

Change-Id: I492eadcbebb78386fc20f744eb9ad8db4a2914fc
Signed-off-by: Kaushal Hooda <quic_khooda@quicinc.com>
2024-03-04 01:13:25 -08:00
Linux Build Service Account
99691fcf0f Merge "msm: kgsl: Do not release dma and anon buffers if unmap fails" into kernel.lnx.5.4.r3-rel 2024-02-27 16:47:52 -08:00
Lynus Vaz
267c47fd45 msm: kgsl: Do not release dma and anon buffers if unmap fails
If iommu unmap fails and leaves dma or anon buffers still mapped in the
iommu, do not free them.

Change-Id: Ice0e1a59c1ac0ee7a9d62d8899966b84fa63d5ca
Signed-off-by: Lynus Vaz <quic_lvaz@quicinc.com>
Signed-off-by: Deepak Kumar <quic_dkumar@quicinc.com>
(cherry picked from commit e7c4bb239b)
2024-02-26 22:31:47 -08:00
Sarannya S
9d501ea882 soc: qcom: smem: Add boundary checks for partitions
Add condition check to make sure that the end address
of private entry does not go out of partition.

Change-Id: I88b3c69d86d90905b214c13a8c632b134b487a49
Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
Signed-off-by: Pranav Mahesh Phansalkar <quic_pphansal@quicinc.com>
(cherry picked from commit 58e401790a)
2024-02-26 22:31:17 -08:00
Sarannya S
58e401790a soc: qcom: smem: Add boundary checks for partitions
Add condition check to make sure that the end address
of private entry does not go out of partition.

Change-Id: I88b3c69d86d90905b214c13a8c632b134b487a49
Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
Signed-off-by: Pranav Mahesh Phansalkar <quic_pphansal@quicinc.com>
2024-02-20 14:31:26 +05:30
Linux Build Service Account
926d1a7b7f Merge 301c6b0cba on remote branch
Change-Id: I20154d13474efe83afb9bf5324fa428f122942b1
2024-02-18 01:46:45 -08:00
qctecmdr
2cf7f335fc Merge "msm: kgsl: Do not release dma and anon buffers if unmap fails" 2024-02-13 10:14:25 -08:00