[PATCH v1 2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source

Michael Walle mwalle at kernel.org
Fri Oct 17 03:22:22 PDT 2025


At the moment the clock parent of the audio extclk output is PLL1_HSDIV6
of the main domain. This very clock output is also used among various IP
cores, for example for the USB1 LPM clock. The audio extclock being an
external clock output with a variable frequency, it is likely that a
user of this clock will try to set it's frequency to a different value,
i.e. an audio codec. Because that clock output is used also for other IP
cores, bad things will happen.

Instead of using PLL1_HSDIV6 use the PLL2_HSDIV8 as a sane default, as
this output is exclusively used among other audio peripherals.

Signed-off-by: Michael Walle <mwalle at kernel.org>
---
The original abort happens when sound is played and the codec will try
to change the clock frequency of the audio_extclk. In that case, there
will be a synchronous external abort in the xhci irq handler on our
board. This error only happens on board variants with an attached
on-board USB hub (TUSB8043A) probably because of USB traffic.

This can also reduced to just run k3conf to set the clock manually:
  k3conf set clock 157 15 12000000

That will then produce the following splat:

    Internal error: synchronous external abort: 0000000096000010 [#1]  SMP
    Modules linked in:
    CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G   M                6.18.0-rc1-next-20251016-00042-gde32b6002bba #3076 NONE
    Tainted: [M]=MACHINE_CHECK
    Hardware name: Kontron SMARC-sAM67 (DT)
    pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    pc : xhci_handle_events.isra.0+0x278/0x14e8
    lr : xhci_irq+0xa4/0x140
    sp : ffff800080003e00
    x29: ffff800080003e60 x28: ffff0008043cc000 x27: 0000000000000000
    x26: ffff000804513a78 x25: ffffbdbfa3b5df40 x24: ffff0008043c9c48
    x23: ffff000803234c60 x22: ffff800081410490 x21: 0000000000000000
    x20: 0000000000000000 x19: ffff0008043c9240 x18: 0000000000000004
    x17: ffff4249db4d5000 x16: ffff800080000000 x15: ffff00097ee690e0
    x14: 0000000000000001 x13: 0000000000000001 x12: 0000000000000000
    x11: 0000000000000040 x10: ffff0008000146f0 x9 : ffffbdbfa240937c
    x8 : ffff000802679fb0 x7 : 0000000000000000 x6 : 0000000000000000
    x5 : ffff000802679f88 x4 : ffff0008043c9284 x3 : 0000000000000078
    x2 : ffff0008043cc000 x1 : ffff000804513a00 x0 : 0000000000000078
    Call trace:
     xhci_handle_events.isra.0+0x278/0x14e8 (P)
     xhci_irq+0xa4/0x140
     usb_hcd_irq+0x38/0x60
     __handle_irq_event_percpu+0x64/0x278
     handle_irq_event+0x4c/0x110
     handle_fasteoi_irq+0x14c/0x270
     handle_irq_desc+0x3c/0x68
     generic_handle_domain_irq+0x24/0x40
     gic_handle_irq+0x138/0x280
     call_on_irq_stack+0x30/0x48
     do_interrupt_handler+0x88/0xa0
     el1_interrupt+0x4c/0xb8
     el1h_64_irq_handler+0x18/0x30
     el1h_64_irq+0x80/0x88
     default_idle_call+0x38/0xf0 (P)
     do_idle+0x22c/0x290
     cpu_startup_entry+0x40/0x50
     rest_init+0xc8/0xd0
     start_kernel+0x8d0/0x8d8
     __primary_switched+0x88/0x98
    Code: eb02031f 54000e80 f8606836 f9400b1c (b94002d6)
    ---[ end trace 0000000000000000 ]---
    Kernel panic - not syncing: synchronous external abort: Fatal exception in interrupt
---
 arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
index 11a1a42e12b1..04de29da40f1 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
@@ -468,7 +468,7 @@ audio_refclk0: clock at 82e0 {
 		reg = <0x82e0 0x4>;
 		clocks = <&k3_clks 157 0>;
 		assigned-clocks = <&k3_clks 157 0>;
-		assigned-clock-parents = <&k3_clks 157 15>;
+		assigned-clock-parents = <&k3_clks 157 16>;
 		#clock-cells = <0>;
 	};
 
@@ -477,7 +477,7 @@ audio_refclk1: clock at 82e4 {
 		reg = <0x82e4 0x4>;
 		clocks = <&k3_clks 157 18>;
 		assigned-clocks = <&k3_clks 157 18>;
-		assigned-clock-parents = <&k3_clks 157 33>;
+		assigned-clock-parents = <&k3_clks 157 34>;
 		#clock-cells = <0>;
 	};
 };
-- 
2.47.3




More information about the linux-arm-kernel mailing list