git: 30566d1a9dee - main - aw_ccu: h6: Limit the N factor of the PLLs to 12 or more
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Nov 2026 09:51:30 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=30566d1a9deedf38d128a82ab953bd1ae7494bea
commit 30566d1a9deedf38d128a82ab953bd1ae7494bea
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-11-10 15:06:08 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-12 09:47:30 +0000
aw_ccu: h6: Limit the N factor of the PLLs to 12 or more
The minimum value of the N factor of all the PLLs of the H6 is 12, like
the Linux driver does. Without it the search of the factors for a
requested rate can choose a value that makes the PLL run below its
minimum frequency.
Tested on: H6
---
sys/dev/clk/allwinner/ccu_h6.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/sys/dev/clk/allwinner/ccu_h6.c b/sys/dev/clk/allwinner/ccu_h6.c
index 51477d6e5b0e..9428d660defd 100644
--- a/sys/dev/clk/allwinner/ccu_h6.c
+++ b/sys/dev/clk/allwinner/ccu_h6.c
@@ -173,7 +173,7 @@ NP_CLK(pll_cpux_clk,
CLK_PLL_CPUX, /* id */
"pll_cpux", pll_cpux_parents, /* name, parents */
0x00, /* offset */
- 8, 8, 0, 0, 0, /* n factor */
+ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
0, 2, 0, 0, /* p factor */
31, /* gate */
28, 1000, /* lock */
@@ -184,7 +184,7 @@ NMM_CLK(pll_ddr0_clk,
CLK_PLL_DDR0, /* id */
"pll_ddr0", pll_ddr0_parents, /* name, parents */
0x10, /* offset */
- 8, 8, 0, 0, 0, /* n factor */
+ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
0, 1, 0, 0, /* m0 factor */
1, 1, 0, 0, /* m1 factor */
31, /* gate */
@@ -196,7 +196,7 @@ NMM_CLK(pll_peri0_4x_clk,
CLK_PLL_PERIPH0_4X, /* id */
"pll_periph0_4x", pll_peri0_4x_parents, /* name, parents */
0x20, /* offset */
- 8, 8, 0, 0, 0, /* n factor */
+ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
0, 1, 0, 0, /* m0 factor */
1, 1, 0, 0, /* m1 factor */
31, /* gate */
@@ -226,7 +226,7 @@ NMM_CLK(pll_peri1_4x_clk,
CLK_PLL_PERIPH1_4X, /* id */
"pll_periph1_4x", pll_peri1_4x_parents, /* name, parents */
0x28, /* offset */
- 8, 8, 0, 0, 0, /* n factor */
+ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
0, 1, 0, 0, /* m0 factor */
1, 1, 0, 0, /* m1 factor */
31, /* gate */
@@ -256,7 +256,7 @@ NMM_CLK(pll_gpu_clk,
CLK_PLL_GPU, /* id */
"pll_gpu", pll_gpu_parents, /* name, parents */
0x30, /* offset */
- 8, 8, 0, 0, 0, /* n factor */
+ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
0, 1, 0, 0, /* m0 factor */
1, 1, 0, 0, /* m1 factor */
31, /* gate */
@@ -268,7 +268,7 @@ NMM_CLK(pll_video0_4x_clk,
CLK_PLL_VIDEO0_4X, /* id */
"pll_video0_4x", pll_video0_4x_parents, /* name, parents */
0x40, /* offset */
- 8, 8, 0, 0, 0, /* n factor */
+ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
0, 1, 0, 0, /* m0 factor */
1, 1, 0, 0, /* m1 factor */
31, /* gate */
@@ -289,7 +289,7 @@ NMM_CLK(pll_video1_4x_clk,
CLK_PLL_VIDEO1_4X, /* id */
"pll_video1_4x", pll_video1_4x_parents, /* name, parents */
0x48, /* offset */
- 8, 8, 0, 0, 0, /* n factor */
+ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
0, 1, 0, 0, /* m0 factor */
1, 1, 0, 0, /* m1 factor */
31, /* gate */
@@ -310,7 +310,7 @@ NMM_CLK(pll_ve_clk,
CLK_PLL_VE, /* id */
"pll_ve", pll_ve_parents, /* name, parents */
0x58, /* offset */
- 8, 8, 0, 0, 0, /* n factor */
+ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
0, 1, 0, 0, /* m0 factor */
1, 1, 0, 0, /* m1 factor */
31, /* gate */
@@ -322,7 +322,7 @@ NMM_CLK(pll_de_clk,
CLK_PLL_DE, /* id */
"pll_de", pll_de_parents, /* name, parents */
0x60, /* offset */
- 8, 8, 0, 0, 0, /* n factor */
+ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
0, 1, 0, 0, /* m0 factor */
1, 1, 0, 0, /* m1 factor */
31, /* gate */
@@ -334,7 +334,7 @@ NMM_CLK(pll_hsic_clk,
CLK_PLL_HSIC, /* id */
"pll_hsic", pll_hsic_parents, /* name, parents */
0x70, /* offset */
- 8, 8, 0, 0, 0, /* n factor */
+ 8, 8, 0, AW_CLK_FACTOR_MIN_VALUE, 12, /* n factor */
0, 1, 0, 0, /* m0 factor */
1, 1, 0, 0, /* m1 factor */
31, /* gate */