From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f100.google.com (mail-yx1-f100.google.com [74.125.224.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 602C0480DC4 for ; Tue, 4 Aug 2026 20:38:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785875913; cv=none; b=Oc5O00Otb3oCwbbKI3W86eH2HJpuxTEoUZ1jBk21ssNK/wGibEd4/is6tVOnpwKyJoCPmS9wvn1s/HsRWUAEujgKv4dAMyg1pu8uotV1yAh1nWMf21edezlLf12S8nX95vhqOmuZKkf7ZVw0rtdxQWQFjx8BEn/0qMdIT4rKG6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785875913; c=relaxed/simple; bh=PZ//jzzE5h8FHzOfZGXqgUp+ZOZar8706pfw/P/zTb0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BdI6zNiRAY/FPHKodjDR4NeCgi9pK+XM/UyWFxav4p22HP1l2a0O6a6ttdNb7CBbFH4iCNXI2ClV6IVHGtqwlGX3q/7THUXSVmaoOwG9Io1d/jjZxs8NPc5ljqssUvFhMCguZLfGg5fWB5lDLILLZK4uaTkxiLZZcp+HTl1aMyA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=cNQzxJlo; arc=none smtp.client-ip=74.125.224.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="cNQzxJlo" Received: by mail-yx1-f100.google.com with SMTP id 956f58d0204a3-6688acd1a51so278930d50.3 for ; Tue, 04 Aug 2026 13:38:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785875911; x=1786480711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=rIZk2NKICUFTz+VkVHlow8aYGCzUye8f08tzlW4UKMM=; b=ovGZLjkWlhJ0jCmegoo4SdX8utzgELzkcSREH0SppLN9GErw7yPME/d204G5Zzw+6f zhyR4fz9wsYF1pP2K2i9t8mVwXnF4ZsMs09dVAyKa1wT0K3HJswEnR546/MG4d5RJ9m3 cYhI3UbOsx00a1qBsLhlFoMH3wmOE7dkUuFa1OqNXi1ELSbF3Z6jENhbqLnGzRVqa59x V4OCze81+g4HTApWdZnImrSG0+wDo78INGylCbsREcQ2x6DXc3tzWRNWhSb6ApltnnWk wKbjn8I5y3mxWnsGWtXVksrE/Z9wBP9kZiOaoeM3VHPHroXZQvYiOPjczMPHI4bIvKWP TBIQ== X-Forwarded-Encrypted: i=1; AHgh+RrBC+yoCcqtGgtIEiio9ONuIz3yH+KIfqVzHK5+uTsR8oiAivYp1HD0x69+c/qjlTUpIK2BBCikQKzal+Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yx2ZNWXjcUvbrGbbbRRODnOYE6bl7jfmYLXPMGjXAagHQaA+5s3 OMCIGgJv3tRD/G02PXB2aMS6D7zIHCxkQewJ2zU8lu5ul00UDS6aLPd2hlsgBFwURj18letMo/d 3mO0e5qDlJB2JnXN2D1tBetQQ5YoWfYowdueQp273zIc5YuprxKXbGN5yXl1zI8xOTC054ifO5c HXavmpKJqaH4Pev/VfcjRnfmwbVdvAP7I1FFwntmP1ZZr/L24OvIeb5sR8EzKnd83x8dwiCMa8A 3WKb7tCI7ag4Q9o X-Gm-Gg: AR+sD12yihJbBQze3NxE7Spb0K7ZcyBFtWShX+MiN0OsUz/hpLDnph46UK9N5lY3k8L g8Ftiu3ikml5oo+BMrZ8HKoImoZtJw48y8YQUB0CvcEANGSS+W9OKST/xDC/VWO6dX9mUKqDgMy 4ucH7jqLVwh5ngiXFqcoa8IBNPZwOfaHDDu1oSAex0kCm1BYv8H9ePkdprJZBpImyCW0211IxzF HW0kOBa7LQmvH9qPJQvTwtdXU2IUakg/fn0AP84lZnrtEcrOGqalfdchEb0kEjuvWSmL4B7y7yk QZCDx1qGqO26jISYmjFfREoWTwtZMB3pQCUC0PNWo7atMsfwnWKLHUfSQliIkzpBqusUrNDKA7f ShrX+zTaXutj/1F/NgGdelC54kWmF4b3TvA+62NSCZ8Me1tfM/ez2kMELN7qOyefRIGbW+T0zTV ngTKTQGVv5sPOlDXQJ8e2QCSlg1zGuFw6s X-Received: by 2002:a53:c446:0:b0:667:f3d7:eb35 with SMTP id 956f58d0204a3-6699aa3eb17mr829235d50.6.1785875911045; Tue, 04 Aug 2026 13:38:31 -0700 (PDT) Received: from smtp-us-east1-p01-i01-si01.dlp.protect.broadcom.com (address-144-49-247-26.dlp.protect.broadcom.com. [144.49.247.26]) by smtp-relay.gmail.com with ESMTPS id 956f58d0204a3-6699136a008sm146134d50.2.2026.08.04.13.38.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Aug 2026 13:38:31 -0700 (PDT) X-Relaying-Domain: broadcom.com X-CFilter-Loop: Reflected Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-934963b2bc0so30873785a.3 for ; Tue, 04 Aug 2026 13:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1785875910; x=1786480710; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=rIZk2NKICUFTz+VkVHlow8aYGCzUye8f08tzlW4UKMM=; b=cNQzxJlotuAk+Z92InR4LniLUgBS4qsc5B/UymFSdWuSl7PHyQ8OhjxjMz9KIBKmcQ KQdLrnue8FQTyjFhIeOajvBo0KXa9ygFdw5kRUpa7FfzdBtMoMTgF7WOi+wL5qI1qssE B+fNhhLvMvRZz6HGQHGNT9Buu2H8zDDAlJJLw= X-Forwarded-Encrypted: i=1; AHgh+RpoQFfNUnYDez/gLPqZJviVMBV3yml3wT3vs2DZK2FoUgiSisXU8Zs/5HHnauIrnKDb/wjB7uI4DXR0Zyk=@vger.kernel.org X-Received: by 2002:a05:620a:a415:10b0:932:da46:6279 with SMTP id af79cd13be357-9364921af86mr105778185a.23.1785875910293; Tue, 04 Aug 2026 13:38:30 -0700 (PDT) X-Received: by 2002:a05:620a:a415:10b0:932:da46:6279 with SMTP id af79cd13be357-9364921af86mr105774385a.23.1785875909755; Tue, 04 Aug 2026 13:38:29 -0700 (PDT) Received: from mail.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9364a52dbeesm11089085a.30.2026.08.04.13.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2026 13:38:29 -0700 (PDT) From: Kamal Dasu To: Ulf Hansson Cc: Kamal Dasu , 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 Subject: [PATCH v6 2/3] dt-bindings: mmc: Add reset-card-at-resume property Date: Tue, 4 Aug 2026 16:38:17 -0400 Message-Id: <20260804203818.881765-3-kamal.dasu@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260804203818.881765-1-kamal.dasu@broadcom.com> References: <20260804203818.881765-1-kamal.dasu@broadcom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-DetectorID-Processed: b00c1d49-9d2e-4205-b15f-d015386d3d5e On some platforms, firmware or other hardware accesses the card during suspend/resume, before the kernel's own resume path has run, leaving the card in a state the kernel can no longer assume it knows. Add a flag property so such boards can tell the mmc core the card needs to be reset before it can be used again. This is expected to be paired with keep-power-in-suspend on boards whose firmware needs the card to stay powered and live throughout suspend: since the card is never power-cycled, nothing else would force it back to a known state on resume. Signed-off-by: Kamal Dasu --- Changes in v6: - New patch, per Ulf's suggestion: rather than fold "needs a reset at resume" into keep-power-in-suspend's own meaning, describe it as its own independent property, so the two can be combined only where actually needed (brcmstb sets both; SDIO's existing keep-power-in-suspend users are unaffected and set neither this nor a reset). Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml b/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml index c18bf0d6a56e..6929969ed5a2 100644 --- a/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml +++ b/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml @@ -293,6 +293,13 @@ properties: description: Preserves card power during a suspend/resume cycle. + reset-card-at-resume: + $ref: /schemas/types.yaml#/definitions/flag + description: + The HW/FW may have accessed the card during suspend/resume, + leaving it in an unknown state. Hence, before the card can be + used, it must be reset. + wakeup-source: $ref: /schemas/types.yaml#/definitions/flag description: -- 2.34.1