From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vk1-f227.google.com (mail-vk1-f227.google.com [209.85.221.227]) (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 EF5EF3D5C2C for ; Fri, 7 Aug 2026 20:01:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.227 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786132902; cv=none; b=N/A0yU8EuXUFrOm7USnNsxQ3Bx7PVSajq8iLBvuyaQqxUXTlymvXqb1vDV4nAjG00nyt5ac8twX/OYnYD9ioUhBuVv5NT/0wJo0gL9a5UK6w1FxRKweb+1ZfZrxL7+wCKSAHTET+r/ImE1KZ6PTUDpH9OjZ9OZkb2G2FxCM+snQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786132902; c=relaxed/simple; bh=vr/9876nQ9Yqa2p62Al3XaX5d9J+sOFIuHlt/3IXgHE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dTF6jA1aJJpUWz7o8l2pRWamAGGTRNYqlOxQzkzMQCFNGvCOGcQ+2OjwZga8uhJZsVCUkdHeBKCZjd/P7FfQcFyj2zjSDzcoKmfqrCMyxG4/9Qh0wHhkeixV3rRbfmUzQvee3TdlfqhxEZadUyr7AG60wnPb0kNyNTzRFl1SP7U= 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=aARHbHSP; arc=none smtp.client-ip=209.85.221.227 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="aARHbHSP" Received: by mail-vk1-f227.google.com with SMTP id 71dfb90a1353d-5bf95ade656so1311735e0c.1 for ; Fri, 07 Aug 2026 13:01:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786132900; x=1786737700; 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=GUobKnTJDW6OHCpTnuG5AIhSRJPdO7KkwqnQ+2e+QDs=; b=YW0Zk02CqgDRFzmyCNAuhAdndWN0lgMLIFRQX88rTnpTYrt99+9eJgLxTvU8uA/+mn RcpMxyXniKkrNl0tpw6lFh22exaFCspL1ZfdNA5s5W3AL0D101h/Lavj02iRRw41f+o0 3rMh7bkGJfpzBADsnH6DmBvypJjqcCQmsWvmqT/SDUu44VnmqOQy3A91xV02Hktbf61I IWHZRhjPnT/t1ZqjbWE7Ny/C0HIfyTwNZkdM+su+E+owCX6w3rNxyYtihZlwXpqHXRn4 epyuIUTPWicC8Lj/SqJyZgmWE/QDv75AspjELsApOTEpthdYzX9LGJQbPx79kqmB1b0K muww== X-Forwarded-Encrypted: i=1; AHgh+RownnKoUzhbnxIMeYKjhb605asFp6rWly4ny2h5/b3KAPhpQ+SB/CWN5zuWqrvTY8O6b/wfFujfr6Duh2Q=@vger.kernel.org X-Gm-Message-State: AOJu0YwzhvCAGHaEVdwFtPqeBBQPHRDo6N/V/qZRAwXl6WFVPHN5pcpS VJ1RSw+QZPiIETgO4pKRmOtx4QgnMcbsJZBe+e54bAsZoETiY4rjzYBppnu1aUluVyGJQyQVUlZ y5W0MAan/snIqOz4AQ0RTLpqFcMQsaE53laZG0iHONJodObviBqK+vvEQvMCyQxNM0kjg7BD7RC 1ulD3BSUCp9nqI04TGt6JuIuJ6vtg8uR32psiqOjXnQ1lF/2KZs57IRxt9yam4DQvjvT+1J2pB1 Q5PibvmbhOffJF1 X-Gm-Gg: AR+sD13F/QEoDyyXE2nq7DYIEwPv+PUku+sR9UWDeCOk2TPdkW+sfYzp2wNY4kQBGxR +KqljA6OJQ+59LSWoGFAicbNpvZVBohhBCSCN4V3ZFgBWcFk0QKSgocUqZlMPZ/6vzbQdf8M6rF XD1VVHQlyu7y/QfuYXtOc6fNMqgITvhpApHWPxnOtijtOv8iN7forzV/7Mg4ZzT1verXO/9mH92 mhE04ToA91A4/v92g+m2qbfFEtkI5jnL8xfz6hhwhIQyGMMjlTtWscXvi8PXa2IP3HzJ8xXvy5Q Fsj/xU6TeFz/Hkj/ADCwzh+zVu2g9Uk4b3rcf8ad+HeYopW9LR0Ij/7w10h97bSxs70BcNHIQ9i 62qxUXyRoNaSqeDL5UAGLs7coOufvYGgpmGwsOVjlzEElCEVBQMEhTlQ74FoNENi/KU3h/eSOKu vYohAeWXngR0jJ4Ld9oMUAzXILfVCd8A== X-Received: by 2002:a05:6122:32c8:b0:5bf:a6dc:e631 with SMTP id 71dfb90a1353d-5c4095ad02emr752319e0c.14.1786132899520; Fri, 07 Aug 2026 13:01:39 -0700 (PDT) Received: from smtp-us-east1-p01-i01-si01.dlp.protect.broadcom.com (address-144-49-247-0.dlp.protect.broadcom.com. [144.49.247.0]) by smtp-relay.gmail.com with ESMTPS id 71dfb90a1353d-5c40b167d8dsm524618e0c.7.2026.08.07.13.01.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Aug 2026 13:01:39 -0700 (PDT) X-Relaying-Domain: broadcom.com X-CFilter-Loop: Reflected Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-930a098ea19so423406685a.1 for ; Fri, 07 Aug 2026 13:01:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1786132898; x=1786737698; 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=GUobKnTJDW6OHCpTnuG5AIhSRJPdO7KkwqnQ+2e+QDs=; b=aARHbHSP9Nln5FSWL23V1aPIp7cgZpK55smAoujqOSMoOVK0eYbhBkFVRMrbwVXnuA NCDhknxV5/WgsgDRhU6X5qnowMEM9/MXqR7DAOWjdx+QIilP9zWJQzFgdhvBPVJvsptq jXNTlF8Y4nv4sWUGw/jeK0HMIGb4mNrHIqi3I= X-Forwarded-Encrypted: i=1; AHgh+RrhJm6xmck3PoFLUwpTme8GMz85uQaw674LWN5UNUP75I8iO1pJKSYndjd8NszPGTB2xWt2nMB6FqvyLZE=@vger.kernel.org X-Received: by 2002:a05:620a:440b:b0:930:b19a:9d5e with SMTP id af79cd13be357-93671b4bd40mr603679685a.1.1786132898280; Fri, 07 Aug 2026 13:01:38 -0700 (PDT) X-Received: by 2002:a05:620a:440b:b0:930:b19a:9d5e with SMTP id af79cd13be357-93671b4bd40mr603663485a.1.1786132897374; Fri, 07 Aug 2026 13:01:37 -0700 (PDT) Received: from mail.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9366dc51b43sm225839185a.0.2026.08.07.13.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2026 13:01:36 -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 v8 2/3] dt-bindings: mmc: Add reset-card-at-resume property Date: Fri, 7 Aug 2026 16:01:20 -0400 Message-Id: <20260807200121.2590202-3-kamal.dasu@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260807200121.2590202-1-kamal.dasu@broadcom.com> References: <20260807200121.2590202-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 v8: - Sashiko's AI review of v7 pointed out this property's own description says it's "expected to be paired with keep-power-in-suspend", and patch 3/3 now enforces exactly that pairing in the driver, but nothing enforced it in the schema -- a DT could set reset-card-at-resume alone and still pass dt_binding_check. Rob Herring asked for this to be addressed on the list. Added a dependencies entry requiring keep-power-in-suspend whenever reset-card-at-resume is present. Changes in v7: - 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 | 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 c18bf0d6a56e..c51e9184384d 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: @@ -361,5 +368,6 @@ patternProperties: dependencies: cd-debounce-delay-ms: [ cd-gpios ] fixed-emmc-driver-type: [ non-removable ] + reset-card-at-resume: [ keep-power-in-suspend ] additionalProperties: true -- 2.34.1