Commit graph

577927 commits

Author SHA1 Message Date
Subbaraman Narayanamurthy
5c312a4f74 leds: qpnp-flash-v2: Add support for thermal derate features
Add support to configure thermal debounce, hysteresis and
ramp down rates from device tree.

CRs-Fixed: 1060212
Change-Id: Iabe79bae5f9471c3c6128ed21efd04de00739daa
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-14 19:52:32 -08:00
Subbaraman Narayanamurthy
98ac2b9cfa leds: qpnp-flash-v2: add support to read pmic revid
There are some features which needs to be enabled based on the
PMIC. PMIC information such as subtype, revision can be obtained
from revid peripheral. Hence add support to read pmic revid.

Change-Id: Ie7a94f59e58b8f1b0816afda2496449694629205
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-14 18:44:28 -08:00
cyizhao
9a39434a1b ARM: dts: msm: Add battery profile for FG in QRD SKUK and vr1
Add battery profile for these two devices to make sure FG could load it
and work as expected.

CRs-Fixed: 1086571
Change-Id: Id89f54f58bb2d5f7294c0244ab0ba39e90b5ecac
Signed-off-by: cyizhao <cyizhao@codeaurora.org>
2016-11-14 18:15:48 -08:00
cyizhao
7035df4058 ARM: dts: msm: update the battery data for cobalt
FG profile data is updated for cobalt battery according to the new
battery characterization process.

CRs-Fixed: 1086571
Change-Id: Id0a74bc74e5ef1fc08af63ace50ab4774820597c
Signed-off-by: cyizhao <cyizhao@codeaurora.org>
2016-11-15 10:09:37 +08:00
Rohit Gupta
360bc82486 qcom-cpufreq: skip frequencies that round to same rate
Since not all frequencies line up between speed bins,
the common cpufreq table sometimes has frequencies
that round up the same actual frequency.

Fix this by skipping those frequencies.

Change-Id: I0516cc67a1343150f3d1f838b9d9b329e8e1e498
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2016-11-14 16:34:04 -08:00
Olav Haugan
8bf3523cf7 core_ctl: Export boost function
Export core control boost function to make it accessible to kernel
modules.

Change-Id: I94359afa433ad57dd5bfeae3cb78a1f196cd02fe
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-11-14 16:28:03 -08:00
Shiraz Hashim
da02aa08ee defconfig: msm: update mmap randomness for all targets
CTS malloc tests on Android 'N' expects higher entropy in
mmap returned address. Present value of mmap random bits
is not providing enough variations for 32 bit tasks.

Increase mmap_rnd_bits for 32bit and mmap_rnd_compat_bits
for 64bit targets to value of 16.

Change-Id: Ibf6463467f28221470619b4f43ece062d41ae6b8
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
2016-11-14 16:04:41 -08:00
Oleg Perelet
d25293ff0e ARM: dts: msm: Remove min svs level for A540 in msmcobaltv2
Per hardware requirements update dtsi file to remove
min svs power level.

CRs-Fixed: 1085733
Change-Id: I066804e9f8bc527d58dd5199664a5756a0f3d298
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
2016-11-14 15:49:46 -08:00
Patrick Daly
2d083baf33 soc: qcom: secure_buffer: Fix an uninitialized variable
Ensure variables are set before the are used to prevent random behavior.

Change-Id: Ib31e5aca648c0f442afe4cbe576ad79786fe6427
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-11-14 15:00:09 -08:00
Susheel Khiani
e5f6efadcd iommu/arm-smmu: Fix uninitialized use of variable error
There are couple of instances where we are declaring
variable without proper initialization and we
might end up returning these uninitialized
variables. Fix this by initializing them during
declaration.

Change-Id: Icd5b504c35683e94383d2cefd186f66000478e82
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
2016-11-14 14:59:14 -08:00
Skylar Chang
dd650a2835 msm: ipa3: retry on IPA_HW_CONS_DISABLE_CMD_GSI_STOP_FAILURE
When IPA uC fails to stop a GSI channel with GSI STOP_IN_PROG
state, apps needs to sleep for 1ms and retry.

Change-Id: I9e6022ab996861d3d78721aadea9e6116ded4e0f
CRs-Fixed: 1087474
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-11-14 14:53:08 -08:00
Deepak Katragadda
45430a0c76 Revert "clk: msm: clock-gpu-cobalt: Update the graphics core clock frequency"
This reverts commit bfebb79e7c ("clk: msm: clock-gpu-cobalt:
Update the graphics core clock frequency") since we now want
to enable scaling the graphics core clock upto 710 MHz on
MSMCOBALT v2.

Change-Id: I2715197a2b5cbe41da5b1983ff3066fa5d42c483
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-11-14 13:46:35 -08:00
Ram Chandrasekar
73a2595feb driver: thermal: msm_thermal: Enable Reliability algorithm
The reliability algorithm has a dependency for OSM to be initialized
before it is enabled.

Enable reliability algorithm in the LMH DCVSh hardware for both the
clusters from KTM. KTM is enabled, only after OSM populates the OPP
table. So this solves the dependency.

Change-Id: I4a382915a6c3a6b9d445ec1f5d57fb499a011f1a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-11-14 14:46:06 -07:00
Nicholas Troast
bb2c232a14 iio: adc: qcom-tadc: cast raw ADC readings before conversion
Currently the code depends on implicit type conversion when converting
ADC readings. Make the type conversions explicit.

Change-Id: I09b5d4cd219b0a53559176525d9b501e5a6dc0c9
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-11-14 12:49:58 -08:00
Nicholas Troast
c74e83d44c ARM: dts: msm: update TADC ibatt scale for MSMCOBALT
Currently when the battery is charging (sinking current) the ibatt is
positive. Change the scale polarity so that ibatt is negative when
the battery is charging.

Change-Id: I431dcc766df94adb7ee85d4cb32d9181a74d871a
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-11-14 12:49:30 -08:00
Nicholas Troast
e57352646f qpnp-smb2: allow parallel charging during supplemental mode
PMI8998 register 0x1690 BIT(2) is incorrectly documented. This bit enables
a feature to disable the parallel charger via STAT when the PMI is
supplementing a system load using the battery. This feature is not
recommended since SW is limiting the power that the parallel charger can
draw based on the input power available, and the default power
distribution ensures that 50% of the available input power is allocated to
the PMI. Disable this feature.

Change-Id: I1e5400eb64b6b61076617b5b26fc750c6e8d0270
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-11-14 12:13:00 -08:00
David Collins
31cac5b597 ARM: dts: msm: update APC0/APC1/GFX aging allowed revisions for msm8998v2
Update the qcom,allow-aging-voltage-adjustment property for
VDD_APC0, VDD_APC1, and VDD_GFX CPR regulators in order to match
hardware fusing.  Aging fuses will be blown for VDD_APC0 and
VDD_APC1 on parts with local CPR revision 4 and for VDD_GFX on
parts with global CPR revision 3.

Also update the open-loop and closed-loop voltage adjustments so
that the maximum 15 mV aging margin is applied on all parts in
which aging adjustments are not enabled.

Lastly, enable open-loop aging adjustment for VDD_GFX so that
the aging voltage margin is added back into the open-loop voltage
as needed at runtime.

Change-Id: I481abdd54ce1e75bdebf908a61d6b484b377f55a
CRs-Fixed: 1081084
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-11-14 12:08:51 -08:00
Subash Abhinov Kasiviswanathan
2d9b2acc39 net: rmnet_data: Handle buffer bloat for TCP scenarios
After commit 605ad7f184 ("tcp: refine TSO autosizing"), kernel
throttles uplink TCP data in case there is not sufficient amount
of socket buffer available due to delayed release of buffers
through TX completions in the physical net device.

Work around this by orphaning the socket buffer. This makes the
kernel assume that more packets can be sent in this scenario.
Out of band signaling and flow controlling at qdisc / HTB layer
should guarantee no issue for flow control.

Throughput difference for IPv4 TCP UL -

Before change : 143Mbps
After change  : 146Mbps

CRs-Fixed: 1088104
Change-Id: I251ed7938c29e08954d4c81d3041cb235a39d266
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-11-14 12:49:05 -07:00
Nicholas Troast
8931ef2e5c qpnp-smb2: clear the ICL override during probe
When PD negotiates a higher input current limit the ICL override bit will
be set. If a reboot happens then the ICL override will still be set after
the reboot. Clear the ICL override during probe to ensure that the correct
ICL is honored since PD is neither enabled nor has it negotiated a higher
ICL yet.

Change-Id: Iaa5f221d530721f7ff4a413a609192baf98ff359
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-11-14 11:12:29 -08:00
Subash Abhinov Kasiviswanathan
ba31ac1066 nf: IDLETIMER: Fix use after free condition during work
schedule_work(&timer->work) appears to be called after
cancel_work_sync(&info->timer->work) is completed.
Work can be scheduled from the PM_POST_SUSPEND notification event
even after cancel_work_sync is called.

Call stack

-004|notify_netlink_uevent(
    |    [X19] timer = 0xFFFFFFC0A5DFC780 -> (
    |      ...
    |      [NSD:0xFFFFFFC0A5DFC800] kobj = 0x6B6B6B6B6B6B6B6B,
    |      [NSD:0xFFFFFFC0A5DFC868] timeout = 0x6B6B6B6B,
    |      [NSD:0xFFFFFFC0A5DFC86C] refcnt = 0x6B6B6B6B,
    |      [NSD:0xFFFFFFC0A5DFC870] work_pending = 0x6B,
    |      [NSD:0xFFFFFFC0A5DFC871] send_nl_msg = 0x6B,
    |      [NSD:0xFFFFFFC0A5DFC872] active = 0x6B,
    |      [NSD:0xFFFFFFC0A5DFC874] uid = 0x6B6B6B6B,
    |      [NSD:0xFFFFFFC0A5DFC878] suspend_time_valid = 0x6B))
-005|idletimer_tg_work(
-006|__read_once_size(inline)
-006|static_key_count(inline)
-006|static_key_false(inline)
-006|trace_workqueue_execute_end(inline)
-006|process_one_work(
-007|worker_thread(
-008|kthread(
-009|ret_from_fork(asm)
---|end of frame

Force any pending idletimer_tg_work() to complete before freeing
the associated work struct and after unregistering to the pm_notifier
callback.

CRs-Fixed: 1088590
Change-Id: I4c5f0a1c142f7d698c092cf7bcafdb0f9fbaa9c1
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-11-14 12:08:11 -07:00
Sreelakshmi Gownipalli
2d6dc48e83 diag: Call diagmem_exit only if the mempool is initialized
Call diagmem_exit in diag_mhi_exit only if the memory pool is
initialized earlier. If diag bridge initialization fails
allow diag apps to still communicate to other processors
without unloading the diag driver.

Change-Id: I0eb8b9a357f172984612175d1b03dd872df91b6f
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
2016-11-14 10:47:51 -08:00
Harry Yang
8947aae10b qcom-charger: WA for cc2 removal with medium and high rd
In PMICv2, typec removal is known when CC detachment is detected,
but this does not work due to a HW bug, when orientation is CC2
with medium or high rd.

Currently in HW, after cable is removed, rd reading switches to
std from medium or high. The software workaround is to catch this
very change in cc state update, and then force a cc detach irq.

CRs-Fixed: 1079913
Change-Id: I284ca8f2221f596432d67117d89e7d501d2bd9a8
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2016-11-14 10:47:30 -08:00
Harry Yang
dd9faf5083 qcom-charger: WA for typec cc2 sink removal with rdstd
In PMICv2, typec removal relies on CC detachment detection,
but CC removal event does not fire when orientation is CC2
with rdstd, due to a HW bug.

The software workaround is to force typec sink cycles and
poll CC states, until cc status reading confirms detachment,
and PD is notified of typec removal.

CRs-Fixed: 1079913
Change-Id: Ie9ed65d421df57c9bfa4db8e44d358da3b0cdc36
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2016-11-14 10:44:35 -08:00
Nicholas Troast
2db5e43410 qpnp-fg-gen3: add support to show time to full and empty
Estimate the amount of time it will take to charge or discharge the
battery. These values are exposed through power supply properties
time_to_full_avg and time_to_empty_avg.

Change-Id: I53c24deb1cfbd7fea1b2a598ed58c6352c5ff9a2
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-14 10:34:39 -08:00
Nicholas Troast
3b66278123 smb-lib: remove cached vbus present status
USBIN_INT_RT_STS_REG can be read to determine whether vbus is present
therefore caching the result is unnecessary. Remove it.

Change-Id: Idace48373333dc3ab36aa10e0d90098a68af315d
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-11-14 10:28:39 -08:00
Oleg Perelet
eeb34111fa msm: kgsl: preserve ISENSE registers across GPU power collapse
After wakeup from power collapse restore ISENSE registers from
internal buffer.

CRs-Fixed: 1075694
Change-Id: I9cf2f94892bdeb83fab0068902419b1603520364
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
2016-11-14 10:09:42 -08:00
Ingrid Gallardo
a855c5232c msm: mdss: fix logic to enable secure display/camera
Current logic that optimizes the skip of the enable
and disable of the secure display/camera has a
problem which results in skipping the secure
configuration always. Fix the logic to make sure
we only skip the configuration in two cases:
1. If both features secure camera and display are
disabled and state remains same for current frame.
2. If one of the features is already enabled and
the state remains the same for current frame.

Change-Id: I614aeadf022e01f17660791c0037ceb9f73456a3
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-11-14 09:41:28 -08:00
Nicholas Troast
6f15f9c366 smb-lib: use plugin real time status for USB present prop
The USB and DC power supplies should reflect the real time plugin status
in POWER_SUPPLY_PROP_PRESENT.

Change-Id: I08987a383edff181e8e4867d8d795dae58ecf084
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-11-14 09:13:01 -08:00
sathish
293989e540 msm: kgsl: Fix pt NULL pointer dereference
Add a NULL check for pt pointer variable in
a4xx_submit_preempt_token(), to avoid NULL
pointer dereference.

CRs-Fixed: 1083045
Change-Id: I6f8abe55f3d99d2ff46e4bb2a8cd11a067be7508
Signed-off-by: Dumpeti Sathish Kumar <sathyanov14@codeaurora.org>
2016-11-14 03:01:06 -08:00
Yeleswarapu Nagaradhesh
bcbd7e0f16 ASoC: wcd-mbhc: correct cross connection check
Schmitt trigger result is wrong if PA is enabled.
So, don't check for cross connection when PA is enabled.

CRs-Fixed: 1061507
Change-Id: Iad71abbed72aa40b5c839260f5c297a885f7d128
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2016-11-14 01:44:45 -08:00
Zhenhua Huang
6fd2e6f839 ARM: dts: msm: add PMFALCON/PM2FALCON devices for msmcobalt interposer QRD
Add PMIC devices and remove reference of PMCOBALT/PMICOBALT from all
client device nodes. This is for QRD only as it is a different design from
MTP and CDP. In the parallel, delete reference from storage.

Change-Id: I5842c32fbfcd62692a3585f23bfcb0d9c4b5f6c5
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
2016-11-14 15:50:42 +08:00
Amit Nischal
a8cd6932aa clk: qcom: Remove initial configuration from PLL enable function
In alpha PLL enable function, PLLs do not require to do
initial configuration as it can be already configured
by pre HLOS. clk_alpha_pll_configure() should be called
explicitly where HLOS configures the PLLs. So remove the
call to clk_alpha_pll_configure() in PLL enable function.

Change-Id: Id3542f6649209929d83e5a2d6230f1d3d7dfa776
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
2016-11-14 12:29:57 +05:30
Raju P.L.S.S.S.N
369f045fa2 ARM: dts: msm: Add rpm-smd node for msmtriton
Add rpm-smd node for communication with RPM subsystem over glink.

Change-Id: I28be6557fa97d65ec9add1d31c854576e21b47e1
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
2016-11-14 11:14:28 +05:30
Taniya Das
28fc7928ba ARM: dts: msm: Support only dummy clocks for falcon/triton rumi
As RUMI platform does not require real clocks, add back dummy clocks for
this platform.

Change-Id: I774ffb1e55971ec8097994d1cfe664db5902a8ce
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-11-13 21:20:55 -08:00
Linux Build Service Account
24d0c1f91e Merge "msm: mdss: dp: handle fast attention events" 2016-11-13 13:51:09 -08:00
Linux Build Service Account
23bb5f214e Merge "msm: sde: add buf_finish callback to clear last fd" 2016-11-13 13:51:08 -08:00
Linux Build Service Account
d1224e557b Merge "clk: msm: mdss: fix potential use of un-initialized variable" 2016-11-13 13:51:07 -08:00
Rajesh Kemisetti
a852ef6625 ARM: dts: msm: Change GPU clock plan for msmcobalt interposer
Change GPU clock plan based on requirements for msmcobalt
interposer platform versions.

Change-Id: I817859817eeb76c565d1604fcb1cc11b0df2dd30
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2016-11-14 01:09:26 +05:30
Linux Build Service Account
ce1a7c8d7d Merge "ARM: dts: msm: Add battery profile for FG in QRD interposer msmcobalt" 2016-11-13 04:22:15 -08:00
Linux Build Service Account
b22eba07a1 Merge "ARM: dts: msm: update VDD_GFX CPR settings for msmcobalt v2" 2016-11-12 21:39:15 -08:00
Linux Build Service Account
ace335774a Merge "defconfig: enable QCOM_IRQ_HELPER for 32bit msmcobalt and msmfalcon" 2016-11-12 05:13:47 -08:00
Satish Babu Patakokila
bef46b317c ASoC: compress: Fix compress capture stream handling
Compress framework considers the stream as PLAYBACK
always irrespective of the direction.
Derive substream based on the tx/rx direction from
compressed stream.

CRs-fixed: 1072067
Change-Id: I62c51c23a47f26b221dccef6f83c03aef9f095a7
Signed-off-by: Satish Babu Patakokila <sbpata@codeaurora.org>
2016-11-11 21:28:08 -08:00
Linux Build Service Account
eac6f4e45b Merge "defconfig: Enable android-verity and FEC in msmcortex" 2016-11-11 20:05:51 -08:00
Linux Build Service Account
8e2e1b3d6a Merge "msm_11ad: disbale L1 for 11ad device" 2016-11-11 20:05:50 -08:00
Linux Build Service Account
2d320e52f7 Merge "usb: gadget: Do not disconnect unregistered dev" 2016-11-11 20:05:49 -08:00
Linux Build Service Account
20f034903f Merge "usb: core: Add support to skip extended bus resume delay" 2016-11-11 20:05:48 -08:00
Linux Build Service Account
35b3425fcb Merge "qpnp-fg-gen3: Fix empty SOC handling" 2016-11-11 20:05:47 -08:00
Linux Build Service Account
b1f3ef5bc7 Merge "soc: qcom: Replace ARRAY_SIZE macro with strlen" 2016-11-11 20:05:46 -08:00
Linux Build Service Account
327b9b6314 Merge "Documentation: sched: Update frequency guidance explanations" 2016-11-11 20:05:45 -08:00
Linux Build Service Account
b240a83d88 Merge "qcom-charger: smblib: add support for pd current setting" 2016-11-11 20:05:44 -08:00