Re: [PATCH v2 1/2] dt-bindings: mmc: Document no-mmc-sleep property

From: Ulf Hansson

Date: Sat Jul 18 2026 - 09:44:30 EST


On Fri, Jul 17, 2026 at 8:06 PM Kamal Dasu <kamal.dasu@xxxxxxxxxxxx> wrote:
>
> Some (e)MMC devices cannot reliably resume from the SLEEP (CMD5)
> state within their advertised S_A_TIMEOUT, which can be problematic
> on systems that resume from Suspend-to-DRAM by first pulling boot
> code from eMMC using hard wired logic that is not field updatable.
> Add a no-mmc-sleep flag property so affected boards can tell the
> mmc core to never put the card to sleep.

Please clarify what the FW is doing in the commit message so we can
better understand what is needed. Along the lines of the below.

Moreover, as stated for the cover letter; this is rather about keeping
the card powered on during system suspend, because of the behaviour in
the FW.

Moreover, because of the behaviour in the FW, the kernel still needs
to re-initialize the card at system resume.

In regards to the card advertising a wrong S_A_TIMEOUT, that is a
completely separate issue. If you want to fix that, we can for sure
use a card quirk - although that quirk should only override the sleep
timeout value that we use in the kernel - and not prevent the sleep
command.

>
> Signed-off-by: Kamal Dasu <kamal.dasu@xxxxxxxxxxxx>
> ---
> Changes in v2:
> - New patch. v1 used a card-level MMC_QUIRK_BROKEN_SLEEP quirk
> instead of a DT property; this documents the DT property backing
> the host capability added in patch 2, per Ulf's suggestion.
> - Reworded the rationale in the commit message and the binding
> description per Florian's review.
>
> .../devicetree/bindings/mmc/mmc-controller-common.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml b/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml
> index 3d7195e9461c..11df0524530c 100644
> --- a/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml
> @@ -232,6 +232,14 @@ properties:
> description:
> All eMMC HS400 modes are not supported.
>
> + no-mmc-sleep:

This is a misleading name, please try to find a better one.

The property should say "because of FW, we need to keep power in
suspend but re-initialize it at resume".

> + $ref: /schemas/types.yaml#/definitions/flag
> + description:
> + The attached (e)MMC card cannot reliably resume from the SLEEP
> + (CMD5) state within its advertised S_A_TIMEOUT, so the
> + controller must not put it to sleep during suspend or power
> + off.
> +

Please rephrase this, along the lines of what I suggested above.

> dsr:
> description:
> Value the card Driver Stage Register (DSR) should be programmed
> --
> 2.34.1
>

Kind regards
Uffe