Commit graph

577574 commits

Author SHA1 Message Date
Charan Teja Reddy
7b2d18e8a6 ARM: dts: msm: add the smmu dt nodes for msmfalcon
Add the SMMU device tree nodes that are used by the SMMU masters to
translate the I/O virtual address to physical address.

Change-Id: Iae33a17ba43f624052ac6591dc56af26b7a605c6
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2016-10-17 16:19:29 +05:30
Charan Teja Reddy
b31499e592 ARM: dts: msm: add the cma region for venus on msmtriton
Add the memory region for venus firmware that is used to allocate the
contiguous memory using CMA API.

Change-Id: Ibdec14a3e835df19876658d0ad7600da0200603b
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2016-10-17 15:18:21 +05:30
Taniya Das
a4cd7d61cc defconfig: msm: Add support for SMD-RPM clocks
SMD-RPM clocks are required to be enabled for sending clocks requests to
RPM owned clocks.

Also cleanup the CONFIG_MSM_MDSS_PLL which no longer required as we select
CONFIG_COMMON_CLK.

Change-Id: I805df626d85e8d19f3d9f44dd05011713bd22d1e
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-10-17 11:27:10 +05:30
Taniya Das
713867d88f clk: qcom: Add support for Voter and hardware clocks
MSMfalcon requires the voter & voter branch clocks to be able to
enabled/disabled & set rate on these clocks from the client. Also add
support for few hardware & dummy clocks to be able to perform clock ops
from the clients.

Change-Id: I54941fbcc0a4b4d24dcb01f4628aa4dc99fcbab9
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-10-17 11:26:56 +05:30
Taniya Das
55d4764dee clk: qcom: Support to add hardware clocks to of_clk_provider
Currently the hardware clocks are added from each clock controller
individually and are not added to the of_clk_provider. But there could be
clocks which are required by clients to be used. Add the hardware clocks to
the of_clk_provider list.

Change-Id: I9a36a52c77672fba13813656a58f7b8cc14a4c27
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-10-16 22:30:45 +05:30
Linux Build Service Account
4f983fd1aa Merge "clk: qcom: clk-voter: Add support for voter clocks" 2016-10-15 23:19:40 -07:00
Linux Build Service Account
1f47d424c4 Merge "input: misc: pat9125: add gpio configuration and pinctrl support" 2016-10-15 07:37:45 -07:00
Linux Build Service Account
e024b79852 Merge "usb: pd: Use new power_supply PD_IN_HARD_RESET property" 2016-10-15 01:19:59 -07:00
Linux Build Service Account
cb74f5d749 Merge "power_supply: Add additional USB PD properties" 2016-10-15 01:19:58 -07:00
Linux Build Service Account
c8c3a40219 Merge "drivers: soc: add size checks and update log messages" 2016-10-15 01:19:57 -07:00
Linux Build Service Account
b5602aede4 Merge "soc: qcom: core_hang: Separate sysfs entry for silver and gold cluster" 2016-10-15 01:19:55 -07:00
Linux Build Service Account
0f9ddd3093 Merge "leds: qpnp-flash-v2: Fix possible NULL pointer dereference" 2016-10-15 01:19:51 -07:00
Linux Build Service Account
f3fd158ba3 Merge "leds: qpnp-flash-v2: Add support for preemptive charger mitigation" 2016-10-15 01:19:50 -07:00
Hemant Kumar
1d0ede934b usb: gadget: f_midi: Fix use after free bug
Upon cable disconnect usb composition switches from midi
to default composition as a result midi function driver
frees the midi function. When cable is plugged back in
android_setup calls function setup call back for all the
function instances having non-null function pointer. This
results into access to already freed function pointer
stored in function instance. Fix this issue by setting
function instance's function pointer to NULL so that
android_setup will skip calling midi function setup upon
next cable connect.

Change-Id: Ia619650c94c35aea015a89841c59a1f9dbc521f9
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-10-14 19:25:33 -07:00
Linux Build Service Account
0a97d6bb23 Merge "ASoc: wcd9335: Ignore mbhc get impedance error" 2016-10-14 17:58:29 -07:00
Linux Build Service Account
9f00094706 Merge "scsi: ufs: gate ref_clk during aggressive clk gating" 2016-10-14 17:58:27 -07:00
Linux Build Service Account
7d6515f37b Merge "scsi: ufs: reduce auto hibern8 timeout to save power" 2016-10-14 17:58:27 -07:00
Linux Build Service Account
f1c69e2fdd Merge "soc: qcom: msm_smem: Pass device structure to ramdump driver" 2016-10-14 17:58:26 -07:00
Linux Build Service Account
78cd56d395 Merge "ASoC: wcd934x: Update DSD register sequence for v1.1" 2016-10-14 17:58:24 -07:00
Linux Build Service Account
d887e436d2 Merge "ASoC: wcd934x: update keeper enable for soundwire functionality" 2016-10-14 17:58:24 -07:00
Jack Pham
7f87a85c97 usb: pd: Use new power_supply properties for PD current
Switch to setting the POWER_SUPPLY_PROP_PD_CURRENT_MAX for
indicating the current limit to the charger driver when
an explicit contract is established. Also set the
POWER_SUPPLY_PROP_PD_USB_SUSPEND_SUPPORTED property whenever
encountering the "USB Suspend Supported" bit in the first
PDO of a Source Capabilities message. This is an indication
to the charger that when the USB bus enters suspend state that
it should follow suspend rules according to USB 2.0/3.1 spec.

Change-Id: I665ec788a770632b4849b9beff8444d00e956ce1
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-14 17:51:45 -07:00
Jack Pham
5b100713ec usb: pd: Use new power_supply PD_IN_HARD_RESET property
Set the POWER_SUPPLY_PROP_PD_IN_HARD_RESET when hard reset
has been issued and clear it when completed. This replaces
the previous use of PD_ACTIVE which is now used to indicate
assertively whether the port partner is PD capable or not.
As such, since charger driver now definitively knows, it is
also not necessary to explicitly change PROP_TYPE to USB_PD.

Change-Id: I4d8c9fcdf553d1cf1ae79c66932773834804d1a9
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-14 17:51:45 -07:00
Jack Pham
9ed824e16b power_supply: Add additional USB PD properties
Add additional properties for USB PD usage:
- POWER_SUPPLY_PROP_PD_IN_HARD_RESET is set when PD is
  undergoing a hard reset
- POWER_SUPPLY_PROP_PD_CURRENT_MAX used to indicate the
  current limit as negotiated over PD
- POWER_SUPPLY_PROP_PD_USB_SUSPEND_SUPPORTED is set when
  USB suspend current limit must be honored when USB bus
  is suspended

Also add enums to distinguish PD activity state: inactive, active.

Change-Id: I0a3d98ac1e1202e5b655b2e3a8102691b61359c8
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-14 17:51:45 -07:00
Jack Pham
18da08334e usb: pd: Handle PD_ALLOWED within state machine
Charger may be able to detect a legacy cable connection in which
PD is not supported however the state machine still needs to
run in order to send the EXTCON_USB notification to start the
USB controller in peripheral mode (assuming type is SDP or CDP).
Move checking of PD_ALLOWED to the state machine which can be used
to determine if moving beyond PE_SNK_STARTUP is allowed or not.

The psy_changed() callback should only queue the work when either
typec_mode or pd_allowed states have changed. Also move handling
of the in_pr_swap flag to this function by absorbing the
disconnect callback and clearing the flag when CC state indicates
it is reconnected.

Change-Id: I8879699531a49915e7286e4a166944709076fbd1
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-14 17:51:45 -07:00
Jack Pham
d1d42ada3d usb: pd: Support VCONN Swap
Support incoming VCONN Swap requests by accepting and turning
off/on VCONN.

Due to HW board limitations, if VCONN is being sourced from the
VBUS input we cannot support enabling VCONN while as a sink and
greater than 5V has been negotiated on VBUS. In that case, reject
the request. Add a device tree property that indicates whether
the board is configured for separate VCONN supply.

Change-Id: If3a9aa316ae08a80468631f3d536a1b345e21b18
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-14 17:51:45 -07:00
Jack Pham
b08f588476 usb: pd: Prevent sleep when state machine in progress
With PM autosleep enabled, the system may aggressively enter
and re-enter suspend in between calls to queue_work() and
when the state machine function gets executed, which may
at best result in numerous suspend/resume cycles and at
worse starve the PD state machine from even executing.

Fix this by calling pm_stay_awake() whenever the work is
queued and relinquish with pm_relax() when no further work
is to be done.

Change-Id: I71d8ea0c69a7b174c2280f92d1f5342e5e50d9b0
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-14 17:51:45 -07:00
Jack Pham
3bf9e38400 usb: pd: Simplify VDM tx handling
VDMs, especially structured ones, are almost always handled
as requests and responses. Hence it does not make sense to
allow more than one outgoing VDM at a time, so get rid of the
vdm_tx_queue list and simplify it to a single-issued packet.

Because port partners can only have one VDM request/response in
flight, also handle the case when a new structured request is
received before the previous response has been sent. In that
case we simply discard the queued message as it's now invalid.

Change-Id: I144f8158dbf8be0babf5516b01d084fd053413c3
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-14 17:51:45 -07:00
Jack Pham
7ce154ad5d usb: pd: Correctly handle invalid Structured VDMs
As UFP since the policy engine only responds to the Discover
Identity command, all other commands are unrecognized and
therefore should be NAKed. Fix the handling as follows:

 - Ensure the standard Discover Identity was sent using
   SID of 0xFF00, otherwise it is invalid
 - Don't NAK incoming Attention messages
 - When sending a NAK, respond with the same SVID of the
   initiating command, whether it was correct or not
 - Enter Mode is not supported in general, but the NAK
   should also be sent back with the same mode index
 - Re-issue Discover SVIDs when more than 12 SVIDs are returned
 - Clean up macro name prefixes from 'VDM' to 'SVDM' to
   emphasize they are accessing structured VDM specific bits

Change-Id: Id2590065a01e46f8da70733d55f3bfabff5b532d
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-14 17:51:45 -07:00
Jack Pham
beeb22f5e8 usb: pd: Miscellaneous compliance fixes
Fix several issues which help address PD compliance testing:
- Soft reset should be issued instead of hard reset in cases
  where an unexpected message is received.
- In source mode, send a Reject if the Request PDO object also
  exceeds the advertised current capability. Fix the incorrect
  bitmask in the PD_RDO_FIXED_CURR macro.
- Handle possibility of quick back-to-back RX messages by
  flushing the sm worker to ensure the last message was fully
  processed before overwriting the buffer.
- Discard PING messages as they are not applicable to Type-C.
- Respond to GET_SINK_CAP while in source mode, and vice
  versa, respond to GET_SOURCE_CAP when in sink mode.
- Move pd->hard_reset=false to PE_SRC/SNK_TRANSITION_TO_DEFAULT
  for consistency.
- Change default sink capabilities to advertise only 5V @ 900mA
  since the policy engine will not automatically request higher
  voltages. If userspace wants to request greater than 5V it should
  also update the sink capabilities.
- Reset the protocol counters at the beginning of PE_SNK_STARTUP.

Change-Id: I44598eb0b49efd763f86f303c70e8b018fca994b
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-10-14 17:51:45 -07:00
Phani Kumar Uppalapati
607f17ae85 ASoc: wcd9335: Ignore mbhc get impedance error
Avoid DAPM failure by ignoring the mbhc get impedance
errors as this is not a fatal and audio can still work
even if the class-H settings are not updated based on
impedance values.

Change-Id: Icd6846d157af5a96d5ae49261e109cbd5ab8c266
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-10-14 16:35:09 -07:00
Harshdeep Dhatt
3dd9c42266 msm: kgsl: Clear the interrupt immediately
Sometimes an interrupt from GPU is ignored while we
are still executing the previous interrupt. In order
to service any interrupt that was fired while executing
the interrupt handler, clear the interrupt register
immediately.
Also, clear the ADRENO_INT_RBBM_AHB_ERROR bit not before
but after it's serviced in its respective handler. This
will avoid firing the main interrupt handler a second
time.

CRs-Fixed: 1072781
Change-Id: Ie6b5a511f5b3077adae7d464de437f2aa893b0c9
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-10-14 16:41:30 -06:00
Phani Kumar Uppalapati
97ddf9fd0c ASoC: wcd934x: Create mixer control to select asrc output mode
Create mixer control to select asrc (asynchronous sample rate
converter) output mode to integer or fractional rate based on
the playback sample rate of the main path or DSD path.

CRs-Fixed: 1078253
Change-Id: I941a357d63f1024c5f7648de10af10df0148c6a7
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-10-14 15:26:08 -07:00
Chris Lew
68a6f50d3c soc: qcom: msm_smem: Pass device structure to ramdump driver
The ramdump driver uses the device pointer during ramdump read.
This change passes in the device pointer for smem during
ramdump create and moves the call to the probe function.

CRs-Fixed: 1075262
Change-Id: I6234e35d76440beb53c139ad0b02ec8b49c2a196
Signed-off-by: Chris Lew <clew@codeaurora.org>
2016-10-14 13:39:41 -07:00
Chinmay Sawarkar
a1c4488efb ARM: dts: msm: Move 720p120fps encode to SVS on msmcobalt
The VMEM BW requirements for 720p120fps encode usecase push
the corner to SVS. Hence moving this usecase to Venus SVS
corner.

CRs-Fixed: 1073937
Change-Id: I2814cf7191c4410ca7d869b033fc68981dc4de70
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2016-10-14 11:01:57 -07:00
Yuanyuan Liu
a8711e7a85 icnss: Do not parse VBATT DT entry if VBATT feature is disabled
Do not parse VBATT entry in DT if this feature is disabled.

CRs-Fixed: 1078147
Change-Id: I0aa3443a2fddfa200631b6fe9eb22de10178fe46
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-10-14 10:51:35 -07:00
Linux Build Service Account
e657410985 Merge "leds: qpnp-flash-v2: Add support for configuring hardware mitigation" 2016-10-14 03:40:38 -07:00
Linux Build Service Account
911b4fecbe Merge "usb: gadget: f_midi: Use 1024 bytes as MIDI buffer size" 2016-10-14 03:40:37 -07:00
Linux Build Service Account
32ed0e480d Merge "ASoC: msm: lock read/write when add/free audio ion memory" 2016-10-14 03:40:32 -07:00
Linux Build Service Account
a1c6e317af Merge "input: pat9125: add support of sending rotating switch events" 2016-10-14 03:40:31 -07:00
Linux Build Service Account
b2799f1e25 Merge "soc: qcom: glink: Fix ctx initialization with magic number" 2016-10-14 03:40:30 -07:00
Linux Build Service Account
65767b7f53 Merge "fbdev: use unsigned integers to prevent overflow" 2016-10-14 03:40:29 -07:00
Vevek Venkatesan
1e5dde5a4c input: misc: pat9125: add gpio configuration and pinctrl support
Pat9125 is a gpio driven i2c slave. This change adds the gpio
configuration and pinctrl support for pat9125 driver.

Change-Id: I2a9b379715622b5f010a5780ca481da7f9619400
Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-14 14:37:26 +05:30
xiaonian
9b9f5b1124 ARM: dts: msm: Enable SD card for msmcobalt QRD VR1 board
Change polarity of corresponding GPIO to enable SD card
detection for msmcobalt QRD VR1 board.

CRs-Fixed: 1075999

Change-Id: I12bfceb01990873db3f4287f85deccb6b6b36495
Signed-off-by: xiaonian <xiaonian@codeaurora.org>
2016-10-14 02:04:38 -07:00
Prashanth Bhatta
312d5909bb icnss: Switch to CXO before XO disable
During hardware reset if XO gets disabled and while polling to
confirm XO is disabled, bus timeout is noticed. So add
instructions to switch to CXO before disabling XO.

CRs-fixed: 1076441
Change-Id: Ia893786de4689e07f8d99d1ba3d8f1d6efcc7686
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
2016-10-13 23:22:23 -07:00
Taniya Das
d7c369c0b1 clk: qcom: clk-voter: Add support for voter clocks
Voter clocks nodes would require aggregation of all child node rates.
Certain clocks that are not rate-settable can still take
advantage of voter clock functionality.

Change-Id: Ibab7a5aa6aa89236974fcd0d65ffe0bd1a7acb12
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-10-14 10:58:17 +05:30
Neeraj Upadhyay
87b8789085 ARM: dts: msm: correct cpu nodes information for msmtriton
Correct the mpidr configuration for cpu nodes, so that cpu
topology matches the layout of physical CPUs for msmtriton.

Change-Id: Id568f76e03b93cf411366abf01ea857fb80ff1bf
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2016-10-14 09:59:36 +05:30
Linux Build Service Account
c116fa434f Merge "ARM: dts: msm: Fix clock for 720p@240fps usecase" 2016-10-13 19:11:39 -07:00
Linux Build Service Account
2e28fde065 Merge "msm: vidc: Update plane count in get-format" 2016-10-13 19:11:38 -07:00
Linux Build Service Account
3bc1baa947 Merge "defconfig: Enable USB MIDI Function driver for msmcobalt" 2016-10-13 19:11:37 -07:00
Linux Build Service Account
3d91f26e44 Merge "soc: qcom: smem: Update CDSP processor ID" 2016-10-13 19:11:36 -07:00