Skip to contentSkip to conversation

arm: mach-k3: j784s4: Fix MCU_CLKOUT0 parent clock mux

PATCH In review Emanuele Ghidoli 3 participants 3 messages Jun 17, 2024 – Jun 28, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mach-k3: j784s4: Fix MCU_CLKOUT0 parent clock mux

From: Emanuele Ghidoli <[email protected]>

MCU_CLKOUT0 output can be driven by two different clock inputs:
one at 25 MHz and another at 50 MHz. Currently, the 25 MHz input clock is not selectable due to a duplication of the 50 MHz clock input in the mux configuration. This commit corrects the parent clock mux configuration, making the 25 MHz input clock selectable.

---
 arch/arm/mach-k3/r5/j784s4/clk-data.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-k3/r5/j784s4/clk-data.c +2 -2
index feaa13ee266b..793bcac93245 100644
@@ -134,7 +134,7 @@ static const char * const emmcsd1_lb_clksel_out0_parents[] = {
 
 static const char * const mcu_clkout_mux_out0_parents[] = {
 	"hsdiv4_16fft_mcu_2_hsdivout0_clk",
-	"hsdiv4_16fft_mcu_2_hsdivout0_clk",
+	"hsdiv4_16fft_mcu_2_hsdivout1_clk",
 };
 
 static const char * const k3_pll_ctrl_wrap_main_0_sysclkout_clk_parents[] = {
@@ -338,7 +338,7 @@ static const struct dev_clk soc_dev_clk_data[] = {
 	DEV_CLK(149, 5, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
 	DEV_CLK(157, 174, "mcu_clkout_mux_out0"),
 	DEV_CLK(157, 175, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
-	DEV_CLK(157, 176, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
+	DEV_CLK(157, 176, "hsdiv4_16fft_mcu_2_hsdivout1_clk"),
 	DEV_CLK(157, 179, "fss_mcu_0_hyperbus1p0_0_hpb_out_clk_p"),
 	DEV_CLK(157, 180, "fss_mcu_0_hyperbus1p0_0_hpb_out_clk_n"),
 	DEV_CLK(157, 224, "fss_mcu_0_ospi_0_ospi_oclk_clk"),
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

On June 17, 2024 thus sayeth Emanuele Ghidoli:

Quoted 8 lines

From: Emanuele Ghidoli <[email protected]>

MCU_CLKOUT0 output can be driven by two different clock inputs:
one at 25 MHz and another at 50 MHz. Currently, the 25 MHz input clock is not selectable due to a duplication of the 50 MHz clock input in the mux configuration. This commit corrects the parent clock mux configuration, making the 25 MHz input clock selectable.

Quoted 5 lines
---
 arch/arm/mach-k3/r5/j784s4/clk-data.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Nice catch!

~Bryan

Quoted 25 lines
arch/arm/mach-k3/r5/j784s4/clk-data.c +2 -2
index feaa13ee266b..793bcac93245 100644
@@ -134,7 +134,7 @@ static const char * const emmcsd1_lb_clksel_out0_parents[] = {
 
 static const char * const mcu_clkout_mux_out0_parents[] = {
 	"hsdiv4_16fft_mcu_2_hsdivout0_clk",
-	"hsdiv4_16fft_mcu_2_hsdivout0_clk",
+	"hsdiv4_16fft_mcu_2_hsdivout1_clk",
 };
 
 static const char * const k3_pll_ctrl_wrap_main_0_sysclkout_clk_parents[] = {
@@ -338,7 +338,7 @@ static const struct dev_clk soc_dev_clk_data[] = {
 	DEV_CLK(149, 5, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
 	DEV_CLK(157, 174, "mcu_clkout_mux_out0"),
 	DEV_CLK(157, 175, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
-	DEV_CLK(157, 176, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
+	DEV_CLK(157, 176, "hsdiv4_16fft_mcu_2_hsdivout1_clk"),
 	DEV_CLK(157, 179, "fss_mcu_0_hyperbus1p0_0_hpb_out_clk_p"),
 	DEV_CLK(157, 180, "fss_mcu_0_hyperbus1p0_0_hpb_out_clk_n"),
 	DEV_CLK(157, 224, "fss_mcu_0_ospi_0_ospi_oclk_clk"),
Signature · 1 line
2.34.1
#2 lore raw
In reply to Emanuele Ghidoli
Quoted 8 lines · Emanuele Ghidoli

MCU_CLKOUT0 output can be driven by two different clock inputs:
one at 25 MHz and another at 50 MHz. Currently, the 25 MHz input clock is not selectable due to a duplication of the 50 MHz clock input in the mux configuration. This commit corrects the parent clock mux configuration, making the 25 MHz input clock selectable.

[...]

Applied to u-boot/next, thanks!

Signature · 1 line
Tom