Add CONSTANT_CHARGE_CURRENT_MAX, to set and get fcc.
CRs-Fixed: 2004173
Change-Id: I3dfed0ca7b2a477e1c106955fa112ba5206e3fa4
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Add new SCM ID to register listener when smcinvoke is supported. Then
TZ, depending on how the listener has been registered, will either
behave in the old way (i.e. rsp[1]=QSEE_LISTENER_ID), or the new way
(rsp[1]=app_id) when smcinvoke is supported. And qseecom will first
to register listener with new SCM ID, if failed, then fallback to
use old ID.
Change-Id: Ia27055db6ec8f26705669ee913919b29461121ca
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Disable CONFIG_ICNSS_DEBUG now that solution is stable.
CRs-fixed: 2006760
Change-Id: Ic2cd7a02f3486ab81739e8b2fe2259087e3539d6
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
The value of device tree property qcom,connector-temp-max-mdegc is
passed to a wrong variable. Fix it.
CRs-Fixed: 1077217
Change-Id: I705467d91dd8e5e9ea4aa0ab231e29c512608f36
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Current driver has two votables for controlling the usb current
and the usb suspend bit. This could lead to a situation where
the icl votable changes current setting while its suspended.
Changing current setting while suspended causes icl changed
interrupt storm.
Fix it by removing usb_suspend_votable and make all the suspend
voters call usb_icl_votable with 0mA to cause suspend.
Update usb_icl_votable to update current settings only when
not suspended. Moreover disable the interrupt while changing
the current settings and enable the interrupt only after the
unsuspend.
Change-Id: Iafc8ee3c934952b8131d374d0529e865424016d5
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
If LINERESET was detected during hibern8 exit, HW recovers
link back to original speed automatically by PA_INIT sequence,
hence remove the full reset.
Change-Id: I181adf4580c0febed817047a40c1d0621d9c9824
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Auto hibern8 timer will get reset as part of ufshcd_vops_full_reset(),
so reenable the timer in ufshcd_probe_hba().
Change-Id: I8ff85a9fd02f4a6b527666654728c4146cb61f5e
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Set the DMA mask for the SPI device appropriately.
This will alleviate usage of bounce buffers by the dma kernel library and
prevent some of the crashes due to the kernel running out of bounce
buffers.
Change-Id: I7b0b123be6e7bb1e30d0755ca8b1b72ea4e2b5f6
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Parallel charging is enabled only for DCP and HVDCP adapters, add
support to enable parallel charging for SDP/CDP/OCP and FLOAT chargers.
While at it, rename PL_DISABLE_HVDCP_VOTER to PL_DELAY_HVDCP_VOTER.
Change-Id: I79b28ee6fd91739fa9895959d9ca3d399506d388
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Read instance type from device tree node to know the storage type
for ICE configuration, which is used to program the corresponding
ICE register during ICE reset.
Change-Id: I0eb423fb84dc89115227abc7c5688df7ae9a4a3c
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
- Verify spcom_dev is not NULL when exported API or callbacks are called.
- Use IS_ERR() when calling a function that returns a pointer.
- Unregister glink client if probe fails.
- Verify number of predefined channels in device tree is valid.
Change-Id: I4255fe651c4088848da1d31bb448394e2d8ce4b5
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
On error, do the necessary cleanup and propagate the error.
Change-Id: Ief048ecfdba3aff77f62e5da5b8207f4e8e606b2
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
As sdcc and ufs ice nodes are common between sdm660
and sdm630, move sdcc and ufs ice nodes to common
device tree file to avoid duplication of nodes.
Change-Id: I1e018ef44759e8cc3ce201e19a1e99ba6bb601bd
Signed-off-by: Brahmaji K <bkomma@codeaurora.org>
During fast cable connect/disconnect, there is chance that
set_suspend() called as part of USB entering low power mode
and PMIC driver asking to remove pulldowns race each other.
This could cause unclocked access and results in crash. Fix this
issue by using mutex to avoid crash due to the race mentioned.
Change-Id: I1babb545d40b8761774cbdd3a57258ed6bc77398
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
If disconnect happens before connect_work done, there is a chance that
port_usb might be NULL before calling ipa_data_start_rx_tx(). This could
cause crash if it happens. Fix it by taking to local variable under
spin lock protection and check later before calling ipa_data_start_rx_tx()
for queuing RX/TX requests to USB HW.
Change-Id: I82d74e34bb4d29eac225d31dac67bf5d5bc39a79
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Shared rails such as CX, MX are controlled by the RPM. RPM aggregates
the votes to these rails and sets the rails at a corner voltage to
satisfy the needs of all the masters.
Add support to read and print the CX, MX rail-stats from shared memory.
cat /d/rpm_rail_stats
Number of Rails:2
rail:mx num_corners:4 current_corner:2 last_entered:0
corner:ret time:0
corner:svs time:0
corner:nom time:0
corner:turb time:0
rail:cx num_corners:5 current_corner:1 last_entered:0
corner:ret time:0
corner:svs2 time:0
corner:svs time:0
corner:nom time:0
corner:turb time:0
Change-Id: I730c4accc1bf4c152ef95f9ce9343a58022c2630
Signed-off-by: Karthik Parsha <kparsha@codeaurora.org>
Signed-off-by: Naresh Malladi <namall@codeaurora.org>
Commit b76105e359 ("usb: pd: Read sink capabilities from device
tree") added support in usbpd driver to pass sink capablities from
device tree. But it introduced bug in case of no sink capablities
passed from device tree as in this case, device_property_read_u32_array()
returns -EINVAL. Due to this, usbpd driver probe fails as usbpd_create()
returns errors. Fix this issue by checking if return value > 0 and then
only try to read sink capablities from device tree. If not, use default
sink capabliites defined in usbpd driver.
Change-Id: I51beeba282c6e067881c664d38c2657843a1c716
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Home key is designed on the PCB level as a compatible solution, but
there is no mechanical hard key installed. Currently, GPIO11 on PM660
has been assigned the interrupt owership to modem, and this will cause
probe failure on gpio-keys driver and fail other gpio keys detection.
So, remove the home key configuration as a temporary solution.
CRs-Fixed: 2006468
Change-Id: Ib42a79e60c0cdf1489a63ba66ce7cde97c0e3f47
Signed-off-by: Yingwei Zhao <cyizhao@codeaurora.org>
The ath10k snoc bus uses NAPI in rx path and tasklet
is no more used. Remove tasklet references from
bus layer. Refactor driver unload path to have
consistency in API uses.
CRs-Fixed: 2005874
Change-Id: Ib9534286ed45bf1394e109c6ca8063cd89a1d58e
Signed-off-by: Govind Singh <govinds@codeaurora.org>
Currently log and event mask information is sent to all
peripherals. This fix sends log and event mask information
to only dci supported peripherals.
CRs-Fixed: 1117238
Change-Id: Ibcf3762574212e097502b2f36f7ac9284bac3e06
Signed-off-by: Gopikrishna Mogasati <gmogas@codeaurora.org>
Fix memory corruption in Goodix touchscreen driver, by resetting
the global structure cmd_head to zero (except *data and wr flag)
in goodix_tool_write handler on error case.
Change-Id: I4f7f8f464b93571627b922b10c10a65826228e42
Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
Configure APC0/1 CPR instances to operate in closed-loop operation
to maintain an optimal voltage set point on the APC0/1 voltage rails.
Also, add static open-loop and closed-loop voltage margins as per
the early voltage characterization results.
CRs-Fixed: 2006437
Change-Id: Iea42d16d2e7c19a2779090d767dd37b0865b24c2
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
commit 7d08f0c4e3b7c35e ("usb: gadget: replace %p with
%pK") modifies the %pM (MAC address format specifier) as
%pKM in usb drivers. when usb composition switch happens
ecm function bind_config() access the invalid host's
ethernet address and leads usb enumeration failure. Fix
this by replace %pKM with %pM only for usb-eth module.
Change-Id: I29364891fbdf381b5a6ea360ecdbe3ef237f24bd
Signed-off-by: Arumuga Durai A <cadurai@codeaurora.org>
WCN3990 target uses more fields in htt rx descriptor.
Refactor htt rx descriptor to not break legacy code.
Remove last msdu check in htt rx for WCN3990 which is not required.
CRs-Fixed: 2005906
Change-Id: Id2f670ecd72ea898a11a9d9eea61b5a1f2364d32
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
This is the reference driver source code for ST
Touchscreen of version 4.1.0. It is used for QVR8998
touchscreen.
(cherry picked from commit 2cd09314337d614e69d0ebd99afb71d99d31b69a)
Signed-off-by: chenx <chenxiang0527@thundersoft.com>
Git-commit: 2cd09314337d614e69d0ebd99afb71d99d31b69a
Git-repo: https://source.codeaurora.org/quic/la/kernel/msm-3.10
CRs-Fixed: 1106217
Change-Id: I6674245402c0a5d6cca6bf82a9f8b1bf4f4f4ef3
Signed-off-by: Jin Fu <jinf@codeaurora.org>
Use DMA pipe for framebuffer as RGB Pipe type is not available
for SDM 3.x.x targets.
Change-Id: I4dad1df561badceb07d473c4530553a5b53753d1
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Coresight ETR sink is enabled as the default sink to
collect traces.
Change-Id: I78cec888284307dbc7e696e7b33b45707bf9e1ca
Signed-off-by: Saranya Chidura <schidura@codeaurora.org>
Modify DCC RAM size for sdm660 and sdm630. DCC RAM is used to
store captured information locally in DCC.
Change-Id: Ib4c630e165e55b8ac82976e406069ee9e4d3f3c2
Signed-off-by: Saranya Chidura <schidura@codeaurora.org>
In case of PLL lock errors or the RCGR fails to update the new
configuration, add support to capture all the PLL and RCGR
configuration registers as part of kernel logs.
Change-Id: Ifb0cefafc30f8796ba17f2d388fb65ed41aae485
Signed-off-by: Taniya Das <tdas@codeaurora.org>
If the user-space client doesn't provide the pixel extension and qseed3
configuration, driver should set the default values. Change sets the
default values if user-space client is not configuring the blocks when
VIG pipes are selected.
CRs-Fixed:2002381
Change-Id: I02f0e76fb87587d2eed9e5f4fcca5baa7d605b92
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Manoj Kumar AVM <manojavm@codeaurora.org>
Fastmap feature is used in the cases where it required reduced time for
dma_map/unmap().
Change-Id: Ic1c1fd0bbd95d849eaf6ee13569e345117a988b6
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Currently the interrupt trigger type is configured as NONE. This
causes a level handler to be assigned to these interrupts.
However, all of them are edge triggered interrupts with varying
falling/rising/both edge flavors. Update the device tree to
use their correct trigger types thereby preventing missed interrupt
storms because of incorrect handler types.
Change-Id: I6b5cddc8281ca7f6810dcb754d7dd2e6ae6f339c
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Prevent concurrent usage & re-allocation of the wr_buf variable.
Based off patch by chengengjia <chengjia4574@gmail.com>.
BUG: 33001936
Change-Id: I88d78e1ec0fc9e88b1e6824c06161b67d01136ec
Signed-off-by: Andrew Chant <achant@google.com>
Git-commit: d740e7228bd1578ed01762998b2a86e7df56e608
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
Add support to configure battery thermal coefficients so that different
battery thermistors can be supported. These coefficients can be
configured via "qcom,battery-thermal-coefficients" device tree property.
CRs-Fixed: 2004461
Change-Id: Iff25acd397a68c31057dff4db1896d46e396adc6
Signed-off-by: Yingwei Zhao <cyizhao@codeaurora.org>
We'll need this too for shrinker/purging.
Change-Id: Ic0dedbada844d46b608c99cf3eaa3a898a6d5016
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: 4fe5f65e66823dcb212a0404af47389b2b1c58f0
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[jcrouse@codeaurora.org: Modified to use different iommu map function
and merge with existing display changes]
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Nobody uses this now that we are entirely scatter/gather enabled.
Remove it to avoid having to calculate the length unnecessarily.
Change-Id: Ic0dedbad020998e1c8fd5d526789f73beb0d5755
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Previous value really only made sense on armv7 without LPAE. Everything
that supports more than 4g of memory also has iommu's that can map
anything.
Change-Id: Ic0dedbad6ca5973f2ac0d2690dec77e40787b8da
Git-commit: 49d24b7a6bf253aeb7cb81672316c83e7b628ea9
Git-repo: https://github.com/freedreno/kernel-msm
Signed-off-by: Rob Clark <robdclark@gmail.com>
[jcrouse@codeaurora.org: Fixed minor merge issues]
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Use phys_addr_t to store physical addresses destined for iommu_map() to
support targets that can have more than 32 bits of physical address space.
Change-Id: Ic0dedbad8d87bf05c602bccdd48338086d76478d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Remove CONFIG_OF checks in adreno_device.c. The downstream bus scaling
stuff is included only when CONFIG_OF is not set. So, remove that too.
Change-Id: Ic0dedbadbd39970667e7ab745c4b276690a0b0d7
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: 66a42f8586897c3a95ac2fef5e2ee1e69da695c8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Not sure where it came from, but seem unintentional. And also not
needed on a420, so let's just drop it.
Change-Id: Ic0dedbaddb70f0268d4182cc206412b6c69fd472
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: 7977f4426c44da95c5dba91a62f099411e029de8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
As described in the downstream/kgsl driver:
Sometimes the RPTR shadow memory is unreliable causing timeouts
in adreno_idle(). Read it directly from the register instead.
Change-Id: Ic0dedbadf67029a7f8f872daa16d2286efe46267
Signed-off-by: Craig Stout <cstout@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: 7d0c5ee9f07779ab29ac291748060a0a6f1d66db
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
We need this for GL_TIMESTAMP queries.
Note: currently only supported on a4xx.. a3xx doesn't have this
always-on counter. I think we could emulate it with the one CP
counter that is available, but for now it is of limited usefulness
on a3xx (since we can't seem to do time-elapsed queries in any sane
way with the existing firmware on a3xx, and if you are trying to do
profiling on a tiler you want time-elapsed). We can add that later
if it becomes useful.
Change-Id: Ic0dedbad46a7cb22391de89ed2341a5a378e1bb0
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: 6c77d1abe61797239533918d7a0336fc84f4aef1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
We need this in userspace for interpreting some of the perf ctrs.
Note possibly not quite sufficient if we had some frequency mgmt
approach other than race-to-idle. Not really sure what the best
thing to do if we did. Although displaying results as a percentage
of max frequence seems sensible(ish) if we did.
Change-Id: Ic0dedbad1d8481cd2609ae0d86d4de6045f0d22e
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Git-commit: 4102a9e5325941223fbfa0a56175e9efb3d4385a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Pull in additional regs needed for a430, etc.
Change-Id: Ic0dedbada256c546268b2a19556a78e8912d06e4
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: a2272e48eef02869dc3fa031720f36dd4cb05e4f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Add null check in firmware_direct_write to avoid null
pointer dereference due to firmware_abort.
Change-Id: Ibde30452bb6f3fe7a9f92aa3b1f2ed85a858d94e
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Check for NULL for irq descriptor to prevent deferencing an invalid
address. The qos value is then ignored as it cannot be associated with
the requested irq.
Change-Id: I82fdc9b10ffff89032a0f0e9dade42e4c670f4b9
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
SSR logic is executed during device shutdown. During device
shutdown the Linux tasks (processes) are moving to SIGKILL
state. If a DMA allocation from the kernel happens
in a context of a process in SIGKILL state and page migration
is needed, the allocation will fail.
Use GFP_ATOMIC allocation flag during SSR. This will
utilize the atomic memory pool and will not require page
migration.
CRs-fixed: 1077811
Change-Id: Ie06b85d1f9d0a230c3d3832b6f0bbcdefc520c1e
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
Add following support for SDM660 panels.
1) ULPS support for 1080p panels
2) ESD support for 1080p and truly WQHD panels
3) DCS backlight support sharp WQHD panel
Change-Id: Ied36d4771df8c9e24ef27ebaabc948ad4a13bac7
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>