Skip to content

Commit b4fb833

Browse files
andyrosskartben
authored andcommitted
soc/mediatek/adsp: Source timer rate from DTS
These devices have an architecturally fixed 13 MHz clock device. But thankfully you can put a default into a DTS binding so we don't have to repeat it for all of them. Signed-off-by: Andy Ross <[email protected]>
1 parent 09495c9 commit b4fb833

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2024 The ChromiumOS Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
include: base.yaml
5+
6+
# This clock hardware is almost fully described by its register block,
7+
# but needs a binding for the frequency property below (which is
8+
# architecturally fixed at 13 MHz on all known devices)
9+
10+
description: MediaTek Audio DSP Core Clock
11+
compatible: "mediatek,ostimer64"
12+
properties:
13+
freq-hz:
14+
type: int
15+
default: 13000000

soc/mediatek/mt8xxx/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ config XTENSA_TIMER
3737
default n
3838

3939
config SYS_CLOCK_HW_CYCLES_PER_SEC
40-
default 13000000
40+
default $(dt_node_int_prop_int,$(dt_nodelabel_path,ostimer64),freq-hz)
4141

4242
config MAIN_STACK_SIZE
4343
default 2048

0 commit comments

Comments
 (0)