From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f100.google.com (mail-pj1-f100.google.com [209.85.216.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 C5F093F823F for ; Wed, 5 Aug 2026 22:25:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785968718; cv=none; b=LzJ859joVEjE6G9Butn6tlZEea6XM3rrpp/vvhZXmLyMaT9lnYok3RgvdxNTb6S2liXy3niqJLI8QuvyUflJMelMU6WW8JkNl7tVLy366H9kNb/VXVunty+uGJFtxH5I0YuDorSpi0tjF5FqQlsLW/LLv9O2YWHZ2SkTth2Tn/0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785968718; c=relaxed/simple; bh=6qwL+yfFZcESUNF5HiWRkDnZTCmWLZVhdGnov/uFMbE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oA6DZZru3j4I+alITI9f8jOT2OJQzy9Ubsi1bcRgXrPhupOftF8PFQ8pYDq7bSO3GxJxuvC2+5a7TCtFslDY6i72+r2ANoxg+sgZHRtC0FPNLVt1VJvUBxS6ad6KJkjMtFd7O8ydKEj3pwBsLRJu3frOKvk3An156fxyL4+VmKw= 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=erIc+Auj; arc=none smtp.client-ip=209.85.216.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="erIc+Auj" Received: by mail-pj1-f100.google.com with SMTP id 98e67ed59e1d1-383b4a3755fso1526751a91.3 for ; Wed, 05 Aug 2026 15:25:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785968716; x=1786573516; 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=aR+KeTjwxOC6HIctWVlnauptoumuvtPEgsVHqo6aA/w=; b=HIO//bmU3Hqa5mBbviSFzk84JemANWKa6Yk1ZnlI1D5GC/dcHTT4kwkLT2iozVL3Yt OIcMPa2vmLSsfU+6NkVcAYWcNCofcwj7tDbCpqmZBLwnsBSbnI/xVpBAzc8eEZ+46zHN 6+cOZXrP4DpSRNgzySdvW8y8TRzh6WpphHzdE+EmoYXCg18fkTVBQJpSwrzleNmJO+TW w4Rj3xOg/xu+YYSj1G7jg5eee9OUzd5vvWnrN6JkXFMyQBhUHVHbpqWuMrqQqgXRH73c yjVbeQJGlgcyjR793klbVIc4TFBN0fqs9MgVNU0X87bkbtOKqrG9h8weqC//EjzhUzou ejOw== X-Forwarded-Encrypted: i=1; AHgh+RovngMlPLsyLSqLF2zXpUOVqtbxt4CIeR+4vBVgVVHS+3JKGVXdcKIr7k90xvVs09225KGQOmppytPBxz4=@vger.kernel.org X-Gm-Message-State: AOJu0Yxs0T+YF5+YglAOND5jHePlmQNK2NVky+lUHuvb5P0zibgLV6KA ZOPkF9B2wuLNdFcZYV49D1SvyUJrfItNjdeCxgVM1Jm5Yn7Qac8yhJ4mtYIvDIhIn1ovjSAV/VU k7tVTI5EA3Qb8q2fIneICSC6QSppssoR3SNQimBBcwgk1r89XCIh7DGiHnOXFU0wQTMFGhL8Ezc jSfiTJoJz0XR/vpby38R5KNQ90Q8B4XyX4F3AyS8VUyayezlnBi/AWAviuB9vheCxVYycShUmbG daksBDXNQ/EqgBK X-Gm-Gg: AR+sD12s+/MR3T5rsN+eZgQNZ5e4I7KJADjsrh23sASf1iUp/xuinxoQ2g8YljhMau5 wrXmucCUb/Y2qed1yBqCuQCQs1e1bS++wFG53O9d3ErJlU8523b9XxZB/PLG66smsOISSDOpIHG EeUE6RFJT93beXfC8/haPefRB3nPIGzCQXVVED6I/V6AUJjwI8eNlhsH7UuGlO3FT+Ta9U/LHPL YAHMkglo11oMCnYSvcaCEMjdRBypUOqKpGdqegz08i9MBt0h4GyJC4y8twj1MwQDekKhyXWvCfd iPG6jwzJfSoa3llh54wjsA/jpS1l04xUCrdFvIXGGKoAcY5Nl7uCITkMlLQpAru3DIKtEm0DF/A ve/sm10dJTXUWkgH2ywqnbd2Xv7UtO2ejbFZ0A3vlHt+h03pj0oq+dXNCcyU7e/bIHJJx0TKTt+ HdS33MGeoh3sB9rtDSpGf2RXG/1z0QfjPp X-Received: by 2002:a17:90b:4b87:b0:37f:c2a8:ce45 with SMTP id 98e67ed59e1d1-3903c537d5fmr9276550a91.4.1785968716020; Wed, 05 Aug 2026 15:25:16 -0700 (PDT) Received: from smtp-us-east1-p01-i01-si01.dlp.protect.broadcom.com (address-144-49-247-27.dlp.protect.broadcom.com. [144.49.247.27]) by smtp-relay.gmail.com with ESMTPS id 98e67ed59e1d1-39085ee6b3dsm145005a91.4.2026.08.05.15.25.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Aug 2026 15:25:16 -0700 (PDT) X-Relaying-Domain: broadcom.com X-CFilter-Loop: Reflected Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2caf4173b1cso26469685ad.3 for ; Wed, 05 Aug 2026 15:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1785968714; x=1786573514; 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=aR+KeTjwxOC6HIctWVlnauptoumuvtPEgsVHqo6aA/w=; b=erIc+Auj8TsMWxfKzO/qaB51lq+FRDe2ySmLtB1kkmg+4NheD+WSCR3CPWQZutvjv0 ep+xGAGy/3M1uAp8CHxrTkvzieik/ORrfYzr2gPAPXa69jGgG2CFr0hObhyD7BARbgX3 DrAcb0+gaRMFb8UQInSZ7iKg3fMJZTKoUOInA= X-Forwarded-Encrypted: i=1; AHgh+RqBUxmD9hWYAurcIN09QbR7Ew2b6LhOQtZrFYdITGJ29hSl4E+zR7GCbBZpFST5Y/05vMeaMsAPp+FfjnY=@vger.kernel.org X-Received: by 2002:a17:902:f644:b0:2c9:b2c1:13ec with SMTP id d9443c01a7336-2d0ca756f9bmr18188735ad.11.1785968714400; Wed, 05 Aug 2026 15:25:14 -0700 (PDT) X-Received: by 2002:a17:902:f644:b0:2c9:b2c1:13ec with SMTP id d9443c01a7336-2d0ca756f9bmr18188235ad.11.1785968714061; Wed, 05 Aug 2026 15:25:14 -0700 (PDT) Received: from mail.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3158676f579sm18526160eec.20.2026.08.05.15.25.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 15:25:13 -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, Krzysztof Kozlowski Subject: [PATCH v7 2/3] dt-bindings: mmc: Add reset-card-at-resume property Date: Wed, 5 Aug 2026 18:24:59 -0400 Message-Id: <20260805222500.2567801-3-kamal.dasu@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260805222500.2567801-1-kamal.dasu@broadcom.com> References: <20260805222500.2567801-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 Reviewed-by: Krzysztof Kozlowski --- Changes in v7: - Added Krzysztof's Reviewed-by. - No other change here; patch 3/3 now requires this property alongside keep-power-in-suspend for (e)MMC rather than treating them as fully independent in the driver -- see that patch's changelog. 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