STRUCT CCU_PLL_RATE_TBL(9)
π struct ccu_pll_rate_tbl(9) π
okay so bestie, we're in the Kernel API Manual and this page is literally about a struct. a struct!! and she's the entire vibe of rateβregister mapping. let's go π
β¨ NAME β¨
struct ccu_pll_rate_tbl β the structure that maps between PLL rate and register configuration. that's it, that's the whole job, and she does it flawlessly π
β¨ SYNOPSIS β¨
struct ccu_pll_rate_tbl {
unsigned long rate;
u32 swcr1;
u32 swcr2;
u32 swcr3;
};
like, four fields. clean. iconic. no notes π
πΈ Members πΈ
rateβ the PLL rate π«Άswcr1β value of registerPLLx_SW1_CTRLswcr2β value of registerPLLAx_SW2_CTRLswcr3β value of registerPLLx_SW3_CTRL(yes it says lowercase value up there, keeping it real, we don't edit history π)
β¨ DESCRIPTION β¨
so the manual says: see below tables for the register used in PPL/PPLA clocks β¨ (that's PPL/PPLA, exactly how it's written, don't come for me π)
Regular PLL type β the way this one breaks down:
- Enable β
swcr3βPLLx_SW3_CTRL- BIT[31] - Config β
swcr1βPLLx_SW1_CTRL- BIT[31:0] swcr2β Not usedswcr3βPLLx_SW3_CTRL- BIT[30:0]
Special PLL type A β her whole different era:
- Enable β
swcr2βPLLAx_SW2_CTRL- BIT[16] - Config β
swcr1βPLLAx_SW1_CTRL- BIT[31:0] swcr2βPLLAx_SW2_CTRL- BIT[15:8]swcr3βPLLAx_SW3_CTRL- BIT[31:0]
and because the original page serves these tables in their raw, unedited, slightly chaotic form (respect honestly π«‘), here they are verbatim so nothing gets lost in translation:
Regular PLL type | Enable | swcr3 | PLLx_SW3_CTRL - BIT[31] |
----------------------------------------------- | Config | swcr1 |
PLLx_SW1_CTRL - BIT[31:0] | | | swcr2 | Not used
| | | swcr3 | PLLx_SW3_CTRL - BIT[30:0] |
Special PLL type A | Enable | swcr2 | PLLAx_SW2_CTRL - BIT[16] |
----------------------------------------------- | Config | swcr1 |
PLLAx_SW1_CTRL - BIT[31:0] | | | swcr2 | PLLAx_SW2_CTRL -
BIT[15:8] | | | swcr3 | PLLAx_SW3_CTRL - BIT[31:0] |
ngl the bit fields are giving "read the table twice" energy, so lowkey just match the register and the BIT range and you're slaying π₯
heads up bestie: the exact bit positions above are the whole spec β don't eyeball them, copy them exactly. no guessing, no improvising, periodt π
β¨ SEE ALSO β¨
- Kernel file
./drivers/clk/spacemit/ccu_pll.hβ go read the real thing, iykyk π¦
and that's the page!! π source: ./drivers/clk/spacemit, dated October 2026 β mwah, go touch some registers, ily, bye πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms