[PATCH v3 0/2] mmc: Add power_off_delay_us support

Judith Mendez posted 2 patches 1 month, 3 weeks ago
.../devicetree/bindings/mmc/mmc-controller-common.yaml | 10 ++++++++++
drivers/mmc/core/core.c                                |  2 +-
drivers/mmc/core/core.h                                |  8 ++++++++
drivers/mmc/core/host.c                                |  4 ++++
include/linux/mmc/host.h                               |  1 +
5 files changed, 24 insertions(+), 1 deletion(-)
[PATCH v3 0/2] mmc: Add power_off_delay_us support
Posted by Judith Mendez 1 month, 3 weeks ago
This series adds power_off_delay_us support for MMC controllers,
enabling boards to specify custom delays after MMC power off to work around
hardware issues such as slow RC circuites on MMC VDD rails.

Rather than adding host driver-specific workarounds, we abstract the
implementation into the MMC core and pickup the delay value with a device
tree property (power-off-delay-us). This allows any board with slow
power off requirements to configure the necessary delay without code
changes.

The solution is minimal and follows existing patterns as with
power_delay_ms. The allowed minimum value = 0 ms (early return).
The default value is 1000us to not deviate from the
original 1ms delay set in mmc_power_off().

Link to v1:
https://lore.kernel.org/all/20260716232641.2659710-1-jm@ti.com/
Link to v2:
https://lore.kernel.org/all/20260722205701.372789-1-jm@ti.com/

Changes since v2:
- allow 0us as lowest possible value (early return)
- Change custom logic in mmc_delay_us() to use fsleep()
- drop dt parsing checkers

Judith Mendez (2):
  dt-bindings: mmc: Add power-off-delay-us property
  mmc: core: Add power-off-delay-us support

 .../devicetree/bindings/mmc/mmc-controller-common.yaml | 10 ++++++++++
 drivers/mmc/core/core.c                                |  2 +-
 drivers/mmc/core/core.h                                |  8 ++++++++
 drivers/mmc/core/host.c                                |  4 ++++
 include/linux/mmc/host.h                               |  1 +
 5 files changed, 24 insertions(+), 1 deletion(-)

-- 
2.54.0
Re: [PATCH v3 0/2] mmc: Add power_off_delay_us support
Posted by Ulf Hansson 3 weeks, 6 days ago
On Thu, Aug 6, 2026 at 6:23 PM Judith Mendez <jm@ti.com> wrote:
>
> This series adds power_off_delay_us support for MMC controllers,
> enabling boards to specify custom delays after MMC power off to work around
> hardware issues such as slow RC circuites on MMC VDD rails.
>
> Rather than adding host driver-specific workarounds, we abstract the
> implementation into the MMC core and pickup the delay value with a device
> tree property (power-off-delay-us). This allows any board with slow
> power off requirements to configure the necessary delay without code
> changes.
>
> The solution is minimal and follows existing patterns as with
> power_delay_ms. The allowed minimum value = 0 ms (early return).
> The default value is 1000us to not deviate from the
> original 1ms delay set in mmc_power_off().
>
> Link to v1:
> https://lore.kernel.org/all/20260716232641.2659710-1-jm@ti.com/
> Link to v2:
> https://lore.kernel.org/all/20260722205701.372789-1-jm@ti.com/
>
> Changes since v2:
> - allow 0us as lowest possible value (early return)
> - Change custom logic in mmc_delay_us() to use fsleep()
> - drop dt parsing checkers
>
> Judith Mendez (2):
>   dt-bindings: mmc: Add power-off-delay-us property
>   mmc: core: Add power-off-delay-us support
>
>  .../devicetree/bindings/mmc/mmc-controller-common.yaml | 10 ++++++++++
>  drivers/mmc/core/core.c                                |  2 +-
>  drivers/mmc/core/core.h                                |  8 ++++++++
>  drivers/mmc/core/host.c                                |  4 ++++
>  include/linux/mmc/host.h                               |  1 +
>  5 files changed, 24 insertions(+), 1 deletion(-)
>
> --
> 2.54.0
>

The series applied for next, thanks!

Kind regards
Uffe