From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B019C30F548; Thu, 23 Jul 2026 19:36:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784835407; cv=none; b=YtKBAKswQaAE23mLOl+CB1i7EV00+WuuDA/zXJNJakJv8bzPLXaWus0mifPF8+UKtOt3ZY7XOJPgPxCqd9iWFQ9Lxcc6vAkZpPmCkicHNoaZ73yt/OdR4idUti/kM2EV9fDabTgFEv2qrC4X7VMhvmS5ctaBlMkRZ932zBrKvkc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784835407; c=relaxed/simple; bh=jFuLXgh0bEaee69n7DExNdfB3ziexUUqrHUymek6atQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jQyTra2/O7CzBWYUrvnp/mPh31C+aNtYiGlKosRYZBbkSQV690wcNopGrtA93AFkO1m+O3UGlTsUOgaXL96J+ObPAQEYsVldt7hi8B4LgmU/2Wi8R2fq5JkQMN8HNepQFDGHho3pVWwdbnPfk54uRPvfEj2AkJIhfGyiDJ0qABM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IJHyf6uz; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IJHyf6uz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87B4B1F000E9; Thu, 23 Jul 2026 19:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784835405; bh=WPjBErW+lmtK6BA7KhIiumfoC4+KPHRbK9hB/HpL/XI=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=IJHyf6uzVuB5JPitPKvJwLZT4Xcz67ELW2iLtNDTrBk63HLIc5oWen5j5LY+Zscjx wwVCxmOlN4dpdueoGiwrdVsdaOKE9p8GECY6vH34L0g2pJtIwr+r3EgCpE2a7F50RT 5ABbIvfzimvImjLYW+HJpqkxjQohn1Wj62BM/TQmlLK5cpmFaeyQR84JR5wnhLiY54 duM7sT/YJyOyUs651Ph2f58UltHHWaLDseRCmLkyuTYo6wKETeqhHvzdXyZDQgwWHy nWeTy12gmLMoxpGu4hc20rqbTMDvdf0CBpPm83LctzWjE2DSE6oMYbhFWaebi90r+E 8xbuMbn4WqwkA== Message-ID: <5021dbc6-35a7-4af1-bc7b-d918faa2c4fc@kernel.org> Date: Thu, 23 Jul 2026 21:36:36 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/2] dt-bindings: mmc: Document no-mmc-poweroff-suspend property To: Kamal Dasu Cc: Ulf Hansson , Florian Fainelli , Wolfram Sang , Oleksij Rempel , Avri Altman , Pedro Demarchi Gomes , Erick Shepherd , Adrian Hunter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260722211417.3702709-1-kamal.dasu@broadcom.com> <20260722211417.3702709-2-kamal.dasu@broadcom.com> <20260723-venerable-infallible-oriole-434b75@quoll> <1a9d18ce-e6dc-40e0-aa2a-e27f694e1217@kernel.org> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZ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CF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu4vXVFBYI GmpyNPYzRm0QPwARAQABwsF2BBgBCgAgAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtBYpsFAmna YUkACgkQG5NDfTtBYptX+BAApg32CkxwNucNEi8WfWA8oKkW0y8YDuY6ORMo9FWNGiT/OTy0 vyJrLocrpn86zwfjVp+eCrssPYh8eqJfnWqmYv6ACQtHPYzPZQ3mSo8H97Z01oUxITzCxpXm ZkLgPIqtDPcC2E3dPM/fVxcyowM8XsaMA9wcsaUYrta8toOq2b9tKcjleKMfMrm0gQ9u7wUc QbLkwj6TCLOwucb07GXzLTNF9PZmaDUpKAZjMjmrW+le+SFvQbhamx0rxLWPR0NWntXpbCn+ +ACch03p/JyTBVktxFsFyCt7pTPE1kEaeuXBTe/a2D9iQvRxRW19LvuO2e59/u1wYUiH/orz wbIC2S4dBsPAPihL3ztOU1yE86GPyQtSE0kU+/7snnLt4QGi6PChf3t5gnNjAzjUUovO8rgI c+5yN5heq5loYHgK6OQ9OlHzsPHO9e9MOQcKlFycs1pyijFGzDwdNUm/SchK8iWT2QApTx4A K9bCVaboTA2T77QYkRcRJYSsO1alGX0ome/hMLD1daXlkrNUp1HWa3K4iytLRXjCSIorWiGs n+q3krnpXu3TFkA8qtOFZMdnIiFuiq1yLT8hptsV5xh1TA2nsVvSYiaCr3q4s4BKjS/KrLDb qoxzw8ISjdUp4pA85vb6YLCmb39NgidD+7PmAr65lBNveIFynTgsja1rRQ4= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 23/07/2026 21:24, Kamal Dasu wrote: > On Thu, Jul 23, 2026 at 3:01 PM Krzysztof Kozlowski wrote: >> >> On 23/07/2026 20:53, Kamal Dasu wrote: >>> On Thu, Jul 23, 2026 at 3:51 AM Krzysztof Kozlowski wrote: >>> >>>> On Wed, Jul 22, 2026 at 05:14:16PM -0400, Kamal Dasu wrote: >>>>> On some platforms, firmware accesses the (e)MMC card directly during >>>>> system resume from Suspend-to-DRAM, before the kernel's own resume >>>>> path has run, in order to load boot code using hard wired logic that >>>>> is not field updatable. This requires the card to remain powered >>>>> and responsive throughout suspend: it cannot be put to sleep, sent a >>>>> power-off notification, or have its supply removed. >>>>> >>>>> Add a no-mmc-poweroff-suspend flag property so affected boards can >>>>> tell the mmc core to keep the card powered across suspend instead of >>>>> sleeping or powering it off. >>>>> >>>>> Signed-off-by: Kamal Dasu >>>>> --- >>>>> Changes in v3: >>>>> - Renamed from no-mmc-sleep; dropped S_A_TIMEOUT framing per Ulf. >>>>> >>>>> Changes in v2: >>>>> - New patch, replacing v1's card-level quirk, per Ulf. >>>>> >>>>> .../devicetree/bindings/mmc/mmc-controller-common.yaml | 10 ++++++++++ >>>>> 1 file changed, 10 insertions(+) >>>>> >>>>> diff --git >>>> a/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml >>>> b/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml >>>>> index 3d7195e9461c..5f7b3f8ef1dd 100644 >>>>> --- a/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml >>>>> +++ b/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml >>>>> @@ -232,6 +232,16 @@ properties: >>>>> description: >>>>> All eMMC HS400 modes are not supported. >>>>> >>>>> + no-mmc-poweroff-suspend: >>>>> + $ref: /schemas/types.yaml#/definitions/flag >>>>> + description: >>>>> + On this platform, firmware accesses the attached (e)MMC card >>>>> + directly during system resume, before the kernel's own resume >>>>> + path runs. The card must therefore stay powered throughout >>>>> + suspend, and the controller must not send it a sleep or >>>>> + power-off notification. The kernel re-initializes the card >>>>> + after resume, since firmware may have already reset it. >>>> >>>> Isn't this exactly the same as keep-power-in-suspend? >>>> >>>> >>> Not quite, though I see why it reads that way from the description >>> alone. >>> >>> keep-power-in-suspend only takes effect through host->pm_flags, which >>> gets set at runtime via sdio_set_host_pm_flags() -- an SDIO function >>> driver opts in from its own suspend() callback, per suspend cycle. >>> The consuming logic lives entirely in mmc_sdio_suspend()/ >>> mmc_sdio_resume() (drivers/mmc/core/sdio.c); pm_flags is never read >>> in mmc.c, which is what this series touches. >>> >>> no-mmc-poweroff-suspend differs in two ways: >>> >>> - It's a fixed platform characteristic, not a per-driver runtime >>> request. There's no SDIO-style function driver to call an opt-in >>> API from for a plain (e)MMC storage card -- the requirement here >>> (firmware always touches the card at resume, on this board) is >>> always true, not something decided per suspend cycle. >>> - The resume-side behavior differs. keep-power-in-suspend without a >>> wake IRQ does nothing at resume: it assumes the card's state >>> survived untouched. This flag needs the opposite -- keep power, >>> but still fully re-initialize the card via mmc_init_card(), since >>> firmware may have reconfigured it while the kernel was suspended. >> >> All this is just driver stuff which I did not ask about. >> >> The property is described pretty the same - do not power off during >> suspend/resume. >> > > Do you want me to fold this change into using 'keep-power-in-suspend' > for mmc as well ?. I don't want a new property if it has exactly the same meaning. Of course I am happy to hear why the property has different meaning in terms of hardware description. We do not talk here about drivers, obviously. Best regards, Krzysztof