Skip to contentSkip to conversation

rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk

PATCH Applied Michael Walle 3 participants 7 messages Oct 17, 2025 – Oct 31, 2025

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

PATCH 1/2 rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk

The parent of the audio_refclk0/1 is about to change to a sane default value. Thus, move the (soon to be) non-default value into the board device tree.

---
It appears that the eval system just need *any* clock rate for the audio codec. Thus, if it's confirmed to be working with the new default value, this patch might be ignored.

---
 arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-j722s-evm.dts +5 -0
index ce3ed1b0f24d..5de038166a3d 100644
@@ -235,6 +235,11 @@ opp-1400000000 {
 	};
 };
 
+&audio_refclk1 {
+	assigned-clocks = <&k3_clks 157 0>;
+	assigned-clock-parents = <&k3_clks 157 15>;
+};
+
 &cpsw_mac_syscon {
 	bootph-all;
 };
Signature · 1 line
2.47.3
#1 lore raw

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

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.

---
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(-)
arch/arm64/boot/dts/ti/k3-j722s-main.dtsi +2 -2
index 11a1a42e12b1..04de29da40f1 100644
@@ -468,7 +468,7 @@ audio_refclk0: clock@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@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>;
 	};
 };
Signature · 1 line
2.47.3
#2 lore raw

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

Hi Michael,

Quoted 10 lines · Michael Walle

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.

Thanks for this fix,

Initial support for audio_refclkx was added in j722s and am62p soc specific files due

to selection of different parent.

Since these SOC share many common things, and this patch will make these nodes same as of am62p device

https://elixir.bootlin.com/linux/v6.18-rc2/source/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi#L46

So I suggest to move in common file https://elixir.bootlin.com/linux/v6.18-rc2/source/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi#L42

and remove from SOC specific files.

Quoted 82 lines

---
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(-)
arch/arm64/boot/dts/ti/k3-j722s-main.dtsi +2 -2
index 11a1a42e12b1..04de29da40f1 100644
@@ -468,7 +468,7 @@ audio_refclk0: clock@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@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>;
  	};
  };
#3 lore raw

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

Quoted 25 lines · Udit Kumar

Hi Michael,

Quoted 10 lines · Michael Walle

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.

Thanks for this fix,

Initial support for audio_refclkx was added in j722s and am62p soc specific files due

to selection of different parent.

Since these SOC share many common things, and this patch will make these nodes same as of am62p device

Quoted 8 lines

https://elixir.bootlin.com/linux/v6.18-rc2/source/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi#L46

So I suggest to move in common file
https://elixir.bootlin.com/linux/v6.18-rc2/source/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi#L42

and remove from SOC specific files.

Ok, but to keep the information and to not conflate two different things, I'd do the following:
- keep this patch as is
- add a second one, to move the (now) identical nodes into the common-main.dtsi

Sounds good?

-michael

#4 lore raw

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

Quoted 35 lines · Michael Walle
Quoted 25 lines · Udit Kumar

Hi Michael,

Quoted 10 lines · Michael Walle

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.

Thanks for this fix,

Initial support for audio_refclkx was added in j722s and am62p soc specific files due

to selection of different parent.

Since these SOC share many common things, and this patch will make these nodes same as of am62p device

Quoted 8 lines

https://elixir.bootlin.com/linux/v6.18-rc2/source/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi#L46

So I suggest to move in common file
https://elixir.bootlin.com/linux/v6.18-rc2/source/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi#L42

and remove from SOC specific files.

Quoted 7 lines

Ok, but to keep the information and to not conflate two different things, I'd do the following:
- keep this patch as is
- add a second one, to move the (now) identical nodes into the common-main.dtsi

Sounds good?

Agree, this is better way to organize the change.

Quoted 2 lines

-michael

Signature · 3 lines
Regards
Vignesh
https://ti.com/opensource
#5 lore raw
In reply to Michael Walle
Quoted 1 line · Michael Walle

[PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk

Dang. I just noticed the subject has a typo. Will fix it in the next version, or if there are no futher remarks, could it be fixed while applying?

-michael

maintainer Applied
#6 lore raw
In reply to Michael Walle

Hi Michael Walle,

Quoted 5 lines · Michael Walle

The parent of the audio_refclk0/1 is about to change to a sane default value. Thus, move the (soon to be) non-default value into the board device tree.

I have applied the following to branch ti-next on [1]. Thank you!

[1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk

      commit: b2f45bdc185f687fbbfef838eb49320ad07602b4
[2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source
      commit: a3a74f9b15f020952a4c9e4eb3a0b44241827b73

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh