Commit graph

579929 commits

Author SHA1 Message Date
Vijayavardhan Vennapusa
4c551536ee USB: dwc3: msm: Fail probe if core-clk-rate is not passed from dts
Currently USB driver is not failing probe if USB core-clk-rate property
is not exist. This leads to USB enumeration failures across connect/
disconnect. Hence make core-clk-rate property mandatory and if in case
not defined, fail the probe. Also Fail probe if extcon property not
defined in case of OTG mode.

Also return error if dwc3_core_pre_init() fails during dwc3-msm_resume()
due to phy init fails and don't go ahead with setting up event buffers
as event buffers allocation is done.

Change-Id: I3927ad2f670e45acd10f8568857cf9f3434df657
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-12 23:20:32 -08:00
Vijayavardhan Vennapusa
9dea5a7428 ARM: msm: dts: Add regulator changes for msm8998-v2.1-interposer
Add required regulator changes in msm8998-v2.1-interposer-msmfalcon.dts
file for USB functionality to be working.

Change-Id: I3e4a43de0c1de6573fea8a52929f6c7af5259755
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-13 12:12:36 +05:30
Rupesh Tatiya
843dac9993 ARM: dts: msm: Enable bluetooth for wcn3990 on msm8998 interposer
Enable various voltage regulators, clocks required to enable bluetooth on
msm8998 interposer.

CRs-Fixed: 1097035
Change-Id: I9f70b74b7ccfb84fec721dbfa1d838d183419cb9
Signed-off-by: Rupesh Tatiya <rtatiya@codeaurora.org>
2016-12-13 11:57:16 +05:30
Chandana Kishori Chiluveru
a305a4198a defconfig: arm64: msm: Enable USB RMNET & RNDIS using IPA over BAM2BAM
This change enables USB RNDIS and RMNET drivers for BAM2BAM communication.

Change-Id: Ibfd9d12503248a3589bbda94096d40856ccba2c4
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-12-13 11:55:24 +05:30
Rupesh Tatiya
7ee3354e7a ARM: dts: msm: Add bluetooth node for msmfalcon
Add bluetooth node for wcn3990 on msmfalcon. This change configures
various voltage regulator and clocks.

CRs-Fixed: 1100113
Change-Id: I403c9def4f90832174f45e21e6c6fceb4a77a2a0
Signed-off-by: Rupesh Tatiya <rtatiya@codeaurora.org>
2016-12-13 11:34:17 +05:30
Kui Wang
473c5b0d7e ARM: dts: msm: Add camera dtsi for msmfalcon interposer qrd
Add camera related device nodes for msmfalcon interposer qrd.
That includes front/rear/aux sensor device nodes, and
corresponding eeprom/actuator/ois device nodes.

Change-Id: I4f8ca4182f9807d970184c85a58989b41755b163
Signed-off-by: Kui Wang <kuiw@codeaurora.org>
2016-12-12 18:11:26 -08:00
Sunid Wilson
95db044daf msm: fd: Support dynamic update of clock and bus settings
Change the bus settings and clocks based on the user
settings while streaming is in progress.

CRs-Fixed: 985849
Change-Id: If9307ffd47854afe6101671ce911631b52a6dff9
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
2016-12-12 17:03:02 -08:00
Ashwini Rao
034f436b68 msm: camera: fd: Add CPP VBIF error handling
On detecting a VBIF hang, reset the VBIF and FD core
and if there is an active buffer, queue back the
active buffer and start processing again.

CRs-Fixed: 961394
Change-Id: I1ed035c8a8efb20d31da9556c5d5b810f81c44d2
Signed-off-by: Ashwini Rao <ashwinik@codeaurora.org>
2016-12-12 17:02:40 -08:00
Peter Liu
ea445a93a0 msm: camera: cpp: Add cpp bus error handler
Reset and halt the bus when bus hang with cpp timeout.

CRs-Fixed: 961394
Change-Id: Id3612b134e3db19f1f8e2e2b3b444f0b6284c4d1
Signed-off-by: Peter Liu <pingchie@codeaurora.org>
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
2016-12-12 17:01:42 -08:00
Ashwini Rao
6428373814 msm: fd: Handle timeout on stream off
On stream off, if there is a timeout waiting for
the current buffer to complete, do a
vb2_buffer_done on the active buffer before it is
removed from the queue. Reduce the timeout
wait time to 150ms

CRs-fixed: 961394
Change-Id: I57d616e9cf89f7722483fe0d49a0b5e44f0e4782
Signed-off-by: Ashwini Rao <ashwinik@codeaurora.org>
2016-12-12 17:00:52 -08:00
Hemant Kumar
108e051cd4 usb: gadget: Reset notify count to 0 upon completion for RNDIS
When host RNDIS sends reset message it skips response available
notification and directly sends get encap response. This causes
notify count to become > 1. As a result when notify completion happens
driver is queuing another notify response available when there is
no legitimate response to send from device side. Hence reset notify
count back to 0 after the completion of notify response, so that
next notification will only be sent when there is a send encap
command sent by host.

Change-Id: I242478408f8cb60fb5af5c741dbf2e8bf3e38af8
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-12-12 15:45:22 -08:00
Jack Pham
7d34e07588 usb: dwc3-msm: Set PROP_BOOST_CURRENT for direct attach devices
If PMIC provides boost power for VBUS in host mode, it may
need to know the amount of current of an attached device
in order to optimize for overall power consumption. We can
pass the bMaxPower obtained from a device's configuration
descriptor when it is attached. This only affects devices
(including hubs) directly attached to the root port, as
any device downstream of a hub will either consume part of
the hub's budget or has external power.

Change-Id: I1ad2cfecb7a2f6bdeaced29a1753cdc1bf3849db
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-12-12 15:27:36 -08:00
Deepak Katragadda
78417f5478 clk: msm: clock-gpu-8998: Program the Droop Detector gfx_pdn
In order to avoid leakage between the graphics and the CX
rails, set the GPU_DD_WRAP_CTRL__GFX_PDN bit.

Change-Id: I7b2e59606e73c467c2b862f0162a176611d7ae3d
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-12-12 14:48:12 -08:00
Hemant Kumar
5994569c2c usb: core: Allow secondary event ring clean upon disconnect
If device is disconnected in the middle of data transfer
there is a possibility of pending events in the secondary
event ring. As a result when xHC is halted as part of device
disconnect, device is not getting detected upon re-connect.
Fix the issue by acknowledging the pending events upon
device disconnect. Also this allows to finish the clean up
of event ring otherwise this results into a memory leak.

Change-Id: I2ec3d74867e0129dad395d1dbe920b468ac5949d
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-12-12 14:00:42 -08:00
Hemant Kumar
13931636c5 usb: xhci: Acknowledge pending events in secondary event ring
As part of bus suspend if xHC is halted when there are pending
events in the event ring, xHC stops responding to xhci commands
upon host or device initiated bus resume. Fix this issue by
going over all the pending events and writing address of xHC
event ring enqueue pointer to ERDP register. This indicates to
xHC that system software has processed all Events in the ring.

Change-Id: I0c1fafb03c9848d043599fcee19e9bf07c3a3acd
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-12-12 13:59:49 -08:00
Susheel Khiani
1fb84944f4 msm: ion: Export msm_ion_do_cache_offset_op to do cache operations
The current API exposed to clients for doing
cache operations didn't provide option to
specify offset within ion buffer and goes
and performs operation on complete buffer.
Export new function for clients which wants to
perform cache operation on specific range
within ion buffer.

We would also need to amend the current generic
ion_do_cache_op function to correctly take into
account the offset within buffer.

Change-Id: I5e4e7beda47cbbd43783048c64fe5adb2beb7023
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-12-12 13:12:25 -08:00
Subbaraman Narayanamurthy
658891b3b9 qpnp-fg-gen3: fix a possible wake source count leak
Currently, in the power supply notifier callback, GEN3 FG driver
calls pm_stay_awake() which increases the wake source count on
its device before it schedules status_change_work. In case, if
status_change_work is already pending, then pm_stay_awake() will
not have a balanced pm_relax() call as the work will not get
scheduled again if it's pending already. Fix this by scheduling
status_change_work and hence call pm_stay_awake() only if it is
not pending.

Change-Id: I2b8e28f6bfe1a5813410c7b1276d4e229eb67e84
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-12-12 12:16:32 -08:00
Subbaraman Narayanamurthy
37a8348b87 qpnp-fg-gen3: Read debug battery id thresholds from RR_ADC registers
Currently, GEN3 FG driver uses a debug battery id threshold of
7 KOhms. However, depending on the battery id chosen by the user
this threshold can be modified in the bootloader. Hence, add
support to read the debug battery id thresholds directly from
RR_ADC peripheral registers. This can be used to decide whether
a fake battery SOC (67) can be displayed to the user.

Change-Id: I22ab702e10c310e4f847c6c81a48a8f0f3188429
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-12-12 12:16:31 -08:00
Subbaraman Narayanamurthy
eba048d518 qpnp-fg-gen3: add support to configure Rconn
Add support to configure battery connector resistance (Rconn) so
that battery resistance can take into account of that along with
ESR and Rslow.

Change-Id: Ib330c4f9b6d55c75aeb8e8fd5cea4dd92b0f64cf
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-12-12 12:16:31 -08:00
Rajesh Kemisetti
3783f2acda ARM: dts: msm: Add GPU mempools properties for msmfalcon
Add initial set of configuration for GPU mempools
to reserve page pools at init time of kgsl driver.

Change-Id: I088aafe8cef621550b1776ca5a652c66e8ac5b62
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2016-12-13 00:31:26 +05:30
Yuanyuan Liu
97e02e9dfb icnss: Remove dev reference
Remove dev reference in icnss_set_wlan_mac_address as
this function is called by external module and won't
be able to get ICNSS dev pointer.

CRs-Fixed: 1099641
Change-Id: I21c992676c41b6cdc3ea53722806e8d0be78d9d5
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-12-12 09:52:36 -08:00
Andrey Markovytch
24c9ad1c6c scsi: ufs: fixed DUN size for ICE encryption to be 4k
Previously the size was 512 which could have caused performance
issues.

Change-Id: If9577b1303c7cfad5c7175448ca93582222fbbb5
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-12-12 07:09:34 -08:00
Amir Samuelov
416d9ad85b spcom: print error messages when remote SP subsystem crash
When the remote Secure Processor (SP) subsystem crash (SSR), the
communication link goes down. Print error messages for this rare event.

Change-Id: Ib3f719e218d972b75936d9960e342ecfe6787301
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2016-12-12 16:57:24 +02:00
Vijayavardhan Vennapusa
d3c08a3ced USB: dwc3-msm: Disable Update xfer for DBM on ep disable or dequeue
Enable update xfer for DBM while configuring dbm endpoint
and also clear update xfer before queueing end xfer command as
part of endpoint disable as hardware programming guide.

CRs-Fixed: 965207
Change-Id: Ib5ec650884ad06394280416ccf877c1ccce1eaaf
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-12-12 19:19:26 +05:30
AnilKumar Chimata
d21ac4abb9 defconfig: msm: Enable SMCInvoke driver for msmfalcon_32
Enable SMCInvoke driver for msmfalcon_32 to communicate
securely with TZ.

Change-Id: I57aa131a67242d53164a52784ebfe619d77aac15
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
2016-12-12 18:22:25 +05:30
AnilKumar Chimata
63cba64989 msm: mink: Fix compilation issues for 32bit targets
Fix compilation errors which were triggered after enabling
smcinvoke driver for targets which has 32bit architecture.

Change-Id: Id85cea7720343cb4101155d5f33f93a1b9946abf
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
2016-12-12 18:22:20 +05:30
Udaya Mallavarapu
97b96558bd msm: dvb: demux: compilation error fix for 32 bit version
Compilation error fix for 32 bit version mpq demux common plugin

Change-Id: Id2472097e115f1c8d09886c1a1ceb01c4f5c5f4b
CRs-Fixed: 1090466
Signed-off-by: Udaya Mallavarapu <udaym@codeaurora.org>
2016-12-12 18:07:54 +05:30
Himanshu Aggarwal
66f8dff8c8 ARM: dts: msm: add camera focus and snapshot nodes for MSMFALCON
MSM GPIO 64 is connected to Camera Focus Button and MSM GPIO 113 is
connected to Camera Snapshot Button. Add the nodes for these buttons
along with their pintrl configuration.

Change-Id: Ifc03c72233dcf1081fc3f2fed495d19e48bb8c7d
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
2016-12-12 16:34:51 +05:30
Mayank Rana
d3e24bc43d dwc3: gadget: Increase TXFIFO size as 3KB with endless USB IN endpoint
Current code is resizing each USB IN endpoint's TXFIFO to 1KB if it is
not USB GSI endpoint or bursting is not enable. In some high throughput
test case where there is contention in terms of accessing DDR memory
through SNOC between USB3 and other peripheral PCIE, there are many
underrun errors (i.e. Bad Data Length/Bad CRC) observed. These errors
results into retransmision of USB packets and sometime dropping packets
causing diffrent kind of data stalls. Hence fix this issue by increasing
TXFIFO size as 3KB with endless USB IN endpoint (i.e. USB BAM2BAM
endpoint) which helps to successfully retransmit packets.

Change-Id: I73860a7bb252a0226b591a5f732e6a7b864911cf
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-12-12 02:52:09 -08:00
Vijayavardhan Vennapusa
08bed5ef94 USB: dwc3: gadget: Don't queue endless req through generic ep_queue
For DBM endpoints, queueing endless request through generic ep_queue
API should not allowed. Otherwise it might lead to crash when called
dwc3_gadget_map_request(). Hence add check whether it is DBM endpoint
or not and if it is, return error.

Change-Id: I7923df35f30293ac7ebb94b656f709f4ba5e00e5
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-12 02:49:08 -08:00
Vijayavardhan Vennapusa
e589cdf901 USB: dwc3-msm: Perform DBM config/unconfig under spinlock protection
There is a possibility of dwc3_msm_ep_queue() and msm_ep_unconfig() racing
each other if suspend happens right after configured. This scenario will
result in NOC error if start_xfer command gets queued after
msm_ep_unconfig().  Hence fix the issue by adding spinlock protection for
DBM endpoint configuration and unconfiguration.

Change-Id: I3fd007647370250017c97faebffadb35afb7fc4d
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-12-12 15:21:33 +05:30
Vijayavardhan Vennapusa
da1cf560c2 USB: dwc3-msm: Disable DBM endpoint in msm_ep_unconfig if no req queued
There is a chance that error might occur in connect_work before
endless request is queued to USB controller and bails out. In this case,
DBM endpoint will not be disabled and results in setendpoint config
command timeouts after next connect and could cause usb endpoint enable
fails. Fix this by disabling DBM endpoint corresponding to USB endpoint
in msm_ep_unconfig() if there are no requests queued to USB endpoint.

Change-Id: I5601d76c58263150a3ad5b026a8f2b10da087ba5
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-12-12 15:20:24 +05:30
Vijayavardhan Vennapusa
280fe6dcf1 USB: dwc3-msm: Check endpoint status and request queued or not first
When function driver calls dwc3_msm_ep_queue() to queue endless request,
first check endpoint status and whether any request already queued or not.
If that is the case, return error. Else go ahead with queuing request
to USB HW. This helps in resolving the crash seen when request is being
queued again.

Change-Id: I3d6a603c693d1df36719f57684ffad409e1a0e78
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-12-12 15:17:48 +05:30
Vijayavardhan Vennapusa
58c91d96b2 USB: dwc3-msm: Initialize DBM ep before BAM pipe reset
On new platforms, endpoint clock gating is added for dbm endpoints
with Synopsys USB3.0 controller. This hardware feature requires
initialization of DBM endpoint before BAM pipe reset for bam2bam mode
data transfers working. Hence change sequence such that do DBM endpoint
initialization first followed by BAM pipe reset and do start transfer
as last operation.

CRs-Fixed: 965207
Change-Id: Ib5bfd1a7d258fe336a4c9924850fc9223c1c81f6
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-12-12 15:16:52 +05:30
Anirudh Ghayal
3e66297d1b ARM: dts: msm: Move to RPM based regulators for msmtriton
Move the stub regulator to RPM-control based regulators
for most of the rails. Keep the GFX regulator as a stub
until the MSM GFX LDO node is added.

CRs-Fixed: 1100152
Change-Id: Ib2d83635af352513064a3c8b717541bc47b2f875
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-12-12 15:04:54 +05:30
Anirudh Ghayal
60338e0dd4 ARM: dts: msm: Add SPMI and PMIC nodes for msmtriton
SPMI enables communication with PMIC peripherals. Add
the device tree node for it.

While at it, include the supported PMIC configuration.

CRs-Fixed: 1100152
Change-Id: Ib892e3c550e7486d615e9d29e701d2b0c19c45f0
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-12-12 15:04:24 +05:30
Amir Samuelov
884d20e96e spcom: cleanup rx-abort flag when channel closed
When the remote subsystem crash (SSR),
glink will notify rx-abort for any pending rx buffer that was queued.
The notification callback sets the channel rx-abort flag.
When the channel is closed, reset the rx-abort flag.

Change-Id: I6cca614327f7b8e3216e3872a36f08f33a65b23e
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2016-12-12 01:05:54 -08:00
Zhenhua Huang
fd9f279a8a ARM: dts: msm: Add device tree for msmfalcon QRD
Add initial device tree support for QRD platform of
msmfalcon.

Change-Id: Id6787274bf5e1dce8b813835af66874f667144ff
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
2016-12-11 22:09:48 -08:00
Manaf Meethalavalappu Pallikunhi
b4b3b9b16a ARM: dts: msm: Configure lmh hardware for msmfalcon
Configure the limits hardware with the interrupt to listen for.
Limits hardware driver will interact with the trustzone to get
throttling information from the hardware.

Change-Id: I295ea05892075c43d389b3b9a20ea4f68daeba3b
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2016-12-11 21:55:12 -08:00
Asutosh Das
8fb5f84803 ARM: dts: msm: add ufs support to msmfalcon
Add ufs and ufs-phy device nodes for msmfalcon.

Change-Id: I42e796ca7e1883f5c2077660dbcde87cd4b30038
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2016-12-12 11:06:20 +05:30
Asutosh Das
998ec9c188 phy: ufs: add UFS PHY support for msmfalcon
Add support for new UFS PHY that is used in
falcon msm.

This PHY is identical to the final 8996 PHY except it
has been moved to VDDMX and level shifters have been added
between the controller/chip and the PHY.

Change-Id: I50681c877917a58c3d70262597300b0d66b1e3a8
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2016-12-12 11:06:01 +05:30
Amey Telawane
49fc48e4c2 defconfig: enable qdss nodes in msmfalcon
ETM coresight nodes are not present in 32-bit defconfig
file for msmfalcon. Add support to enable ETM in msmfalcon.

CRs-fixed: 1089405
Change-Id: I8259722a890d8388b62294de40cb29a9005f1a3e
Signed-off-by: Amey Telawane <ameyt@codeaurora.org>
2016-12-12 10:42:31 +05:30
Anirudh Ghayal
c988a9870d ARM: dts: msm: Add temp alarm nodes for pm/pm2falcon
The temp_alarm module monitors the PMIC die-temp. Add the
device tree nodes to enable the module.

CRs-Fixed: 1100015
Change-Id: I17c5d04d8492f237d75eaf433a34b3451428d537
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-12-12 09:47:24 +05:30
Linux Build Service Account
a80e267a8c Merge "ARM: dts: msm: Configure MPM for qusb2phy_dpse_hv for msm8998" 2016-12-10 23:06:39 -08:00
Linux Build Service Account
35640cdd7e Merge "mm: remove gup_flags FOLL_WRITE games from __get_user_pages()" 2016-12-10 23:06:38 -08:00
Linux Build Service Account
b6dff5ca3c Merge "clk: msm: clock-osm: don't use version register to enable WDOG status" 2016-12-10 23:06:38 -08:00
Linux Build Service Account
5332a6cfcb Merge "ARM: dts: msm: enable the watchdog bark interrupt for smb138x" 2016-12-10 23:06:37 -08:00
Linux Build Service Account
6daf3a8c26 Merge "power: bcl: Add frequency mitigation as an optional property for BCL" 2016-12-10 23:06:36 -08:00
Linux Build Service Account
1bb4efc419 Merge "ARM: dts: msm: Add BCL peripheral configs for pmfalcon" 2016-12-10 23:06:36 -08:00
Linux Build Service Account
bd3f1f2aee Merge "ARM: dts: msm: add qdss node support for msmtriton" 2016-12-10 23:06:35 -08:00