STRUCT TEGRA_CLK_PLL_PARAMS(9)
π NAME π
okay so bestie, welcome to the Kernel API Manual β¨ β this page is all about struct tegra_clk_pll_params, which is literally just PLL parameters. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
like, here's the whole struct, no cap β every field exactly where it lives:
struct tegra_clk_pll_params {
unsigned long input_min;
unsigned long input_max;
unsigned long cf_min;
unsigned long cf_max;
unsigned long vco_min;
unsigned long vco_max;
u32 base_reg;
u32 misc_reg;
u32 lock_reg;
u32 lock_mask;
u32 lock_enable_bit_idx;
u32 iddq_reg;
u32 iddq_bit_idx;
u32 reset_reg;
u32 reset_bit_idx;
u32 sdm_din_reg;
u32 sdm_din_mask;
u32 sdm_ctrl_reg;
u32 sdm_ctrl_en_mask;
u32 ssc_ctrl_reg;
u32 ssc_ctrl_en_mask;
u32 aux_reg;
u32 dyn_ramp_reg;
u32 ext_misc_reg[MAX_PLL_MISC_REG_COUNT];
u32 pmc_divnm_reg;
u32 pmc_divp_reg;
u32 flags;
int stepa_shift;
int stepb_shift;
int lock_delay;
int max_p;
bool defaults_set;
const struct pdiv_map *pdiv_tohw;
struct div_nmp *div_nmp;
struct tegra_clk_pll_freq_table *freq_table;
unsigned long fixed_rate;
u16 mdiv_default;
u32 (*round_p_to_pdiv)(u32 p, u32 *pdiv);
void (*set_gain)(struct tegra_clk_pll_freq_table *cfg);
int (*calc_rate)(struct clk_hw *hw, struct tegra_clk_pll_freq_table *cfg, unsigned long rate, unsigned long parent_rate);
unsigned long (*adjust_vco)(struct tegra_clk_pll_params *pll_params, unsigned long parent_rate);
void (*set_defaults)(struct tegra_clk_pll *pll);
int (*dyn_ramp)(struct tegra_clk_pll *pll, struct tegra_clk_pll_freq_table *cfg);
int (*pre_rate_change)(void);
void (*post_rate_change)(void);
};
π Members π
every single one, bestie, in order, no skips π
input_minβ Minimum input frequencyinput_maxβ Maximum input frequencycf_minβ Minimum comparison frequencycf_maxβ Maximum comparison frequencyvco_minβ Minimum VCO frequencyvco_maxβ Maximum VCO frequencybase_regβ PLL base reg offsetmisc_regβ PLL misc reg offsetlock_regβ PLL lock reg offsetlock_maskβ Bitmask for PLL lock statuslock_enable_bit_idxβ Bit index to enable PLL lockiddq_regβ PLL IDDQ register offsetiddq_bit_idxβ Bit index to enable PLL IDDQreset_regβ Register offset of where RESET bit isreset_bit_idxβ Shift of reset bit inreset_regsdm_din_regβ Register offset where SDM settings aresdm_din_maskβ Mask of SDM divider bitssdm_ctrl_regβ Register offset where SDM enable issdm_ctrl_en_maskβ Mask of SDM enable bitssc_ctrl_regβ Register offset where SSC settings aressc_ctrl_en_maskβ Mask of SSC enable bitaux_regβ AUX register offsetdyn_ramp_regβ Dynamic ramp control register offsetext_misc_regβ Miscellaneous control register offsetspmc_divnm_regβ n, m divider PMC override register offset (PLLM)pmc_divp_regβ p divider PMC override register offset (PLLM)flagsβ PLL flagsstepa_shiftβ Dynamic ramp step A field shiftstepb_shiftβ Dynamic ramp step B field shiftlock_delayβ Delay in us if PLL lock is not usedmax_pβ maximum value for the p dividerdefaults_setβ Boolean signaling all reg defaults for PLL set.pdiv_tohwβ mapping of p divider to register valuesdiv_nmpβ offsets and widths on n, m and p fieldsfreq_tableβ array of frequencies supported by PLLfixed_rateβ PLL rate if it is fixedmdiv_defaultβ Default value for fixed mdiv for this PLLround_p_to_pdivβ Callback used to round p to the closed pdivset_gainβ Callback to adjust N div for SDM enabled PLL's based on fractional divider value.calc_rateβ Callback used to change how out of table rates (dividers and multipler) are calculated.adjust_vcoβ Callback to adjust the programming range of the divider range (if SDM is present)set_defaultsβ Callback which will try to initialize PLL registers to sane default values. This is first tried during PLL registration, but if the PLL is already enabled, it will be done the first time the rate is changed while the PLL is disabled.dyn_rampβ Callback which can be used to define a custom dynamic ramp function for a given PLL.pre_rate_changeβ Callback which is invoked just before changing PLL's rate.post_rate_changeβ Callback which is invoked right after changing PLL's rate.
π Description π
okay so the flags, let me walk you through them one by one, because each one is genuinely doing the most π«Ά
TEGRA_PLL_USE_LOCKβ This flag indicated to use lock bits for PLL locking. If not set it will uselock_delayvalue to wait.TEGRA_PLL_HAS_CPCONβ This flag indicates that CPCON value needs to be programmed to change output frequency of the PLL.TEGRA_PLL_SET_LFCONβ This flag indicates that LFCON value needs to be programmed to change output frequency of the PLL.TEGRA_PLL_SET_DCCONβ This flag indicates that DCCON value needs to be programmed to change output frequency of the PLL.TEGRA_PLLUβ PLLU has inverted post divider. This flags indicated that it is PLLU and invert post divider value.TEGRA_PLLMβ PLLM has additional override settings in PMC. This flag indicates that it is PLLM and use override settings.TEGRA_PLL_FIXEDβ We are not supposed to change output frequency of some plls.TEGRA_PLLE_CONFIGUREβ Configure PLLE when enabling.TEGRA_PLL_LOCK_MISCβ Lock bit is in the misc register instead of the base register.TEGRA_PLL_BYPASSβ PLL has bypass bitTEGRA_PLL_HAS_LOCK_ENABLEβ PLL has bit to enable lock monitoringTEGRA_MDIV_NEWβ Switch to new method for calculating fixed mdiv it may be more accurate (especially if SDM present)TEGRA_PLLMBβ PLLMB has should be treated similar to PLLM. This flag indicated that it is PLLMB.TEGRA_PLL_VCO_OUTβ Used to indicate that the PLL has a VCO output
π¦ SEE ALSO π¦
- Kernel file
./drivers/clk/tegra/clk.h struct tegra_clk_sync_source(9)struct tegra_clk_frac_div(9)struct tegra_clk_pll_freq_table(9)struct pdiv_map(9)struct div_nmp(9)struct tegra_clk_pll(9)struct tegra_audio_clk_info(9)struct tegra_clk_pll_out(9)struct tegra_clk_periph_regs(9)struct tegra_clk_periph_gate(9)struct tegra_sdmmc_mux(9)
π friendly reminder bestie: this page is from./drivers/clk/tegra, dated October 2026, and its title isstruct tegra_clk_pll_params(9)β screenshot it, cite it, cite it again, periodt π
that's the whole page, you ate it, i'm obsessed, go forth and clock πΈπ§π
π¦ 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