Commit graph

582807 commits

Author SHA1 Message Date
Nicholas Troast
d86ba09f57 power_supply: add INPUT_VOLTAGE_SETTLED property
INPUT_VOLTAGE_SETTLED is the negotiated adapter voltage setting.

Change-Id: I2ac529a77e8ed007c908c4f37eea718a80bc11d3
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-02-10 16:16:47 -08:00
Nicholas Troast
c9329b856e ARM: dts: msm: enable the chg-state-change IRQ for SMB138X
The chg-state-change IRQ will be used to notify when the parallel slave
charger changes its charge state. Enable it.

Change-Id: Ia57db8ec5f2263b62217c235725ee9caa07f86e4
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-02-10 16:16:47 -08:00
Nicholas Troast
e9fc341735 smb138x-charger: add handler for slave chg state change
Add an IRQ handler function that notifies when the slave charge state
changes.

Change-Id: I359ed08c5ad289ceeabd6fa8720a959c74b6bb5e
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-02-10 16:16:46 -08:00
Linux Build Service Account
45ad5727c9 Merge "ASoC: msm: qdsp6v2: Add INT3 Tx port for LSM" 2017-02-10 06:46:05 -08:00
Linux Build Service Account
1f2a86994e Merge "drivers: soc: add mutex to prevent response being processed twice" 2017-02-10 06:46:05 -08:00
Linux Build Service Account
af6d354a11 Merge "ARM: dts: msm: add SMB1351 charger node for SDM660 MTP" 2017-02-10 06:46:04 -08:00
Linux Build Service Account
564ead6a58 Merge "qpnp-smb2: support POWER_SUPPLY_PROP_CTM_CURRENT_MAX" 2017-02-10 06:46:02 -08:00
Linux Build Service Account
1a78d46209 Merge "power_supply: add DIE_HEALTH and CONNECTOR_HEALTH properties" 2017-02-10 06:46:01 -08:00
Linux Build Service Account
2283a0e090 Merge "defconfig: arm64: msm-perf: Enable MSM_TZ_LOG" 2017-02-10 06:46:00 -08:00
Linux Build Service Account
9cfe21ae68 Merge "soc: qcom: Add support for Cx iPeak limit driver" 2017-02-10 06:45:59 -08:00
Linux Build Service Account
00b3ef62c0 Merge "USB: qc_rndis: Fix aggregation parameters settings issue" 2017-02-10 06:45:58 -08:00
Linux Build Service Account
9be7e2fad6 Merge "ARM: dts: msm: Add APC0/1 CPR instances for sdm630" 2017-02-10 06:45:56 -08:00
Linux Build Service Account
1603ea92b1 Merge "defconfig: msm: Enable CONFIG_MMC_RING_BUFFER for sdm660" 2017-02-10 06:45:56 -08:00
Linux Build Service Account
c8fbebb199 Merge "driver-core: cpu: Make isolate node read-only" 2017-02-10 06:45:55 -08:00
Linux Build Service Account
d01d82d616 Merge "qpnp-smb2: Make CURRENT_MAX property writeable for usb_psy" 2017-02-10 06:45:54 -08:00
Linux Build Service Account
f85e7d3750 Merge "ASoC: msm: qdsp6v2: Add endianness control for USB devices" 2017-02-10 06:45:53 -08:00
Linux Build Service Account
ddb5ca1fc6 Merge "msm: rndis_ipa: Fix to incorrect state transition" 2017-02-10 06:45:52 -08:00
Linux Build Service Account
1dc780eb62 Merge "clk: qcom: Add qpnp clock divider support" 2017-02-10 06:45:46 -08:00
Nicholas Troast
578f8f6a7c qpnp-smb2: support POWER_SUPPLY_PROP_CTM_CURRENT_MAX
CTM needs to vote for USB ICL. Add support for it.

Change-Id: I88b146000f7327cf5dc7310fb721309f08dc3035
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-02-10 12:52:15 +05:30
Nicholas Troast
fcc57cd62f power_supply: add CTM_CURRENT_MAX property
POWER_SUPPLY_PROP_CTM_CURRENT_MAX is needed by CTM to limit USB input
current. Add it.

Change-Id: I8aac65a91959300676cf7e1c2685a557f322c509
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-02-10 12:52:15 +05:30
Nicholas Troast
683a347835 power: supply: qcom: implement die and connector health property
The die and connector health properties expose the comparator output of
the thermal regulation. If both die and skin temperature regulation is
enabled then the output of the comparator will be the higher of the two.
The property values can be one of: Unknown, Cool, Warm, Hot, Overheat.

Change-Id: Ic92c9cb08ec42fd2c2f26a54687a17e3b05b388f
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-02-10 12:52:14 +05:30
Nicholas Troast
e93616b414 power_supply: add DIE_HEALTH and CONNECTOR_HEALTH properties
The DIE_HEALTH and CONNECTOR_HEALTH properties are used to show the
output of the thermal regulation TEMP_RANGE.

Change-Id: Ice3f159b7775084bdd0099047d4660a1e5edce98
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-02-10 12:52:13 +05:30
Abhijeet Dharmapurikar
3a3c5fd62e smb-lib: add support of ICL voting based on charger
Add support to vote for ICL based on charger type.
Following are the current limit for chargers:
Legacy adapters:
CDP: 1500mA, DCP: 1800mA, HVDCP: 3000mA

TypeC Adapters:
Based on the current advertised by the adapter.

Change-Id: Ia5dbf73c29949a94e096ca6233a33c40da744140
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-02-10 12:52:07 +05:30
Matt Wagantall
86325cf591 defconfig: arm64: msm-perf: Enable MSM_TZ_LOG
The tz_log driver is responsible for allocating the memory for the
'qsee_log' buffer. If tz_log driver is disabled and some part of the
bootchain has set the qsee_log address before Linux booted, then that
previous address will continue being used. If that address overlaps
with memory used for some other purpose, logging to qsee_log may
scribble on memory and cause a crash.

Change-Id: I10d69355beeb252115a0d91cfabfa8b9e729c969
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2017-02-10 12:45:46 +05:30
Ashay Jaiswal
f1ec8989c4 ARM: dts: msm: add SMB1351 charger node for SDM660 MTP
Add SMB1351 charger node in parallel charger configuration
for SDM660.

Change-Id: Ia36a352f2728c25605b4a4a730493b99f83c8c12
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-02-10 12:45:18 +05:30
Linux Build Service Account
487ff740cb Merge "power: qcom-charger: add support for USBIN-USBIN parallel configuration" 2017-02-09 22:09:29 -08:00
Linux Build Service Account
3252149cd2 Merge "power: smb1351-charger: update drive to support parallel architecture" 2017-02-09 22:09:28 -08:00
Linux Build Service Account
fa12840e3d Merge "icnss: For WDOG bite, shutdown after FW ready" 2017-02-09 22:09:27 -08:00
Linux Build Service Account
0e39052658 Merge "sched: remove sched_new_task_windows tunable" 2017-02-09 22:09:26 -08:00
Linux Build Service Account
3bbac5a6d9 Merge "ARM: dts: msm: Add alias name for secondary GPU sensor in MSM8998" 2017-02-09 22:09:25 -08:00
Linux Build Service Account
ae8d5f9081 Merge "ARM: dts: msm: Update tsens for cluster0 mitigation profile for sdm630" 2017-02-09 22:09:24 -08:00
Linux Build Service Account
cbbf109dc4 Merge "icnss: Avoid DOMAIN_ATTR_ATOMIC setting during S1 bypass" 2017-02-09 22:09:23 -08:00
Linux Build Service Account
d8d3d2d37d Merge "usb: host: xhci: Fix bound check for interrupter number" 2017-02-09 22:09:22 -08:00
Linux Build Service Account
dbba2248a3 Merge "clk: qcom: update post div bits to be cleared for MMCC/GPU clocks" 2017-02-09 22:09:21 -08:00
Linux Build Service Account
c2ae92ed42 Merge "ARM: dts: msm: Add audio support for SDM630, SDA630/660" 2017-02-09 22:09:20 -08:00
Linux Build Service Account
6f3ba0cb90 Merge "defconfig: mfd: Enable REGMAP_ALLOW_WRITE_DEBUGFS for 8998" 2017-02-09 22:09:14 -08:00
Linux Build Service Account
9eaf6b101b Merge "msm: regmap: configure REGMAP debugfs write optional" 2017-02-09 22:09:14 -08:00
Linux Build Service Account
95811d0d4d Merge "msm: mdss: enable dest_scaler data protection" 2017-02-09 22:09:13 -08:00
Tirupathi Reddy
b691575140 ARM: dts: msm: Add APC0/1 CPR instances for sdm630
Add CPR device nodes with required configuration for supporting
closed-loop operation for APC0/1 CPR instances in sdm630.

CRs-Fixed: 1117353
Change-Id: I206ef602a78802ddd15b568b1d5d1043ddfc44c0
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-02-10 11:21:54 +05:30
Ashay Jaiswal
504aeb1158 power: qcom-charger: add support for USBIN-USBIN parallel configuration
Add support for USBIN-USBIN configuration based parallel charging. This
involves splitting Input Current Limit(ICL) between the main and the
parallel charger, ICL re-split is done when the settled AICL of the main
charger changes by 300mA.

Change-Id: I5b916f1503a2267ca1e73b24096cb60a304e3c19
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-02-10 10:33:31 +05:30
Ashay Jaiswal
23d22ee4bf power: smb1351-charger: update drive to support parallel architecture
Re-organize SMB1351 charger driver to support new parallel charger
architecture.
- New property "POWER_SUPPLY_PROP_PARALLEL_MODE" exposes the parallel
  charger configuration, in this case it is USBIN-USBIN configuration.
- Property "POWER_SUPPLY_CHARGE_TYPE" is added to report the current
  charge type and is also used for parallel charger chip detection.

Change-Id: I05692b34daef244f89a365e03043ae2ffe42d9da
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-02-10 10:31:37 +05:30
Abhijeet Dharmapurikar
111ee8a2d1 power: qcom-charger: add support to detect parallel charger
Add support to detect presence of parallel charger chip by
requesting a register read via power_supply framework.
If parallel chip is absent then disable parallel charger.

Change-Id: Icfa4a774d344fde4c7d1f4ced772a707be85020d
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-02-10 10:16:15 +05:30
Ashay Jaiswal
bc82c4febc qcom: battery: add support to delay parallel enable
Add support to delay parallel enable until HVDCP detection
and authentication completes. This involves adding a new voter
which enables parallel charger under following condition:
For DCP: enable parallel path after HVDCP detection
times out.
For HVDCP: enable parallel path after HVDCP authentication
completes.

Change-Id: Ib1c740eee5c721a0c267f6a9bc924c58af4b2c1e
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-02-10 10:04:17 +05:30
Abhijeet Dharmapurikar
07b6e5b98f smb-lib: manage override in icl_callback
Currently we have only one path - the pd active setting path -  where
ICL_OVERRIDE gets set.

With the upcoming changes to manage connector temperature
mitigation and usbin-usbin parallel charger, the ICL_OVERRIDE is needed
to be set from these usecases.

So instead of creating a voter for ICL_OVERRIDE and putting the onus
on callsites to set it before calling their icl settings, it is best
to handle it in icl_callback.

Update the icl_callback to manage override and suspend in this way.

- Presence of voter signifies that the driver wants to enforce a
  value different than the hw default. Force an icl override.

- No voters signifies that the hw defaults are good, undo an override.

- For USB types that command a limit aka SDP and CDP, never override.

- never suspend if there are no clients.

Change-Id: I3ed01237b0bb2c028bec572d2905cabb03ce50a3
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-02-10 09:57:37 +05:30
Abhijeet Dharmapurikar
0591184767 smb-lib: Handle icl voter priorities between DCP, SDP and PD type
Cleanup the code such that when PD is activated, DCP_VOTER
and USB_PSY_VOTER (the voter for SDP and CDP types) are disabled.

While at it DCP_VOTER is intended to enforce a different value
from the hw defaults. Set it only when type is confirmed DCP.

Also to handle the situation when the PD profile allows to suspend
based on the phy, use a different voter PD_SUSPEND_SUPPORTED_VOTER
to activate that situation.

Change-Id: I0cb1a0aad9c94fdd233ec3103779e1a13449472e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-02-10 09:56:36 +05:30
Tirupathi Reddy
18e54c2fda regulator: cprh-kbss: add support for sdm630 kbss cpr instances
sdm630 CPU CPR controllers support full hardware closed-loop CPR
operation also known as CPR hardening. Extend the cprh-kbss-regulator
driver to handle CPU subsystem specific power requirements of
the sdm630 chip.

CRs-Fixed: 1117353
Change-Id: Id2aa0674b0d9737907defd4b305ee70b74f65142
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-02-10 09:55:09 +05:30
Sayali Lokhande
61f272f633 defconfig: msm: Enable CONFIG_MMC_RING_BUFFER for sdm660
Enable CONFIG_MMC_RING_BUFFER to support ring buffer
logging of legacy and CQ events for sdm660.

Change-Id: I91e7dc68b929c0bf03d76510a084ee89ca4cd030
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2017-02-10 09:37:36 +05:30
Olav Haugan
df795ecb7c driver-core: cpu: Make isolate node read-only
We no longer support isolating a core using the isolate node. Remove
write-access to this node.

Change-Id: Ib51cf12066819ad295ce57f6ae8edf52b0a4e558
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2017-02-09 16:49:25 -08:00
Prashanth Bhatta
b70b942f24 icnss: For WDOG bite, shutdown after FW ready
When there is Modem WDOG bite, Q6 will not get chance to reset
the hardware and if shutdown is called as part of PD down
notification then freeing buffers already submitted to hardware
may cause exceptions as hardware may try to access DDR location
which is already freed.
Fix the issue by delaying the shutdown till FW ready happens and
hardware is reset to clean state this way buffers are freed after
hardware is in reset state.

CRs-fixed: 2000709
Change-Id: Iacea5e8b712dd4ca310e5b502e43f4beb99f6981
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
2017-02-09 16:41:22 -08:00
Puja Gupta
97daa00ee4 soc: qcom: Add ssr states to service notifier notifications
Add more refined states with service notifier notification for clients
to be able to distinguish between different error scenarios.

CRs-Fixed: 2004229
Change-Id: Ibae1f2b0ba03f8cdcb14398d7d35b007fac1a150
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2017-02-09 16:40:17 -08:00