]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/log
mirror_ubuntu-zesty-kernel.git
7 years agofirmware: qcom: scm: Add support for ARM64 SoCs
Kumar Gala [Wed, 8 Apr 2015 19:34:02 +0000 (14:34 -0500)]
firmware: qcom: scm: Add support for ARM64 SoCs

Add an implementation of the SCM interface that works on ARM64/64-bit SoCs

Signed-off-by: Kumar Gala <galak@codeaurora.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agocpufreq-dt: Add L2 frequency scaling support
Georgi Djakov [Tue, 8 Sep 2015 08:24:41 +0000 (11:24 +0300)]
cpufreq-dt: Add L2 frequency scaling support

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Conflicts:
drivers/cpufreq/cpufreq-dt.c

7 years agopwer:avs: cpr: fix with new reg_sequence structures
Srinivas Kandagatla [Wed, 16 Sep 2015 15:55:12 +0000 (16:55 +0100)]
pwer:avs: cpr: fix with new reg_sequence structures

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agopower: avs: cpr: Fix Duplicate OPPs warning
Georgi Djakov [Fri, 11 Sep 2015 13:26:31 +0000 (16:26 +0300)]
power: avs: cpr: Fix Duplicate OPPs warning

Change the sequence to get the regulators first
and then add OPPs as regulators can defer probe
in the middle and leave us with only partially
added OPPs.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agopower: avs: Register CPR with cpufreq-dt
Georgi Djakov [Mon, 15 Jun 2015 06:44:42 +0000 (09:44 +0300)]
power: avs: Register CPR with cpufreq-dt

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agopower: avs: cpr: Use raw mem access for qfprom
Georgi Djakov [Sun, 14 Jun 2015 19:22:47 +0000 (22:22 +0300)]
power: avs: cpr: Use raw mem access for qfprom

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agopower: avs: Add support for CPR (Core Power Reduction)
Stephen Boyd [Tue, 2 Jun 2015 01:47:59 +0000 (18:47 -0700)]
power: avs: Add support for CPR (Core Power Reduction)

RBCPR (RapidBridge Core Power Reduction) is a technology to reduce
core power on a CPU or other device. It reads voltage settings in
efuse from product test process as initial settings and populates OPPs
for the device being "monitored". Each OPP corresponds to a "corner"
that has a range of valid voltages for a particular frequency. While
the device is running at a particular frequency, CPR monitors dynamic
factors such as temperature, etc. and adjusts the voltage for that
frequency accordingly to save power and meet silicon characteristic
requirements.

This driver is based on work by others on codeaurora.org[1].

TODO:
* DT binding documentation

[1] https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/drivers/regulator/cpr-regulator.c?h=msm-3.10

Cc: David Collins <collinsd@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agocpufreq-dt: Handle OPP voltage adjust events
Stephen Boyd [Tue, 2 Jun 2015 01:47:58 +0000 (18:47 -0700)]
cpufreq-dt: Handle OPP voltage adjust events

On some SoCs the Adaptive Voltage Scaling (AVS) technique is
employed to optimize the operating voltage of a device. At a
given frequency, the hardware monitors dynamic factors and either
makes a suggestion for how much to adjust a voltage for the
current frequency, or it automatically adjusts the voltage
without software intervention.

In the former case, an AVS driver will call
dev_pm_opp_modify_voltage() and update the voltage for the
particular OPP the CPUs are using. Add an OPP notifier to
cpufreq-dt so that we can adjust the voltage of the CPU when AVS
updates the OPP.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
7 years agoOPP: Allow notifiers to call dev_pm_opp_get_{voltage, freq} RCU-free
Stephen Boyd [Tue, 2 Jun 2015 01:47:57 +0000 (18:47 -0700)]
OPP: Allow notifiers to call dev_pm_opp_get_{voltage, freq} RCU-free

We pass the dev_pm_opp structure to OPP notifiers but the users
of the notifier need to surround calls to dev_pm_opp_get_*() with
RCU read locks to avoid lockdep warnings. The notifier is already
called with the dev_opp's srcu lock held, so it should be safe to
assume the devm_pm_opp structure is already protected inside the
notifier. Update the lockdep check for this.

Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
7 years agoPM / OPP: Support adjusting OPP voltages at runtime
Stephen Boyd [Tue, 2 Jun 2015 01:47:56 +0000 (18:47 -0700)]
PM / OPP: Support adjusting OPP voltages at runtime

On some SoCs the Adaptive Voltage Scaling (AVS) technique is
employed to optimize the operating voltage of a device. At a
given frequency, the hardware monitors dynamic factors and either
makes a suggestion for how much to adjust a voltage for the
current frequency, or it automatically adjusts the voltage
without software intervention. Add an API to the OPP library for
the former case, so that AVS type devices can update the voltages
for an OPP when the hardware determines the voltage should
change. The assumption is that drivers like CPUfreq or devfreq
will register for the OPP notifiers and adjust the voltage
according to suggestions that AVS makes.

Cc: Nishanth Menon <nm@ti.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
7 years agoMove to new qcom_smem_get() api
Srinivas Kandagatla [Fri, 8 Jan 2016 18:04:15 +0000 (18:04 +0000)]
Move to new qcom_smem_get() api

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoFix: Make it buildable on v4.3
Srinivas Kandagatla [Tue, 8 Dec 2015 11:38:31 +0000 (11:38 +0000)]
Fix: Make it buildable on v4.3

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agosoc: qcom: Stub IPCRTR client driver
Bjorn Andersson [Wed, 10 Dec 2014 19:27:51 +0000 (11:27 -0800)]
soc: qcom: Stub IPCRTR client driver

The IPCRTR channel needs to come up for the pronto block to be happy and
continue communication, so this driver does just that (and dumps
incoming data in the log).

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Conflicts:
drivers/soc/qcom/Kconfig
drivers/soc/qcom/Makefile

7 years agosoc: qcom: rpm_log: Add rpm log driver
Andy Gross [Tue, 3 Nov 2015 21:02:23 +0000 (15:02 -0600)]
soc: qcom: rpm_log: Add rpm log driver

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agosoc: qcom: Add msm_bus driver
Andy Gross [Tue, 13 Oct 2015 03:59:55 +0000 (22:59 -0500)]
soc: qcom: Add msm_bus driver

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agoremoteproc: tz: Allow no scm clocks support
Srinivas Kandagatla [Mon, 7 Dec 2015 11:56:24 +0000 (11:56 +0000)]
remoteproc: tz: Allow no scm clocks support

On APQ8064 I could not find any scm clocks related to scm and Q6, so
this patch is a temporary workaround to get the q6 loading working on
ifc6410.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoWIP: remoteproc: HACK to get it working on DB410c
Srinivas Kandagatla [Thu, 26 Nov 2015 13:11:41 +0000 (13:11 +0000)]
WIP: remoteproc: HACK to get it working on  DB410c

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoWIP: remoteproc: q6: add support to scm restart
Srinivas Kandagatla [Tue, 24 Nov 2015 17:47:45 +0000 (17:47 +0000)]
WIP: remoteproc: q6: add support to scm restart

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoWIP: remoteproc: q6: add support to memory-region
Srinivas Kandagatla [Tue, 24 Nov 2015 17:46:09 +0000 (17:46 +0000)]
WIP: remoteproc: q6: add support to memory-region

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoWIP:remoteproc:q6pil: add segment_is_loadable and segment_is_relocatable macros
Srinivas Kandagatla [Tue, 24 Nov 2015 17:30:25 +0000 (17:30 +0000)]
WIP:remoteproc:q6pil: add segment_is_loadable and segment_is_relocatable macros

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoWIP: remoteproc: q6: remove some commented out code
Srinivas Kandagatla [Tue, 24 Nov 2015 17:18:16 +0000 (17:18 +0000)]
WIP: remoteproc: q6: remove some commented out code

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agosoc: qcom: smd: Support opening additional channels
Bjorn Andersson [Tue, 20 Oct 2015 02:46:15 +0000 (10:46 +0800)]
soc: qcom: smd: Support opening additional channels

With the qcom_smd_open_channel() API we allow SMD devices to open
additional SMD channels, to allow implementation of multi-channel SMD
devices - like Bluetooth.

Channels are opened from the same edge as the calling SMD device is tied
to.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agosoc: qcom: smd: Support multiple channels per sdev
Bjorn Andersson [Tue, 20 Oct 2015 02:45:43 +0000 (10:45 +0800)]
soc: qcom: smd: Support multiple channels per sdev

This patch allows chaining additional channels to a SMD device, enabling
implementation of multi-channel SMD devies - like Bluetooth.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agosoc: qcom: smd: Refactor channel open and close handling
Bjorn Andersson [Tue, 20 Oct 2015 02:44:16 +0000 (10:44 +0800)]
soc: qcom: smd: Refactor channel open and close handling

Refactor opening and closing of channels into two separate functions
instead of open coding this in the various places.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agosoc: qcom: smd: Split discovery and state change work
Bjorn Andersson [Tue, 20 Oct 2015 02:43:44 +0000 (10:43 +0800)]
soc: qcom: smd: Split discovery and state change work

Split the two steps of channel discovery and state change handling into
two different workers. This allows for new channels to be found while
we're are probing, which is required as we introduce multi-channel
support.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agosoc: qcom: smd: Introduce callback setter
Bjorn Andersson [Tue, 20 Oct 2015 02:42:56 +0000 (10:42 +0800)]
soc: qcom: smd: Introduce callback setter

Introduce a setter for the callback function pointer to clarify the
locking around the operation and to reduce some duplication.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agosoc: smd: Migrate the wifi driver from old smd driver to new smd driver.
Yin, Fengwei [Tue, 17 Nov 2015 16:51:01 +0000 (16:51 +0000)]
soc: smd: Migrate the wifi driver from old smd driver to new smd driver.

Signed-off-by: Yin, Fengwei <fengwei.yin@linaro.org>
7 years agoqcom-smd-rpm: Add MSM8916 support
Andy Gross [Wed, 22 Apr 2015 20:35:39 +0000 (15:35 -0500)]
qcom-smd-rpm: Add MSM8916 support

This patch adds SMD/RPM support for the MSM8916.

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agogpio:smp2p:qcom: kill set_irq_flags and use genirq
Srinivas Kandagatla [Thu, 24 Sep 2015 18:01:47 +0000 (19:01 +0100)]
gpio:smp2p:qcom: kill set_irq_flags and use genirq

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoremoteproc: tz_pil: skip waiting ready irq if it not provided
Stanimir Varbanov [Fri, 21 Aug 2015 14:34:05 +0000 (17:34 +0300)]
remoteproc: tz_pil: skip waiting ready irq if it not provided

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
7 years agoremoteproc: tz_pil: take relocation flag into account
Stanimir Varbanov [Fri, 21 Aug 2015 13:37:57 +0000 (16:37 +0300)]
remoteproc: tz_pil: take relocation flag into account

when setup memory by scm call

Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
7 years agoremoteproc: tz_pil: make irqs, smd edge & crash-reason optional properties
Stanimir Varbanov [Wed, 19 Aug 2015 13:54:46 +0000 (16:54 +0300)]
remoteproc: tz_pil: make irqs, smd edge & crash-reason optional properties

the wdog, fatal, ready, handover and stop-ack irqs does not
exist for vidc (venus) remote processor, so make them optional.

Also crash-reason id and smd edge ditto.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
7 years agoregulator: smd: remove left over debug statement
Nicolas Dechesne [Mon, 7 Sep 2015 08:56:03 +0000 (10:56 +0200)]
regulator: smd: remove left over debug statement

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoregulator: smd: Add correct ifdef flag for stubs
Srinivas Kandagatla [Wed, 22 Jul 2015 14:30:02 +0000 (15:30 +0100)]
regulator: smd: Add correct ifdef flag for stubs

If built as module would throw up with
drivers/regulator/qcom_smd-regulator.c:67:5: error: redefinition of 'qcom_rpm_set_floor'
drivers/regulator/qcom_smd-regulator.c:89:5: error: redefinition of 'qcom_rpm_set_corner'

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoregulator: smd: Make set_{corner,floor} work with regulator struct
Georgi Djakov [Mon, 1 Jun 2015 16:23:00 +0000 (19:23 +0300)]
regulator: smd: Make set_{corner,floor} work with regulator struct

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agoregulator: smd: Add floor and corner operations
Andy Gross [Tue, 19 May 2015 06:44:28 +0000 (01:44 -0500)]
regulator: smd: Add floor and corner operations

This patch addes the Qualcomm specific functions for setting the floor and
corner voltages on the regulators.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Conflicts:
drivers/regulator/qcom_smd-regulator.c

7 years agoHACK: soc: qcom: smd: Add debug to fix timing
Andy Gross [Wed, 15 Jul 2015 03:54:43 +0000 (22:54 -0500)]
HACK: soc: qcom: smd: Add debug to fix timing

Hack to fix crashes

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agoremoteproc: tz_pil: Fixes to support 8916
Andy Gross [Wed, 15 Jul 2015 03:03:52 +0000 (22:03 -0500)]
remoteproc: tz_pil: Fixes to support 8916

This patch adds a few things to support the MSM8916 PIL.

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agogpio: qcom-smp2p: Fix compile issues
Andy Gross [Tue, 14 Jul 2015 03:48:17 +0000 (22:48 -0500)]
gpio: qcom-smp2p: Fix compile issues

This patch fixes 64 bit compile issues

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agodt-binding: gpio: Introduce qcom,smp2p binding documentation
Bjorn Andersson [Tue, 30 Jun 2015 01:06:42 +0000 (18:06 -0700)]
dt-binding: gpio: Introduce qcom,smp2p binding documentation

Introduce binding documentation for the Qualcomm Shared Memory Point 2 Point
protocol implemented as gpio and interrupt controllers.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agogpio: qcom-smp2p: Qualcomm Shared Memory Point to Point
Bjorn Andersson [Thu, 25 Sep 2014 23:03:26 +0000 (16:03 -0700)]
gpio: qcom-smp2p: Qualcomm Shared Memory Point to Point

Introduce the Qualcomm Shard Memory Point to Point driver, exposing bits
from the SMP2P protocol as gpio and interrupt controllers.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Conflicts:

drivers/gpio/Kconfig
drivers/gpio/Makefile

7 years agosoc: qcom: smd: Use correct smem id
Andy Gross [Mon, 13 Jul 2015 21:35:56 +0000 (16:35 -0500)]
soc: qcom: smd: Use correct smem id

This patch fixes the incorrect table and smem id usage

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agogpio: smsm: Fix compiler warnings
Andy Gross [Wed, 15 Jul 2015 04:24:13 +0000 (23:24 -0500)]
gpio: smsm: Fix compiler warnings

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agogpio: smsm: Update smem prototypes
Bjorn Andersson [Fri, 3 Apr 2015 20:24:54 +0000 (13:24 -0700)]
gpio: smsm: Update smem prototypes

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agogpio: qcom-smsm: Add driver for Qualcomm SMSM
Bjorn Andersson [Thu, 25 Sep 2014 22:59:58 +0000 (15:59 -0700)]
gpio: qcom-smsm: Add driver for Qualcomm SMSM

This driver exposed the Qualcomm Shared Memory State Machine bits as
GPIOs to the system.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoregulator: qcom: smd: Regulator driver for the Qualcomm RPM
Bjorn Andersson [Mon, 13 Apr 2015 21:58:02 +0000 (14:58 -0700)]
regulator: qcom: smd: Regulator driver for the Qualcomm RPM

Driver for regulators exposed by the Resource Power Manager (RPM) found
in devices based on Qualcomm 8974 and newer platforms.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: qcom_q6v5_pil: Fix 64 bit
Andy Gross [Fri, 3 Jul 2015 23:48:06 +0000 (18:48 -0500)]
remoteproc: qcom_q6v5_pil: Fix 64 bit

This patch fixes some 64 bit issues with compilation.

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agoremoteproc: qcom_tz_pil: Fix compiler issues
Andy Gross [Fri, 3 Jul 2015 21:33:01 +0000 (16:33 -0500)]
remoteproc: qcom_tz_pil: Fix compiler issues

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agoremoteproc: qcom: Extract PAS and fix compilation for 4.1
Bjorn Andersson [Tue, 30 Jun 2015 18:26:23 +0000 (11:26 -0700)]
remoteproc: qcom: Extract PAS and fix compilation for 4.1

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: qcom-tz: Drop smd reset stuff for now
Bjorn Andersson [Wed, 8 Apr 2015 21:25:31 +0000 (14:25 -0700)]
remoteproc: qcom-tz: Drop smd reset stuff for now

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: qcom-tz: Update smem prototypes
Bjorn Andersson [Fri, 3 Apr 2015 20:25:39 +0000 (13:25 -0700)]
remoteproc: qcom-tz: Update smem prototypes

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: qcom-tz: Update to match smem api changes
Bjorn Andersson [Tue, 17 Feb 2015 20:50:20 +0000 (12:50 -0800)]
remoteproc: qcom-tz: Update to match smem api changes

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: qcom: q6v5 pil: Initial hack to boot mss
Bjorn Andersson [Mon, 5 Jan 2015 18:10:08 +0000 (10:10 -0800)]
remoteproc: qcom: q6v5 pil: Initial hack to boot mss

This initial hack powers the q6v5, boots and authenticate the mba and
use that to load the mdt and subsequent bXX files.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: Support loading firmware from lately mounted fs (HACK)
Courtney Cavin [Mon, 5 Jan 2015 18:07:57 +0000 (10:07 -0800)]
remoteproc: Support loading firmware from lately mounted fs (HACK)

If the firmware isn't available during boot then table_ptr will be NULL
and subsequent attempts to load the firmware will fail. Move things
around and reattempt the load upon trying to boot the rproc.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: qcom: tz-pil: Round up max address
Bjorn Andersson [Mon, 5 Jan 2015 18:07:02 +0000 (10:07 -0800)]
remoteproc: qcom: tz-pil: Round up max address

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: qcom-tz: Finish shutdown on timeout
Bjorn Andersson [Wed, 10 Dec 2014 19:42:18 +0000 (11:42 -0800)]
remoteproc: qcom-tz: Finish shutdown on timeout

When the remote processor have hit an fatal error, it will not perform
the stop-ack handshake. So we have to finish the shutdown process to not
leave the remote processor in a dangling state (stopping us from
bringing it up again).

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: qcom-tz: Inform SMD about crashing remotes
Bjorn Andersson [Wed, 10 Dec 2014 19:41:12 +0000 (11:41 -0800)]
remoteproc: qcom-tz: Inform SMD about crashing remotes

When a remote processor crashes there is no indication in SMD, so we
need to inform the SMD driver that it should reset all open channels
associated with the remote processor.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: qcom-tz-pil: Add interrupts and gpio hooks
Bjorn Andersson [Fri, 21 Nov 2014 18:34:02 +0000 (10:34 -0800)]
remoteproc: qcom-tz-pil: Add interrupts and gpio hooks

Add the necessary interrupt and gpio hooks to be informed about events
on the remote processor as well as being able to shut it down
gracefully.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: Add additional crash reasons
Bjorn Andersson [Fri, 21 Nov 2014 18:33:30 +0000 (10:33 -0800)]
remoteproc: Add additional crash reasons

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: qcom-pil: Implementation of Qualcomm TZ backed PIL
Bjorn Andersson [Thu, 27 Feb 2014 23:52:47 +0000 (15:52 -0800)]
remoteproc: qcom-pil: Implementation of Qualcomm TZ backed PIL

This implements the TrustZone based Peripheral Image Loader used in
Qualcomm platforms for loading and boot audio, video and wifi/bt remote
processors.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agoremoteproc: core: Make the loaded resource table optional
Bjorn Andersson [Tue, 11 Nov 2014 01:25:53 +0000 (17:25 -0800)]
remoteproc: core: Make the loaded resource table optional

Remote processors like the ones found in the Qualcomm SoCs does not have
a resource table passed to them, so make it optional and only populate
it if it exists.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
7 years agosoc: qcom: smem: Add debugfs
Andy Gross [Fri, 10 Jul 2015 17:36:46 +0000 (12:36 -0500)]
soc: qcom: smem: Add debugfs

Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agoarm64: add qcom_defconfig
Kumar Gala [Tue, 20 Jan 2015 19:36:03 +0000 (13:36 -0600)]
arm64: add qcom_defconfig

7 years agoregulator: qcom-smd: Add support for PMA8084
Andy Gross [Tue, 15 Dec 2015 05:30:45 +0000 (23:30 -0600)]
regulator: qcom-smd: Add support for PMA8084

This patch adds support and documentation for the PMA8084 regulators
found on APQ8084 platforms.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoregulator: qcom-smd: Add PM8916 support
Andy Gross [Tue, 15 Dec 2015 05:30:44 +0000 (23:30 -0600)]
regulator: qcom-smd: Add PM8916 support

This patch adds support and documentation for the PM8916 regulators
found on MSM8916 platforms.

Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agodrivers/soc/qcom/smd.c: use __ioread32_copy() instead of open-coding it
Stephen Boyd [Tue, 5 Jan 2016 23:49:31 +0000 (10:49 +1100)]
drivers/soc/qcom/smd.c: use __ioread32_copy() instead of open-coding it

Now that we have a generic library function for this, replace the
open-coded instance.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: <zajec5@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 years agoARM: 8485/1: cpuidle: remove cpu parameter from the cpuidle_ops suspend hook
Lorenzo Pieralisi [Thu, 17 Dec 2015 10:22:45 +0000 (11:22 +0100)]
ARM: 8485/1: cpuidle: remove cpu parameter from the cpuidle_ops suspend hook

The suspend() hook in the cpuidle_ops struct is always called on
the cpu entering idle, which means that the cpu parameter passed
to the suspend hook always corresponds to the local cpu, making
it somewhat redundant.

This patch removes the logical cpu parameter from the ARM
cpuidle_ops.suspend hook and updates all the existing kernel
implementations to reflect this change.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Lina Iyer <lina.iyer@linaro.org>
Tested-by: Lina Iyer <lina.iyer@linaro.org>
Tested-by: Jisheng Zhang <jszhang@marvell.com> [psci]
Cc: Lina Iyer <lina.iyer@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
7 years agosoc: qcom: smd-rpm: Add existing platform support
Andy Gross [Thu, 24 Sep 2015 19:18:51 +0000 (14:18 -0500)]
soc: qcom: smd-rpm: Add existing platform support

This patch adds support for all current Qualcomm platforms which utilize
RPM over SMD.  This includes both MSM8916 and APQ8084.

Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agosoc: qcom: Introduce WCNSS_CTRL SMD client
Bjorn Andersson [Mon, 21 Sep 2015 17:52:55 +0000 (10:52 -0700)]
soc: qcom: Introduce WCNSS_CTRL SMD client

The WCNSS_CTRL SMD client is used for among other things upload nv
firmware to a newly booted WCNSS chip.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agoARM: qcom: select ARM_CPU_SUSPEND for power management
Arnd Bergmann [Tue, 24 Nov 2015 22:13:09 +0000 (23:13 +0100)]
ARM: qcom: select ARM_CPU_SUSPEND for power management

The qcom spm driver uses cpu_resume_arm(), which is not included
in the kernel in all configurations:

drivers/built-in.o: In function `qcom_cpu_spc':
:(.text+0xbc022): undefined reference to `cpu_suspend'
drivers/built-in.o: In function `qcom_cpuidle_init':
:(.init.text+0x610c): undefined reference to `cpu_resume_arm'

This adds a 'select' Kconfig statement to ensure it's always
enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agosoc: qcom: enable smsm/smp2p modular build
Arnd Bergmann [Fri, 20 Nov 2015 10:32:21 +0000 (11:32 +0100)]
soc: qcom: enable smsm/smp2p modular build

The newly added smp2p and smsm drivers cannot be loadable modules
but depend on smem, which can be, and that causes a link error:

drivers/built-in.o: In function `qcom_smp2p_intr':
:(.text+0xa6e68): undefined reference to `qcom_smem_get'
drivers/built-in.o: In function `qcom_smp2p_probe':
:(.text+0xa7320): undefined reference to `qcom_smem_alloc'
:(.text+0xa736c): undefined reference to `qcom_smem_get'
drivers/built-in.o: In function `qcom_smsm_probe':
:(.text+0xa7b34): undefined reference to `qcom_smem_get'

This marks all the drivers as 'tristate' to make the Kconfig
dependency resolution work properly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: dbb04bd7122f ("soc: qcom: smp2p: Qualcomm Shared Memory Point to Point")
Fixes: d7387fc6add4 ("soc: qcom: smsm: Add driver for Qualcomm SMSM")
Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agosoc: qcom: smp2p: Qualcomm Shared Memory Point to Point
Bjorn Andersson [Fri, 25 Sep 2015 01:25:03 +0000 (18:25 -0700)]
soc: qcom: smp2p: Qualcomm Shared Memory Point to Point

Introduce the Qualcomm Shard Memory Point to Point driver.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agosoc: qcom: smsm: Add driver for Qualcomm SMSM
Bjorn Andersson [Fri, 25 Sep 2015 01:25:02 +0000 (18:25 -0700)]
soc: qcom: smsm: Add driver for Qualcomm SMSM

This driver exposed the Qualcomm Shared Memory State Machine bits.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agosoc: qcom: Introduce common SMEM state machine code
Bjorn Andersson [Fri, 25 Sep 2015 01:25:01 +0000 (18:25 -0700)]
soc: qcom: Introduce common SMEM state machine code

This implements a common API for handling and exposing SMP2P and SMSM
state information.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
7 years agommc: sdhci-msm: Add SDHCI_QUIRK_NO_CARD_NO_RESET
Ivan T. Ivanov [Mon, 8 Jun 2015 11:49:55 +0000 (14:49 +0300)]
mmc: sdhci-msm: Add SDHCI_QUIRK_NO_CARD_NO_RESET

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
7 years agommc: sdhci: let GPIO based card detection have higher precedence
Ivan T. Ivanov [Mon, 8 Jun 2015 07:22:08 +0000 (10:22 +0300)]
mmc: sdhci: let GPIO based card detection have higher precedence

Controller could have BROKEN_CARD_DETECTION quirk set, but drivers
could use GPIO to detect card present state. Let, when defined, GPIO
take precedence, so drivers could properly detect card state and not
use polling.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
7 years agodrm/msm/mdp5: Update bus scaling support
Archit Taneja [Thu, 10 Dec 2015 10:54:51 +0000 (16:24 +0530)]
drm/msm/mdp5: Update bus scaling support

Modify mdp5_encoder and mdp5_cmd_encoder such that they adapt to the
latest bus scaling API and get bus scale tables via DT.

Replace DOWNSTREAM_CONFIG_MSM_BUS_SCALING with CONFIG_MSM_BUS_SCALING so
that the bus scaling code is used.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
7 years agodrm/msm/dsi: Update the "vdd" voltage range
Archit Taneja [Thu, 10 Dec 2015 05:19:31 +0000 (10:49 +0530)]
drm/msm/dsi: Update the "vdd" voltage range

The min and max voltage levels for the VDD input to DSI were initially set
to 2.85V (as suggested by the spec).

We have a platform (db410c) where the same regulator supply is also needed
by another consumer at a higher voltage. Bump up the max voltage level to
3.3V. No regressions are seen with this.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
7 years agodrm/msm: remove pm_runtime_put() calls
Archit Taneja [Wed, 8 Apr 2015 10:38:44 +0000 (16:08 +0530)]
drm/msm: remove pm_runtime_put() calls

The drm msm driver isn't pm_runtime adapted yet. Since gdsc is now associated
with pm_runtime, we need to make sure we don't do a pm_runtime_put() when we
are using the hardware.

This can be removed after pm_runtime adaptation.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Conflicts:
drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c

7 years agomdp4: Add iommu detach_dev in error path
Sricharan R [Tue, 11 Aug 2015 06:41:35 +0000 (12:11 +0530)]
mdp4: Add iommu detach_dev in error path

attach_dev gets called and on a error the detach_dev
should be called correspondingly.

Signed-off-by: Sricharan R <sricharan@codeaurora.org>
7 years agoHACK: drm/msm/mdp5: Make sure mdp5 clocks aren't disbaled when we need them
Archit Taneja [Fri, 4 Sep 2015 07:07:02 +0000 (12:37 +0530)]
HACK: drm/msm/mdp5: Make sure mdp5 clocks aren't disbaled when we need them

mdp5_hw_init configures registers but may not have clocks enabled. Add
calls to enable/disable clocks in this func.

Comment out a mdp5_disable() call in mdp5_kms_init. For now, this makes
sure we have clocks all the time. This will be removed when runtime
pm is added, and we identify all paths where we risk clocks being
disabled when they shouldn't.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
7 years agodrm/msm/dsi: Don't call hpd helper unconditionally
Archit Taneja [Mon, 7 Sep 2015 08:04:15 +0000 (13:34 +0530)]
drm/msm/dsi: Don't call hpd helper unconditionally

Currently, msm dsi_host's attach/detach ops call drm_helper_hpd_irq_event
unconditionally. Calling it makes sense if we have a drm_panel
connected (in this case, we created the connector), but not when we have
a bridge chip connected. For bridges, the driver (or someone else in the
encoder chain) should call the hpd handler.

Call it in the attach/detach ops only if we're connected to a panel.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
7 years agodrm/msm/dsi: Remove incorrect warning on host attach
Archit Taneja [Mon, 7 Sep 2015 08:15:42 +0000 (13:45 +0530)]
drm/msm/dsi: Remove incorrect warning on host attach

With the implementation of of_graph parsing, it isn't any longer
necessary for msm_host->device node to be same as dsi->dev.of_node. This
only holds true when the connected device is also a child of the dsi_host.

In the case of external bridge chips belonging to a different control
bus, these are guaranteed to be different.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
7 years agodrm/msm/dsi: Add a delay when performing software reset
Hai Li [Wed, 1 Jul 2015 10:39:40 +0000 (16:09 +0530)]
drm/msm/dsi: Add a delay when performing software reset

Signed-off-by: Hai Li <hali@codeaurora.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
7 years agodrm/msm/dsi: Parse lane swap information from DT
Hai Li [Thu, 3 Sep 2015 18:30:49 +0000 (14:30 -0400)]
drm/msm/dsi: Parse lane swap information from DT

Lane swap configuration is based on the board design.
This change allows the DSI host to get this information
from device tree, instead of hardcoding in driver.

Signed-off-by: Hai Li <hali@codeaurora.org>
7 years agoi2c: qup: Remove verbose messages.
Srinivas Kandagatla [Wed, 9 Dec 2015 10:42:27 +0000 (10:42 +0000)]
i2c: qup: Remove verbose messages.

This patch moves some of the dev_err messages to dev_dgb as these are
very normal messages, nothing unusual. Without this patch the messages
on console are very distracting when we run programs like i2cdetect.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoi2c: qup: Add bam dma capabilities
Sricharan R [Mon, 18 May 2015 14:40:55 +0000 (20:10 +0530)]
i2c: qup: Add bam dma capabilities

QUP cores can be attached to a BAM module, which acts as a dma engine for the
QUP core. When DMA with BAM is enabled, the BAM consumer pipe transmitted data
is written to the output FIFO and the BAM producer pipe received data is read
from the input FIFO.

With BAM capabilities, qup-i2c core can transfer more than 256 bytes, without a
'stop' which is not possible otherwise.

Signed-off-by: Sricharan R <sricharan@codeaurora.org>
7 years agoi2c: qup: Transfer each i2c_msg in i2c_msgs without a stop bit
Sricharan R [Mon, 18 May 2015 11:40:05 +0000 (17:10 +0530)]
i2c: qup: Transfer each i2c_msg in i2c_msgs without a stop bit

The definition of i2c_msg says that

"If this is the last message in a group, it is followed by a STOP.
Otherwise it is followed by the next @i2c_msg transaction segment,
beginning with a (repeated) START"

So the expectation is that there is no 'STOP' bit inbetween individual
i2c_msg segments with repeated 'START'. The QUP i2c hardware has no way
to inform that there should not be a 'STOP' at the end of transaction.
The only way to implement this is to coalesce all the i2c_msg in i2c_msgs
in to one transaction and transfer them. Adding the support for the same.

This is required for some clients like touchscreen which keeps
incrementing counts across individual transfers and 'STOP' bit inbetween
resets the counter, which is not required.

This patch adds the support in non-dma mode.

Signed-off-by: Sricharan R <sricharan@codeaurora.org>
7 years agoi2c: qup: Add V2 tags support
Sricharan R [Mon, 18 May 2015 10:31:36 +0000 (16:01 +0530)]
i2c: qup: Add V2 tags support

QUP from version 2.1.1 onwards, supports a new format of
i2c command tags. Tag codes instructs the controller to
perform a operation like read/write. This new tagging version
supports bam dma and transfers of more than 256 bytes without 'stop'
in between. Adding the support for the same.

For each block a data_write/read tag and data_len tag is added to
the output fifo. For the final block of data write_stop/read_stop
tag is used.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
7 years agoqup: i2c: factor out common code for reuse
Sricharan R [Mon, 18 May 2015 09:23:08 +0000 (14:53 +0530)]
qup: i2c: factor out common code for reuse

The qup_i2c_write/read_one functions can be split to have
the common initialization code and function to loop around
the data bytes separately. This way the initialization code
can be reused while adding v2 tags functionality.

Signed-off-by: Sricharan R <sricharan@codeaurora.org>
7 years agoi2c: qup: Change qup_wait_writeready function to use for all timeouts
Sricharan R [Thu, 12 Mar 2015 09:15:19 +0000 (14:45 +0530)]
i2c: qup: Change qup_wait_writeready function to use for all timeouts

qup_wait_writeready waits only on a output fifo empty event.
Change the same function to accept the event and data length
to wait as parameters. This way the same function can be used for
timeouts in otherplaces as well.

Signed-off-by: Sricharan R <sricharan@codeaurora.org>
7 years agocoresight-etm3x: Add Qualcomm PTM v1.1 peripheral ID
Ivan T. Ivanov [Fri, 31 Jul 2015 15:37:22 +0000 (09:37 -0600)]
coresight-etm3x: Add Qualcomm PTM v1.1 peripheral ID

Add Qualcomm's PTM v1.1 peripheral ID to supported devices.
This device could be found at least in MSM8974 and APQ8064
chipsets.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoamba: Defer device peripheral ID read
Ivan T. Ivanov [Fri, 15 May 2015 08:07:00 +0000 (11:07 +0300)]
amba: Defer device peripheral ID read

To be able to read peripheral ID during device create time
bus code have turn on device interface clock, but this
clock could be unavailable at this time. Fix this by defer
device ID read until driver match time.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agothermal: qcom: tsens-8960: Add support for 8960 family of SoCs
Rajendra Nayak [Fri, 9 Oct 2015 09:41:06 +0000 (15:11 +0530)]
thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

8960 family of SoCs have the TSENS device as part of GCC, hence
the driver probes the virtual child device created by GCC and
uses the parent to extract all DT properties and reuses the GCC
regmap.

Also GCC/TSENS are part of a  domain thats not always ON.
Hence add .suspend and .resume hooks to save and restore some of
the inited register context.

Also 8960 family have some of the TSENS init sequence thats
required to be done by the HLOS driver (some later versions of TSENS
do not export these registers to non-secure world, and hence need
these initializations to be done by secure bootloaders)

8660 from the same family has just one sensor and hence some register
offset/layout differences which need special handling in the driver.

Based on the original code from Siddartha Mohanadoss, Stephen Boyd and
Narendran Rajan.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
7 years agothermal: qcom: tsens-8974: Add support for 8974 family of SoCs
Rajendra Nayak [Fri, 9 Oct 2015 09:41:05 +0000 (15:11 +0530)]
thermal: qcom: tsens-8974: Add support for 8974 family of SoCs

Add .calibrate support for 8974 family as part of tsens_ops.

Based on the original code by Siddartha Mohanadoss and Stephen Boyd.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
7 years agothermal: qcom: tsens-8916: Add support for 8916 family of SoCs
Rajendra Nayak [Fri, 9 Oct 2015 09:41:04 +0000 (15:11 +0530)]
thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

Add support to calibrate sensors on 8916 family and also add common
functions to read temperature from sensors (This can be reused on
other SoCs having similar TSENS device)
The calibration data is read from eeprom using the generic nvmem
framework apis.

Based on the original code by Siddartha Mohanadoss and Stephen Boyd.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
7 years agothermal: qcom: tsens: Add a skeletal TSENS drivers
Rajendra Nayak [Fri, 9 Oct 2015 09:41:03 +0000 (15:11 +0530)]
thermal: qcom: tsens: Add a skeletal TSENS drivers

TSENS is Qualcomms' thermal temperature sensor device. It
supports reading temperatures from multiple thermal sensors
present on various QCOM SoCs.
Calibration data is generally read from a non-volatile memory
(eeprom) device.

Add a skeleton driver with all the necessary abstractions so
a variety of qcom device families which support TSENS can
add driver extensions.

Also add the required device tree bindings which can be used
to describe the TSENS device in DT.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Reviewed-by: Lina Iyer <lina.iyer@linaro.org>
7 years agoclk:gcc-msm8916: add missing mss_q6_bimc_axi clock
Srinivas Kandagatla [Tue, 24 Nov 2015 16:54:31 +0000 (16:54 +0000)]
clk:gcc-msm8916: add missing mss_q6_bimc_axi clock

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agosoc: qcom: Add support for SAW2 regulators
Georgi Djakov [Tue, 11 Aug 2015 13:35:59 +0000 (16:35 +0300)]
soc: qcom: Add support for SAW2 regulators

The SAW2 (Subsystem Power Manager and Adaptive Voltage Scalling Wrapper)
is part of the SPM subsystem. It is a hardware block in the Qualcomm
chipsets that regulates the power to the cores.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agoclk: qcom: Add A53 clock driver
Georgi Djakov [Thu, 19 Mar 2015 07:28:37 +0000 (09:28 +0200)]
clk: qcom: Add A53 clock driver

Add a driver for the A53 subsystem PLL, so that we can provide higher
frequency clocks for use by the system.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>