linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x
@ 2019-12-13  3:07 Dave Gerlach
  2019-12-13  3:07 ` [PATCH 1/5] dt-bindings: arm: cpu: Add TI AM335x and AM437x enable method Dave Gerlach
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Dave Gerlach @ 2019-12-13  3:07 UTC (permalink / raw)
  To: Tony Lindgren, Santosh Shilimkar
  Cc: linux-arm-kernel, linux-kernel, linux-omap, devicetree, Dave Gerlach

Hi,
This series adds support for cpuidle on am335x and am437x using the
cpuidle_arm driver. When testing on am335x-evm and am437x-gp-evm the
follow power consumption reductions are seen on v5.5-rc1 baseline:


Idling at command line, CPUFreq userspace governor to 300MHz:
  am335x-evm:
    VDD_MPU: 48 mW -> 5 mW

  am437x-gp-evm:
    VDD_MPU: 32 mW -> 3 mW


Idling at command line, CPUFreq userspace governor to 1GHz:
  am335x-evm:
    VDD_MPU: 313 mW -> 18 mW

  am437x-gp-evm:
    VDD_MPU: 208 mW -> 10 mW

A forthcoming series will add idle states to the device tree for each
am335x and am437x to add C1 state for MPU Gate which gates the clock to
the main CPU.  am335x makes use of the wkup_m3_ipc driver for this to
use the same wkup_m3 to gate the cpu clock that is used for suspend, so
the same firmware found here is required [1] to be placed in
/lib/firmware.

First patch adds dt-binding for enable-method for each SoC which is needed
for cpuidle-arm driver to probe, second patch adds platform code for cpuidle,
third patch modifies both platform code and pm33xx soc driver to add needed
flags and callback for idling, fourth patch actually enables cpuidle in the
soc pm33xx driver, and then that last patch enables the needed CONFIG options
in omap2plus_defconfig.

Regards,
Dave

[1] https://git.ti.com/cgit/processor-firmware/ti-amx3-cm3-pm-firmware/tree/bin/am335x-pm-firmware.elf?h=ti-v4.1.y

Dave Gerlach (5):
  dt-bindings: arm: cpu: Add TI AM335x and AM437x enable method
  ARM: OMAP2+: pm33xx-core: Add cpuidle_ops for am335x/am437x
  ARM: OMAP2+: pm33xx-core: Extend platform_data ops for cpuidle
  soc: ti: pm33xx: Add base cpuidle support
  ARM: omap2plus_defconfig: Add CONFIG_ARM_CPUIDLE

 .../devicetree/bindings/arm/cpus.yaml         |   2 +
 arch/arm/configs/omap2plus_defconfig          |   2 +
 arch/arm/mach-omap2/pm33xx-core.c             | 137 +++++++++++++++++-
 drivers/soc/ti/pm33xx.c                       |  21 ++-
 include/linux/platform_data/pm33xx.h          |   6 +-
 5 files changed, 160 insertions(+), 8 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/5] dt-bindings: arm: cpu: Add TI AM335x and AM437x enable method
  2019-12-13  3:07 [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Dave Gerlach
@ 2019-12-13  3:07 ` Dave Gerlach
  2019-12-19 23:17   ` Rob Herring
  2019-12-13  3:07 ` [PATCH 2/5] ARM: OMAP2+: pm33xx-core: Add cpuidle_ops for am335x/am437x Dave Gerlach
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Dave Gerlach @ 2019-12-13  3:07 UTC (permalink / raw)
  To: Tony Lindgren, Santosh Shilimkar
  Cc: linux-arm-kernel, linux-kernel, linux-omap, devicetree,
	Dave Gerlach, Rob Herring

Add enable-method binding for "ti,am3352" and "ti,am4372".

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
CC: Rob Herring <robh+dt@kernel.org>
---
 Documentation/devicetree/bindings/arm/cpus.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.yaml
index c23c24ff7575..428b6b55b5da 100644
--- a/Documentation/devicetree/bindings/arm/cpus.yaml
+++ b/Documentation/devicetree/bindings/arm/cpus.yaml
@@ -201,6 +201,8 @@ properties:
               - rockchip,rk3066-smp
               - socionext,milbeaut-m10v-smp
               - ste,dbx500-smp
+              - ti,am3352
+              - ti,am4372
 
   cpu-release-addr:
     $ref: '/schemas/types.yaml#/definitions/uint64'
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/5] ARM: OMAP2+: pm33xx-core: Add cpuidle_ops for am335x/am437x
  2019-12-13  3:07 [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Dave Gerlach
  2019-12-13  3:07 ` [PATCH 1/5] dt-bindings: arm: cpu: Add TI AM335x and AM437x enable method Dave Gerlach
@ 2019-12-13  3:07 ` Dave Gerlach
  2019-12-13  3:07 ` [PATCH 3/5] ARM: OMAP2+: pm33xx-core: Extend platform_data ops for cpuidle Dave Gerlach
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2019-12-13  3:07 UTC (permalink / raw)
  To: Tony Lindgren, Santosh Shilimkar
  Cc: linux-arm-kernel, linux-kernel, linux-omap, devicetree, Dave Gerlach

am335x and am437x can now make use of the generic cpuidle-arm driver.
This requires that we define init and suspend ops to be passed set as
the cpuidle ops for the SoC. These ops are invoked directly at the last
stage of the cpuidle-arm driver in order to allow low level platform
code to run and bring the CPU the rest of the way into it's desired idle
state. It is required that the CPUIDLE_METHOD_OF_DECLARE be called from
code that is built in so define these ops in pm33xx-core where the
always built-in portion of the PM code for these SoCs lives.

Additionally, although an soc_suspend function is already exposed by the
pm33xx platform code, it contains additional operations needed for full
SoC suspend beyond what is needed for a relatively simple CPU suspend
needed during cpuidle. To get around this introduce cpu_suspend ops to
be used by the am335x and am437x PM driver for the last stage of cpuidle
path.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/mach-omap2/pm33xx-core.c    | 117 ++++++++++++++++++++++++++-
 include/linux/platform_data/pm33xx.h |   3 +
 2 files changed, 119 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/pm33xx-core.c b/arch/arm/mach-omap2/pm33xx-core.c
index f11442ed3eff..dc43736f0ae6 100644
--- a/arch/arm/mach-omap2/pm33xx-core.c
+++ b/arch/arm/mach-omap2/pm33xx-core.c
@@ -6,11 +6,14 @@
  *	Dave Gerlach
  */
 
+#include <linux/cpuidle.h>
+#include <linux/platform_data/pm33xx.h>
+#include <asm/cpuidle.h>
 #include <asm/smp_scu.h>
 #include <asm/suspend.h>
 #include <linux/errno.h>
-#include <linux/platform_data/pm33xx.h>
 #include <linux/clk.h>
+#include <linux/cpu.h>
 #include <linux/platform_data/gpio-omap.h>
 #include <linux/pinctrl/pinmux.h>
 #include <linux/wkup_m3_ipc.h>
@@ -34,6 +37,14 @@ static struct clockdomain *gfx_l4ls_clkdm;
 static void __iomem *scu_base;
 static struct omap_hwmod *rtc_oh;
 
+static int (*idle_fn)(u32 wfi_flags);
+
+struct amx3_idle_state {
+	int wfi_flags;
+};
+
+static struct amx3_idle_state *idle_states;
+
 static int am43xx_map_scu(void)
 {
 	scu_base = ioremap(scu_a9_get_base(), SZ_256);
@@ -177,6 +188,43 @@ static int am43xx_suspend(unsigned int state, int (*fn)(unsigned long),
 	return ret;
 }
 
+static int am33xx_cpu_suspend(int (*fn)(unsigned long), unsigned long args)
+{
+	int ret = 0;
+
+	if (omap_irq_pending() || need_resched())
+		return ret;
+
+	ret = cpu_suspend(args, fn);
+
+	return ret;
+}
+
+static int am43xx_cpu_suspend(int (*fn)(unsigned long), unsigned long args)
+{
+	int ret = 0;
+
+	if (!scu_base)
+		return 0;
+
+	scu_power_mode(scu_base, SCU_PM_DORMANT);
+	ret = cpu_suspend(args, fn);
+	scu_power_mode(scu_base, SCU_PM_NORMAL);
+
+	return ret;
+}
+
+static void amx3_begin_suspend(void)
+{
+	cpu_idle_poll_ctrl(true);
+}
+
+static void amx3_finish_suspend(void)
+{
+	cpu_idle_poll_ctrl(false);
+}
+
+
 static struct am33xx_pm_sram_addr *amx3_get_sram_addrs(void)
 {
 	if (soc_is_am33xx())
@@ -230,6 +278,9 @@ static void am43xx_prepare_rtc_resume(void)
 static struct am33xx_pm_platform_data am33xx_ops = {
 	.init = am33xx_suspend_init,
 	.soc_suspend = am33xx_suspend,
+	.cpu_suspend = am33xx_cpu_suspend,
+	.begin_suspend = amx3_begin_suspend,
+	.finish_suspend = amx3_finish_suspend,
 	.get_sram_addrs = amx3_get_sram_addrs,
 	.save_context = am33xx_save_context,
 	.restore_context = am33xx_restore_context,
@@ -242,6 +293,9 @@ static struct am33xx_pm_platform_data am33xx_ops = {
 static struct am33xx_pm_platform_data am43xx_ops = {
 	.init = am43xx_suspend_init,
 	.soc_suspend = am43xx_suspend,
+	.cpu_suspend = am43xx_cpu_suspend,
+	.begin_suspend = amx3_begin_suspend,
+	.finish_suspend = amx3_finish_suspend,
 	.get_sram_addrs = amx3_get_sram_addrs,
 	.save_context = am43xx_save_context,
 	.restore_context = am43xx_restore_context,
@@ -277,3 +331,64 @@ int __init amx3_common_pm_init(void)
 
 	return 0;
 }
+
+static int __init amx3_idle_init(struct device_node *cpu_node, int cpu)
+{
+	struct device_node *state_node;
+	struct amx3_idle_state states[CPUIDLE_STATE_MAX];
+	int i;
+	int state_count = 1;
+
+	for (i = 0; ; i++) {
+		state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i);
+		if (!state_node)
+			break;
+
+		if (!of_device_is_available(state_node))
+			continue;
+
+		if (i == CPUIDLE_STATE_MAX) {
+			pr_warn("%s: cpuidle states reached max possible\n",
+				__func__);
+			break;
+		}
+
+		states[state_count].wfi_flags = 0;
+
+		if (of_property_read_bool(state_node, "ti,idle-wkup-m3"))
+			states[state_count].wfi_flags |= WFI_FLAG_WAKE_M3 |
+							 WFI_FLAG_FLUSH_CACHE;
+
+		state_count++;
+	}
+
+	idle_states = kcalloc(state_count, sizeof(*idle_states), GFP_KERNEL);
+	if (!idle_states)
+		return -ENOMEM;
+
+	for (i = 1; i < state_count; i++)
+		idle_states[i].wfi_flags = states[i].wfi_flags;
+
+	return 0;
+}
+
+static int amx3_idle_enter(unsigned long index)
+{
+	struct amx3_idle_state *idle_state = &idle_states[index];
+
+	if (!idle_state)
+		return -EINVAL;
+
+	if (idle_fn)
+		idle_fn(idle_state->wfi_flags);
+
+	return 0;
+}
+
+static struct cpuidle_ops amx3_cpuidle_ops __initdata = {
+	.init = amx3_idle_init,
+	.suspend = amx3_idle_enter,
+};
+
+CPUIDLE_METHOD_OF_DECLARE(pm33xx_idle, "ti,am3352", &amx3_cpuidle_ops);
+CPUIDLE_METHOD_OF_DECLARE(pm43xx_idle, "ti,am4372", &amx3_cpuidle_ops);
diff --git a/include/linux/platform_data/pm33xx.h b/include/linux/platform_data/pm33xx.h
index dd5971937a64..8e59f2db2adc 100644
--- a/include/linux/platform_data/pm33xx.h
+++ b/include/linux/platform_data/pm33xx.h
@@ -49,6 +49,9 @@ struct am33xx_pm_platform_data {
 	int	(*init)(void);
 	int	(*soc_suspend)(unsigned int state, int (*fn)(unsigned long),
 			       unsigned long args);
+	int	(*cpu_suspend)(int (*fn)(unsigned long), unsigned long args);
+	void    (*begin_suspend)(void);
+	void    (*finish_suspend)(void);
 	struct  am33xx_pm_sram_addr *(*get_sram_addrs)(void);
 	void __iomem *(*get_rtc_base_addr)(void);
 	void (*save_context)(void);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/5] ARM: OMAP2+: pm33xx-core: Extend platform_data ops for cpuidle
  2019-12-13  3:07 [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Dave Gerlach
  2019-12-13  3:07 ` [PATCH 1/5] dt-bindings: arm: cpu: Add TI AM335x and AM437x enable method Dave Gerlach
  2019-12-13  3:07 ` [PATCH 2/5] ARM: OMAP2+: pm33xx-core: Add cpuidle_ops for am335x/am437x Dave Gerlach
@ 2019-12-13  3:07 ` Dave Gerlach
  2019-12-13  3:07 ` [PATCH 4/5] soc: ti: pm33xx: Add base cpuidle support Dave Gerlach
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2019-12-13  3:07 UTC (permalink / raw)
  To: Tony Lindgren, Santosh Shilimkar
  Cc: linux-arm-kernel, linux-kernel, linux-omap, devicetree, Dave Gerlach

In order for am335x and am437x to properly enter deeper c-states in
cpuidle they must always call into the sleep33/43xx suspend code and
also sometimes invoke the wkup_m3_ipc driver. These are both controlled
by the pm33xx module so we must provide a method for the platform code
to call back into the module when it is available as the core cpuidle
ops that are invoked by the cpuidle-arm driver must remain as built in.

Extend the init platform op to take an idle function as an argument so
that we can use this to call into the pm33xx module for c-states that
need it. Also add a deinit op so we can unregister this idle function
from the PM core when the pm33xx module gets unloaded.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/mach-omap2/pm33xx-core.c    | 20 +++++++++++++++-----
 drivers/soc/ti/pm33xx.c              |  2 +-
 include/linux/platform_data/pm33xx.h |  3 ++-
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/pm33xx-core.c b/arch/arm/mach-omap2/pm33xx-core.c
index dc43736f0ae6..388808e90677 100644
--- a/arch/arm/mach-omap2/pm33xx-core.c
+++ b/arch/arm/mach-omap2/pm33xx-core.c
@@ -78,7 +78,7 @@ static int am43xx_check_off_mode_enable(void)
 	return 0;
 }
 
-static int amx3_common_init(void)
+static int amx3_common_init(int (*idle)(u32 wfi_flags))
 {
 	gfx_pwrdm = pwrdm_lookup("gfx_pwrdm");
 	per_pwrdm = pwrdm_lookup("per_pwrdm");
@@ -98,10 +98,12 @@ static int amx3_common_init(void)
 	else
 		omap_set_pwrdm_state(cefuse_pwrdm, PWRDM_POWER_OFF);
 
+	idle_fn = idle;
+
 	return 0;
 }
 
-static int am33xx_suspend_init(void)
+static int am33xx_suspend_init(int (*idle)(u32 wfi_flags))
 {
 	int ret;
 
@@ -112,12 +114,12 @@ static int am33xx_suspend_init(void)
 		return -ENODEV;
 	}
 
-	ret = amx3_common_init();
+	ret = amx3_common_init(idle);
 
 	return ret;
 }
 
-static int am43xx_suspend_init(void)
+static int am43xx_suspend_init(int (*idle)(u32 wfi_flags))
 {
 	int ret = 0;
 
@@ -127,11 +129,17 @@ static int am43xx_suspend_init(void)
 		return ret;
 	}
 
-	ret = amx3_common_init();
+	ret = amx3_common_init(idle);
 
 	return ret;
 }
 
+static int amx3_suspend_deinit(void)
+{
+	idle_fn = NULL;
+	return 0;
+}
+
 static void amx3_pre_suspend_common(void)
 {
 	omap_set_pwrdm_state(gfx_pwrdm, PWRDM_POWER_OFF);
@@ -277,6 +285,7 @@ static void am43xx_prepare_rtc_resume(void)
 
 static struct am33xx_pm_platform_data am33xx_ops = {
 	.init = am33xx_suspend_init,
+	.deinit = amx3_suspend_deinit,
 	.soc_suspend = am33xx_suspend,
 	.cpu_suspend = am33xx_cpu_suspend,
 	.begin_suspend = amx3_begin_suspend,
@@ -292,6 +301,7 @@ static struct am33xx_pm_platform_data am33xx_ops = {
 
 static struct am33xx_pm_platform_data am43xx_ops = {
 	.init = am43xx_suspend_init,
+	.deinit = amx3_suspend_deinit,
 	.soc_suspend = am43xx_suspend,
 	.cpu_suspend = am43xx_cpu_suspend,
 	.begin_suspend = amx3_begin_suspend,
diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
index ccc6d53fe788..19bdcaca1f21 100644
--- a/drivers/soc/ti/pm33xx.c
+++ b/drivers/soc/ti/pm33xx.c
@@ -503,7 +503,7 @@ static int am33xx_pm_probe(struct platform_device *pdev)
 	suspend_wfi_flags |= WFI_FLAG_WAKE_M3;
 #endif /* CONFIG_SUSPEND */
 
-	ret = pm_ops->init();
+	ret = pm_ops->init(NULL);
 	if (ret) {
 		dev_err(dev, "Unable to call core pm init!\n");
 		ret = -ENODEV;
diff --git a/include/linux/platform_data/pm33xx.h b/include/linux/platform_data/pm33xx.h
index 8e59f2db2adc..644af1d89cfa 100644
--- a/include/linux/platform_data/pm33xx.h
+++ b/include/linux/platform_data/pm33xx.h
@@ -46,7 +46,8 @@ struct am33xx_pm_sram_addr {
 };
 
 struct am33xx_pm_platform_data {
-	int	(*init)(void);
+	int     (*init)(int (*idle)(u32 wfi_flags));
+	int     (*deinit)(void);
 	int	(*soc_suspend)(unsigned int state, int (*fn)(unsigned long),
 			       unsigned long args);
 	int	(*cpu_suspend)(int (*fn)(unsigned long), unsigned long args);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/5] soc: ti: pm33xx: Add base cpuidle support
  2019-12-13  3:07 [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Dave Gerlach
                   ` (2 preceding siblings ...)
  2019-12-13  3:07 ` [PATCH 3/5] ARM: OMAP2+: pm33xx-core: Extend platform_data ops for cpuidle Dave Gerlach
@ 2019-12-13  3:07 ` Dave Gerlach
  2019-12-13  3:07 ` [PATCH 5/5] ARM: omap2plus_defconfig: Add CONFIG_ARM_CPUIDLE Dave Gerlach
  2019-12-13 15:03 ` [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Tony Lindgren
  5 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2019-12-13  3:07 UTC (permalink / raw)
  To: Tony Lindgren, Santosh Shilimkar
  Cc: linux-arm-kernel, linux-kernel, linux-omap, devicetree, Dave Gerlach

Some cpuidle C-states supported on am335x and am437x, like C1 on am335x,
require the use of the wkup_m3_ipc driver, and all C-states beyond C0 on
both platforms require the use of the SRAM sleep code.

Pass am33xx_do_sram_idle as the idle function to the platform pm core to
be used by the cpuidle-arm driver when entering cpuidle states.
am33xx_do_sram_idle will detect when the wkup_m3 is needed and ping it
if necessary before calling the final cpu_suspend op which will execute
the SRAM code to put the cpu into idle.

Finally, use the begin_suspend and finish_suspend platform ops to be
called at the beginning and end of suspend path to allow use of
cpu_idle_poll_ctrl.

This prevents races between cpuidle and suspend paths trying to
communicate with the wkup_m3, as during suspend we only want it
configured for entry to suspend.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 drivers/soc/ti/pm33xx.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
index 19bdcaca1f21..de0123ec8ad6 100644
--- a/drivers/soc/ti/pm33xx.c
+++ b/drivers/soc/ti/pm33xx.c
@@ -130,6 +130,19 @@ static int am33xx_push_sram_idle(void)
 	return 0;
 }
 
+static int am33xx_do_sram_idle(u32 wfi_flags)
+{
+	int ret = 0;
+
+	if (!m3_ipc || !pm_ops)
+		return 0;
+
+	if (wfi_flags & WFI_FLAG_WAKE_M3)
+		ret = m3_ipc->ops->prepare_low_power(m3_ipc, WKUP_M3_IDLE);
+
+	return pm_ops->cpu_suspend(am33xx_do_wfi_sram, wfi_flags);
+}
+
 static int __init am43xx_map_gic(void)
 {
 	gic_dist_base = ioremap(AM43XX_GIC_DIST_BASE, SZ_4K);
@@ -260,6 +273,8 @@ static int am33xx_pm_begin(suspend_state_t state)
 		rtc_only_idle = 0;
 	}
 
+	pm_ops->begin_suspend();
+
 	switch (state) {
 	case PM_SUSPEND_MEM:
 		ret = m3_ipc->ops->prepare_low_power(m3_ipc, WKUP_M3_DEEPSLEEP);
@@ -301,6 +316,8 @@ static void am33xx_pm_end(void)
 	}
 
 	rtc_only_idle = 0;
+
+	pm_ops->finish_suspend();
 }
 
 static int am33xx_pm_valid(suspend_state_t state)
@@ -503,7 +520,7 @@ static int am33xx_pm_probe(struct platform_device *pdev)
 	suspend_wfi_flags |= WFI_FLAG_WAKE_M3;
 #endif /* CONFIG_SUSPEND */
 
-	ret = pm_ops->init(NULL);
+	ret = pm_ops->init(am33xx_do_sram_idle);
 	if (ret) {
 		dev_err(dev, "Unable to call core pm init!\n");
 		ret = -ENODEV;
@@ -522,6 +539,8 @@ static int am33xx_pm_probe(struct platform_device *pdev)
 
 static int am33xx_pm_remove(struct platform_device *pdev)
 {
+	if (pm_ops->deinit)
+		pm_ops->deinit();
 	suspend_set_ops(NULL);
 	wkup_m3_ipc_put(m3_ipc);
 	am33xx_pm_free_sram();
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/5] ARM: omap2plus_defconfig: Add CONFIG_ARM_CPUIDLE
  2019-12-13  3:07 [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Dave Gerlach
                   ` (3 preceding siblings ...)
  2019-12-13  3:07 ` [PATCH 4/5] soc: ti: pm33xx: Add base cpuidle support Dave Gerlach
@ 2019-12-13  3:07 ` Dave Gerlach
  2019-12-13 15:03 ` [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Tony Lindgren
  5 siblings, 0 replies; 11+ messages in thread
From: Dave Gerlach @ 2019-12-13  3:07 UTC (permalink / raw)
  To: Tony Lindgren, Santosh Shilimkar
  Cc: linux-arm-kernel, linux-kernel, linux-omap, devicetree, Dave Gerlach

Add CONFIG_ARM_CPUIDLE and supporting CONFIG_DT_IDLE_STATES as am335x
and am437x will make use of these drivers.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/configs/omap2plus_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 8c37cc8ab6f2..84c2423cbe89 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -56,6 +56,8 @@ CONFIG_CPUFREQ_DT=m
 # CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set
 CONFIG_ARM_TI_CPUFREQ=y
 CONFIG_CPU_IDLE=y
+CONFIG_ARM_CPUIDLE=y
+CONFIG_DT_IDLE_STATES=y
 CONFIG_KERNEL_MODE_NEON=y
 CONFIG_PM_DEBUG=y
 CONFIG_ARM_CRYPTO=y
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x
  2019-12-13  3:07 [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Dave Gerlach
                   ` (4 preceding siblings ...)
  2019-12-13  3:07 ` [PATCH 5/5] ARM: omap2plus_defconfig: Add CONFIG_ARM_CPUIDLE Dave Gerlach
@ 2019-12-13 15:03 ` Tony Lindgren
  2020-02-26 18:43   ` Tony Lindgren
  5 siblings, 1 reply; 11+ messages in thread
From: Tony Lindgren @ 2019-12-13 15:03 UTC (permalink / raw)
  To: Dave Gerlach
  Cc: Santosh Shilimkar, linux-arm-kernel, linux-kernel, linux-omap,
	devicetree

* Dave Gerlach <d-gerlach@ti.com> [191212 19:07]:
> Hi,
> This series adds support for cpuidle on am335x and am437x using the
> cpuidle_arm driver. When testing on am335x-evm and am437x-gp-evm the
> follow power consumption reductions are seen on v5.5-rc1 baseline:
> 
> 
> Idling at command line, CPUFreq userspace governor to 300MHz:
>   am335x-evm:
>     VDD_MPU: 48 mW -> 5 mW
> 
>   am437x-gp-evm:
>     VDD_MPU: 32 mW -> 3 mW
> 
> 
> Idling at command line, CPUFreq userspace governor to 1GHz:
>   am335x-evm:
>     VDD_MPU: 313 mW -> 18 mW
> 
>   am437x-gp-evm:
>     VDD_MPU: 208 mW -> 10 mW

Hey this is great! A beverage on me when we get a chance :)

For merging, looks like I should take the series after folks are happy
with it. Santosh, care to review and ack if it looks OK?

Regards,

Tony

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/5] dt-bindings: arm: cpu: Add TI AM335x and AM437x enable method
  2019-12-13  3:07 ` [PATCH 1/5] dt-bindings: arm: cpu: Add TI AM335x and AM437x enable method Dave Gerlach
@ 2019-12-19 23:17   ` Rob Herring
  0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2019-12-19 23:17 UTC (permalink / raw)
  To: Dave Gerlach
  Cc: Tony Lindgren, Santosh Shilimkar, linux-arm-kernel, linux-kernel,
	linux-omap, devicetree, Dave Gerlach

On Thu, 12 Dec 2019 21:07:51 -0600, Dave Gerlach wrote:
> Add enable-method binding for "ti,am3352" and "ti,am4372".
> 
> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
> ---
> CC: Rob Herring <robh+dt@kernel.org>
> ---
>  Documentation/devicetree/bindings/arm/cpus.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x
  2019-12-13 15:03 ` [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Tony Lindgren
@ 2020-02-26 18:43   ` Tony Lindgren
  2020-02-26 19:55     ` santosh.shilimkar
  0 siblings, 1 reply; 11+ messages in thread
From: Tony Lindgren @ 2020-02-26 18:43 UTC (permalink / raw)
  To: Dave Gerlach, Santosh Shilimkar
  Cc: Santosh Shilimkar, linux-arm-kernel, linux-kernel, linux-omap,
	devicetree

Santosh,

* Tony Lindgren <tony@atomide.com> [191213 15:04]:
> * Dave Gerlach <d-gerlach@ti.com> [191212 19:07]:
> > Hi,
> > This series adds support for cpuidle on am335x and am437x using the
> > cpuidle_arm driver. When testing on am335x-evm and am437x-gp-evm the
> > follow power consumption reductions are seen on v5.5-rc1 baseline:
> > 
> > 
> > Idling at command line, CPUFreq userspace governor to 300MHz:
> >   am335x-evm:
> >     VDD_MPU: 48 mW -> 5 mW
> > 
> >   am437x-gp-evm:
> >     VDD_MPU: 32 mW -> 3 mW
> > 
> > 
> > Idling at command line, CPUFreq userspace governor to 1GHz:
> >   am335x-evm:
> >     VDD_MPU: 313 mW -> 18 mW
> > 
> >   am437x-gp-evm:
> >     VDD_MPU: 208 mW -> 10 mW
> 
> Hey this is great! A beverage on me when we get a chance :)
> 
> For merging, looks like I should take the series after folks are happy
> with it. Santosh, care to review and ack if it looks OK?

Looks like this series of changes is still pending. Care
to ack?

Regards,

Tony

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x
  2020-02-26 18:43   ` Tony Lindgren
@ 2020-02-26 19:55     ` santosh.shilimkar
  2020-02-27 17:34       ` Tony Lindgren
  0 siblings, 1 reply; 11+ messages in thread
From: santosh.shilimkar @ 2020-02-26 19:55 UTC (permalink / raw)
  To: Tony Lindgren, Dave Gerlach, Santosh Shilimkar
  Cc: linux-arm-kernel, linux-kernel, linux-omap, devicetree

On 2/26/20 10:43 AM, Tony Lindgren wrote:
> Santosh,
> 
> * Tony Lindgren <tony@atomide.com> [191213 15:04]:
>> * Dave Gerlach <d-gerlach@ti.com> [191212 19:07]:
>>> Hi,
>>> This series adds support for cpuidle on am335x and am437x using the
>>> cpuidle_arm driver. When testing on am335x-evm and am437x-gp-evm the
>>> follow power consumption reductions are seen on v5.5-rc1 baseline:
>>>
>>>
>>> Idling at command line, CPUFreq userspace governor to 300MHz:
>>>    am335x-evm:
>>>      VDD_MPU: 48 mW -> 5 mW
>>>
>>>    am437x-gp-evm:
>>>      VDD_MPU: 32 mW -> 3 mW
>>>
>>>
>>> Idling at command line, CPUFreq userspace governor to 1GHz:
>>>    am335x-evm:
>>>      VDD_MPU: 313 mW -> 18 mW
>>>
>>>    am437x-gp-evm:
>>>      VDD_MPU: 208 mW -> 10 mW
>>
>> Hey this is great! A beverage on me when we get a chance :)
>>
>> For merging, looks like I should take the series after folks are happy
>> with it. Santosh, care to review and ack if it looks OK?
> 
> Looks like this series of changes is still pending. Care
> to ack?
> 
Was scanning this series today. It looks good to me Tony.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x
  2020-02-26 19:55     ` santosh.shilimkar
@ 2020-02-27 17:34       ` Tony Lindgren
  0 siblings, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2020-02-27 17:34 UTC (permalink / raw)
  To: santosh.shilimkar
  Cc: Dave Gerlach, Santosh Shilimkar, linux-arm-kernel, linux-kernel,
	linux-omap, devicetree

* santosh.shilimkar@oracle.com <santosh.shilimkar@oracle.com> [200226 19:56]:
> On 2/26/20 10:43 AM, Tony Lindgren wrote:
> > Santosh,
> > 
> > * Tony Lindgren <tony@atomide.com> [191213 15:04]:
> > > * Dave Gerlach <d-gerlach@ti.com> [191212 19:07]:
> > > > Hi,
> > > > This series adds support for cpuidle on am335x and am437x using the
> > > > cpuidle_arm driver. When testing on am335x-evm and am437x-gp-evm the
> > > > follow power consumption reductions are seen on v5.5-rc1 baseline:
> > > > 
> > > > 
> > > > Idling at command line, CPUFreq userspace governor to 300MHz:
> > > >    am335x-evm:
> > > >      VDD_MPU: 48 mW -> 5 mW
> > > > 
> > > >    am437x-gp-evm:
> > > >      VDD_MPU: 32 mW -> 3 mW
> > > > 
> > > > 
> > > > Idling at command line, CPUFreq userspace governor to 1GHz:
> > > >    am335x-evm:
> > > >      VDD_MPU: 313 mW -> 18 mW
> > > > 
> > > >    am437x-gp-evm:
> > > >      VDD_MPU: 208 mW -> 10 mW
> > > 
> > > Hey this is great! A beverage on me when we get a chance :)
> > > 
> > > For merging, looks like I should take the series after folks are happy
> > > with it. Santosh, care to review and ack if it looks OK?
> > 
> > Looks like this series of changes is still pending. Care
> > to ack?
> > 
> Was scanning this series today. It looks good to me Tony.
> 
> Acked-by: Santosh Shilimkar <ssantosh@kernel.org>

Thanks applying this series into omap-for-v5.7/pm33xx.

Regards,

Tony

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-02-27 17:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13  3:07 [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Dave Gerlach
2019-12-13  3:07 ` [PATCH 1/5] dt-bindings: arm: cpu: Add TI AM335x and AM437x enable method Dave Gerlach
2019-12-19 23:17   ` Rob Herring
2019-12-13  3:07 ` [PATCH 2/5] ARM: OMAP2+: pm33xx-core: Add cpuidle_ops for am335x/am437x Dave Gerlach
2019-12-13  3:07 ` [PATCH 3/5] ARM: OMAP2+: pm33xx-core: Extend platform_data ops for cpuidle Dave Gerlach
2019-12-13  3:07 ` [PATCH 4/5] soc: ti: pm33xx: Add base cpuidle support Dave Gerlach
2019-12-13  3:07 ` [PATCH 5/5] ARM: omap2plus_defconfig: Add CONFIG_ARM_CPUIDLE Dave Gerlach
2019-12-13 15:03 ` [PATCH 0/5] ARM: OMAP2+: Introduce cpuidle for am335x/am437x Tony Lindgren
2020-02-26 18:43   ` Tony Lindgren
2020-02-26 19:55     ` santosh.shilimkar
2020-02-27 17:34       ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).