All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lina Iyer <lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org,
	msivasub-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Lina Iyer <lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: [PATCH v15 03/11] ARM: cpuidle: qcom: Add documentation for qcom cpuidle states.
Date: Mon,  9 Mar 2015 09:16:38 -0600	[thread overview]
Message-ID: <1425914206-22295-4-git-send-email-lina.iyer@linaro.org> (raw)
In-Reply-To: <1425914206-22295-1-git-send-email-lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Add documentation for cpuidle states of QCOM cpus. In addition to
arm-idle-state compatible string, the ARM idle state definition must
define one of the following compatible strings -
	"qcom,idle-state-stby",
	"qcom,idle-state-ret",
	"qcom,idle-state-spc",
	"qcom,idle-state-pc",

The compatibles helps the SPM platform driver to use the correct idle
function when the index to the idle state is passed to the platform
driver.

Signed-off-by: Lina Iyer <lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 .../bindings/arm/msm/qcom,idle-state.txt           | 81 ++++++++++++++++++++++
 1 file changed, 81 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,idle-state.txt

diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,idle-state.txt b/Documentation/devicetree/bindings/arm/msm/qcom,idle-state.txt
new file mode 100644
index 0000000..ae1b07f
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/msm/qcom,idle-state.txt
@@ -0,0 +1,81 @@
+QCOM Idle States for cpuidle driver
+
+ARM provides idle-state node to define the cpuidle states, as defined in [1].
+cpuidle-qcom is the cpuidle driver for Qualcomm SoCs and uses these idle
+states. Idle states have different enter/exit latency and residency values.
+The idle states supported by the QCOM SoC are defined as -
+
+    * Standby
+    * Retention
+    * Standalone Power Collapse (Standalone PC or SPC)
+    * Power Collapse (PC)
+
+Standby: Standby does a little more in addition to architectural clock gating.
+When the WFI instruction is executed the ARM core would gate its internal
+clocks. In addition to gating the clocks, QCOM cpus use this instruction as a
+trigger to execute the SPM state machine. The SPM state machine waits for the
+interrupt to trigger the core back in to active. This triggers the cache
+hierarchy to enter standby states, when all cpus are idle. An interrupt brings
+the SPM state machine out of its wait, the next step is to ensure that the
+cache hierarchy is also out of standby, and then the cpu is allowed to resume
+execution.
+
+Retention: Retention is a low power state where the core is clock gated and
+the memory and the registers associated with the core are retained. The
+voltage may be reduced to the minimum value needed to keep the processor
+registers active. The SPM should be configured to execute the retention
+sequence and would wait for interrupt, before restoring the cpu to execution
+state. Retention may have a slightly higher latency than Standby.
+
+Standalone PC: A cpu can power down and warmboot if there is a sufficient time
+between the time it enters idle and the next known wake up. SPC mode is used
+to indicate a core entering a power down state without consulting any other
+cpu or the system resources. This helps save power only on that core.  The SPM
+sequence for this idle state is programmed to power down the supply to the
+core, wait for the interrupt, restore power to the core, and ensure the
+system state including cache hierarchy is ready before allowing core to
+resume. Applying power and resetting the core causes the core to warmboot
+back into Elevation Level (EL) which trampolines the control back to the
+kernel. Entering a power down state for the cpu, needs to be done by trapping
+into a EL. Failing to do so, would result in a crash enforced by the warm boot
+code in the EL for the SoC. On SoCs with write-back L1 cache, the cache has to
+be flushed in s/w, before powering down the core.
+
+Power Collapse: This state is similar to the SPC mode, but distinguishes
+itself in that the cpu acknowledges and permits the SoC to enter deeper sleep
+modes. In a hierarchical power domain SoC, this means L2 and other caches can
+be flushed, system bus, clocks - lowered, and SoC main XO clock gated and
+voltages reduced, provided all cpus enter this state.  Since the span of low
+power modes possible at this state is vast, the exit latency and the residency
+of this low power mode would be considered high even though at a cpu level,
+this essentially is cpu power down. The SPM in this state also may handshake
+with the Resource power manager processor in the SoC to indicate a complete
+application processor subsystem shut down.
+
+The idle-state for QCOM SoCs are distinguished by the compatible property of
+the idle-states device node.
+The devicetree representation of the idle state should be -
+
+Required properties:
+
+- compatible: Must be one of -
+			"qcom,idle-state-stby",
+			"qcom,idle-state-ret",
+			"qcom,idle-state-spc",
+			"qcom,idle-state-pc",
+		and "arm,idle-state".
+
+Other required and optional properties are specified in [1].
+
+Example:
+
+	idle-states {
+		CPU_SPC: spc {
+			compatible = "qcom,idle-state-spc", "arm,idle-state";
+			entry-latency-us = <150>;
+			exit-latency-us = <200>;
+			min-residency-us = <2000>;
+		};
+	};
+
+[1]. Documentation/devicetree/bindings/arm/idle-states.txt
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: lina.iyer@linaro.org (Lina Iyer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v15 03/11] ARM: cpuidle: qcom: Add documentation for qcom cpuidle states.
Date: Mon,  9 Mar 2015 09:16:38 -0600	[thread overview]
Message-ID: <1425914206-22295-4-git-send-email-lina.iyer@linaro.org> (raw)
In-Reply-To: <1425914206-22295-1-git-send-email-lina.iyer@linaro.org>

Add documentation for cpuidle states of QCOM cpus. In addition to
arm-idle-state compatible string, the ARM idle state definition must
define one of the following compatible strings -
	"qcom,idle-state-stby",
	"qcom,idle-state-ret",
	"qcom,idle-state-spc",
	"qcom,idle-state-pc",

The compatibles helps the SPM platform driver to use the correct idle
function when the index to the idle state is passed to the platform
driver.

Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
---
 .../bindings/arm/msm/qcom,idle-state.txt           | 81 ++++++++++++++++++++++
 1 file changed, 81 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,idle-state.txt

diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,idle-state.txt b/Documentation/devicetree/bindings/arm/msm/qcom,idle-state.txt
new file mode 100644
index 0000000..ae1b07f
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/msm/qcom,idle-state.txt
@@ -0,0 +1,81 @@
+QCOM Idle States for cpuidle driver
+
+ARM provides idle-state node to define the cpuidle states, as defined in [1].
+cpuidle-qcom is the cpuidle driver for Qualcomm SoCs and uses these idle
+states. Idle states have different enter/exit latency and residency values.
+The idle states supported by the QCOM SoC are defined as -
+
+    * Standby
+    * Retention
+    * Standalone Power Collapse (Standalone PC or SPC)
+    * Power Collapse (PC)
+
+Standby: Standby does a little more in addition to architectural clock gating.
+When the WFI instruction is executed the ARM core would gate its internal
+clocks. In addition to gating the clocks, QCOM cpus use this instruction as a
+trigger to execute the SPM state machine. The SPM state machine waits for the
+interrupt to trigger the core back in to active. This triggers the cache
+hierarchy to enter standby states, when all cpus are idle. An interrupt brings
+the SPM state machine out of its wait, the next step is to ensure that the
+cache hierarchy is also out of standby, and then the cpu is allowed to resume
+execution.
+
+Retention: Retention is a low power state where the core is clock gated and
+the memory and the registers associated with the core are retained. The
+voltage may be reduced to the minimum value needed to keep the processor
+registers active. The SPM should be configured to execute the retention
+sequence and would wait for interrupt, before restoring the cpu to execution
+state. Retention may have a slightly higher latency than Standby.
+
+Standalone PC: A cpu can power down and warmboot if there is a sufficient time
+between the time it enters idle and the next known wake up. SPC mode is used
+to indicate a core entering a power down state without consulting any other
+cpu or the system resources. This helps save power only on that core.  The SPM
+sequence for this idle state is programmed to power down the supply to the
+core, wait for the interrupt, restore power to the core, and ensure the
+system state including cache hierarchy is ready before allowing core to
+resume. Applying power and resetting the core causes the core to warmboot
+back into Elevation Level (EL) which trampolines the control back to the
+kernel. Entering a power down state for the cpu, needs to be done by trapping
+into a EL. Failing to do so, would result in a crash enforced by the warm boot
+code in the EL for the SoC. On SoCs with write-back L1 cache, the cache has to
+be flushed in s/w, before powering down the core.
+
+Power Collapse: This state is similar to the SPC mode, but distinguishes
+itself in that the cpu acknowledges and permits the SoC to enter deeper sleep
+modes. In a hierarchical power domain SoC, this means L2 and other caches can
+be flushed, system bus, clocks - lowered, and SoC main XO clock gated and
+voltages reduced, provided all cpus enter this state.  Since the span of low
+power modes possible at this state is vast, the exit latency and the residency
+of this low power mode would be considered high even though at a cpu level,
+this essentially is cpu power down. The SPM in this state also may handshake
+with the Resource power manager processor in the SoC to indicate a complete
+application processor subsystem shut down.
+
+The idle-state for QCOM SoCs are distinguished by the compatible property of
+the idle-states device node.
+The devicetree representation of the idle state should be -
+
+Required properties:
+
+- compatible: Must be one of -
+			"qcom,idle-state-stby",
+			"qcom,idle-state-ret",
+			"qcom,idle-state-spc",
+			"qcom,idle-state-pc",
+		and "arm,idle-state".
+
+Other required and optional properties are specified in [1].
+
+Example:
+
+	idle-states {
+		CPU_SPC: spc {
+			compatible = "qcom,idle-state-spc", "arm,idle-state";
+			entry-latency-us = <150>;
+			exit-latency-us = <200>;
+			min-residency-us = <2000>;
+		};
+	};
+
+[1]. Documentation/devicetree/bindings/arm/idle-states.txt
-- 
2.1.0

  parent reply	other threads:[~2015-03-09 15:16 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 15:16 [RFC PATCH v15 00/11] ARM: qcom: cpuidle support for 8064, 8074, 8084 Lina Iyer
2015-03-09 15:16 ` Lina Iyer
2015-03-09 15:16 ` [RFC PATCH v15 01/11] ARM: cpuidle: Register per cpuidle device Lina Iyer
2015-03-09 15:16   ` Lina Iyer
2015-03-09 21:29   ` Andy Gross
2015-03-09 21:29     ` Andy Gross
2015-03-09 21:40     ` Lina Iyer
2015-03-09 21:40       ` Lina Iyer
2015-03-09 22:04       ` Andy Gross
2015-03-09 22:04         ` Andy Gross
2015-03-10 10:37   ` Russell King - ARM Linux
2015-03-10 10:37     ` Russell King - ARM Linux
2015-03-10 14:57     ` Lina Iyer
2015-03-10 14:57       ` Lina Iyer
2015-03-09 15:16 ` [RFC PATCH v15 02/11] ARM: qcom: Add Subsystem Power Manager (SPM) driver Lina Iyer
2015-03-09 15:16   ` Lina Iyer
2015-03-10 17:26   ` Kumar Gala
2015-03-10 17:26     ` Kumar Gala
2015-03-10 18:51     ` Lina Iyer
2015-03-10 18:51       ` Lina Iyer
2015-03-12 22:50   ` Lina Iyer
2015-03-12 22:50     ` Lina Iyer
2015-03-16 21:51   ` Stephen Boyd
2015-03-16 21:51     ` Stephen Boyd
2015-03-16 22:51     ` Lina Iyer
2015-03-16 22:51       ` Lina Iyer
2015-03-09 15:16 ` [RFC PATCH v15 04/11] ARM: cpuidle: Register cpuidle_ops for QCOM cpus Lina Iyer
2015-03-09 15:16   ` Lina Iyer
2015-03-11 18:16   ` Stephen Boyd
2015-03-11 18:16     ` Stephen Boyd
2015-03-12 12:34     ` Daniel Lezcano
2015-03-12 12:34       ` Daniel Lezcano
2015-03-12 15:06       ` Lina Iyer
2015-03-12 15:06         ` Lina Iyer
2015-03-13  9:57         ` Daniel Lezcano
2015-03-13  9:57           ` Daniel Lezcano
2015-03-09 15:16 ` [PATCH v15 05/11] ARM: dts: qcom: Add power-controller device node for 8074 Krait CPUs Lina Iyer
2015-03-09 15:16   ` Lina Iyer
     [not found] ` <1425914206-22295-1-git-send-email-lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-03-09 15:16   ` Lina Iyer [this message]
2015-03-09 15:16     ` [PATCH v15 03/11] ARM: cpuidle: qcom: Add documentation for qcom cpuidle states Lina Iyer
2015-03-09 15:16   ` [PATCH v15 06/11] ARM: dts: qcom: Add power-controller device node for 8084 Krait CPUs Lina Iyer
2015-03-09 15:16     ` Lina Iyer
2015-03-09 15:16   ` [PATCH v15 09/11] ARM: dts: qcom: Add idle states device nodes for 8084 Lina Iyer
2015-03-09 15:16     ` Lina Iyer
2015-03-09 15:16 ` [PATCH v15 07/11] ARM: dts: qcom: Update power-controller device node for 8064 Krait CPUs Lina Iyer
2015-03-09 15:16   ` Lina Iyer
2015-03-09 15:16 ` [PATCH v15 08/11] ARM: dts: qcom: Add idle states device nodes for 8074 Lina Iyer
2015-03-09 15:16   ` Lina Iyer
2015-03-09 15:16 ` [PATCH v15 10/11] ARM: dts: qcom: Add idle state device nodes for 8064 Lina Iyer
2015-03-09 15:16   ` Lina Iyer
2015-03-09 15:16 ` [PATCH v15 11/11] ARM: qcom: Update defconfig Lina Iyer
2015-03-09 15:16   ` Lina Iyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425914206-22295-4-git-send-email-lina.iyer@linaro.org \
    --to=lina.iyer-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org \
    --cc=msivasub-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.