Commit graph

579869 commits

Author SHA1 Message Date
Vijayavardhan Vennapusa
48f731aacb ARM: dts: msm: Add QMP PHY init sequence for msmfalcon
Add required QMP PHY initialization sequence for msmfalcon for
USB SS mode working.

Change-Id: I14a9f7a1079956efcb3b31ffeca1235a62856bf5
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-14 16:10:59 +05:30
Gaurav Kohli
19740f9d53 soc: qcom: pil-q6v5: Update the reset sequence for qdspv62.1.2/1.5
Update the reset sequence to read each write while enabling QDSP6 memory
bank one at a time. This will make sure whether write is complete or not.
Also add logs during Mss shutdown, It will help to debug Mss restart
and shutdown case.

Change-Id: I9f2cb058a7e59b573fc64662ee7b5bff49b18ea7
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2016-12-14 01:02:53 -08:00
Amir Samuelov
28d23d4d79 spcom: check size before calling copy_to_user()
Calling copy_to_user(to, from, size) with negative value
might cause heap overflow since size is unsigned parameter
and negative value is cast to big unsigned value.

CRs-Fixed: 1092683
Change-Id: I9b4a0710aa33942de2976f7ee158a8025dd6a20e
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2016-12-13 22:26:38 -08:00
Vijayavardhan Vennapusa
e6b5a58c7d USB: composite: Send stall when no config is active
Whenever composition switch happens, android driver stops data transfers &
removes configuation before disabling pullup. Due to this, there is small
window during which pullup is active and device ends up sending device
descriptor with zero confiurations in certain scenarios of Host PC reboot.
Hence fix the issue by stalling control endpoint in this scenario.

Change-Id: I3d3c0321d9311617c6ee492c55809f36de6ae412
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-12-13 21:02:32 -08:00
Vijayavardhan Vennapusa
d4d45536ae usb: gadget: composite: Add spinlock protection for usb config descriptor
During composition switch, android driver stops data transfers first and
removes configuration before disabling pullup for USB3 controller. With
this sequence there is a possibility for a race where usb_remove_config is
in progress during which pullup is active and sending the setup request for
configuration descriptor with zero configuration value. Hence fix the issue
by adding spinlock protection for get_config descriptor.

CRs-Fixed: 1052608
Change-Id: I65d38387f77addc9a8894a74f427d97313f90a9e
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-12-13 20:58:03 -08:00
Vijayavardhan Vennapusa
7d36ce0b84 Revert "USB: dwc3-msm: Enable power event irq in case of host bus suspend"
Commit 3dd2172dfecc ("USB: dwc3-msm: Enable power event irq in case of
host bus suspend") is added to enable power_event_irq during host bus
suspend. This is to map MPM pin for DM to power_event_irq to wakeup during
system suspend in host mode. Currently MPM driver has support for mapping
multiple MPM pins to single IRQ. Hence it is not required to enable
power_event_irq during host bus suspend.

Change-Id: I5c7d6b4d43baa0b387342a8bd261361a5c07fe23
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-13 20:55:37 -08:00
Vijayavardhan Vennapusa
98eba6ebf2 USB: gadget: f_qdss: Add proper checks in usb_qdss_close()
On qdsss channel close, driver is dequeuing endless request without
checking whether qdss is active or not. This might crash if qdss channel
is closed when non QDSS composition is active. Fix the issue by having
proper checks and if qdss is not active, just return without performing
dequeue operation.

Change-Id: I667ea843f77794e9384c22ece218853331751db6
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-12-13 20:55:21 -08:00
Vijayavardhan Vennapusa
fc2fd4a788 USB: f_qc_rndis: Add spinlock protection whereever required
Add spinlock protection in rndis_qc_command_complete() and
rndis_qc_response_complete() to avoid races with disable and
unbind() function calls. Otherwise it results in crash or using
freed memory.

Change-Id: Ida99de70a541ba12a8a8610b1c6fa717e42d865c
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-12-13 20:54:53 -08:00
Vijayavardhan Vennapusa
3ce2d1d47d defconfig: msmfalcon: Enable EHSET Test Fixture device driver
Enable required EHSET Test fixture driver to perform the high speed
electrical testing procedure for USB-IF compliance.

Change-Id: I92cd6cac7315905862aff1c3dde1b4d6ee771128
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-14 10:23:06 +05:30
Vijayavardhan Vennapusa
6ffbb989b5 usb: qusb2: De-assert TCSR_QUSB2PHY_CLAMP_DIG_N_1P8 upon boot up
This prevents leakage on 1p8 power rail upon boot up when usb cable
is not connected.

Change-Id: Ia19d54df6086cfb0047fcdd8b04e7e0edff91cf7
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-14 10:17:18 +05:30
Hemant Kumar
9ed86b4e6c sound: usb: auto suspend device only if it supports remote wakeup
Some usb headsets which do not support remote wakeup when suspended
and resumed by host resulting device disconnect. Hence do not suspend
device if it not remote wake up capable.

Change-Id: Ia2462116582b6e22c44cff88df2872e4127e5e29
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-12-13 18:28:27 -08:00
Kuirong Wang
9286838256 ASoC: msm8998: add asm loopback FE DAI
Add asm loopback FE DAI to support the audio asm loopback
use case for msm8998 platform.

CRs-Fixed: 1099656
Change-Id: Ia1c6d8dfd75eb21cde8de7b9bfcab4e4277e339f
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2016-12-13 17:56:03 -08:00
Kuirong Wang
73c975d6fd ARM: dts: msm: update speaker left and right GPIOs for APQ8998
Update speaker left and right GPIOs for APQ8998 platform since it
uses different GPIOs from MSM8998 platform.

CRs-Fixed: 1099656
Change-Id: Idecd865b7a11e4cd30737f5d800673c87807592c
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2016-12-13 17:32:17 -08:00
Skylar Chang
303f2fbfac msm: ipa3: support AP+STA IPA stats
Add IPA stats support on AP+STA mode when
CNE queries. Also add metering funtionality
on WIFI interface to stop the data transfer
when quota reached on WIFI-case.

Change-Id: I85da89f681170acf21674a8f1a34778014c92892
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-12-13 17:01:29 -08:00
Krishnankutty Kolathappilly
7e4424a1b5 msm: camera: Synchronize jpeg ISR and userspace call
This will fix the race between jpeg dma ISR and userspace call.
Without this fix jpeg dma may randomly crash due to invalid pointer
access.

Change-Id: I559ae08b9a46d5d3c35f8be509976a25faa967f9
CRs-Fixed: 1083323
Signed-off-by: Krishnankutty Kolathappilly <kkolatha@codeaurora.org>
2016-12-13 15:20:00 -08:00
Linux Build Service Account
3162449f7d Merge "USB: dwc3: msm: Fail probe if core-clk-rate is not passed from dts" 2016-12-13 12:18:07 -08:00
Linux Build Service Account
2b66512ac3 Merge "USB: dwc3-msm: Check endpoint status and request queued or not first" 2016-12-13 12:18:06 -08:00
Linux Build Service Account
b574f42cd7 Merge "USB: dwc3-msm: Initialize DBM ep before BAM pipe reset" 2016-12-13 12:18:05 -08:00
Linux Build Service Account
0aaea76517 Merge "ARM: msm: dts: Add regulator changes for msm8998-v2.1-interposer" 2016-12-13 12:18:05 -08:00
Linux Build Service Account
4cfe3d17f6 Merge "ARM: dts: msm: Add bluetooth node for msmfalcon" 2016-12-13 12:18:04 -08:00
Linux Build Service Account
1dcf06662e Merge "ARM: dts: msm: add camera focus and snapshot nodes for MSMFALCON" 2016-12-13 12:18:03 -08:00
Linux Build Service Account
a9d2a4230a Merge "ARM: dts: msm: Add GPU mempools properties for msmfalcon" 2016-12-13 12:18:02 -08:00
Linux Build Service Account
41a3d6a427 Merge "clk: qcom: Update fmax tables and few frequencies clocks of MSMfalcon" 2016-12-13 12:18:02 -08:00
Linux Build Service Account
7acd465532 Merge "defconfig: arm64: msm: Enable USB RMNET & RNDIS using IPA over BAM2BAM" 2016-12-13 12:18:01 -08:00
Linux Build Service Account
f25d55e62e Merge "qpnp-fg-gen3: Use the correct property name to get fastcharge current" 2016-12-13 12:18:00 -08:00
Linux Build Service Account
127197b2bf Merge "ARM: dts: msm: rename battery profile used for msm8998 QRD" 2016-12-13 12:17:59 -08:00
Linux Build Service Account
6243ed9ad2 Merge "usb: dwc3-msm: Set PROP_BOOST_CURRENT for direct attach devices" 2016-12-13 12:17:59 -08:00
Linux Build Service Account
d18c993351 Merge "icnss: Remove dev reference" 2016-12-13 12:17:58 -08:00
Linux Build Service Account
db080b80dc Merge "msm: dvb: demux: compilation error fix for 32 bit version" 2016-12-13 12:17:57 -08:00
Linux Build Service Account
ccb490b3dc Merge "smb-lib: revert the boost back workaround for dc path" 2016-12-13 12:17:56 -08:00
Linux Build Service Account
6524cc4515 Merge "dwc3: gadget: Increase TXFIFO size as 3KB with endless USB IN endpoint" 2016-12-13 12:17:56 -08:00
Linux Build Service Account
10114703d2 Merge "spcom: check buf size for send modified command" 2016-12-13 12:17:55 -08:00
Linux Build Service Account
ef451d15bb Merge "spcom: check buf_size validity for user send command" 2016-12-13 12:17:54 -08:00
Linux Build Service Account
d3fdecd206 Merge "NFC: Inform CLF whenever eSE is powered off" 2016-12-13 12:17:53 -08:00
Linux Build Service Account
3263de1fee Merge "spcom: check user space command size" 2016-12-13 12:17:53 -08:00
Mayank Rana
de7e98f381 defconfig: arm64: Enable USBNET driver
This change enables USBNET driver which allows USB ethernet class
driver to register USB ethernet device as network device with Linux
Network Stack and allows USB IOs with USB Host Controller driver.

Change-Id: Iba036ce43656979df0b9ea228b57bc980c4c53bc
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-12-13 08:57:03 -08:00
Andrey Markovytch
f28a6750a8 ARM: dts: msm: specify a flag to control encryption key size on msm8998
This is required to control the FDE/FBE key size from kernel.
Same TZ image can now be used for different encryption key sizes.
The key size will not be fixed and will be controlled with
this flag in qseecom driver.

Change-Id: Iac5c25ba5dc7d22cd7a4961dd5058db0088995ca
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-12-13 06:20:59 -08:00
Andrey Markovytch
309430921f qseecom: add configurable encryption key size
ICE crypto engine key size can now be configured using dtsi flag.
This is required to facilitate usage of common TZ image with variable
key sizes and also provides flexibility in handling different key sizes
requirement in future. This flag is parsed in driver and depending upon
the value HLOS decides on key size to be passed to TZ.

Change-Id: If40f83a943e5ae8333d171c21823a16816d7ddd4
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-12-13 06:18:03 -08:00
Girish Mahadevan
2012b2e207 spi: spi_qsd: Improve latencies for small transfers
For smaller transfers when DMA mode isn't used improve the transfer
latencies by being more effecient when moving data to the hardware
FIFO especially when using bits_per_word that is less than 32. This
will reduce the number of interrupts being generated in such transfers
helping in overall transaction latency.

Change-Id: I6ddd933d4a43a4d24d7b5310a678a19411a14f2c
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2016-12-13 17:15:23 +05:30
Vijay kumar Tumati
1056fb70ed ARM: dts: msm: Enable CAM1 on msmfalcon interposer
Add DTSI configuration for camera node 1. Used by
all sensor modules that are connected to this port.

Change-Id: I3301d822a3664869d8531d7ff0efa20e22996763
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
2016-12-13 00:55:25 -08:00
Krishnankutty Kolathappilly
925920826d msm: cpp: Reset vbif and load firmware on poll failures
CPP poll failure can happen if vbif reset is not proper. Reset vbif
and load firmware on poll failures to recover from error scenario.

CRs-Fixed: 1098549
Change-Id: I38ef1c9478450c98c8379d8b1c085b31209cb48e
Signed-off-by: Krishnankutty Kolathappilly <kkolatha@codeaurora.org>
2016-12-12 23:46:07 -08:00
Manish Poddar
dd1c15c802 msm: camera: Initialize return value to 0
Initialize return variable to 0 instead of
error.
CRs-fixed: 1001532

Change-Id: I81c87cac13e33e0678b3bb92f58da0699d9197c2
Signed-off-by: Manish Poddar <mpoddar@codeaurora.org>
2016-12-12 23:46:05 -08:00
Manish Poddar
faef6bbca7 msm: camera: Initialize variables to default
Add NULL check and initialize  the variables to
default values in camera.

CRs-fixed: 994317
Change-Id: I165f1c39c1332737a644c6650bc40f4c718a7ee8
Signed-off-by: Manish Poddar <mpoddar@codeaurora.org>
2016-12-12 23:45:53 -08:00
Taniya Das
0cb6666c6f clk: qcom: Update fmax tables and few frequencies clocks of MSMfalcon
The fmax corner frequencies have got updated, and also new frequencies have
been added for few clocks, so fix and update the same.

Change-Id: Ic6e2c2208a8971b07ed6ccfc8d63091e4692301f
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-12-13 13:05:35 +05:30
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