From nobody Thu Nov 12 09:51:33 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 4jQFyt0vcCz70KCT for ; Thu, 12 Nov 2026 09:51:34 +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 4jQFys4Vmkz3GM1 for ; Thu, 12 Nov 2026 09:51:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794477093; 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=rC8i/CpChyLTGvZ/6sc8dUa+blSLGU8ykUPGM64cgBw=; b=AAS5SprcdxJT4NizAI35Tsc3pWjtOqoR5Cz6VAIeDFun5QqMG3irrAsWke/2QLaod/dSAo fNdF6+CZZ6CUWoSuBP+H9XrRDb6SSzNkDm9zvsaeI+yjbDbSz6UUHCKY269esnb/POifZY jb3yg8i8xwrYI2LeJt5COzvCO/r+TEnl62/fZXB79Vlc86GfRjIpXEhvolNHqIRdQIZvgS 1x92A0fX7fgnaKCjrcH5RyhpeH5L3tq2ml598Gkezirjf5R/52wOcYRyA1F3jeG9nO1Egi JhxGwyCNBenwCj7vKubEMwpXTmt/kS2Coz6hYnKz4TnTZtHtu3PSJXxlcp7GvA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794477093; b=lFpOA7ZGzT7bQ685couNTtPLPLs5JJRMt1x23bIaS8gTw1Us21iO2hioPHUSUhG/WcNjq2 PUbV4P/Fu9+JTcURDW4KkorDlAvZ/LHlSZbHuamibn9OS8wrtym6FTI+rzc/JKFvdLsSuW nzBbtNsh+tObUmjJINTAi1ZMnqNj9gbOeAZhr5e64qM49R2ydg87sCuTUp3sn4NSfk+jXE wF52/VT1iq/0eMF+mAZqHRb4E84TzMnOpZBi1VM8aOA5BUBO8AuFCKVraysrh/38waWHmG uuwzXkcn/YA2U8Et2Yo0hWkhQa6TVgRhO4sj22Y5blu4v7/7ifBinsgvFii3zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794477093; 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=rC8i/CpChyLTGvZ/6sc8dUa+blSLGU8ykUPGM64cgBw=; b=cmjUXxB118WgVH/4qVVGvA6pNDHXR2ivK1l2H99wIHR9pvf11Tlu6gAaIFgyP7TtVxnw+X 5ZS7sBhDb8W6Q5SZ8/MBQlHcENEUw4PHQMv///I8rfPe3TFSlkpOgny8RgRb7M/aktcXcU oCZIQeTIhWbhlguMB9XOTmzh0td6vX1e82SHk8mN+kI84YJ1C+AwGRKNrcNBRTxYwD+mUp DfRhTHAnz/8mSjVlHa88VaPTc86+saojxLDTCpc6ROtqk4TCL7TVr1l0WRCoWPPJaAiWSw 0YQcfjy/fOXTCLl7J/1OvjEWe4BV2SSdy++LJVeNQ+zbtRtWfY935S9HD76QVA== 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 4jQFys47hqzy0M for ; Thu, 12 Nov 2026 09:51:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e8ed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Nov 2026 09:51:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 5c25d7b78da0 - main - aw_ccu: h6: Fix the P factor of the CPUX PLL 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c25d7b78da04dd1f78e889d616abc425062320a Auto-Submitted: auto-generated Date: Thu, 12 Nov 2026 09:51:33 +0000 Message-Id: <6af58c25.1e8ed.5550ed33@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5c25d7b78da04dd1f78e889d616abc425062320a commit 5c25d7b78da04dd1f78e889d616abc425062320a Author: Emmanuel Vadot AuthorDate: 2026-11-10 16:09:59 +0000 Commit: Emmanuel Vadot CommitDate: 2026-11-12 09:47:30 +0000 aw_ccu: h6: Fix the P factor of the CPUX PLL The P factor of the CPUX PLL was defined on the bits 1:0, which are the M factor that is only used for testing, instead of bits 17:16. It was also defined as one to four when it is a divider of 1, 2 or 4, as the H6 manual says. Read it from the correct bits as a power of two. It should only be used for frequencies lower than 288MHz, which the minimum of N does not allow, so always search the rate with it at 1 as Linux does. Tested on: H6 --- sys/dev/clk/allwinner/ccu_h6.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/clk/allwinner/ccu_h6.c b/sys/dev/clk/allwinner/ccu_h6.c index 9ff89d6dfdcd..5aa2cea62fbd 100644 --- a/sys/dev/clk/allwinner/ccu_h6.c +++ b/sys/dev/clk/allwinner/ccu_h6.c @@ -168,13 +168,20 @@ FIXED_CLK(osc12m_clk, 2, /* div */ 0); /* flags */ +/* + * The P factor, bits 17:16, is /1, /2 or /4 and should only be used for + * frequencies lower than 288MHz, which the minimum of N does not allow. It + * is read but the rate is always searched with it at 1. The bits 1:0 are + * the M factor which is only used for testing, it is not used. + */ static const char *pll_cpux_parents[] = {"osc24M"}; NP_CLK(pll_cpux_clk, CLK_PLL_CPUX, /* id */ "pll_cpux", pll_cpux_parents, /* name, parents */ 0x00, /* offset */ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */ - 0, 2, 0, 0, /* p factor */ + 16, 2, 1, AW_CLK_FACTOR_POWER_OF_TWO | + AW_CLK_FACTOR_SEARCH_VALUE, /* p factor */ 31, /* gate */ 28, 1000, /* lock */ AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */