mfd: qcom-rpm: Expose sleep state resources to clients

Resources exposed from the RPM have an "active state" that is used during
normal operations and a "sleep state" that is used for HW assisted sleep
modes. Expose this in the api to let client drivers set the "sleep
state" as well.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
ARM: dts: sony-lagan: RPM regulator updates

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
regulator: qcom-rpm: Implement RPM assisted disable

Some regulators are used to power e.g. PLLs that clocks the core we're
running on, so we can't turn them off directly; but we do want them off
when the core is powered down. To handle this the Qualcomm SoC provides
a means to specify a "sleep state" for RPM resources that can be
triggered by the hardware when the cores are brought down.

Resources of this type should be considered always-on while the CPU(s)
are running and we can utilize the "sleep state" functionality to defer
disabling them until the CPU(s) go to sleep, if not used by other
peripherals at that time.

Other properties are kept in sync between the states, so that if the
CPU(s) go to sleep with a particular regulator still enabled there will
be no change.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
regulator: qcom-rpm: Add pm8921_ln_ldo regulator type

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
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>
net: wireless: ath: wcn36xx: Move setup code to wcnss_ctrl

The setup code should not be part of the wcn36xx driver but rather the
wcnss_ctrl driver, as it relates to the combo chip and not just the wifi
core.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
soc: qcom: Implement wcnss_ctrl driver

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
ARM: dts: sony-rhine: Update tcsr node to match v5

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
ARM: dts: sony-rhine: Split wcnss_ctrl into own driver

Adjust the memory regions to give the wcnss_ctrl driver access to PMU
and SPARE regions of the wcnss block.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
ARM: dts: sony-rhine: Add adsp rproc and smd nodes

Add the necessary node to load and boot the adsp firmware and a stub
node for the smd edge to this subsystem.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
ARM: defconfig: sony: Add wcnss_ctrl and update remoteproc

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
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>
hwspinlock: qcom: Add support for Qualcomm HW Mutex block

Add driver for Qualcomm Hardware Mutex block that exists on newer
Qualcomm SoCs.

Cc: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Eric Holmberg <eholmber@codeaurora.org>
Cc: Courtney Cavin <courtney.cavin@sonymobile.com>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
[bjorn: added pm_runtime calls, from Courtney,
	added sfpb-mutex compatible,
	updated DT binding documentation formatting,
	replaced msm prefix with qcom,
	cleaned up includes]
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
ARM: dts: sony-rhine: Reflect changes in qcom,tz-pil

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Merge branch 'drivers/msm_rpm'
soc: qcom: Add device tree binding for SMEM

Add device tree binding documentation for the Qualcom Shared Memory
manager.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
soc: qcom: Add device tree binding for SMD

Add device tree binding documentation for the Qualcomm Shared Memory
Device.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
mfd: devicetree: bindings: Add Qualcomm SMD based RPM DT binding

Add binding documentation for the Qualcomm Resource Power Manager (RPM)
using shared memory (Qualcomm SMD) as transport mechanism. This is found
in 8974 and newer based devices.

The binding currently describes the rpm itself and the regulator
subnodes.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
soc: qcom: Add Shared Memory Manager driver

The Shared Memory Manager driver implements an interface for allocating
and accessing items in the memory area shared among all of the
processors in a Qualcomm platform.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
soc: qcom: Add Shared Memory Driver

This adds the Qualcomm Shared Memory Driver (SMD) providing
communication channels to remote processors, ontop of SMEM.

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