From nobody Thu Nov 05 14:51:12 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 4jL4xs0Fhnz706Vs for ; Thu, 05 Nov 2026 14:51:13 +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 4jL4xr5QSNz3Dqb for ; Thu, 05 Nov 2026 14:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793890272; 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=ww8eCIV2SJcmtfofi1vpnV5FUtTWphf0N1vABCZxiBc=; b=kGx7dnrreJsZMOhOwceEODhAaAOhY+9WcDKgPQ/UCLr6J4xp6Dy8z/BV6upzlTTeQTiBTU n3MCTyDm911AmZ5HivOB7aiP909mo4tCcsHIEV91yhZrhQdJTPU4Zt3U8j55CnEziymN4O /U0/cZ6TraKadqcCLB4E40mhAK2vHbCDujO18Swv0JwzuspiodHcF5iKoxwNIH33fQeBzv k9KffIxRcP5/68Irx1HwRxYDLhVC0lQ3jKUwV+sIJ4SOKx2lOXyrwVr27babVb+yaPzfWV 2Qg5JHDyDTuVaaGkYgutLHDrG9TV/SBlyuJKc/e+QL6kaudb88tF/q1bH6/jIQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793890272; b=hk6AI0zOCvDI986KJcjvlULiJsf83X0xkOLwbvsRWA5lUaVOUaaVdZrn3YN1OTbPJ5grCF W2I+9UkFWrKeH1XB1t0kJhG0eOwJEYLXOsloURpPaY149j9qUAa8jHKvsNBxgIp8ItYTay je5AFE/7ZSiTvKdLER856U/77dXUybpWDxbkzyje8xQq631HrOOb3GmJyrlBetQ1M2ukoQ ln+98NU3ZSsRJJuYx7bO0vTXE4sSrzWfGIbNmwIzAPKswCk1wrcPCdsiRzzSy2m4imbXja odmb6LkXmmRGDgAFKIh3ihSz918tQpw8Oi42H6QurRDExjYz8myx4mqbUWgsJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793890272; 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=ww8eCIV2SJcmtfofi1vpnV5FUtTWphf0N1vABCZxiBc=; b=Eo3AniRvFioXU6axUnsMYGwb+A4Xn4cnfCxcU5a7M0T/eOKB7n9eR6eDoJSrYEKMw0GKIt 0GD0p79Ckl7kh6lTeIQlLw8Gz8GLVQlrOo4eW66uuHqUYd+Xi0WWqSfW+hqvUc39qtvK54 MjimYVOFE2eaYX8C2iloKoRPOgwkRcI37izyU2oDDp/8VwsKdZoY7zTMbAs0HYBgn6l/WB hpkQ0nYIkLAsD24m4ZVJLBCxnVkrQNnIAv2lFql9RQ2zT5RhuefBDJlIdTzf4yCqzJzF4z i4KCvt4swuzTmlci3ddAZEA7xJCHx1cNVzkJEBgffx2csDG/emcqInUGeJs+9w== 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 4jL4xr54pQzvNr for ; Thu, 05 Nov 2026 14:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22813 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 05 Nov 2026 14:51:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 40363144e85b - main - sdhci: rockchip: rk3568: Fix the eMMC card clock List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40363144e85b08bbe581248066054c77ca0281b4 Auto-Submitted: auto-generated Date: Thu, 05 Nov 2026 14:51:12 +0000 Message-Id: <6aec97e0.22813.79e2b5c7@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=40363144e85b08bbe581248066054c77ca0281b4 commit 40363144e85b08bbe581248066054c77ca0281b4 Author: Emmanuel Vadot AuthorDate: 2026-10-20 11:04:16 +0000 Commit: Emmanuel Vadot CommitDate: 2026-11-05 14:50:38 +0000 sdhci: rockchip: rk3568: Fix the eMMC card clock The divider of the controller is not functional on Rockchip, the card clock is the rate of the core clock. Request the core clock rounded down so that the closest available rate is selected and report a failure, which was ignored before. The eMMC was identified at the wrong clock and was never detected. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D60893 --- sys/dev/sdhci/sdhci_fdt_rockchip.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/sdhci/sdhci_fdt_rockchip.c b/sys/dev/sdhci/sdhci_fdt_rockchip.c index 932165045bb9..c0499e41c6c2 100644 --- a/sys/dev/sdhci/sdhci_fdt_rockchip.c +++ b/sys/dev/sdhci/sdhci_fdt_rockchip.c @@ -177,7 +177,16 @@ sdhci_fdt_rockchip_set_clock(device_t dev, struct sdhci_slot *slot, int clock) clock = 375000; if (clock) { - clk_set_freq(sc->clk_core, clock, 0); + /* + * The divider of the controller is not functional, the + * card clock is the rate of the core clock. + */ + i = clk_set_freq(sc->clk_core, clock, + CLK_SET_ROUND_DOWN); + if (i != 0 && bootverbose) + device_printf(dev, + "cannot set the core clock to %d Hz: %d\n", + clock, i); if (clock <= 52000000) { bus_write_4(sc->mem_res[slot->num],