git: c240a00b5182 - main - aw_ccu: h6: Never use the output divider of the GPU PLL
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Nov 2026 09:51:32 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=c240a00b51825ffed503bde179d018e3f44cc446
commit c240a00b51825ffed503bde179d018e3f44cc446
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-11-10 15:55:57 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-12 09:47:30 +0000
aw_ccu: h6: Never use the output divider of the GPU PLL
Linux found that using the output divider of the GPU PLL, bit 0 of its
register, to scale the frequency of the GPU makes the system fail, so it
clears it and does not model it. The H6 manual does not say so and has
it in the rate of the PLL, 24MHz*N/M0/M1. It is set at reset, the PLL
is at 432MHz with N=36, so it still has to be read to compute the rate.
Search the rate with this divider at 1. It is read as before, and is
cleared when the rate of the PLL is changed.
Tested on: H6
---
sys/dev/clk/allwinner/ccu_h6.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sys/dev/clk/allwinner/ccu_h6.c b/sys/dev/clk/allwinner/ccu_h6.c
index 9428d660defd..9ff89d6dfdcd 100644
--- a/sys/dev/clk/allwinner/ccu_h6.c
+++ b/sys/dev/clk/allwinner/ccu_h6.c
@@ -251,13 +251,18 @@ FIXED_CLK(pll_peri1_clk,
4, /* div */
0); /* flags */
+/*
+ * Changing the output divider (bit 0) of the GPU PLL to scale its frequency
+ * makes the system fail. It is set at reset so it is read but the rate is
+ * always searched with it at 1, like Linux which also clears it.
+ */
static const char *pll_gpu_parents[] = {"osc24M"};
NMM_CLK(pll_gpu_clk,
CLK_PLL_GPU, /* id */
"pll_gpu", pll_gpu_parents, /* name, parents */
0x30, /* offset */
8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
- 0, 1, 0, 0, /* m0 factor */
+ 0, 1, 1, AW_CLK_FACTOR_SEARCH_VALUE, /* m0 factor */
1, 1, 0, 0, /* m1 factor */
31, /* gate */
28, 1000, /* lock */