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 7DB143C09F3 for ; Tue, 11 Aug 2026 16:38:20 +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=1786466302; cv=none; b=dzIwX3Xx6LmfctJ87cMkQrt/gevI/0zHRkACAHgF4wpDpHUG3M1BpzSAuUqP/qccUDbaPjj7TCS1ox4EjcPjeubS4/T2Ptovr52kDawH3Sr1hPEYLMjR1y/ASts+sRNdFDSrTsdBtfcV+3+5k6gcyvIKsdkX63b1OHEBTQRdzv4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786466302; c=relaxed/simple; bh=VjAm/G+XBV3wqAMJf/jE90KbOirqngl4/9uUrm3AKo8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ku6ZRZQBmJoS1pUfOZwx5uFBhYzsRnlNUqMF7db9cX9CDwDg997iM1UaoUWK3wXHPnvL2YnNIP1LxpdMIu/fSNKqd/WCBRJn+6VaVGtxjclffPWCPHhPlNtDJJyxnWOJdQzPnal//Hq+r52x63z9qPBeWRCk7GvJpmB9EUBDQJM= 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=BRAkb/dQ; 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="BRAkb/dQ" Received: by mail-pj1-f100.google.com with SMTP id 98e67ed59e1d1-38d489b6b71so106164a91.0 for ; Tue, 11 Aug 2026 09:38:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786466300; x=1787071100; 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=IP0oJG7AWLjJjpPY4ZmVTg/sHwIBv1HYr/k2mhlodnU=; b=a5Kqjzmb0Dwi9FMtlP4CR4HqPHpNnKsyi4HFb229lcFVDZjkWhIsotPnSEWf1/BKld daIeEEh3/O5whGaiin2+7F13qkGfh4Wnbry0MTgnQ+4U07dH5lbZjpaMJgVkVA8gz/7u kPkHEeXwxuT6kD9T4dbdo6yyh9k/hjYjviEDS1D4fid7sfYvit6ZzI3AUutGeL6gS1NT uRZ0utfIB0mnSZ7wY56eiggzn/5WCGQx2R04/xKT34YvnW/g9IEwW7qvw/oWk/LXfzRp IW1ERiFye/Zubyn/M6ytsXiCvdUcRtKZW2X+Fpksw/i2Ux8RiY8IxsQItsl3lry9I9Xc Kbzw== X-Forwarded-Encrypted: i=1; AHgh+RrewhYT35z0MwMlJWervNoyZL7LU0gEsnjROo+W3z8FdVEj+0JYxGDkwkzaU+gBYRh8KTgCpe167rNeGJc=@vger.kernel.org X-Gm-Message-State: AOJu0Yy5y5PHPacnh4HPgj/IuFHu2F0P1Vwni8MxKFUbS4ZxGCjokwqE C726ifB8Yk23qVMacbef0QASk3hArrkYu0db0L/HeCUK+YahzHAW7OFcY2mKwDOtPlbOfW3fymY f4IswdezZcdf0UZOz4FQYbZenCrIXdW7mSCyClXiAFdtWL74Q9HX5WV9NLLBCvB/hP0Pn6J1R4i LAiIHLSTqP+aJCnXeuoCW0CQ5LtLcmkxJ69ZrxJJcci8p7Qw/u54Ump5MWYR5Y5sdSaa8grmWBX 7513omq+k+a23ni X-Gm-Gg: AR+sD106u8/Yt/ybvlmeojzOf3x4tDme3QfkFW34Xk50gk+3iSE25uPusO3GUDQ+hh+ AecryZgbEDSuF4sYnpUFG3hs2zoLHaHtyhD1wUjO01UwhzGRlhy6oJ9PpFpwSqMhDU/kBp+vubS y6dcuJIIy8dsxnYYgq3Xwy1uCCBlJG45bkk2bYJWRmeJls7otSqIn+QXRNiS0Bjf9yCZ+GX9tUp eDj/e/XCKsvGd9UHPNSjjIRM9wjXnIJtsxvSRKOgwha/k5TGjylTmOfAga+Vjh9b6IeAo5prTIf PCsFJO+1ujhS++tdXvMSbHkogzKj2a1+BicHVoqRzYMhi8BFK2yc3PxTsvQKAJKK1hYg0fvf0zu 7REXxlsV0Jia+oAJmWIjAn5cR6y1uK9uWXTQqSKzt/3ViWARraf57vDlnAX7gLzcPPUClY2aafV Bc1JGgxyh8wb0OHSgcdlSovY5e2n54cQ== X-Received: by 2002:a17:90b:4d10:b0:381:6c5:3f63 with SMTP id 98e67ed59e1d1-392f469ab53mr1299645a91.6.1786466299626; Tue, 11 Aug 2026 09:38:19 -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 98e67ed59e1d1-392f9514986sm28526a91.12.2026.08.11.09.38.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Aug 2026 09:38:19 -0700 (PDT) X-Relaying-Domain: broadcom.com X-CFilter-Loop: Reflected Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-51c12e43b98so1208391cf.1 for ; Tue, 11 Aug 2026 09:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1786466298; x=1787071098; 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=IP0oJG7AWLjJjpPY4ZmVTg/sHwIBv1HYr/k2mhlodnU=; b=BRAkb/dQhOBssXaWTntCJIG7KtHtikt2iq1aXuUsa7YYoOywPlrxiAn8luv3YrSBO4 lIk0mU0HZkZ2V/vRy795+3kAQjRRcrDtBAUSrFL2up7204weT+pEZORRi7NH966lc/6h S0b3VtvUxHgOHhO6XpGMWTRa8T5aacjokMglE= X-Forwarded-Encrypted: i=1; AHgh+RrcZJ4DkJrmQX/nlvNNp6/gMbdHIGukvupiLQh4GjzpfyEbwh21jhe30TWWnf1EuQTK44BCy+T+NW5LxGM=@vger.kernel.org X-Received: by 2002:a05:622a:4185:b0:51c:1c2c:a8bf with SMTP id d75a77b69052e-52d60284dabmr16892381cf.43.1786466298514; Tue, 11 Aug 2026 09:38:18 -0700 (PDT) X-Received: by 2002:a05:622a:4185:b0:51c:1c2c:a8bf with SMTP id d75a77b69052e-52d60284dabmr16891771cf.43.1786466297946; Tue, 11 Aug 2026 09:38:17 -0700 (PDT) Received: from mail.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-52d57c3c09bsm14427981cf.25.2026.08.11.09.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2026 09:38:17 -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 v9 2/3] dt-bindings: mmc: Add reset-card-at-resume property Date: Tue, 11 Aug 2026 12:38:09 -0400 Message-Id: <20260811163810.1599747-3-kamal.dasu@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260811163810.1599747-1-kamal.dasu@broadcom.com> References: <20260811163810.1599747-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 v9: - No change. 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