All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] AM65x MMC power-off delay fix
@ 2026-09-09 17:38 Judith Mendez
  2026-09-09 17:38 ` [PATCH v2 1/1] arm64: dts: ti: k3-am654-base-board: Add power-off delay for proper MMC power cycle Judith Mendez
  2026-09-22 14:22 ` [PATCH v2 0/1] AM65x MMC power-off delay fix Nishanth Menon
  0 siblings, 2 replies; 4+ messages in thread
From: Judith Mendez @ 2026-09-09 17:38 UTC (permalink / raw)
  To: Judith Mendez, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-kernel, devicetree, linux-kernel

This series adds power-off-delay-us in AM65x EVM DT to ensure proper MMC
card power cycling during boot.

AM65x EVM VDD rail discharges slowly (~632.97ms) through RC circuit.
Without sufficient power-off delay, SD card boot fails in bootloader stage.

AM65x SD boot failure was initially exposed by U-Boot MMC driver patch [0],
which was correct but revealed EVM hardware limitation. There is no SD card
boot failure in Linux yet, but proper power cycling is required regardless.
Additionally, equivalent Linux kernel discussions for similar fix [0] are
ongoing. Linux MMC driver now supports delay after MMC power-off [1] and
this patch adds power-off-delay-us=650ms to AM65x EVM DT.

Links:
[0] U-Boot patch & debug discussion:
https://lore.kernel.org/u-boot/d17a810c-e2db-4a24-a37d-2d7e02466ce9@ti.com/

[1] Merged power_off_delay_us support in Linux MMC:
https://lore.kernel.org/linux-mmc/20260806162202.657512-1-jm@ti.com/

V1: https://lore.kernel.org/linux-devicetree/20260908170635.238775-1-jm@ti.com/

Changes since v1:
- Fix commit subject and description
- Add cover letter to provide full context of implementation & history

Judith Mendez (1):
  arm64: dts: ti: k3-am654-base-board: Add power-off delay for proper
    MMC power cycle

 arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 1 +
 1 file changed, 1 insertion(+)

-- 
2.34.1


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

* [PATCH v2 1/1] arm64: dts: ti: k3-am654-base-board: Add power-off delay for proper MMC power cycle
  2026-09-09 17:38 [PATCH v2 0/1] AM65x MMC power-off delay fix Judith Mendez
@ 2026-09-09 17:38 ` Judith Mendez
  2026-09-09 17:49   ` sashiko-bot
  2026-09-22 14:22 ` [PATCH v2 0/1] AM65x MMC power-off delay fix Nishanth Menon
  1 sibling, 1 reply; 4+ messages in thread
From: Judith Mendez @ 2026-09-09 17:38 UTC (permalink / raw)
  To: Judith Mendez, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-kernel, devicetree, linux-kernel

The AM65x EVM MMC1 VDD rail discharges slowly through RC circuit.
SD spec (section 6.4.1.3) requires VDD < 0.5V for minimum 1ms during
power cycle. Measured discharge time on this board is ~632.97ms to
reach < 0.5V threshold.

During boot, MMC power cycles between boot stages. Without power off
delay, VDD doesn't fully discharge. Card retains 1.8V signaling state
from previous boot stages. When MMC driver later initializes, card no
longer asserts S18A in ACMD41 response (already switched to 1.8V). Host
misinterprets card state and forces 1.8V anyway, falling into a bad
state and causes MMC init failure with "unable to select a mode"
signature.

Add power-off-delay-us = 650000 (650ms) to ensure proper VDD discharge
during power cycles, allowing card to fully reset state between boot
stages.

Signed-off-by: Judith Mendez <jm@ti.com>
---
Changes since v1:
- Fixup commit header and description
---
 arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
index ca1300e130936..edcf039ccfbd0 100644
--- a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
@@ -460,6 +460,7 @@ &sdhci0 {
 &sdhci1 {
 	status = "okay";
 	vmmc-supply = <&vdd_mmc1_sd>;
+	power-off-delay-us = <650000>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_mmc1_pins_default>;
 	ti,driver-strength-ohm = <50>;
-- 
2.34.1


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

* Re: [PATCH v2 1/1] arm64: dts: ti: k3-am654-base-board: Add power-off delay for proper MMC power cycle
  2026-09-09 17:38 ` [PATCH v2 1/1] arm64: dts: ti: k3-am654-base-board: Add power-off delay for proper MMC power cycle Judith Mendez
@ 2026-09-09 17:49   ` sashiko-bot
  0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-09-09 17:49 UTC (permalink / raw)
  To: Judith Mendez; +Cc: devicetree, robh, conor+dt

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The `power-off-delay-us` property is placed directly in the SDHCI host node where it is silently ignored by the kernel, rendering the intended fix ineffective.
--

commit ad27b5f7c84e8187c60f3d6ec61cfd8ac2996675
Author: Judith Mendez <jm@ti.com>

arm64: dts: ti: k3-am654-base-board: Add power-off delay for proper MMC power cycle

This commit adds a power-off-delay-us property to the SDHCI1 node in the
AM654 base board Devicetree. It intends to ensure the MMC1 VDD rail fully
discharges during power cycles between boot stages.

> diff --git a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
> index ca1300e130936..edcf039ccfbd0 100644
> --- a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
> @@ -460,6 +460,7 @@ &sdhci0 {
>  &sdhci1 {
>  	status = "okay";
>  	vmmc-supply = <&vdd_mmc1_sd>;
> +	power-off-delay-us = <650000>;

[Severity: High]
Will this property be parsed by the kernel when placed directly in the host
node?

The power-off-delay-us property is specific to the mmc-pwrseq-simple binding
and is parsed exclusively by drivers/mmc/core/pwrseq_simple.c. Neither the
core MMC code (drivers/mmc/core/host.c) nor the SDHCI host drivers parse
this property directly from the host controller node.

Because it is placed directly under &sdhci1 rather than inside an
mmc-pwrseq-simple node, the kernel will silently ignore it. Does this leave
the MMC initialization failure unresolved?

>  	pinctrl-names = "default";
>  	pinctrl-0 = <&main_mmc1_pins_default>;
>  	ti,driver-strength-ohm = <50>;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909173833.764103-2-jm@ti.com?part=1

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

* Re: [PATCH v2 0/1] AM65x MMC power-off delay fix
  2026-09-09 17:38 [PATCH v2 0/1] AM65x MMC power-off delay fix Judith Mendez
  2026-09-09 17:38 ` [PATCH v2 1/1] arm64: dts: ti: k3-am654-base-board: Add power-off delay for proper MMC power cycle Judith Mendez
@ 2026-09-22 14:22 ` Nishanth Menon
  1 sibling, 0 replies; 4+ messages in thread
From: Nishanth Menon @ 2026-09-22 14:22 UTC (permalink / raw)
  To: Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Judith Mendez
  Cc: Nishanth Menon, linux-arm-kernel, devicetree, linux-kernel

Hi Judith Mendez,

On Wed, 09 Sep 2026 12:38:32 -0500, Judith Mendez wrote:
> This series adds power-off-delay-us in AM65x EVM DT to ensure proper MMC
> card power cycling during boot.
> 
> AM65x EVM VDD rail discharges slowly (~632.97ms) through RC circuit.
> Without sufficient power-off delay, SD card boot fails in bootloader stage.
> 
> AM65x SD boot failure was initially exposed by U-Boot MMC driver patch [0],
> which was correct but revealed EVM hardware limitation. There is no SD card
> boot failure in Linux yet, but proper power cycling is required regardless.
> Additionally, equivalent Linux kernel discussions for similar fix [0] are
> ongoing. Linux MMC driver now supports delay after MMC power-off [1] and
> this patch adds power-off-delay-us=650ms to AM65x EVM DT.
> 
> [...]

I have applied the following to branch ti-k3-dts-next on [1].

For future reference, we dont need a coverletter for a single patch..
the information can be plugged in the diffstat section.

Additionally, I see that power-off-delay-us is in next - if the patch
with commit 555bb7b7c1497accc0894423220f772f006a9584 is dropped,
please let me know so that this patch can be dropped from my tree
since that is required for dtbs_check to be clean. Picking this patch
as a valid required fix and helps users.

Thank you!

[1/1] arm64: dts: ti: k3-am654-base-board: Add power-off delay for proper MMC power cycle
      commit: 7dd4fb52749d9726302463dfa2ccf71db6bbed4c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
https://ti.com/opensource


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

end of thread, other threads:[~2026-09-22 14:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-09 17:38 [PATCH v2 0/1] AM65x MMC power-off delay fix Judith Mendez
2026-09-09 17:38 ` [PATCH v2 1/1] arm64: dts: ti: k3-am654-base-board: Add power-off delay for proper MMC power cycle Judith Mendez
2026-09-09 17:49   ` sashiko-bot
2026-09-22 14:22 ` [PATCH v2 0/1] AM65x MMC power-off delay fix Nishanth Menon

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.