From 0ecfac663d4cb4593abee8e9353105f522ae49d2 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Mon, 6 May 2024 17:20:45 +0200 Subject: [PATCH] dts: nordic nrf-timer: Expose max frequency as DT property The counter driver needs to know what is the maximum counting frequency of each timer peripheral. Let's add it to its DT. Signed-off-by: Alberto Escolar Piedras --- dts/bindings/timer/nordic,nrf-timer.yaml | 12 +++++++++++- dts/common/nordic/nrf54h20.dtsi | 5 +++++ dts/common/nordic/nrf54l15.dtsi | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/dts/bindings/timer/nordic,nrf-timer.yaml b/dts/bindings/timer/nordic,nrf-timer.yaml index 8a961f34f88..9f8395003a8 100644 --- a/dts/bindings/timer/nordic,nrf-timer.yaml +++ b/dts/bindings/timer/nordic,nrf-timer.yaml @@ -24,10 +24,20 @@ properties: interrupts: required: true + max-frequency: + type: int + default: 16000000 + description: | + Maximum timer frequency in Hz. + + The default value is 16MHz which was the maximum frequency for all nRF TIMER peripherals + up to the nRF54 series, and still remains the most typical maximum frequency for nRF54 + TIMERs. + prescaler: type: int required: true - description: Prescaler value determines frequency (base_frequency/2^prescaler) + description: Prescaler value determines frequency (max-frequency/2^prescaler) zli: type: boolean diff --git a/dts/common/nordic/nrf54h20.dtsi b/dts/common/nordic/nrf54h20.dtsi index 75d112b85e2..4a4f78bc166 100644 --- a/dts/common/nordic/nrf54h20.dtsi +++ b/dts/common/nordic/nrf54h20.dtsi @@ -217,6 +217,7 @@ cc-num = <8>; interrupts = <40 NRF_DEFAULT_IRQ_PRIORITY>; max-bit-width = <32>; + max-frequency = ; prescaler = <0>; }; @@ -227,6 +228,7 @@ cc-num = <8>; interrupts = <41 NRF_DEFAULT_IRQ_PRIORITY>; max-bit-width = <32>; + max-frequency = ; prescaler = <0>; }; @@ -237,6 +239,7 @@ cc-num = <8>; interrupts = <42 NRF_DEFAULT_IRQ_PRIORITY>; max-bit-width = <32>; + max-frequency = ; prescaler = <0>; }; @@ -369,6 +372,7 @@ cc-num = <6>; interrupts = <226 NRF_DEFAULT_IRQ_PRIORITY>; max-bit-width = <32>; + max-frequency = ; prescaler = <0>; }; @@ -379,6 +383,7 @@ cc-num = <6>; interrupts = <227 NRF_DEFAULT_IRQ_PRIORITY>; max-bit-width = <32>; + max-frequency = ; prescaler = <0>; }; diff --git a/dts/common/nordic/nrf54l15.dtsi b/dts/common/nordic/nrf54l15.dtsi index 76dc4903f55..a15ead43953 100644 --- a/dts/common/nordic/nrf54l15.dtsi +++ b/dts/common/nordic/nrf54l15.dtsi @@ -212,6 +212,7 @@ cc-num = <6>; max-bit-width = <32>; interrupts = <85 NRF_DEFAULT_IRQ_PRIORITY>; + max-frequency = ; prescaler = <0>; }; @@ -228,6 +229,7 @@ cc-num = <8>; max-bit-width = <32>; interrupts = <133 NRF_DEFAULT_IRQ_PRIORITY>; + max-frequency = ; prescaler = <0>; };