diff --git a/dts/bindings/clock/nordic,nrf-fll16m.yaml b/dts/bindings/clock/nordic,nrf-fll16m.yaml new file mode 100644 index 00000000000..eca813fbdbc --- /dev/null +++ b/dts/bindings/clock/nordic,nrf-fll16m.yaml @@ -0,0 +1,42 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +description: | + Nordic FLL16M + + The FLL16M can use the following clocks as clock sources: + + - HFXO: The HFXO clock is used as a clock source if the + FLL16M mode is BYPASS, or if the FLL16M mode is + closed-loop and the LFXO clock is not available. + + - LFXO: The LFXO clock is used as a clock source if the + FLL16M mode is closed-loop and the LFXO clock is + available. + + Devicetree example: + + fll16m { + open-loop-accuracy-ppm = <20000>; + closed-loop-base-accuracy-ppm = <5000>; + clocks = <&hfxo>, <&lfxo>; + clock-names = "hfxo", "lfxo"; + }; + +compatible: "nordic,nrf-fll16m" + +include: fixed-clock.yaml + +properties: + clock-frequency: + const: 16000000 + + open-loop-accuracy-ppm: + type: int + description: Clock accuracy in parts per million if open-loop clock source is used. + + closed-loop-base-accuracy-ppm: + type: int + description: | + Base clock accuracy in parts per million if closed-loop clock source is used. + The actual accuracy is this property plus the accuracy of the HFXO or LFXO. diff --git a/dts/bindings/clock/nordic,nrf-lfclk.yaml b/dts/bindings/clock/nordic,nrf-lfclk.yaml new file mode 100644 index 00000000000..f7df4d8a435 --- /dev/null +++ b/dts/bindings/clock/nordic,nrf-lfclk.yaml @@ -0,0 +1,42 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +description: | + nRF LFCLK (Low Frequency CLocK) + + The LFCLK can use the following clocks as clock sources: + + - HFXO: The HFXO clock is used as a clock source if the + LFCLK SYNTH mode is selected and the LFXO clock is not + available. The HFXO clock is used indirectly through + the FLL16M clock in BYPASS mode. + + - LFXO: The LFXO clock is used as a clock source if the + LFCLK SYNTH mode is selected and the LFXO clock is + available. The LFXO clock is used indirectly through + the FLL16M clock in BYPASS mode. + + Devicetree example: + + lfclk { + lfrc-accuracy-ppm = <500>; + lflprc-accuracy-ppm = <1000>; + clocks = <&hfxo>, <&lfxo>; + clock-names = "hfxo", "lfxo"; + }; + +compatible: "nordic,nrf-lfclk" + +include: fixed-clock.yaml + +properties: + clock-frequency: + const: 32768 + + lfrc-accuracy-ppm: + type: int + description: Clock accuracy in parts per million if LFRC clock source is used. + + lflprc-accuracy-ppm: + type: int + description: Clock accuracy in parts per million if LFLPRC clock source is used. diff --git a/dts/common/nordic/nrf54h20.dtsi b/dts/common/nordic/nrf54h20.dtsi index c5258e08af5..391a853aeea 100644 --- a/dts/common/nordic/nrf54h20.dtsi +++ b/dts/common/nordic/nrf54h20.dtsi @@ -156,9 +156,13 @@ }; fll16m: fll16m { - compatible = "fixed-clock"; + compatible = "nordic,nrf-fll16m"; #clock-cells = <0>; clock-frequency = ; + open-loop-accuracy-ppm = <20000>; + closed-loop-base-accuracy-ppm = <5000>; + clocks = <&hfxo>, <&lfxo>; + clock-names = "hfxo", "lfxo"; }; hsfll120: hsfll120 { @@ -169,9 +173,14 @@ }; lfclk: lfclk { - compatible = "fixed-clock"; + compatible = "nordic,nrf-lfclk"; #clock-cells = <0>; clock-frequency = <32768>; + status = "okay"; + lfrc-accuracy-ppm = <500>; + lflprc-accuracy-ppm = <1000>; + clocks = <&hfxo>, <&lfxo>; + clock-names = "hfxo", "lfxo"; }; };