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

Commit 87a47c4a authored by Saravana Kannan's avatar Saravana Kannan
Browse files

PM / devfreq: Make the CPUBW voting device driver to be more generic



Making the driver more generic would allow it to be reused for voting for
BW requirements of other devices like GPU, etc.

Instead of cpubw and qcom,cpubw, the driver and the device are now called
devbw and qcom,devbw respectively.

Change-Id: I49e5a5ba6d46517da19d013413abd471a730af29
Signed-off-by: default avatarSaravana Kannan <skannan@codeaurora.org>
parent d8b46e28
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
MSM CPU bandwidth device

cpubw is a device that represents the CPU subsystem master ports in a MSM SoC
and the related info that is needed to make CPU to DDR bandwidth votes.

Required properties:
- compatible:		Must be "qcom,cpubw"
- qcom,cpu-mem-ports:	A list of tuples where each tuple consists of a bus
			master (CPU subsystem) port number and a bus slave
			(memory) port number.
- qcom,bw-tbl:		A list of meaningful instantaneous bandwidth values
			(in MB/s) that can be requested from the CPU
			subsystem to DDR. The list of values depend on the
			supported DDR frequencies and the bus widths.

Example:

	qcom,cpubw {
		compatible = "qcom,cpubw";
		qcom,cpu-mem-ports = <1 512>, <2 512>;
		qcom,bw-tbl =
			<  572 /*  75 MHz */ >,
			< 1144 /* 150 MHz */ >,
			< 1525 /* 200 MHz */ >,
			< 2342 /* 307 MHz */ >,
			< 3509 /* 460 MHz */ >,
			< 4684 /* 614 MHz */ >,
			< 6103 /* 800 MHz */ >,
			< 7102 /* 931 MHz */ >;
	};
+39 −0
Original line number Diff line number Diff line
MSM device bandwidth device

devbw is a device that represents a MSM device's BW requirements from its
master port(s) to a different device's slave port(s) in a MSM SoC. This
device is typically used to vote for BW requirements from a device's (Eg:
CPU, GPU) master port(s) to the slave (Eg: DDR) port(s).

Required properties:
- compatible:		Must be "qcom,devbw"
- qcom,src-dst-ports:	A list of tuples where each tuple consists of a bus
			master port number and a bus slave port number.
- qcom,bw-tbl:		A list of meaningful instantaneous bandwidth values
			(in MB/s) that can be requested from the device
			master port to the slave port. The list of values
			depend on the supported bus/slave frequencies and the
			bus width.

Optional properties:
- qcom,active-only:	Indicates that the bandwidth votes need to be
			enforced only when the CPU subsystem is active.
- governor:		Initial governor to use for the device.
			Default: "performance"

Example:

	qcom,cpubw {
		compatible = "qcom,devbw";
		qcom,src-dst-ports = <1 512>, <2 512>;
		qcom,active-only;
		qcom,bw-tbl =
			<  572 /*  75 MHz */ >,
			< 1144 /* 150 MHz */ >,
			< 1525 /* 200 MHz */ >,
			< 2342 /* 307 MHz */ >,
			< 3509 /* 460 MHz */ >,
			< 4684 /* 614 MHz */ >,
			< 6103 /* 800 MHz */ >,
			< 7102 /* 931 MHz */ >;
	};
+4 −2
Original line number Diff line number Diff line
@@ -4158,8 +4158,10 @@
	};

	cpubw: qcom,cpubw {
		compatible = "qcom,cpubw";
		qcom,cpu-mem-ports = <1 512>;
		compatible = "qcom,devbw";
		governor = "cpufreq";
		qcom,src-dst-ports = <1 512>;
		qcom,active-only;
		qcom,bw-tbl =
			<   762 /*   50 MHz */ >,
			<  1144 /*   75 MHz */ >,
+4 −2
Original line number Diff line number Diff line
@@ -693,8 +693,10 @@
	};

	cpubw: qcom,cpubw {
		compatible = "qcom,cpubw";
		qcom,cpu-mem-ports = <1 512>, <2 512>;
		compatible = "qcom,devbw";
		governor = "cpufreq";
		qcom,src-dst-ports = <1 512>, <2 512>;
		qcom,active-only;
		qcom,bw-tbl =
			<  572 /*  75 MHz */ >,
			< 1144 /* 150 MHz */ >,
+4 −2
Original line number Diff line number Diff line
@@ -758,8 +758,10 @@
	};

	cpubw: qcom,cpubw {
		compatible = "qcom,cpubw";
		qcom,cpu-mem-ports = <1 512>;
		compatible = "qcom,devbw";
		governor = "cpufreq";
		qcom,src-dst-ports = <1 512>;
		qcom,active-only;
		qcom,bw-tbl =
			< 1266 /* 166 MHz */ >,
			< 2540 /* 333 MHz */ >,
Loading