Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 733dbd6e authored by Osvaldo Banuelos's avatar Osvaldo Banuelos Committed by Matt Wagantall
Browse files

power: qcom: Add Array Power Mux driver



Introduce a driver to interface with the APM controller which
is responsible for selecting the power rail sourcing the CPU and
cache memory arrays. Support an API that performs the programming
steps to switch the rail powering these arrays in order to fulfill
the SRAM Vmin requirement across different performance levels.

Change-Id: I7659c00b68c5cc61653c84cb14a30a8ef3c29cca
Signed-off-by: default avatarOsvaldo Banuelos <osvaldob@codeaurora.org>
[abhimany: enable compilation of qcom power dirvers and
resolve trivial merge conflicts]
Signed-off-by: default avatarAbhimanyu Kapur <abhimany@codeaurora.org>
parent 18faa3da
Loading
Loading
Loading
Loading
+51 −0
Original line number Diff line number Diff line
MSM Array Power Mux (msm-apm)

In some MSM designs, the CPU and caches contain logic which can be powered by
multiple rails. The APM controller exists to enable the selection of the power
rail supplying these arrays. Since a given supply may drop below the array
SRAM minimum operating voltage, the APM controller can be used to request a
switch to a power supply that will guarantee logic state retention.

Required properties
- compatible:	"qcom,msm-apm"
- reg:		Specifies physical base address and size of memory mapped regions
		containing the APM controller, APCS CSR, APC PLL controller, and
		SPM event registers.
- reg-names:	List of strings identifying the reg property entries. This list must
		contain: "pm-apcc-glb", "apcs-csr", "apc0-pll-ctl", "apc1-pll-ctl",
		"apc0-cpu0-spm", "apc0-cpu1-spm", "apc1-cpu0-spm", "apc1-cpu1-spm",
		"apc0-l2-spm", and "apc1-l2-spm".

MSM APM Users

Required properties:
- qcom,apm-ctrl:		phandle of APM controller device node

Example:
	apc_apm: apm@099e0000 {
		compatible = "qcom,msm-apm";
		reg = <0x099e0000 0x1000>,
			<0x09820000 0x10000>,
			<0x06400050 0x8>,
			<0x06480050 0x8>,
			<0x09981068 0x8>,
			<0x09991068 0x8>,
			<0x099b1068 0x8>,
			<0x099c1068 0x8>,
			<0x099a1068 0x8>,
			<0x099d1068 0x8>;
		reg-names = "pm-apcc-glb",
				"apcs-csr",
				"apc0-pll-ctl",
				"apc1-pll-ctl",
				"apc0-cpu0-spm",
				"apc0-cpu1-spm",
				"apc1-cpu0-spm",
				"apc1-cpu1-spm",
				"apc0-l2-spm",
				"apc1-l2-spm";

	foo_user {
		...
		qcom,apm-ctrl = <&apc_apm>;
	};
+1 −0
Original line number Diff line number Diff line
@@ -402,3 +402,4 @@ source "drivers/power/reset/Kconfig"
endif # POWER_SUPPLY

source "drivers/power/avs/Kconfig"
source "drivers/power/qcom/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -59,3 +59,4 @@ obj-$(CONFIG_POWER_AVS) += avs/
obj-$(CONFIG_CHARGER_SMB347)	+= smb347-charger.o
obj-$(CONFIG_CHARGER_TPS65090)	+= tps65090-charger.o
obj-$(CONFIG_POWER_RESET)	+= reset/
obj-$(CONFIG_ARCH_MSM)		+= qcom/
+7 −0
Original line number Diff line number Diff line
config MSM_APM
       bool "Qualcomm Technologies Inc platform specific APM driver"
       help
	Platform specific driver to manage the power source of
	memory arrays. Interfaces with regulator drivers to ensure
	SRAM Vmin requirements are met across different performance
	levels.
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_MSM_APM)		+= apm.o
Loading