Commit graph

586124 commits

Author SHA1 Message Date
Anirudh Ghayal
b957e4cc08 ARM: dts: msm: Add APC CPR configuration for MSM8996 speed-bin 2
Speed-bin 2 supports same CPR fusing scheme as speed-bin 0,
add CPR configuration for all APC cpr regulators.

Change-Id: I3a7c826b0dd6d73f877b4cd23288a820d85ba24d
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-03-17 04:02:39 -07:00
Tirupathi Reddy
2da21395ab power: qcom: Modify APM timeout value for msm8953
As per msm8953 design, APM state machine could take more
than 200us for mode switching. Increase SW timeout constraint
value to 500us.

Also, update the mask used to check APM switch status.

CRs-Fixed: 992695
Change-Id: Ie0f8733fb5b39172fb14547292cbd05689a50230
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-03-17 04:00:03 -07:00
Anirudh Ghayal
61997e84cd regulator: spm-regulator: Fix the usage of the 'uV' variable
The commit 639277b6c73c ("regulator: spm-regulator: Add additional
settling delay for  FTS2.5 SMPS") incorrectly changed the usage
of 'uV' variable. The local 'uV' variable holds the correct voltage
level to be scaled up/down. Use it instead of vreg->uV.

CRs-Fixed: 1036738
Change-Id: I52540237a4db79c149409c6017ffc750b5abddd2
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-03-17 03:52:09 -07:00
Anirudh Ghayal
8bb7c391c7 regulator: spm-regulator: Add additional settling delay for FTS2.5 SMPS
Based on characterization add 70us settling delay on the voltage UP
to account for warm-up time and ramp-up delays for 0-10% and 90-100%
of the voltage value.

On the voltage ramp-down side add the stepper slew-rate delay and
and an additional 70us margin to avoid voltage updates while the
stepper is in progress. This could lead to voltage over/undershoot
due to buck-internal synchronization failure.

CRs-Fixed: 1036738
Change-Id: Id4230be9c4c981758bbf6860bab1f487a3b57f85
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-03-17 03:40:35 -07:00
Subbaraman Narayanamurthy
2e538b63ec regulator: cpr3-hmss: Increase fuse combo count
To accommodate speed bin 2 and fuse revisions associated with it
increase the fuse combo count from 16 to 24. At present, this is
needed for msm8996proAU SOC.

Change-Id: I8555162eab2c6bfead2e0762f28525e0aa56cf10
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-03-17 03:39:45 -07:00
Subbaraman Narayanamurthy
13f1bf5014 regulator: cpr3-mmss: Increase fuse combo count
To accommodate speed bin 2 and fuse revisions associated with it
increase the fuse combo count from 16 to 24. At present, this is
needed for msm8996proAU SOC.

Change-Id: Ie781ffda433d491a38695caa5e55ec1ec7ff9b4a
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-03-17 03:38:58 -07:00
Tirupathi Reddy
4f849986b3 regulator: cpr3: Update temp based adjustments config
Temp_adj_en instantaneously reduces the voltage and quotient
when temperature enters into corresponding band which may cause
an aggressive reduction in voltage. Avoid this by not configuring
temp_adj_en bit, this only reduces the quotient and allows CPR to
react to the reduced quotient. Use temp_adj_en bit only when both
temperature based and core count based adjustments are desired.

CRs-Fixed: 1051076
Change-Id: Ia42dbdd095e51bf9b9b7e865c104dcbe8f4219da
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-03-17 02:19:06 -07:00
Tirupathi Reddy
86974ccc17 regulator: cpr3: Use scaled gate count for aging measurements
Use scaled gate count (GCNT) for aging measurements to reduce
the noise effect on aging data. The amount of scaling depends
on the noise effect observed in characterization results. Use
a selected scaling factor value to derive the gate count (GCNT)
used for aging measurements.

CRs-Fixed: 1025832
Change-Id: I0eb3fb08d51ddca5cd4c08e26bc83eb9f66fd3ed
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-03-17 14:47:40 +05:30
Krupal Divvela
9719a635a7 msm : camera: Fix kw issues in Jpeg
Fix the kw issues in jpeg set driver data and in jpegdma modules.

CRs-Fixed: 2017767
Change-Id: I601245553b8148c9f257d55c42367b0b8612db92
Signed-off-by: Krupal Divvela <kdivvela@codeaurora.org>
2017-03-17 01:53:44 -07:00
Venu Yeshala
5159d3ed94 msm: camera: isp: Initialize or validate variables before use
Check the validity of pointer before dereference and initialize
uninitialized variables.

Change-Id: Ifad4dd9668db91a18b493e0c7276bf6c193fb680
Signed-off-by: Venu Yeshala <vyeshala@codeaurora.org>
2017-03-17 00:54:38 -07:00
Udaya Bhaskara Reddy Mallavarapu
5693233c0f media: platform: msm: dvb: video frame event notification changes
video frame event notification is changed so that events will be raised
for all frames both predicted and non predicted frames and invalidate
pts and dts values for predicted frames. This change is specific to
IoT targets in which only non predicted frames will be decoded
and rendered for performance improvement.

CR's-Fixed: 2005724
Change-Id: I08f648a89eb043938fcc7d3d81e83c3599a2f160
Signed-off-by: Udaya Bhaskara Reddy Mallavarapu <udaym@codeaurora.org>
2017-03-17 11:09:10 +05:30
Fenglin Wu
5d50b169c9 leds: leds-qpnp: replace pwm_free with pwm_disable
pwm_free() is called in the driver incorrectly when trying to disable PWM
channel while changing the configuration. pwm_free() checks PWMF_REQUESTED
flag before calling disable() hook. The driver doesn't call pwm_request()
but only calls of_pwm_get() at the probe to get the flag once. The Flag
will be cleared when pwm_free() is called for the first time and calling it
afterwards will simply bailout not calling disable().

Replace pwm_free() with pwm_disable(), this won't cause any issue because
the PWM channel is considered statically allocated to the led devices from
hardware perspective and no need to free it in the driver.

While at it, free the PWM device if any errors when getting PWM
configuration.

CRs-Fixed: 2014600
Change-Id: I373d2a1ac83232ce94933c287b4ebe3f23519c83
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2017-03-17 12:49:41 +08:00
Subbaraman Narayanamurthy
d7d3139eb5 soc: qcom: qpnp-haptic: Fix read/write APIs
Fix the order of parameters passed into read/write APIs to make
it more readable. While at it, add a pr_fmt() to the driver to
get better log information. Also, change all dev_* APIs to pr_*
APIs for better logging.

Change-Id: Ib19f48ddbaeeb3af483ac472dabb44558a6b9e43
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-03-16 20:46:05 -07:00
Subbaraman Narayanamurthy
34d5b6df83 soc: qcom: qpnp-haptic: Fix reading MISC_TRIM_ERROR_RC19P2_CLK register
Currently MISC_TRIM_ERROR_RC19P2_CLK register is hardcoded to
read the trim error in 19.2 MHz RC clock. However, this can be
located differently in some PMICs. Add support to read it from
misc device as this register cannot be directly accessed from
haptics driver.

Specify the MISC peripheral and the clock trim error register in
haptics for pmi8998 and pm660 so that haptics initial drive code
can be adjusted based on error code properly.

Change-Id: I04d8dbac0f943c65272531647c54d3c1495331e7
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-03-16 20:44:19 -07:00
Taniya Das
5b586c72e2 clk: qcom: Register gcc debug mux with clock_debug functionality
clock_debug_mux is required for the 'measure' functionality of the clock,
register using the clk_register_debug for the same.

Change-Id: I95b64ddd3ef3d869cf3b8ad2b4210ea78ba8f5fa
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-03-17 09:12:11 +05:30
Taniya Das
947428e547 clk: Move the measure functionality from common clock framework
Common Clock Framework(CCF) already has a clock ops hook `debug_init` which
could be used for the debugfs clock measure functionality. Remove the APIs
from the CCF and update the 'debug_init' clock ops to the clock types which
require the measure functionality.

Change-Id: I0c01f72a9d1d1caa1b1ab73a800401c2cbc3216c
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-03-17 09:12:10 +05:30
Taniya Das
76ddd7e95c clk: qcom: Move clock debug measure support from common code
The 'measure' functionality is a debug feature which allows the user of
clocks to allow measuring the frequency of a given clock using the ring
oscillator.
Move 'measure' code to a new clk-debug file to support the functionality.

Change-Id: I229721f17d232a4ff69b5cf416b43d22fee5b72e
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-03-17 09:12:05 +05:30
Linux Build Service Account
3f942f9f96 Merge "misc: qpnp-misc: change the initcall level for qpnp-misc driver" 2017-03-16 20:03:03 -07:00
Linux Build Service Account
ddd0566475 Merge "power: smb-lib: always assume legacy cable and limit ICL" 2017-03-16 20:03:00 -07:00
Linux Build Service Account
d53dae0046 Merge "power: smb-lib: always assume legacy cable to prevent CC OV" 2017-03-16 20:03:00 -07:00
Linux Build Service Account
b5809c9045 Merge "ASoC: wcd934x: Fix mbhc errors upon removing SND_SOC_WCD934X_MBHC" 2017-03-16 20:02:58 -07:00
Linux Build Service Account
d2932199db Merge "arch: arm64: Fix APPENDED_DTB for arm64" 2017-03-16 20:02:57 -07:00
Linux Build Service Account
ca5b7b47a0 Merge "ARM: dts: msm: increase strength for mclk0 on msm8998 HDK" 2017-03-16 20:02:56 -07:00
Linux Build Service Account
c2d9ad7019 Merge "ARM: dts: msm: enable HDMI and DP functionality for HDK835" 2017-03-16 20:02:56 -07:00
Linux Build Service Account
1debce8dc0 Merge "mhi: mhi_core: move mhi from module_Init to subsys_init" 2017-03-16 20:02:53 -07:00
Linux Build Service Account
1e266f61af Merge "mhi: core: add support for priority based event processing" 2017-03-16 20:02:53 -07:00
Chris Lew
a7ee55b234 diag: Update msg, log and event information
Update the diag header with latest log, message
and event information to match the list maintained
by the peripherals.

CRs-Fixed: 2020864
Change-Id: Icbed01bb4f90fb7d72fe7517ee6964d799f1d48e
Signed-off-by: Chris Lew <clew@codeaurora.org>
2017-03-16 17:40:34 -07:00
Subbaraman Narayanamurthy
0061baa081 ARM: dts: msm: Fix KPDPWR and KPDPWR_RESIN PON configuration in pm8998
As per the hardware documentation, configure S2 reset type for
KPDPWR_RESIN PON configuration to DVDD_HARD_RESET. Since KPDPWR
S1/S2 timer and S2 reset type is configured by bootloader for
the internal devices, HLOS doesn't need to configure it again.
Hence remove it.

CRs-Fixed: 2017642
Change-Id: I000953dba1fd138c1dbcbb94e15f95ac78a07acd
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-03-16 16:10:38 -07:00
Subbaraman Narayanamurthy
122836477b misc: qpnp-misc: change the initcall level for qpnp-misc driver
Change the initcall level of qpnp-misc driver from module_init()
to subsys_initcall() so that the misc devices can be available
earlier. This helps the clients to access the registers under
misc peripheral sooner without a probe deferral.

Change-Id: Ie5df2cb9cf6842c59ec6f00ac9123994111f207b
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-03-16 11:56:59 -07:00
Nicholas Troast
437db3081b power: smb-lib: always assume legacy cable and limit ICL
While in DRP the legacy cable detection may fail. When a legacy cable is
detected the legacy input current limits are enforced by hardware.

Always assume a legacy cable since the legacy cable detection will
fail in some cases. Manually enforce the legacy input current limits to
ensure USB stability and compliance. As a side effect, non-legacy 22k
ohm and 10k ohm Rp adapters will be current limited to legacy standards.

To realize this:
- Set a limit of 100mA as soon as type-c is connected and remove that
  limit once PD is confirmed.
- If PD is not confirmed:
  - SDP:   Use 100mA vote until USB PHY updates it to 500/900mA
  - CDP:   Use 1.5A vote
  - DCP:   Use 1.5A vote
  - HVDCP: Use 3A vote

Change-Id: I049a7ee2099acd9e58df1b9417847daec4854af5
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-03-16 10:00:40 -07:00
Nicholas Troast
11a54fcfa4 power: smb-lib: always assume legacy cable to prevent CC OV
While in DRP the legacy cable detection may fail. Legacy cable
detection is essential to preventing CC OV damage.

Always assume a legacy cable since the legacy cable detection will fail
in some cases. As a side effect, non-legacy HVDCP adapters will stay at
5V if they have a 10k ohm Rp.

To realize this:
- Remove disallowing PD based on the legacy bit being set. That bit set
  or unset is not reliable and it is safe to try PD.
- Remove the workaround which tries to fix legacy cable being set
  incorrectly at boot. That bit set or unset is not reliable.

Change-Id: I37879866592f63906a7c688f51c309b4e2fee48d
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-03-16 10:00:40 -07:00
Nicholas Troast
fa12cb53c0 power: smb-lib: use updated ICL override bit
Currently to override the ICL the self-clearing ICL override bit is
used. The problem with this bit is that it is self-clearing and a
separate register needs to be read to get the override status.
Furthermore, the hardware will automatically clear this bit on USB
removal.

A new ICL override bit was added in PMI hardware revision 2.0. This bit
is not self-clearing, and can be set prior to USB insertion. Use this
new bit.

Change-Id: I30a601b6aacba3c404ebdfb82e529504a694a048
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-03-16 10:00:39 -07:00
Nicholas Troast
13bdd014a7 power: smb-lib: let userspace rerun AICL for PD and PPS
Currently AICL will be rerun whenever PD requests a voltage increase.
While this works in most cases it can become problematic if PD requests
the same voltage twice, and the ICL may fall to ICL_MIN.

Since the voltage requests originate in the userspace it would be less
error prone to allow the userspace to rerun AICL instead. Do it.

Change-Id: Id190564e28bcffd72a1de70fa1327fce3e40299e
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-03-16 10:00:39 -07:00
Nicholas Troast
e7f294565f power: smb-lib: prevent unnecessary APSD re-runs
When APSD_START_ON_CC_BIT is set both VBUS and CC must be attached
before APSD runs. This eliminates all issues related to slow plugin.

Unfortunately this means that if CC is re-asserted anytime after APSD
finishes, then it will rerun again.

Fix this by disabling APSD_START_ON_CC_BIT right after CC is asserted,
and enable it after USB removal.

Change-Id: I27d3727647635b78392b925f0881dc3a4ef41623
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-03-16 10:00:38 -07:00
Nicholas Troast
c3e73c5a50 power: pmic-voter: add is_client_vote_enabled API
A client vote can be enabled or disabled. Add an API which allows
consumers to check the enable/disable status of a client vote.

Change-Id: Ic4e9224c19e63fb88216da0cb775994e3e87c1f7
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-03-16 10:00:37 -07:00
Sravanthi Kollukuduru
be6fa69caa msm: mdss: Enable concurrent writeback feature
Update mdp caps to enable concurrent write back feature
along with the QoS settings required.

Change-Id: Ie8368fb327e908a549877b06da0fed5917fc3788
Signed-off-by: Sravanthi Kollukuduru <skolluku@codeaurora.org>
2017-03-16 16:35:25 +05:30
Ashish Garg
4cd60f6e04 msm: mdss: add support for multiple DSI host escape clk frequencies
Some panels have low escape clock requirements based on which the
host escape clock should be configured. Add support to configure
host escape clock based on the panel escape clock. By default, the
host would be configured for an escape clock of 19.2MHz.

Change-Id: If791ffb4d49dd97424366042ee35bd4ecda5c185
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-03-16 15:24:33 +05:30
Wei Ding
a03ae92180 deconfig: arm64: enable the laser sensor on msm8998
Enable the laser sensor on the msm8998.

CRs-fixed: 1051771
Change-Id: Ie929092504ceb40bff283817e98b6cb0c4c05714
Signed-off-by: Wei Ding <weiding@codeaurora.org>
2017-03-16 01:56:29 -07:00
Bikas Gurung
abf70e5c9d input: vl53l0: Enable laser sensor Kconfig and Makefile entries
Laser sensor is connected using CCI interface.
Add support to configure and enable laser
sensor driver.

CRs-fixed: 1051771
Change-Id: Ia9eab96862b1c2a657d40272867f015a0a91e0ed
Signed-off-by: Bikas Gurung <bgurung@codeaurora.org>
2017-03-16 16:38:12 +08:00
Ashay Jaiswal
50df82f860 qcom: qpnp-smb2: update micro-usb mode change sequence
Switching to micro-USB mode in PBS might cause charger FSM
to stuck, update the micro-usb mode switch sequence to reset
FSM and move charger FSM into micro-USB mode.

CRs-Fixed: 2017880
Change-Id: I6e4484e9a83494f81dad0d9cdbd815b62d67c9af
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-03-16 13:58:53 +05:30
Sandeep Panda
0c48b2fcf8 msm: mdss: read active line count before triggering BTA
In the current implementation before triggering BTA,
DSI SW waits for extra time to skip display blanking period.
Add an additional check for active line count to ensure that
BTA is always triggered during display active region only.

Change-Id: Ife67f5a38fa9e8df6f8431e9d2b0179c207adeb2
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2017-03-16 13:03:50 +05:30
Ashish Garg
62cdee80fc ARM: dts: msm: enable ESD for command mode panel on sdm660
ESD feature is enabled on the nt35597 truly panel on sdm660 to
check the panel status periodically.

Change-Id: Id354c900a784b1bf239595fd31a244c064066987
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-03-16 00:17:42 -07:00
Ashish Garg
d433ca6670 ARM: dts: msm: update the panel escape clock for truly panel
For some panels, escape clock needs to be updated for checking
the panel status periodically. Update the panel init sequence
to increase the escape clock.

Change-Id: I4a154d30e829c80587b3207ddc754aace927ab1c
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-03-16 12:47:11 +05:30
Aravind Venkateswaran
f120e77b9a msm: mdss: dp: restrict list of supported modes based on link parameters
DP sink specifies the maximum per-lane link rate and the maximum lane
count that it supports as part of its capabilities. This would limit
the maximum data transfer rate that can be supported on the link. Use
this information to filter the list of EDID modes to include only the
ones that can be supported with the maximum possible link rate.

CRs-Fixed: 2018514
Change-Id: I4bc3a339935a49081bd45cb778737116d99ee7c2
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2017-03-15 23:04:55 -07:00
Srinivas Girigowda
5c03c607f0 msm: wlan: Update regulatory database for South Korea
Incorporate the 2016-10-31 updates to the internal regulatory
database for South Korea.

Change-Id: I310bb8609c2298832e976e38ebe6b816c6faa5d0
CRs-Fixed: 2020241
Signed-off-by: Srinivas Girigowda <sgirigow@codeaurora.org>
2017-03-15 19:29:47 -07:00
Wei Ding
722434012e ARM: dts: msm: increase strength for mclk0 on msm8998 HDK
Increase the strength of camera mclk0 on msm8998 HDK.

Change-Id: I9804d26265f074e1696f9b324ac8973100bb0a0e
Signed-off-by: Wei Ding <weiding@codeaurora.org>
2017-03-15 17:43:32 -07:00
Sunil Paidimarri
25709e34ad msm: ipa: Add IPA NTN suspend-resume support
Added support for IPA Neutrino offload suspend
resume to IPA driver.

Change-Id: Ie9cc50cb30c579e286350f1f4d0b201e6f09b0c5
CRs-Fixed: 1095771
Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
2017-03-15 17:15:15 -07:00
Zhen Kong
11352d5a7a firmware: tz_log: Enable asynchronous driver probing
Do asynchronous driver probing of TZ log driver to improve
the device boot-up time.

Change-Id: Ic972be12f820787db1a5bc957b109461354875fb
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-03-15 16:43:02 -07:00
Ram Chandrasekar
419140454d drivers: msm_lmh_dcvs: Fix unsigned integer overflow error
The frequency value that is calculated in Hz can be of a large value to
cause unsigned integer overflow. DCVSh though fetches the final
frequency value in HZ in a unsigned long variable, the intermediate
variable used in the estimation is unsigned integer. This will result in
a wrong frequency value being reported to userspace and clients.

Fix the overflow by using a unsigned long datatype for the frequency
computation.

Change-Id: I4bba53b9f5bd243c4aaaf67a831ce77ef231b38f
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2017-03-15 16:28:38 -06:00
Maya Erez
d10579f3b2 wil6210: NOC time-out fixes
On MSM there is NOC time-out in case the 11AD device wake-up
latency exceeds 6.7ms.
In order to guarantee fast wake-up in 11AD BL, set USAGE_8
bit 0, which prevents deep sleep in BL.
In addition, to shorten the wake-up time in operational FW,
mark the FW to set T_POWER_ON to 0, by setting BIT 1 of USAGE_8
register.

Change-Id: Ic1084f0ba1a226723818f7e4a7b1d81ce30bb31f
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-03-15 22:04:53 +02:00