Skip to content

Commit 3cdcdce

Browse files
Zhiqiang-Houfabioestevam
authored andcommitted
clk: imx8m: register ARM A53 core clock
Register ARM A53 core clock for i.MX 8M Mini, Nano and Plus, preparing for enabling the 'cpu' command, which depends on this to print CPU core frequency. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
1 parent ecc5dd7 commit 3cdcdce

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

drivers/clk/imx/clk-imx8mm.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ static const char * const sys_pll1_bypass_sels[] = {"sys_pll1", "sys_pll1_ref_se
2121
static const char * const sys_pll2_bypass_sels[] = {"sys_pll2", "sys_pll2_ref_sel", };
2222
static const char * const sys_pll3_bypass_sels[] = {"sys_pll3", "sys_pll3_ref_sel", };
2323

24+
static const char * const imx8mm_arm_core_sels[] = {"arm_a53_src", "arm_pll_out", };
25+
2426
static const char * const imx8mm_a53_sels[] = {"clock-osc-24m", "arm_pll_out", "sys_pll2_500m",
2527
"sys_pll2_1000m", "sys_pll1_800m", "sys_pll1_400m",
2628
"audio_pll1_out", "sys_pll3_out", };
@@ -417,6 +419,12 @@ static int imx8mm_clk_probe(struct udevice *dev)
417419
imx_clk_gate4("qspi_root_clk", "qspi", base + 0x42f0, 0));
418420
#endif
419421

422+
clk_dm(IMX8MM_CLK_ARM,
423+
imx_clk_mux2_flags("arm_core", base + 0x9880, 24, 1,
424+
imx8mm_arm_core_sels,
425+
ARRAY_SIZE(imx8mm_arm_core_sels),
426+
CLK_IS_CRITICAL));
427+
420428
return 0;
421429
}
422430

drivers/clk/imx/clk-imx8mn.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ static const char * const sys_pll1_bypass_sels[] = {"sys_pll1", "sys_pll1_ref_se
2323
static const char * const sys_pll2_bypass_sels[] = {"sys_pll2", "sys_pll2_ref_sel", };
2424
static const char * const sys_pll3_bypass_sels[] = {"sys_pll3", "sys_pll3_ref_sel", };
2525

26+
static const char * const imx8mn_arm_core_sels[] = {"arm_a53_src", "arm_pll_out", };
27+
2628
static const char * const imx8mn_a53_sels[] = {"clock-osc-24m", "arm_pll_out", "sys_pll2_500m",
2729
"sys_pll2_1000m", "sys_pll1_800m", "sys_pll1_400m",
2830
"audio_pll1_out", "sys_pll3_out", };
@@ -403,6 +405,12 @@ static int imx8mn_clk_probe(struct udevice *dev)
403405
imx_clk_gate4("ecspi3_root_clk", "ecspi3", base + 0x4090, 0));
404406
#endif
405407

408+
clk_dm(IMX8MN_CLK_ARM,
409+
imx_clk_mux2_flags("arm_core", base + 0x9880, 24, 1,
410+
imx8mn_arm_core_sels,
411+
ARRAY_SIZE(imx8mn_arm_core_sels),
412+
CLK_IS_CRITICAL));
413+
406414
return 0;
407415
}
408416

drivers/clk/imx/clk-imx8mp.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ static const char * const sys_pll1_bypass_sels[] = {"sys_pll1", "sys_pll1_ref_se
2121
static const char * const sys_pll2_bypass_sels[] = {"sys_pll2", "sys_pll2_ref_sel", };
2222
static const char * const sys_pll3_bypass_sels[] = {"sys_pll3", "sys_pll3_ref_sel", };
2323

24+
static const char * const imx8mp_arm_core_sels[] = {"arm_a53_src", "arm_pll_out", };
25+
2426
static const char * const imx8mp_a53_sels[] = {"clock-osc-24m", "arm_pll_out", "sys_pll2_500m",
2527
"sys_pll2_1000m", "sys_pll1_800m", "sys_pll1_400m",
2628
"audio_pll1_out", "sys_pll3_out", };
@@ -354,6 +356,12 @@ static int imx8mp_clk_probe(struct udevice *dev)
354356

355357
clk_dm(IMX8MP_CLK_USDHC3_ROOT, imx_clk_gate4("usdhc3_root_clk", "usdhc3", base + 0x45e0, 0));
356358

359+
clk_dm(IMX8MP_CLK_ARM,
360+
imx_clk_mux2_flags("arm_core", base + 0x9880, 24, 1,
361+
imx8mp_arm_core_sels,
362+
ARRAY_SIZE(imx8mp_arm_core_sels),
363+
CLK_IS_CRITICAL));
364+
357365
return 0;
358366
}
359367

0 commit comments

Comments
 (0)