lmk04832_calc_pll2_params(9)
π
lmk04832_calc_pll2_params β the Kernel API Manual moment π
okay so bestie, this is a page straight out of the Kernel API Manual, and it's literally about getting your PLL2 parameters so the VCO frequency can be set. no cap, it's a whole function. let's get into it β¨
πΈ NAME πΈ
lmk04832_calc_pll2_params β get the PLL2 parameters that are used to set the VCO frequency. that's it, that's the vibe π«Ά
β SYNOPSIS β
long lmk04832_calc_pll2_params (unsigned long prate , unsigned long rate
, unsigned int *n , unsigned int *p , unsigned int *r );
yep, she returns a long. noted. moving on π
π¦ ARGUMENTS π¦
prateβ the parent rate feeding into PLL2, usuallyOSCin. your starting point, bestie β¨rateβ the desired output rate for the VCO. what you want, the dream π―nβ a reference toPLL2_N. hand over the pointer, get the value πpβ a reference toPLL2_P. same deal πrβ a reference toPLL2_R. third one, iconic trio π
π₯ DESCRIPTION π₯
so this function assumes LMK04832_BIT_PLL2_MISC_REF_2X_EN is set β and honestly it should be, because the datasheet recommends it. the way that a higher phase detector frequency makes designing wider loop bandwidth filters possible?? obsessed. that's the whole reason, fr fr π
the VCO rate can be calculated using the following expression:
VCO = OSCin * 2 * PLL2_N * PLL2_P / PLL2_R
write it down, screenshot it, tattoo it, idc β it's giving main character math π
π RETURN π
the vco rate, or a negative errno if things go sideways. lowkey important to check which one you got π
π§ SEE ALSO π§
- Kernel file
./drivers/clk/clk-lmk04832.c struct lmk04832_device_info(9)struct lmk04832(9)lmk04832_check_vco_ranges(9)
π that's the whole page bestie. all the facts, none of the boring. slay.
and finally, a cute little sign-off for the footer: this one lives under ./drivers/clk, dated October 2026, and it's titled lmk04832_calc_pll2_params(9) β periodt ππ
π¦ 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