1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2013-2017 Altera Corporation <www.altera.com>
9 #include <asm/arch/clock_manager.h>
13 * function to write the bypass register which requires a poll of the
16 static void cm_write_bypass(u32 val)
18 writel(val, socfpga_get_clkmgr_addr() + CLKMGR_GEN5_BYPASS);
22 /* function to write the ctrl register which requires a poll of the busy bit */
23 static void cm_write_ctrl(u32 val)
25 writel(val, socfpga_get_clkmgr_addr() + CLKMGR_GEN5_CTRL);
29 /* function to write a clock register that has phase information */
30 static int cm_write_with_phase(u32 value, const void *reg_address, u32 mask)
34 /* poll until phase is zero */
35 ret = wait_for_bit_le32(reg_address, mask, false, 20000, false);
39 writel(value, reg_address);
41 return wait_for_bit_le32(reg_address, mask, false, 20000, false);
45 * Setup clocks while making no assumptions about previous state of the clocks.
47 * Start by being paranoid and gate all sw managed clocks
48 * Put all plls in bypass
49 * Put all plls VCO registers back to reset value (bandgap power down).
50 * Put peripheral and main pll src to reset value to avoid glitch.
52 * Deassert bandgap power down and set numerator and denominator
54 * set internal dividers
55 * Wait for 7 us timer.
57 * Set external dividers while plls are locking
59 * Assert/deassert outreset all.
60 * Take all pll's out of bypass
62 * set source main and peripheral clocks
66 int cm_basic_init(const struct cm_config * const cfg)
71 /* Start by being paranoid and gate all sw managed clocks */
74 * We need to disable nandclk
75 * and then do another apb access before disabling
76 * gatting off the rest of the periperal clocks.
78 writel(~CLKMGR_PERPLLGRP_EN_NANDCLK_MASK &
79 readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_EN),
80 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_EN);
82 /* DO NOT GATE OFF DEBUG CLOCKS & BRIDGE CLOCKS */
83 writel(CLKMGR_MAINPLLGRP_EN_DBGTIMERCLK_MASK |
84 CLKMGR_MAINPLLGRP_EN_DBGTRACECLK_MASK |
85 CLKMGR_MAINPLLGRP_EN_DBGCLK_MASK |
86 CLKMGR_MAINPLLGRP_EN_DBGATCLK_MASK |
87 CLKMGR_MAINPLLGRP_EN_S2FUSER0CLK_MASK |
88 CLKMGR_MAINPLLGRP_EN_L4MPCLK_MASK,
89 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_EN);
91 writel(0, socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_EN);
93 /* now we can gate off the rest of the peripheral clocks */
94 writel(0, socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_EN);
96 /* Put all plls in bypass */
97 cm_write_bypass(CLKMGR_BYPASS_PERPLL | CLKMGR_BYPASS_SDRPLL |
98 CLKMGR_BYPASS_MAINPLL);
100 /* Put all plls VCO registers back to reset value. */
101 writel(CLKMGR_MAINPLLGRP_VCO_RESET_VALUE &
102 ~CLKMGR_MAINPLLGRP_VCO_REGEXTSEL_MASK,
103 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_VCO);
104 writel(CLKMGR_PERPLLGRP_VCO_RESET_VALUE &
105 ~CLKMGR_PERPLLGRP_VCO_REGEXTSEL_MASK,
106 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_VCO);
107 writel(CLKMGR_SDRPLLGRP_VCO_RESET_VALUE &
108 ~CLKMGR_SDRPLLGRP_VCO_REGEXTSEL_MASK,
109 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_VCO);
112 * The clocks to the flash devices and the L4_MAIN clocks can
113 * glitch when coming out of safe mode if their source values
114 * are different from their reset value. So the trick it to
115 * put them back to their reset state, and change input
116 * after exiting safe mode but before ungating the clocks.
118 writel(CLKMGR_PERPLLGRP_SRC_RESET_VALUE,
119 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_SRC);
120 writel(CLKMGR_MAINPLLGRP_L4SRC_RESET_VALUE,
121 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_L4SRC);
123 /* read back for the required 5 us delay. */
124 readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_VCO);
125 readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_VCO);
126 readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_VCO);
130 * We made sure bgpwr down was assert for 5 us. Now deassert BG PWR DN
131 * with numerator and denominator.
133 writel(cfg->main_vco_base,
134 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_VCO);
135 writel(cfg->peri_vco_base,
136 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_VCO);
137 writel(cfg->sdram_vco_base,
138 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_VCO);
141 * Time starts here. Must wait 7 us from
142 * BGPWRDN_SET(0) to VCO_ENABLE_SET(1).
144 end = timer_get_us() + 7;
148 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_MPUCLK);
150 /* altera group mpuclk */
151 writel(cfg->altera_grp_mpuclk,
152 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_ALTR_MPUCLK);
154 /* main main clock */
156 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_MAINCLK);
159 writel(cfg->dbgatclk,
160 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_DBGATCLK);
162 /* main for cfgs2fuser0clk */
163 writel(cfg->cfg2fuser0clk,
164 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_CFGS2FUSER0CLK);
166 /* Peri emac0 50 MHz default to RMII */
167 writel(cfg->emac0clk,
168 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_EMAC0CLK);
170 /* Peri emac1 50 MHz default to RMII */
171 writel(cfg->emac1clk,
172 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_EMAC1CLK);
175 writel(cfg->mainqspiclk,
176 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_MAINQSPICLK);
178 writel(cfg->perqspiclk,
179 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_PERQSPICLK);
181 /* Peri pernandsdmmcclk */
182 writel(cfg->mainnandsdmmcclk,
183 socfpga_get_clkmgr_addr() +
184 CLKMGR_GEN5_MAINPLL_MAINNANDSDMMCCLK);
186 writel(cfg->pernandsdmmcclk,
187 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_PERNANDSDMMCCLK);
189 /* Peri perbaseclk */
190 writel(cfg->perbaseclk,
191 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_PERBASECLK);
193 /* Peri s2fuser1clk */
194 writel(cfg->s2fuser1clk,
195 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_S2FUSER1CLK);
197 /* 7 us must have elapsed before we can enable the VCO */
198 while (timer_get_us() < end)
203 writel(cfg->main_vco_base | CLKMGR_MAINPLLGRP_VCO_EN,
204 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_VCO);
207 writel(cfg->peri_vco_base | CLKMGR_MAINPLLGRP_VCO_EN,
208 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_VCO);
211 writel(cfg->sdram_vco_base | CLKMGR_MAINPLLGRP_VCO_EN,
212 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_VCO);
214 /* L3 MP and L3 SP */
216 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_MAINDIV);
219 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_DBGDIV);
221 writel(cfg->tracediv,
222 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_TRACEDIV);
224 /* L4 MP, L4 SP, can0, and can1 */
226 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_DIV);
229 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_GPIODIV);
231 cm_wait_for_lock(LOCKED_MASK);
233 /* write the sdram clock counters before toggling outreset all */
234 writel(cfg->ddrdqsclk & CLKMGR_SDRPLLGRP_DDRDQSCLK_CNT_MASK,
235 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_DDRDQSCLK);
237 writel(cfg->ddr2xdqsclk & CLKMGR_SDRPLLGRP_DDR2XDQSCLK_CNT_MASK,
238 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_DDR2XDQSCLK);
240 writel(cfg->ddrdqclk & CLKMGR_SDRPLLGRP_DDRDQCLK_CNT_MASK,
241 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_DDRDQCLK);
243 writel(cfg->s2fuser2clk & CLKMGR_SDRPLLGRP_S2FUSER2CLK_CNT_MASK,
244 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_S2FUSER2CLK);
247 * after locking, but before taking out of bypass
248 * assert/deassert outresetall
250 u32 mainvco = readl(socfpga_get_clkmgr_addr() +
251 CLKMGR_GEN5_MAINPLL_VCO);
253 /* assert main outresetall */
254 writel(mainvco | CLKMGR_MAINPLLGRP_VCO_OUTRESETALL_MASK,
255 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_VCO);
257 u32 periphvco = readl(socfpga_get_clkmgr_addr() +
258 CLKMGR_GEN5_PERPLL_VCO);
260 /* assert pheriph outresetall */
261 writel(periphvco | CLKMGR_PERPLLGRP_VCO_OUTRESETALL_MASK,
262 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_VCO);
264 /* assert sdram outresetall */
265 writel(cfg->sdram_vco_base | CLKMGR_MAINPLLGRP_VCO_EN |
266 CLKMGR_SDRPLLGRP_VCO_OUTRESETALL,
267 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_VCO);
269 /* deassert main outresetall */
270 writel(mainvco & ~CLKMGR_MAINPLLGRP_VCO_OUTRESETALL_MASK,
271 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_VCO);
273 /* deassert pheriph outresetall */
274 writel(periphvco & ~CLKMGR_PERPLLGRP_VCO_OUTRESETALL_MASK,
275 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_VCO);
277 /* deassert sdram outresetall */
278 writel(cfg->sdram_vco_base | CLKMGR_MAINPLLGRP_VCO_EN,
279 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_VCO);
282 * now that we've toggled outreset all, all the clocks
283 * are aligned nicely; so we can change any phase.
285 ret = cm_write_with_phase(cfg->ddrdqsclk,
286 (const void *)(socfpga_get_clkmgr_addr() +
287 CLKMGR_GEN5_SDRPLL_DDRDQSCLK),
288 CLKMGR_SDRPLLGRP_DDRDQSCLK_PHASE_MASK);
292 /* SDRAM DDR2XDQSCLK */
293 ret = cm_write_with_phase(cfg->ddr2xdqsclk,
294 (const void *)(socfpga_get_clkmgr_addr() +
295 CLKMGR_GEN5_SDRPLL_DDR2XDQSCLK),
296 CLKMGR_SDRPLLGRP_DDR2XDQSCLK_PHASE_MASK);
300 ret = cm_write_with_phase(cfg->ddrdqclk,
301 (const void *)(socfpga_get_clkmgr_addr() +
302 CLKMGR_GEN5_SDRPLL_DDRDQCLK),
303 CLKMGR_SDRPLLGRP_DDRDQCLK_PHASE_MASK);
307 ret = cm_write_with_phase(cfg->s2fuser2clk,
308 (const void *)(socfpga_get_clkmgr_addr() +
309 CLKMGR_GEN5_SDRPLL_S2FUSER2CLK),
310 CLKMGR_SDRPLLGRP_S2FUSER2CLK_PHASE_MASK);
314 /* Take all three PLLs out of bypass when safe mode is cleared. */
317 /* clear safe mode */
318 cm_write_ctrl(readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_CTRL) |
319 CLKMGR_CTRL_SAFEMODE);
322 * now that safe mode is clear with clocks gated
323 * it safe to change the source mux for the flashes the the L4_MAIN
326 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_SRC);
328 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_L4SRC);
330 /* Now ungate non-hw-managed clocks */
331 writel(~0, socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_EN);
332 writel(~0, socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_EN);
333 writel(~0, socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_EN);
335 /* Clear the loss of lock bits (write 1 to clear) */
336 writel(CLKMGR_INTER_SDRPLLLOST_MASK |
337 CLKMGR_INTER_PERPLLLOST_MASK |
338 CLKMGR_INTER_MAINPLLLOST_MASK,
339 socfpga_get_clkmgr_addr() + CLKMGR_GEN5_INTER);
344 static unsigned int cm_get_main_vco_clk_hz(void)
348 /* get the main VCO clock */
349 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_VCO);
350 clock = cm_get_osc_clk_hz(1);
351 clock /= ((reg & CLKMGR_MAINPLLGRP_VCO_DENOM_MASK) >>
352 CLKMGR_MAINPLLGRP_VCO_DENOM_OFFSET) + 1;
353 clock *= ((reg & CLKMGR_MAINPLLGRP_VCO_NUMER_MASK) >>
354 CLKMGR_MAINPLLGRP_VCO_NUMER_OFFSET) + 1;
359 static unsigned int cm_get_per_vco_clk_hz(void)
363 /* identify PER PLL clock source */
364 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_VCO);
365 reg = (reg & CLKMGR_PERPLLGRP_VCO_SSRC_MASK) >>
366 CLKMGR_PERPLLGRP_VCO_SSRC_OFFSET;
367 if (reg == CLKMGR_VCO_SSRC_EOSC1)
368 clock = cm_get_osc_clk_hz(1);
369 else if (reg == CLKMGR_VCO_SSRC_EOSC2)
370 clock = cm_get_osc_clk_hz(2);
371 else if (reg == CLKMGR_VCO_SSRC_F2S)
372 clock = cm_get_f2s_per_ref_clk_hz();
374 /* get the PER VCO clock */
375 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_VCO);
376 clock /= ((reg & CLKMGR_PERPLLGRP_VCO_DENOM_MASK) >>
377 CLKMGR_PERPLLGRP_VCO_DENOM_OFFSET) + 1;
378 clock *= ((reg & CLKMGR_PERPLLGRP_VCO_NUMER_MASK) >>
379 CLKMGR_PERPLLGRP_VCO_NUMER_OFFSET) + 1;
384 unsigned long cm_get_mpu_clk_hz(void)
388 clock = cm_get_main_vco_clk_hz();
390 /* get the MPU clock */
391 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_ALTR_MPUCLK);
393 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_MPUCLK);
398 unsigned long cm_get_sdram_clk_hz(void)
402 /* identify SDRAM PLL clock source */
403 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_VCO);
404 reg = (reg & CLKMGR_SDRPLLGRP_VCO_SSRC_MASK) >>
405 CLKMGR_SDRPLLGRP_VCO_SSRC_OFFSET;
406 if (reg == CLKMGR_VCO_SSRC_EOSC1)
407 clock = cm_get_osc_clk_hz(1);
408 else if (reg == CLKMGR_VCO_SSRC_EOSC2)
409 clock = cm_get_osc_clk_hz(2);
410 else if (reg == CLKMGR_VCO_SSRC_F2S)
411 clock = cm_get_f2s_sdr_ref_clk_hz();
413 /* get the SDRAM VCO clock */
414 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_VCO);
415 clock /= ((reg & CLKMGR_SDRPLLGRP_VCO_DENOM_MASK) >>
416 CLKMGR_SDRPLLGRP_VCO_DENOM_OFFSET) + 1;
417 clock *= ((reg & CLKMGR_SDRPLLGRP_VCO_NUMER_MASK) >>
418 CLKMGR_SDRPLLGRP_VCO_NUMER_OFFSET) + 1;
420 /* get the SDRAM (DDR_DQS) clock */
421 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_SDRPLL_DDRDQSCLK);
422 reg = (reg & CLKMGR_SDRPLLGRP_DDRDQSCLK_CNT_MASK) >>
423 CLKMGR_SDRPLLGRP_DDRDQSCLK_CNT_OFFSET;
429 unsigned int cm_get_l4_sp_clk_hz(void)
433 /* identify the source of L4 SP clock */
434 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_L4SRC);
435 reg = (reg & CLKMGR_MAINPLLGRP_L4SRC_L4SP) >>
436 CLKMGR_MAINPLLGRP_L4SRC_L4SP_OFFSET;
438 if (reg == CLKMGR_L4_SP_CLK_SRC_MAINPLL) {
439 clock = cm_get_main_vco_clk_hz();
441 /* get the clock prior L4 SP divider (main clk) */
442 reg = readl(socfpga_get_clkmgr_addr() +
443 CLKMGR_GEN5_ALTR_MAINCLK);
445 reg = readl(socfpga_get_clkmgr_addr() +
446 CLKMGR_GEN5_MAINPLL_MAINCLK);
448 } else if (reg == CLKMGR_L4_SP_CLK_SRC_PERPLL) {
449 clock = cm_get_per_vco_clk_hz();
451 /* get the clock prior L4 SP divider (periph_base_clk) */
452 reg = readl(socfpga_get_clkmgr_addr() +
453 CLKMGR_GEN5_PERPLL_PERBASECLK);
457 /* get the L4 SP clock which supplied to UART */
458 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_MAINPLL_MAINDIV);
459 reg = (reg & CLKMGR_MAINPLLGRP_MAINDIV_L4SPCLK_MASK) >>
460 CLKMGR_MAINPLLGRP_MAINDIV_L4SPCLK_OFFSET;
461 clock = clock / (1 << reg);
466 unsigned int cm_get_mmc_controller_clk_hz(void)
470 /* identify the source of MMC clock */
471 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_SRC);
472 reg = (reg & CLKMGR_PERPLLGRP_SRC_SDMMC_MASK) >>
473 CLKMGR_PERPLLGRP_SRC_SDMMC_OFFSET;
475 if (reg == CLKMGR_SDMMC_CLK_SRC_F2S) {
476 clock = cm_get_f2s_per_ref_clk_hz();
477 } else if (reg == CLKMGR_SDMMC_CLK_SRC_MAIN) {
478 clock = cm_get_main_vco_clk_hz();
480 /* get the SDMMC clock */
481 reg = readl(socfpga_get_clkmgr_addr() +
482 CLKMGR_GEN5_MAINPLL_MAINNANDSDMMCCLK);
484 } else if (reg == CLKMGR_SDMMC_CLK_SRC_PER) {
485 clock = cm_get_per_vco_clk_hz();
487 /* get the SDMMC clock */
488 reg = readl(socfpga_get_clkmgr_addr() +
489 CLKMGR_GEN5_PERPLL_PERNANDSDMMCCLK);
493 /* further divide by 4 as we have fixed divider at wrapper */
498 unsigned int cm_get_qspi_controller_clk_hz(void)
502 /* identify the source of QSPI clock */
503 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_SRC);
504 reg = (reg & CLKMGR_PERPLLGRP_SRC_QSPI_MASK) >>
505 CLKMGR_PERPLLGRP_SRC_QSPI_OFFSET;
507 if (reg == CLKMGR_QSPI_CLK_SRC_F2S) {
508 clock = cm_get_f2s_per_ref_clk_hz();
509 } else if (reg == CLKMGR_QSPI_CLK_SRC_MAIN) {
510 clock = cm_get_main_vco_clk_hz();
512 /* get the qspi clock */
513 reg = readl(socfpga_get_clkmgr_addr() +
514 CLKMGR_GEN5_MAINPLL_MAINQSPICLK);
516 } else if (reg == CLKMGR_QSPI_CLK_SRC_PER) {
517 clock = cm_get_per_vco_clk_hz();
519 /* get the qspi clock */
520 reg = readl(socfpga_get_clkmgr_addr() +
521 CLKMGR_GEN5_PERPLL_PERQSPICLK);
528 unsigned int cm_get_spi_controller_clk_hz(void)
532 clock = cm_get_per_vco_clk_hz();
534 /* get the clock prior L4 SP divider (periph_base_clk) */
535 reg = readl(socfpga_get_clkmgr_addr() + CLKMGR_GEN5_PERPLL_PERBASECLK);
541 /* Override weak dw_spi_get_clk implementation in designware_spi.c driver */
542 int dw_spi_get_clk(struct udevice *bus, ulong *rate)
544 *rate = cm_get_spi_controller_clk_hz();
549 void cm_print_clock_quick_summary(void)
551 printf("MPU %10ld kHz\n", cm_get_mpu_clk_hz() / 1000);
552 printf("DDR %10ld kHz\n", cm_get_sdram_clk_hz() / 1000);
553 printf("EOSC1 %8d kHz\n", cm_get_osc_clk_hz(1) / 1000);
554 printf("EOSC2 %8d kHz\n", cm_get_osc_clk_hz(2) / 1000);
555 printf("F2S_SDR_REF %8d kHz\n", cm_get_f2s_sdr_ref_clk_hz() / 1000);
556 printf("F2S_PER_REF %8d kHz\n", cm_get_f2s_per_ref_clk_hz() / 1000);
557 printf("MMC %8d kHz\n", cm_get_mmc_controller_clk_hz() / 1000);
558 printf("QSPI %8d kHz\n", cm_get_qspi_controller_clk_hz() / 1000);
559 printf("UART %8d kHz\n", cm_get_l4_sp_clk_hz() / 1000);
560 printf("SPI %8d kHz\n", cm_get_spi_controller_clk_hz() / 1000);