All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] mmc: Add power_off_delay_us support
@ 2026-07-22 20:56 Judith Mendez
  2026-07-22 20:56 ` [PATCH v2 1/3] dt-bindings: mmc: Add power-off-delay-us property Judith Mendez
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Judith Mendez @ 2026-07-22 20:56 UTC (permalink / raw)
  To: Judith Mendez, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-mmc, devicetree, linux-kernel

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 = 1us and maximum value=
10000000us. The default value is 1000us to not deviate from the
original 1ms delay set in mmc_power_off().

Requesting comments for how big the delay should be maxed at, currently
it is set to 10000000us, but not sure if this is too high. Testing
10000000us on AM65 EVM seems to not break SD boot so going with this
value as the max allowed value for now.

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

Changes since v1:
- Add mmc_delay_us()
- Switch from ms to us implementation due to switch from
  post_power_on_delay_ms to power_off_delay_us
- Update commit messages to include more coverletter descriptions

Judith Mendez (3):
  dt-bindings: mmc: Add power-off-delay-us property
  mmc: core: Add mmc_delay_us() for microsecond precision delays
  mmc: core: Add power-off-delay-us support

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

-- 
2.54.0


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

end of thread, other threads:[~2026-07-22 21:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 20:56 [PATCH v2 0/3] mmc: Add power_off_delay_us support Judith Mendez
2026-07-22 20:56 ` [PATCH v2 1/3] dt-bindings: mmc: Add power-off-delay-us property Judith Mendez
2026-07-22 20:57 ` [PATCH v2 2/3] mmc: core: Add mmc_delay_us() for microsecond precision delays Judith Mendez
2026-07-22 21:04   ` sashiko-bot
2026-07-22 20:57 ` [PATCH v2 3/3] mmc: core: Add power-off-delay-us support Judith Mendez
2026-07-22 21:06   ` sashiko-bot

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.