* [PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk
@ 2025-10-17 10:22 Michael Walle
2025-10-17 10:22 ` [PATCH v1 2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source Michael Walle
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Michael Walle @ 2025-10-17 10:22 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, devicetree, linux-kernel, 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.
Signed-off-by: Michael Walle <mwalle@kernel.org>
---
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(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
index ce3ed1b0f24d..5de038166a3d 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
@@ -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;
};
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source
2025-10-17 10:22 [PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk Michael Walle
@ 2025-10-17 10:22 ` Michael Walle
2025-10-23 13:50 ` Kumar, Udit
2025-10-17 10:27 ` [PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk Michael Walle
2025-10-31 14:40 ` Vignesh Raghavendra
2 siblings, 1 reply; 7+ messages in thread
From: Michael Walle @ 2025-10-17 10:22 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, devicetree, linux-kernel, 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.
Signed-off-by: Michael Walle <mwalle@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@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>;
};
};
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk
2025-10-17 10:22 [PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk Michael Walle
2025-10-17 10:22 ` [PATCH v1 2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source Michael Walle
@ 2025-10-17 10:27 ` Michael Walle
2025-10-31 14:40 ` Vignesh Raghavendra
2 siblings, 0 replies; 7+ messages in thread
From: Michael Walle @ 2025-10-17 10:27 UTC (permalink / raw)
To: Michael Walle, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
On Fri Oct 17, 2025 at 12:22 PM CEST, Michael Walle wrote:
> [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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source
2025-10-17 10:22 ` [PATCH v1 2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source Michael Walle
@ 2025-10-23 13:50 ` Kumar, Udit
2025-10-23 14:18 ` Michael Walle
0 siblings, 1 reply; 7+ messages in thread
From: Kumar, Udit @ 2025-10-23 13:50 UTC (permalink / raw)
To: Michael Walle, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, devicetree, linux-kernel, u-kumar1
Hi Michael,
On 10/17/2025 3:52 PM, Michael Walle wrote:
> 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.
> Signed-off-by: Michael Walle <mwalle@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@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>;
> };
> };
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source
2025-10-23 13:50 ` Kumar, Udit
@ 2025-10-23 14:18 ` Michael Walle
2025-10-23 14:27 ` Vignesh Raghavendra
0 siblings, 1 reply; 7+ messages in thread
From: Michael Walle @ 2025-10-23 14:18 UTC (permalink / raw)
To: Kumar, Udit, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]
On Thu Oct 23, 2025 at 3:50 PM CEST, Udit Kumar wrote:
> Hi Michael,
>
> On 10/17/2025 3:52 PM, Michael Walle wrote:
>> 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.
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source
2025-10-23 14:18 ` Michael Walle
@ 2025-10-23 14:27 ` Vignesh Raghavendra
0 siblings, 0 replies; 7+ messages in thread
From: Vignesh Raghavendra @ 2025-10-23 14:27 UTC (permalink / raw)
To: Michael Walle, Kumar, Udit, Nishanth Menon, Tero Kristo,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, devicetree, linux-kernel
On 23/10/25 19:48, Michael Walle wrote:
> On Thu Oct 23, 2025 at 3:50 PM CEST, Udit Kumar wrote:
>> Hi Michael,
>>
>> On 10/17/2025 3:52 PM, Michael Walle wrote:
>>> 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.
>
> 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.
>
> -michael
--
Regards
Vignesh
https://ti.com/opensource
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk
2025-10-17 10:22 [PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk Michael Walle
2025-10-17 10:22 ` [PATCH v1 2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source Michael Walle
2025-10-17 10:27 ` [PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk Michael Walle
@ 2025-10-31 14:40 ` Vignesh Raghavendra
2 siblings, 0 replies; 7+ messages in thread
From: Vignesh Raghavendra @ 2025-10-31 14:40 UTC (permalink / raw)
To: Nishanth Menon, Tero Kristo, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Michael Walle
Cc: Vignesh Raghavendra, linux-arm-kernel, devicetree, linux-kernel
Hi Michael Walle,
On Fri, 17 Oct 2025 12:22:21 +0200, Michael Walle wrote:
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-10-31 14:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17 10:22 [PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk Michael Walle
2025-10-17 10:22 ` [PATCH v1 2/2] arm64: dts: ti: k3-j722s-main: fix the audio refclk source Michael Walle
2025-10-23 13:50 ` Kumar, Udit
2025-10-23 14:18 ` Michael Walle
2025-10-23 14:27 ` Vignesh Raghavendra
2025-10-17 10:27 ` [PATCH v1 1/2] rm64: dts: ti: k3-j722s-evm: explicitly use PLL1_HSDIV6 audio refclk Michael Walle
2025-10-31 14:40 ` Vignesh Raghavendra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).