From nobody Fri Nov 13 18:41:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jR5gg6HM5z714BM for ; Fri, 13 Nov 2026 18:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jR5gg4knQz4P78 for ; Fri, 13 Nov 2026 18:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794595279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IYTQwkXqBH792vyCEyXA1zssvu4uLokLxXHOMNIVqaY=; b=wzYX6nwlieNR+sxHnlcBPmn0+RiiFSVsdnxxYxO5Cxls/YAA1eeNiSUAHBqyUwHth37AWa x3wJb5PJ6M7gaqwxmnu3vTsvonTZ9IRMNduCzJdeBEG6+a/s7ubu9K1iN2z+xJdXddb7ee typ4gzNBD56cnyreFAG0r1vyqKBXJ1yNvLPGFxg4QR1RMNrnV53zFALU4Ic4f3dXTmqDce owBHhl+FNMPO518PMdZXUBIiDsIb9XyUYYlSL7oeui6WxuCxUop31kxNTdtLoKISacqox6 oLkl+vJf8iDpm0JGpzDCQwsbNLZvsDj8lAYGvyBaHIIxE/rx0WOHmS+Hl5fdyw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794595279; b=WiIA3U9artBW5vq14mEhNfVJnaoohKnheJpmKvpB78Kjh1JGA17q36HobMzzmlhgv3vkX+ ZxCnsrc+SIWHs7dl1DBIm9XffREY7D7LZn8QUIL2ab8JdNMy+1MM2r/dvzROw87LQ9ZnaD v6S2kiSW8ZRyoSyzTVyyKcinqq7ZeZDvDzD8QFDTX5RqOmte2rCULGGwlDVdv/Q/yf6yUM rtAKjeJ8E9aqVGkBTYEL6IOi9pNLBT0gHsczHKucrPUY61dWYtk1RwnicdvkN9lvPqyyzf uAxTeaYZXfuzI6TGoBmFlg952fgiAWztG7P/kXUEC9NkQ32kI52mAtiVnzTmcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794595279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IYTQwkXqBH792vyCEyXA1zssvu4uLokLxXHOMNIVqaY=; b=qNf45Brs7Rq/LG79sJ0n3BXB11WL62WOTGLZ/+pYa3NaX6hyKPOOlQ1/l5XpRj/NdQFsWK WsDrfX6e0qFTjuZ8WTJktLHwm9ubafcQEOgXFGUHaAEPTLIw7QK5cpOprh1H/ImNoktX/k PIp05brzJo8/I00m6okAd6A1zMD3hHebdly33aRGndL4CAejhC9MWefJ3LjPUunDnRGbBX 2mugPLxmRy5ua2ZpR307pcCDghZFeC8QjvZL6rAF2/B9VRkLdBpAkbJgNnACjMgcNUVhQi W+I6VHAn3nPPZocUYF1yR00/BY0bUA6iDwCkxT+WkuMr54huRQtEko0bDndtDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jR5gg4PtPzmyN for ; Fri, 13 Nov 2026 18:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e06b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Nov 2026 18:41:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 554b97e32db0 - stable/14 - mmc_fdt: handle broken-cd property List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 554b97e32db0d6f0a1c79cba778aad6e544d0377 Auto-Submitted: auto-generated Date: Fri, 13 Nov 2026 18:41:19 +0000 Message-Id: <6af759cf.1e06b.174ec9c5@gitrepo.freebsd.org> The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=554b97e32db0d6f0a1c79cba778aad6e544d0377 commit 554b97e32db0d6f0a1c79cba778aad6e544d0377 Author: Mitchell Horne AuthorDate: 2025-11-05 14:37:36 +0000 Commit: Mitchell Horne CommitDate: 2026-11-13 18:41:02 +0000 mmc_fdt: handle broken-cd property The documented properties [1] for card-detection are one of: - cd-gpios - non-removable - broken-cd In cd_setup() we handle the first two, but not the latter, resulting in a silently undetected card on an affected system. To work around this, force cd_disabled when broken-cd is specified, so that the card detect helper function gets to run. A more complete solution would implement some kind of polling mechanism to detect the card's presence or removal. Some variants of the Allwinner D1, such as the Lichee Rv, specify this property in the mmc0 device node. [1] sys/contrib/device-tree/Bindings/mmc/mmc-controller.yaml Reported by: Haowu Ge Tested by: Haowu Ge Reviewed by: imp, manu, mmel MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53546 (cherry picked from commit 768ee6d454821cc63247cb4ffe526c5a06accff0) --- sys/dev/mmc/mmc_fdt_helpers.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/dev/mmc/mmc_fdt_helpers.c b/sys/dev/mmc/mmc_fdt_helpers.c index 47c8c6ce1c79..3c4328ad5354 100644 --- a/sys/dev/mmc/mmc_fdt_helpers.c +++ b/sys/dev/mmc/mmc_fdt_helpers.c @@ -160,6 +160,17 @@ cd_setup(struct mmc_helper *helper, phandle_t node) return; } + /* + * If the device has no card-detection, treat it as non-removable. + * This could be improved by polling for detection. + */ + if (helper->props & MMC_PROP_BROKEN_CD) { + helper->cd_disabled = true; + if (bootverbose) + device_printf(dev, "Broken card-detect\n"); + return; + } + /* * If there is no cd-gpios property, then presumably the hardware * PRESENT_STATE register and interrupts will reflect card state