* [PATCH 0/2] Add cap-aggressive-pm support
@ 2026-04-21 2:46 Shawn Lin
2026-04-21 2:46 ` [PATCH 1/2] dt-bindings: mmc: Add cap-aggressive-pm property Shawn Lin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Shawn Lin @ 2026-04-21 2:46 UTC (permalink / raw)
To: Ulf Hansson
Cc: Krzysztof Kozlowski, Rob Herring, Conor Dooley, devicetree,
linux-kernel, linux-rockchip, Shawn Lin
Aggressive power-management is now all-or-nothing set by host drivers.
This should be board-specific, add a new dt property to support adding
it via firmware;
Shawn Lin (2):
dt-bindings: mmc: Add cap-aggressive-pm property
mmc: core: Parse property for aggressive power management
Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml | 5 +++++
drivers/mmc/core/host.c | 2 ++
2 files changed, 7 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] dt-bindings: mmc: Add cap-aggressive-pm property
2026-04-21 2:46 [PATCH 0/2] Add cap-aggressive-pm support Shawn Lin
@ 2026-04-21 2:46 ` Shawn Lin
2026-04-21 2:46 ` [PATCH 2/2] mmc: core: Parse property for aggressive power management Shawn Lin
2026-04-21 9:42 ` [PATCH 0/2] Add cap-aggressive-pm support Shawn Lin
2 siblings, 0 replies; 4+ messages in thread
From: Shawn Lin @ 2026-04-21 2:46 UTC (permalink / raw)
To: Ulf Hansson
Cc: Krzysztof Kozlowski, Rob Herring, Conor Dooley, devicetree,
linux-kernel, linux-rockchip, Shawn Lin
Introduce a new optional device tree property cap-aggressive-pm for
the mmc framework to perform aggressive power management strategy.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml b/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml
index 3d7195e..3c3e5ce 100644
--- a/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml
+++ b/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml
@@ -177,6 +177,11 @@ properties:
description:
enable SDIO IRQ signalling on this interface
+ cap-aggressive-pm:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ Enable aggressive power management strategy.
+
full-pwr-cycle:
$ref: /schemas/types.yaml#/definitions/flag
description:
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] mmc: core: Parse property for aggressive power management
2026-04-21 2:46 [PATCH 0/2] Add cap-aggressive-pm support Shawn Lin
2026-04-21 2:46 ` [PATCH 1/2] dt-bindings: mmc: Add cap-aggressive-pm property Shawn Lin
@ 2026-04-21 2:46 ` Shawn Lin
2026-04-21 9:42 ` [PATCH 0/2] Add cap-aggressive-pm support Shawn Lin
2 siblings, 0 replies; 4+ messages in thread
From: Shawn Lin @ 2026-04-21 2:46 UTC (permalink / raw)
To: Ulf Hansson
Cc: Krzysztof Kozlowski, Rob Herring, Conor Dooley, devicetree,
linux-kernel, linux-rockchip, Shawn Lin
Aggressive power management is a framework-level policy rather than
a host driver or controller-specific feature. Currently, this
capability must be enabled by individual host drivers, which has led
to inconsistent adoption and limited real-world testing. This
all-or-nothing approach is inflexible, as the optimal setting depends
on the specific product requirements and usage patterns.
Introduce a new device-tree property "cap-aggressive-pm" to allow
platform-specific configuration of the MMC_CAP_AGGRESSIVE_PM flag.
This enables more aggressive runtime power management strategies that
can significantly improve power efficiency in certain scenarios.
However, the benefits of this feature are highly workload-dependent.
While it reduces power consumption during idle periods, it may also
introduce additional resume latency from low-power states. Therefore,
it should be configurable rather than hardcoded, allowing different
products to balance power savings against performance requirements.
By exposing this as a device-tree property, system integrators can
selectively enable aggressive power management for specific products
or use cases where power savings outweigh potential performance impact.
For example, it could be enabled on battery-powered devices where
power efficiency is critical, but disabled on always-connected devices
where low latency is more important.
This change provides the flexibility needed to optimize for different
market segments and user scenarios without requiring driver modifications.
Existing drivers that previously set MMC_CAP_AGGRESSIVE_PM can now
remove those hardcoded settings in favor of device-tree configuration.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
drivers/mmc/core/host.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index b7ce313..abe61c7 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -400,6 +400,8 @@ int mmc_of_parse(struct mmc_host *host)
if (device_property_read_bool(dev, "no-mmc-hs400"))
host->caps2 &= ~(MMC_CAP2_HS400_1_8V | MMC_CAP2_HS400_1_2V |
MMC_CAP2_HS400_ES);
+ if (device_property_read_bool(dev, "cap-aggressive-pm"))
+ host->caps |= MMC_CAP_AGGRESSIVE_PM;
/* Must be after "non-removable" check */
if (device_property_read_u32(dev, "fixed-emmc-driver-type", &drv_type) == 0) {
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Add cap-aggressive-pm support
2026-04-21 2:46 [PATCH 0/2] Add cap-aggressive-pm support Shawn Lin
2026-04-21 2:46 ` [PATCH 1/2] dt-bindings: mmc: Add cap-aggressive-pm property Shawn Lin
2026-04-21 2:46 ` [PATCH 2/2] mmc: core: Parse property for aggressive power management Shawn Lin
@ 2026-04-21 9:42 ` Shawn Lin
2 siblings, 0 replies; 4+ messages in thread
From: Shawn Lin @ 2026-04-21 9:42 UTC (permalink / raw)
To: Ulf Hansson
Cc: shawn.lin, Krzysztof Kozlowski, Rob Herring, Conor Dooley,
devicetree, linux-kernel
在 2026/04/21 星期二 10:46, Shawn Lin 写道:
> Aggressive power-management is now all-or-nothing set by host drivers.
> This should be board-specific, add a new dt property to support adding
> it via firmware;
>
Nak myslef. I forgot we could set it via debugfs now. Sorry for
the noise.
>
>
> Shawn Lin (2):
> dt-bindings: mmc: Add cap-aggressive-pm property
> mmc: core: Parse property for aggressive power management
>
> Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml | 5 +++++
> drivers/mmc/core/host.c | 2 ++
> 2 files changed, 7 insertions(+)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-21 9:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-21 2:46 [PATCH 0/2] Add cap-aggressive-pm support Shawn Lin
2026-04-21 2:46 ` [PATCH 1/2] dt-bindings: mmc: Add cap-aggressive-pm property Shawn Lin
2026-04-21 2:46 ` [PATCH 2/2] mmc: core: Parse property for aggressive power management Shawn Lin
2026-04-21 9:42 ` [PATCH 0/2] Add cap-aggressive-pm support Shawn Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox