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

Commit a449177e authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "regulator: Add snapshot of MSM GFX LDO driver"

parents ff22fe54 4b9943dc
Loading
Loading
Loading
Loading
+148 −0
Original line number Diff line number Diff line
Qualcomm Technologies, Inc. GFX LDO for Graphics

The GPU core on MSM 8953 can be powered by an internal (on-die)
MSM LDO or BHS based on its operating corner.

This document describes the bindings that apply for the GFX LDO regulator.

- compatible
	Usage:      required
	Value type: <string>
	Definition: should be "qcom,msm8953-gfx-ldo" for MSM8953 and
		    "qcom,sdm660-gfx-ldo" for SDM660

- reg
	Usage:      required
	Value type: <prop-encoded-array>
	Definition: Addresses and sizes for the memory of the GFX ldo

- reg-names
	Usage:      required
	Value type: <stringlist>
	Definition: Address names. "ldo_addr", "efuse_addr". Must be
		    specified in the same order as the corresponding addresses
		    are specified in the reg property.

- regulator-name
	Usage:      required
	Value type: <string>
	Definition: A string used to describe the regulator.

- regulator-min-microvolt
	Usage:      required
	Value type: <u32>
	Definition: Minimum corner value which should be 1 to represent the
		    lowest supported corner.

- regulator-max-microvolt
	Usage:      required
	Value type: <u32>
	Definition: Maximum corner value which should be equal to qcom,num-corners.

- qcom,num-corners
	Usage:      required
	Value type: <u32>
	Definition: Number of voltage corners present. Many other
		    properties are sized based upon this value.

- qcom,num-ldo-corners
	Usage:      required
	Value type: <u32>
	Definition: Number of voltage corners defined for the ldo. It is a
		    subset of qcom,num-corners (i.e. 1 to qcom,num-ldo-corners
		    are the corners for ldo operation)

- qcom,init-corner
	Usage:      required
	Value type: <u32>
	Definition: The initial-corner at which the GFX rail is powered on.

- qcom,ldo-enable-corner-map
	Usage:      required
	Value type: <prop-encoded-array>
	Definition: Integer values ( / 0) which indicate the GFX corners in which
		    ldo is to enabled. The length of this property
		    should be equal to qcom,num-corners.

- qcom,ldo-voltage-ceiling
	Usage:      required
	Value type: <prop-encoded-array>
	Definition: Array of ceiling voltages in microvolts for voltage corners
		    ordered from lowest voltage corner to highest voltage corner.
		    This property must be of length defined by qcom,num-ldo-corners.

- qcom,ldo-voltage-floor
	Usage:      required
	Value type: <prop-encoded-array>
	Definition: Array of floor voltages in microvolts for voltage corners
		    ordered from lowest voltage corner to highest voltage corner.
		    This property must be of length defined by qcom,num-ldo-corners.

- vdd-cx-supply
	Usage:      optional
	Value type: <phandle>
	Definition: Parent regulator supply to the ldo.

- qcom,vdd-cx-corner-map
	Usage:      required if vdd-cx-supply is specified.
	Value type: <prop-encoded-array>
	Definition: Array of integers which define the mapping of the VDD_CX corner
		    to the corresponding GFX voltage corner. The elements in
		    the array are ordered from lowest voltage corner to highest
		    voltage corner.  The length of this property must be equal to
		    the value defined by qcom,num-corners.
- mem-acc-supply
	Usage:      optional
	Value type: <phandle>
	Definition: Regulator to vote for the memory accelerator configuration.
		    Not Present: memory accelerator configuration not supported.

- qcom,mem-acc-corner-map:
	Usage:      optional
	Value type: <prop-encoded-aray>
	Definition: Array of integer which defines the mapping from mem-acc
		    corner value for each gfx corner. The elements in the array
		    are ordered from lowest voltage corner to highest voltage corner.

- qcom,ldo-init-voltage-adjustment
	Usage:      optional
	Value type: <prop-encoded-aray>
	Definition: Array of voltages in microvolts which indicate the static
		    adjustment to be applied to the open-loop voltages for the
		    LDO supported corners. The length of this property must be
		    equal to qcom,num-ldo-corners.

=======
Example
=======

	gfx_vreg_corner: ldo@0185f000 {
		compatible = "qcom,msm8953-gfx-ldo";
		reg = <0x0185f000 0x30>, <0xa0000 0x1000>;
		reg-names = "ldo_addr", "efuse_addr";

		regulator-name = "msm_gfx_ldo";
		regulator-min-microvolt = <1>;
		regulator-max-microvolt = <7>;

		qcom,ldo-voltage-ceiling = <500000 700000 900000>;
		qcom,ldo-voltage-floor = <400000 600000 800000>;

		qcom,num-corners = <7>;
		qcom,num-ldo-corners = <3>;
		qcom,ldo-enable-corner-map = <1 1 1 0 0 0 0>;
		qcom,init-corner = <5>;

		vdd-cx-supply = <&pm8953_s2_level>;
		qcom,vdd-cx-corner-map = <RPM_SMD_REGULATOR_LEVEL_LOW_SVS>,
					<RPM_SMD_REGULATOR_LEVEL_LOW_SVS>,
					<RPM_SMD_REGULATOR_LEVEL_LOW_SVS>,
					<RPM_SMD_REGULATOR_LEVEL_SVS>,
					<RPM_SMD_REGULATOR_LEVEL_NOM>,
					<RPM_SMD_REGULATOR_LEVEL_NOM_PLUS>,
					<RPM_SMD_REGULATOR_LEVEL_TURBO>;

		mem-acc-supply = <&gfx_mem_acc>;
		qcom,mem-acc-corner-map = <1 1 2 2 2 2 2>;
		qcom,ldo-init-voltage-adjustment = <10000 20000 30000>;
	};
+73 −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", "qcom,msm8996pro-apm", "qcom,msm8953-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".

Optional properties
- qcom,clock-source-override:	Specify this property to request a switch of the APC0 and APC1
				clock sources to GPLL0 before the APM switch begins and to
				switch back to the original clock source after the APM switch
				completes.
- qcom,apm-post-halt-delay:	The APM controller post halt delay counter value that SW needs
				to program one time before starting the APM HW controller for
				msm8953 target.
- qcom,apm-halt-clk-delay:	The APM controller halt clock delay counter value that SW
				needs to program one time before starting the APM HW controller
				for msm8953 target.
- qcom,apm-resume-clk-delay:	The APM controller resume clock delay counter value that SW
				needs to program one time before starting the APM HW controller
				for msm8953 target.
- qcom,apm-sel-switch-delay:	The APM controller switch selection delay counter value that SW
				needs to program one time before starting the APM HW controller
				for msm8953 target.

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";
		qcom,apm-post-halt-delay = <0x2>;
		qcom,apm-halt-clk-delay = <0x11>;
		qcom,apm-resume-clk-delay = <0x10>;
		qcom,apm-sel-switch-delay = <0x01>;

	foo_user {
		...
		qcom,apm-ctrl = <&apc_apm>;
	};
+10 −0
Original line number Diff line number Diff line
@@ -1042,6 +1042,16 @@ config REGULATOR_REFGEN
	  it used by various PHY blocks found inside of the SoC.  It supports
	  enable/disable control.

config REGULATOR_MSM_GFX_LDO
	tristate "MSM GFX LDO Regulator"
	depends on OF
	help
	  This driver supports the MSM GFX (Graphics) LDO regulator. The
	  GFU core is either powered by an internal MSM LDO or by BHS.
	  Typically the lower voltage corners are powered by LDO and
	  the higher ones by BHS. This driver allows for configuration of
	  the rail between the LDO/BHS as well as the LDO voltage.

config REGULATOR_RPMH
	tristate "Qualcomm Technologies, Inc. RPMh regulator driver"
	depends on OF
+1 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
obj-$(CONFIG_REGULATOR_CPR) += cpr-regulator.o
obj-$(CONFIG_REGULATOR_MEM_ACC) += mem-acc-regulator.o
obj-$(CONFIG_REGULATOR_MSM_GFX_LDO) += msm_gfx_ldo.o
obj-$(CONFIG_REGULATOR_REFGEN) += refgen.o
obj-$(CONFIG_REGULATOR_RPM_SMD) += rpm-smd-regulator.o
obj-$(CONFIG_REGULATOR_SPM) += spm-regulator.o
+1652 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading