From: Parth Pancholi <parth.panch...@toradex.com>

CU_CLKOUT0 can be driven by two input clocks: a 25 MHz and a 50 MHz source.
Currently, the 25 MHz option is not selectable due to an incorrect mux
configuration where the 50 MHz clock is duplicated in the parent list.

This patch fixes the mux setup, allowing proper selection of the 25 MHz
clock source for MCU_CLKOUT0.

Similar configuration is already correctly implemented in AM62 clock
data for 'hsdiv4_16fft_main_2_hsdivout1_clk10', where MCU_CLKOUT0
parent switching behaves as expected.

Link: 
http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am62px/clocks.html#clocks-for-board0-device
Signed-off-by: Parth Pancholi <parth.panch...@toradex.com>
---
 arch/arm/mach-k3/r5/am62px/clk-data.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-k3/r5/am62px/clk-data.c 
b/arch/arm/mach-k3/r5/am62px/clk-data.c
index 4b9892fe0516..bc62d1d0d084 100644
--- a/arch/arm/mach-k3/r5/am62px/clk-data.c
+++ b/arch/arm/mach-k3/r5/am62px/clk-data.c
@@ -59,7 +59,7 @@ static const char * const 
sam62_pll_ctrl_wrap_mcu_0_sysclkout_clk_parents[] = {
 
 static const char * const clkout0_ctrl_out0_parents[] = {
        "hsdiv4_16fft_main_2_hsdivout1_clk",
-       "hsdiv4_16fft_main_2_hsdivout1_clk",
+       "hsdiv4_16fft_main_2_hsdivout1_clk10",
 };
 
 static const char * const main_emmcsd0_refclk_sel_out0_parents[] = {
@@ -193,6 +193,7 @@ static const struct clk_data clk_list[] = {
        CLK_DIV("hsdiv4_16fft_main_1_hsdivout2_clk", 
"pllfracf2_ssmod_16fft_main_1_foutvcop_clk", 0x681088, 0, 7, 0, 0),
        CLK_DIV("hsdiv4_16fft_main_1_hsdivout3_clk", 
"pllfracf2_ssmod_16fft_main_1_foutvcop_clk", 0x68108c, 0, 7, 0, 0),
        CLK_DIV("hsdiv4_16fft_main_2_hsdivout1_clk", 
"pllfracf2_ssmod_16fft_main_2_foutvcop_clk", 0x682084, 0, 7, 0, 0),
+       CLK_DIV("hsdiv4_16fft_main_2_hsdivout1_clk10", 
"pllfracf2_ssmod_16fft_main_2_foutvcop_clk", 0x682084, 0, 7, 0, 0),
        CLK_DIV("hsdiv4_16fft_main_2_hsdivout2_clk", 
"pllfracf2_ssmod_16fft_main_2_foutvcop_clk", 0x682088, 0, 7, 0, 0),
        CLK_DIV("hsdiv4_16fft_mcu_0_hsdivout0_clk", 
"pllfracf2_ssmod_16fft_mcu_0_foutvcop_clk", 0x4040080, 0, 7, 0, 0),
        CLK_MUX_PLLCTRL("sam62_pll_ctrl_wrap_main_0_sysclkout_clk", 
sam62_pll_ctrl_wrap_main_0_sysclkout_clk_parents, 2, 0x410000, 0),
@@ -281,7 +282,7 @@ static const struct dev_clk soc_dev_clk_data[] = {
        DEV_CLK(146, 5, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
        DEV_CLK(157, 36, "clkout0_ctrl_out0"),
        DEV_CLK(157, 37, "hsdiv4_16fft_main_2_hsdivout1_clk"),
-       DEV_CLK(157, 38, "hsdiv4_16fft_main_2_hsdivout1_clk"),
+       DEV_CLK(157, 38, "hsdiv4_16fft_main_2_hsdivout1_clk10"),
        DEV_CLK(157, 40, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
        DEV_CLK(157, 54, "mshsi2c_main_0_porscl"),
        DEV_CLK(157, 91, "sam62_pll_ctrl_wrap_mcu_0_sysclkout_clk"),
-- 
2.34.1

Reply via email to