The default value of CPE FLL threshold register needs to be updated
to 0x20 as per the hardware specification. Change fixes this by
adding this register to the codec register defaults.
CRs-Fixed: 1083199
Change-Id: Ib19d78f0834803c75b255ee3a119e043ffb8a988
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Enable PMM_TCXO_CLK before swith to cxo. Also, add
debug logs of reading WCSS_SR_PMM_SR_MSB register
multiple times to check whether ref clock is shut off
or not when xo disable command failed.
CRs-Fixed: 1082643
Change-Id: I1aae776d5e6cc8f1cc2af9278c0e3d6ac37804a9
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Memory core and memory peripheral blocks should remain
on upon host bus suspend otherwise XHCI controller
fails to respond to XHCI commands upon host bus resume.
These memory blocks will be turned off only upon stopping
host mode or vbus off in device mode.
Change-Id: I1f53c9536b6896111707b77954d2b6cf4d227db8
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Integer overflow check is invalid when ULONG_MAX is used,
as ULONG_MAX has typeof 'unsigned long', while areq->assoclen,
q_req->crytlen, and qreq.ivsize are 'unsigned int'. Make change
to use UINT_MAX instead of ULONG_MAX.
Change-Id: If2bb1900c07af1ea162da362c913d4880b0bc755
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Add initial device trees for msmcobalt v2 QRD VR1 board.
Move audio device tree entry to common file as well.
Change-Id: Iabc11506074511ee71463e9d287f6e460dca451e
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>
Today IPA-USB uses disconnect sequence when USB initiates
suspend without remote wake-up, and uses suspend sequence
when USB initiates suspend with remote wake-up.
In accordance with USB-GSI driver, changing this behavior
to use suspend sequence in both of the cases. This is to
overcome some USB H/W malfunction when using disconnect
sequence in case of suspend scenario.
Change-Id: Iba43e192905ab37d196aea4b5d00861b9cb7c347
CRs-Fixed: 1068949
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
During system suspend, usb_suspend() will get called for
both root hub instances and in the choose_wakeup() routine
it will find that device_may_wakeup() returns false. If
the busses were previously runtime suspended then
udev->do_remote_wakeup would be set, but since it conflicts
with the wakeup setting being false, the routine has to
first runtime resume the devices in order to change the
remote wakeup setting. This causes unnecessary delay
as it interrupts the system suspend sequence.
Since the host already does support remote wakeup, enable the
per-device wakeup settings for both the hcd root hub instances
in order to avoid the mismatch during choose_wakeup() which
will allow usb_suspend() to proceed without any unnecessary
resume.
Change-Id: I619272c5d0439427061541f5658cfd305a4ebd46
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Currently, current limit (ILIM) for WLED is configured only for
pmi8994. ILIM levels differs in pmicobalt. Also, the step size
assumed before cannot go well with the different levels.
Default ILIM value differs for LCD and AMOLED mode. Taking this
all into account, add a separate function to configure ILIM for
different PMIC subtypes.
Change-Id: Ibc69706ae1dc878de5cbdaf283f0d71aff8000a1
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
For newer PMICs like pmicobalt, AMOLED_VOUT can be programmed via
independent registers. Also the option to configure AVDD voltage
through SWIRE and SPMI mode is present. Add support to program
the AVDD voltage and mode through these registers. AVDD TRIM
adjustment is needed only for pmi8952 and pmi8994. It is not
needed for pmicobalt. Support it.
CRs-Fixed: 1051250
Change-Id: Ia5cc4a6bbf6b6d0d86e13cec7da167f8a49b859d
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Free the skb if packet is not sent to ipa hw
successfully other than TX_BUSY error cases to avoid
memory leak.
Change-Id: I012484aa92e8f25ed0ad4f6709a54f40409ab8d2
CRs-Fixed: 1077525
Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
Make change in __qseecom_load_fw() and qseecom_load_commonlib_image()
to check buffer size before copying img to buffer.
CRs-fixed: 1080290
Change-Id: I0f48666ac948a9571e249598ae7cc19df9036b1d
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Reduce the power dissipation impact by choosing the optimal
switching frequency per input voltage.
The optimal switching frequences are chosen as follow,
5V only = 600kHz
6-8V QC3 = 800kHz
9V QC2 or vanilla PD = 1.0MHz
12V QC2 or PD adapter = 1.2MHz
CRs-Fixed: 1048242
Change-Id: I2ef9f3e122b39682a743334668fcd0aeb085e147
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Fix input parameter validation in order to avoid
device crash because of incorrect parameter in IPA driver.
Change-Id: Icbdb05aeb9211665420a872d3453dbbd24fd347b
CRs-Fixed: 1069060
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
AArch64 is capable of 128-bit memory accesses without alignment
restrictions, which makes it both possible and highly practical to slurp
up a typical 20-byte IP header in just 2 loads. Implement our own
version of ip_fast_checksum() to take advantage of that, resulting in
considerably fewer instructions and memory accesses than the generic
version. We can also get more optimal code generation for csum_fold() by
defining it a slightly different way round from the generic version, so
throw that into the mix too.
CRs-Fixed: 1082349
Change-Id: I0d8e9bdc15d052458e366cef13a6d2d8c7420ff2
Suggested-by: Luke Starrett <luke.starrett@broadcom.com>
Acked-by: Luke Starrett <luke.starrett@broadcom.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-commit: 0e455d8e80aa22d7ed42c9f5e4e3a75c558aa543
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Ensure the PSHardResetTimer is observed in the source case
when receiving a hard reset. Currently it is handled only
when sending a hard reset. This is achieved by moving
PE_SRC_TRANSITION_TO_DEFAULT from usbpd_set_state to usbpd_sm.
Change-Id: Iea0a8cd64fcce14a99b828cadb0f07664ce858f0
Signed-off-by: Jack Pham <jackp@codeaurora.org>
commit f2449fb61a ("usb: pd: Clear PD_IN_HARD_RESET in
PE_SNK_TRANSITION_TO_DEFAULT") introduced a subtle bug by
moving the clearing of the pd->hard_reset flag in sink mode
to the PE_SNK_TRANSITION_TO_DEFAULT state. This caused a
regression in which the state machine acts as if it had
received a hard reset signal and infinitely loops back there.
The cycle could only be broken if a physical disconnect happens.
Fix this by renaming the flag to hard_reset_recvd and only using
it when receiving, and not sending a hard reset.
Change-Id: I04008d0bfc9a874e08b45f78a937004e9f37527d
Signed-off-by: Jack Pham <jackp@codeaurora.org>
MCLK TX widget has been added for WCD9335 for recording usecases,
but this results in failure of audio recording usecases on
WCD9340 as msmcobalt supports dynamic detection of codecs. Add
corresponding MCLK widgets based on codec selection for audio
recording usecases to work properly on both codecs.
CRs-Fixed: 1022917
Change-Id: I772e05990a796c99c3b6b6f50323d87b5894231b
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Add SLPI fw name property to support dynamic loading of SLPI
fw images based on the version info.
Change-Id: I69981b603526575758376695d7a5e9affd389dbe
Signed-off-by: Ananda Kishore <kananda@codeaurora.org>
Read SLPI fw name from device node to dynamically load the SLPI
fw image.
Change-Id: I9ecc0cc1b5de5e0bd47c658747463a4498123655
Signed-off-by: Ananda Kishore <kananda@codeaurora.org>