Commit graph

578906 commits

Author SHA1 Message Date
Patrick Daly
149c51d5f2 iommu: arm-smmu: Fix clock reference count error
When an atomic iommu domain attaches, an additional vote for both
clk_prepare, bus_bw, and regulator_enable must be held. The prior logic
only did this if the atomic domain was the first to attach to the iommu.
Fix this.

As a side effect, add reference counting for bus_bandwidth voting such
that a call to arm_smmu_enable_clock() followed by
arm_smmu_disable_clocks() will not always result in a bus bandwidth
vote of zero.

Change-Id: I7f88ea845a281c8c1def4f642e61262b53b60e1a
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-12-08 14:32:20 -08:00
Hemant Kumar
a8c976f55a usb: phy: qusb2: Add support to vote for regulator L2a
L2a is required to lock the phy PLL upon bus resume when
exiting from XO shutdown. This LDO powers REFGEN block
which is required to be powered on so that phy PLL gets
locked as part of wakeup from XO shutdown.

Change-Id: Ia0e3d574de7c78534832e4f8749672eb6fcde1f0
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-12-08 13:54:27 -08:00
Hemant Kumar
10957dd96e sound: usb: Handle implicit feedback data endpoint properly
For the devices supporting implicit feedback over data endpoint
usb audio driver instantiates snd_usb_endpoint as sync_endpoint
even though there is no real usb sync endpoint exists. QMI driver
looks for usb endpoint if sync_endpoint is instantiated and bails
out if endpoint related context does not exist. This causes such
devices to not work. Hence do not bail out if sync ep context
does not exist and continue preparing the QMI response.

Change-Id: I7d96555573cfd6cca1ca56c877d78fde943f8100
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-12-08 13:37:31 -08:00
Siddhartha Agrawal
355786d15d msm: mdss: dp: correctly ref count the pll resources
This fixes the issue where the dp pll resource was not correctly
keeping a refcount on the pll resource. This will fix the bootup
warning when both DSI and DP are enabled.

Crs-Fixed: 1088737
Change-Id: I19f8eef7f664a58cac1a082b8195e48c52613c5d
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2016-12-08 12:37:08 -08:00
Osvaldo Banuelos
31a66f3234 clk: msm: clock-osm: don't use version register to enable WDOG status
The hardware version register does not return the expected
version value. The register is located in register space that is
accessible to the secure world only. This results in WDOG status
register not being enabled. Use the chip version instead.

CRs-Fixed: 1099112
Change-Id: I014c823bcf2545f005205dde326a074eaa5d7a6a
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-12-08 11:59:14 -08:00
Shankar Ravi
cb5b41659b ARM: dts: msm: Update camera GPIO, VREG config for msmfalcon interposer
1. Update PMIC gpio configuration for
   front and rear camera.
2. Correct VANA GPIO.
3. Correct the CSID VREG Voting.

Change-Id: I1e72bf8855ea1150eb2cedaee82d04610b09bdae
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2016-12-08 15:28:40 +05:30
Vijayavardhan Vennapusa
e5b3bf88ce defconfig: msmfalcon: Enable audiosource gadget driver
Enable required audiosource driver that is required for audio
over accessory dock to work.

Change-Id: Ifeb779a3323c505d482eb53ad96a1b8aec0f3af5
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-08 12:04:18 +05:30
Meng Wang
043b01d09a include: clock: remove ifdef from header file
As audio-ext-clk.h is finally included in device tree and
and using ifdef results in compilation failure. Delete
ifdef from audio-ext-clk.h.

CRs-Fixed: 1090500
Change-Id: Ib6f715c3f606770e7e0b1f0f84ab50e442398cd0
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2016-12-07 22:24:56 -08:00
Ashay Jaiswal
9c6653b0b1 qpnp-fg-gen3: Add support for PMFALCON in Fuel Gauge
Add support of PMFALCON PMIC in FG driver. PMFALCON
FG core uses same SRAM map as PMI8998v2.0.
While at it, add workaround flag variable to keep track
of all hardware specific workarounds.

CRs-Fixed: 1096793
Change-Id: I8ba73276fd30f6eaf935ed77b75601f1322c0ba6
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-12-08 11:16:15 +05:30
Nicholas Troast
d804378a31 smb138x-charger: enable the watchdog timer when parallel is enabled
If software becomes unresponsive then the battery could be overcharged by
the parallel charger. Enable the watchdog so that when the bite timer
expires then charging will be disabled by hardware.

Change-Id: I82febbc28c05563d052c6eed034adc817df39790
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-12-07 15:22:57 -08:00
Nicholas Troast
5b55bcfa96 ARM: dts: msm: enable the watchdog bark interrupt for smb138x
The smb138x parallel charger device has a watchdog timer that will
disable parallel charging if it is not pet by software. Enable it.

Change-Id: Ie28323cdabccdc64196fae25deb2f56dfbb5a0e7
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-12-07 15:22:49 -08:00
David Collins
4bf6721985 ARM: dts: msm: reduce VDD_GFX CPR max floor to ceiling range for MSM8998v2
Reduce the VDD_GFX CPR maximum floor to ceiling voltage range for
each corner in order to meet the most recent hardware guidelines.

Change-Id: Ie70a698fbed442e8826f0bc30c5ef6bdfd5b3e1f
CRs-Fixed: 1098577
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-12-07 14:41:29 -08:00
Shubhraprakash Das
b9a96eb2e5 msm: camera: isp: Ignore bus error from RDI write master
Bus error can be generated on RDI write master even if there
is no data sent on it. This is not actually an error hence
ignore it.

CRs-Fixed: 1098568
Change-Id: I8dc24f3c4926f008d114778c890ad2c2902f84b9
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2016-12-07 13:52:00 -08:00
Shubhraprakash Das
f230f0f67b msm: camera: isp: Stop stats stream properly
When the camif input is disabled the stats streams need to be
turned off as well. Stop the stats stream by following the
correct stop sequence instead of just turning off the
stats write masters.

CRs-Fixed: 1098562
Change-Id: I4789bf9e837b1c0af7288e26ff02c4068638337a
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2016-12-07 13:47:50 -08:00
Shubhraprakash Das
97587bf5cb msm: camera: isp: Add secure mode to isp
Add option to put the isp hardware in secure smmu mode. The
isp stats will still be in non secure mode. Add ioctl to
indicate which buffer queue will be in secure mode so that
they can be mapped in secure mode

CRs-Fixed: 1060631
Change-Id: Ibf2050d0814cc2aaf22a6f510847054d78fd7477
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2016-12-07 13:46:20 -08:00
Shubhraprakash Das
757c94f42f msm: camera: isp: Initialize registers after reset
Initialize the qos registers and turn on interrupts after reset.

CRs-Fixed: 1089171
Change-Id: I8ed92a835fec1d5297448f440c19cc22ba52728b
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2016-12-07 13:34:26 -08:00
Harshdeep Dhatt
ac782356a0 ARM: dts: msm: Specify coresight trace ID for msm8998
Specify the graphics coresight trace ID in the device tree
file.

Change-Id: I30a10a63b320cd3cb6d7cc4ef2fba423f697a66f
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-12-07 13:55:50 -07:00
Lokesh Batra
ac4034d803 ARM: dts: msm: Add GPU coresight properties for msm8998
Add properties in the GPU device tree for coresight. Define GPU
name and its funnel connections.

CR-fixed: 988516
Change-Id: Ibf2e369c2a4732ebc7471ee103bc8d5d934247ec
Signed-off-by: Lokesh Batra <lbatra@codeaurora.org>
2016-12-07 13:55:10 -07:00
David Collins
b3ce4f6026 ARM: dts: msm: disable VDD_GFX CPR aging adjustments on MSM8998v2
Disable VDD_GFX CPR aging measurement and adjustments for all
global CPR fusing revisions.  The initial aging sensor difference
fuse will not be blown on parts with revision 3 so software must
not attempt to perform an aging measurement on these parts.  It
is unknown which future revision will end up utilizing aging so
also disable aging measurements on all future revisions as well.

Modify the open-loop and closed-loop voltage adjustments
accordingly so that the maximum 15 mV aging margin is present
for all CPR revisions.

Change-Id: I4d413a2b3320d421c487aff1a97e72bd2678b19f
CRs-Fixed: 1097587
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-12-07 12:07:24 -08:00
Skylar Chang
38b489ccd4 msm: ipa3: check the rx_door_bell value on disable
In WDI2.0, seeing some issue about rdy_ring_rp_va
is not equal to rdy_comp_ring_wp_va because wlan-fw
still update the doorbell after ipa host-driver
issue the CH_DISABLE cmd to ipa-uc. The fix is
to compare rdy_comp_ring_wp_va and rx_door_bell
values instead.

Change-Id: Ibe57c7d5ba9e45260c12528910f173e347259d7c
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-12-07 10:50:58 -08:00
Ram Chandrasekar
e219034e04 msm: thermal: Notify LMH DCVSh driver after freq mitigation request
LMH DCVSh hardware doesn't generate a debug interrupt, when HLOS
CPU frequency cap is the only throttling value coming to the hardware
aggregator logic. The LMH DCVSh requires atleast one of the hardware
algorithm to throttle to generate a debug interrupt. So there will be
a case where, LMH DCVS driver won't notify scheduler about the
throttling frequency if HLOS is the only reason for throttling.

LMH DCVSh driver now exposes a new API, to trigger the frequency polling
loop. KTM is updated to use this API to trigger the LMH DCVSh polling,
whenever there is a new software frequency cap. This will ensure that
the LMH DCVSh will notify the scheduler even if software is the only
throttling reason.

Change-Id: I92b1bd9a5efc9810eea721b088dff1bd6eef3838
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-12-07 11:36:37 -07:00
Tarun Karra
c71cda2d10 msm: kgsl: Add Bind objects to dispatcher draw queue
kgsl_ioctl_gpu_sparse_command() is added to for user to
specify list of binds/unbinds for a memory entry
and syncpoints they depend on. If user specifies both
create a sync object for syncpoints and bind object for
binds/unbinds and add them to dispatcher draw queue. Sync
object should be inserted before the bind object in the
draw queue. Once the bind object reaches the head of
draw queue the corresponding binds/unbinds are performed.
kgsl_ioctl_gpu_sparse_command() only accepts commands from
context created with flag KGSL_CONTEXT_SPARSE, commands
from all other context types will return an error.

Change-Id: Ib0a2361f854ae01d0d8090cdd48cfa96308daf93
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2016-12-07 10:33:16 -08:00
Harry Yang
a5dea1fbd6 power_supply: Add BOOST_CURRENT property
This property will be used to indicate to the boost current
after the boost is turned on.

CRs-Fixed: 1095917
Change-Id: Ie667fa49c4a8e8c008e8866f655e3bbe3e69e156
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2016-12-07 10:18:04 -08:00
Ram Chandrasekar
64a7b2e649 msm: lmh_dcvsh: Support new API to notify scheduler
HLOS can place a mitigation frequency via the LMH DCVSh hardware using
the software cap register and this request doesn't trigger a debug
interrupt. Thus, this frequency mitigation change will not result in
scheduler being notified by LMH DCVSh driver.

Introduce a new API in LMH DCVSh driver, that can be used by other
drivers to trigger the scheduler notification. This API and the
interrupt handler follows the same code path to poll and notify the
scheduler.

Change-Id: Iefcdb57ff598ecb1bafc535958684f75b1f6e645
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-12-07 11:17:55 -07:00
Rupesh Tatiya
20d34be354 ARM: dts: msm: update wcn3990 node for msm8998 interposer
Disable qca, wcn3990 bluetooth node to avoid failure in bootup.

Change-Id: I7c6700a44c45360acf8aebc0ab9264c2e08abc8f
Signed-off-by: Rupesh Tatiya <rtatiya@codeaurora.org>
2016-12-07 09:52:28 -08:00
Lokesh Batra
256de04b8d msm: kgsl: Add trace ID support for graphics coresight
Add the support for trace ID for coresight. This ID is
will be defined in the respective device tree file.

Change-Id: I78ba05ed05b54fdc0f4d4f55c468f90f39c821f1
Signed-off-by: Lokesh Batra <lbatra@codeaurora.org>
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-12-07 08:57:09 -07:00
Vijayavardhan Vennapusa
6e71895900 ARM: dts: msm: Attach device memory to lpass iommu on msmfalcon
In order to share the usb audio qmi device iova with lpass usb audio
driver, attach usb audio qmi device to lpass q6 iommu using sid 6.

Change-Id: I6b3c9b49ac973f2472391b3f702908212e3f6e7d
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-07 06:05:50 -08:00
Vijayavardhan Vennapusa
c5641f4d27 defconfig: msmfalcon: enable host CDC-ECM class support
Enable USB host CDC-ECM class support for msmfalcon.

Change-Id: I8b69e8590e3de1aa79469003633b8837451bf3ed
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-07 19:26:11 +05:30
Charan Teja Reddy
37e0cf7dc9 ARM: dts: msm: update the smmu device node configuration for msmfalcon
Update the SMMU device node configuration for correct operation of SMMU
on msmfalcon.

Change-Id: I29fa8f488df800d38f6403646e58a19e555ba1cd
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2016-12-07 17:57:21 +05:30
Vijayavardhan Vennapusa
56dacc3502 defconfig: msmfalcon: enable the USB video class support
Enable USB video class support for msmfalcon for host video usecases.

Change-Id: I30f8294527275a267bd88115a8a8d44beb2adfb8
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-07 17:30:16 +05:30
Ashay Jaiswal
a1478993cf defconfig: msm: msm8998: enable LCDB driver
LCDB driver exposes regulators to control the positive and
negative voltage bias for the LCD display panel. It also
allows configurability for the various bias-voltage parameters.

CRs-Fixed: 1074468
Change-Id: I68958c5ecfb71a11f346c5c46884948e4b36eea0
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-12-07 17:18:18 +05:30
Anirudh Ghayal
375f27114e ARM: dts: msm: Add pinctrl configuration for PMFALCOM L6/9/19
BT and WLAN vote for the regulator-mode via pinctrl. Add
support for this.

Change-Id: I95158cce1b20778547615141ffbbb7d81d5e10a1
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-12-07 16:35:10 +05:30
Gaurav Kohli
2964fdc176 soc: qcom: pil: Use NULL check of resource pointer for restart register
In failure case pointer to resource for restart register may be used while
it is uninitialized. So use proper NULL check for the same.

Change-Id: I3fc77b72e825f4b11724808239eea16aa126de42
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2016-12-07 02:49:54 -08:00
AnilKumar Chimata
d7c3ca1390 defconfig: Add missing features for HW Encryption support
Enable SCSI_UFS_QCOM_ICE for msmfalcon_32 which is required
for hardware encryption.

Change-Id: I6f9afca5bebd5ad0745b064bb7d1a33f78fe6941
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
2016-12-07 15:19:50 +05:30
AnilKumar Chimata
c8b3f11197 defconfig: Enable ext4 ICE encryption for msmfalcon_32
Enable EXT4_FS_ICE_ENCRYPTION feature for msmfalcon_32
to use ICE for FBE.

Change-Id: I991f3550720526b097c009dc852e9caaabf4860b
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
2016-12-07 15:19:49 +05:30
Vijayavardhan Vennapusa
7c480568b3 ARM: dts: msm: Add missing properties for USB node for msmfalcon
Add missing required properties for USB node for msmfalcon for
USB functionality to be working.

Change-Id: I602cac95616da34ffe6462c8cf3af85ce973085b
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-07 15:07:04 +05:30
Asutosh Das
ae8dff9cb7 phy: qcom-ufs: Modify the vdd-phy min-max range
There are 2 issues with setting the vdd-phy voltage:
1. The min & max range that's defined is 1v, whereas
   0.925 (+/- 5%) is the required voltage. A range of
   0.8v to 0.925v would suffice.
2. This defined range is over-ridden with the current
   rail-voltage. This assumes that some consumer has
   set the regulator to the correct voltage.

This change corrects the defined min/max range to
0.8v-0.925v for vdd-phy.
It also removes the code that's causing [2].

CRs-fixed: 1095116
Change-Id: I943bc4f38385036b21c1f9a2e479d6e94ac12813
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2016-12-07 01:32:35 -08:00
Anirudh Ghayal
6764573a87 ARM: dts: msm: Add VOL_UP node for MSMFALCON and interposer
PM2FALCON GPIO 7 is connected to VOL_UP key. Add the
PMIC and GPIO key configuration for GPIO 7.

Change-Id: Ie1dcc85f579e0b9817a104be86bbb9e91771b15c
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-12-07 14:57:20 +05:30
Weiyin Jiang
41417b2031 ASoC: msm: enable DAP set license logic on 8998
Since we move to GEF implementation for Dolby post processing,
disabling DAP/DAX2 driver logic on msm8998 target except for
license validation.

CRs-Fixed: 1094027
Change-Id: I33c5625026611856f6cdd8c6e0b5d7ef229ba8c7
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
2016-12-07 16:20:08 +08:00
Udaya Mallavarapu
34cbae8bc5 media: dvb-core: Add feed state check before stop dvbdemux feed
Add feed state check whether any filter is configured on dvbdemux
feed before feed stop is called. If any filter is started the feed
status should be set to DMX_STATE_GO.

CRs-Fixed: 1090466
Change-Id: If9e87065bb9fb82befb398f2a3a0d0da2f76efa5
Signed-off-by: Udaya Mallavarapu <udaym@codeaurora.org>
2016-12-06 23:52:08 -08:00
Venkatesh Yadav Abbarapu
57e1de214a ARM: dts: msm: Enable core hang detect feature on msmfalcon
Add core hang detect node for msmfalcon which enables the
core hang detect feature. Enable the same for msmtriton
also.

Change-Id: I108451bae429c8e4c858f7f549c4202f3d59a6d2
Signed-off-by: Venkatesh Yadav Abbarapu <vabbar@codeaurora.org>
2016-12-06 23:02:28 -08:00
Raju P.L.S.S.S.N
85d3b91231 ARM: dts: msm: Add PM support for msmfalcon
Add initial PM configuration necessary for SPM, LPM, MPM,
RPM stats to support msmfalcon.

Change-Id: Ia1e83fe40710e80156b049982e9a8421d04902a1
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
2016-12-07 12:00:53 +05:30
Mohammed Khajapasha
15895e937f msm-core: use get_user() API to read userspace data/settings
Currently userspace data is getting accessed directly
and leading to crash, So use get_user() API to copy
userspace data/settings to kernel space.

Change-Id: I3a75ec9503d8207829640bf88e1c3160bf72c9f0
Signed-off-by: Mohammed Khajapasha <mkhaja@codeaurora.org>
2016-12-06 22:03:48 -08:00
Zhenhua Huang
be5a91fa22 ARM: dts: msm: Modify QRD interposer dts file for msm8998
Update regulators for clocks and usb phy.

CRs-Fixed: 1096674
Change-Id: Ib205ccebaec612fd9d1d6bb1a02a4f14be8f21c1
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
2016-12-06 21:41:38 -08:00
Taniya Das
3704dafda8 ARM: dts: msm: Update clock mmss node for MSMfalcon/Triton
Modify the clock_mmss dummy clock to use the real clock controller for MMSS
clock controller client. Use dummy clocks for RUMI platform.

Change-Id: I1ec9fe1d473be79ec0a54f2b8cacfc891f5be5bb
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-12-06 21:09:01 -08:00
Taniya Das
eecdeb00e2 defconfig: Add support to enable MMCC clocks
Multimedia clock controller is required to be enabled for clocks
supported by multimedia clock controller clients.

Change-Id: I7fa2748c113870a20f0e01ae98faf391d195003c
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-12-06 21:08:55 -08:00
Linux Build Service Account
368fecd7df Merge "leds: qpnp-wled: Fix the APIs to read/write WLED registers" 2016-12-06 21:03:16 -08:00
Linux Build Service Account
58dbcd1ada Merge "thermal-core: Use rcu for accessing sensor list" 2016-12-06 21:03:16 -08:00
Linux Build Service Account
9b1012bb48 Merge "msm: sensor: Validationg function pointers before using them" 2016-12-06 21:03:14 -08:00
Linux Build Service Account
8ae6b25770 Merge "msm: camera: Notify TZ App about changes of the HW security mode" 2016-12-06 21:03:14 -08:00