Skip to content

Commit bbfeb6e

Browse files
[nrf fromlist] dts: nordic: Add support for clock outputs
Add support for GRTC clock output pins. Upstream PR #: 82788 Signed-off-by: Adam Kondraciuk <[email protected]>
1 parent 418194e commit bbfeb6e

File tree

7 files changed

+71
-1
lines changed

7 files changed

+71
-1
lines changed

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-pinctrl.dtsi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,24 @@
9898
low-power-enable;
9999
};
100100
};
101+
102+
/omit-if-no-ref/ grtc_default: grtc_default {
103+
group1 {
104+
psels = <NRF_PSEL(GRTC_CLKOUT_FAST, 1, 8)>;
105+
};
106+
group2 {
107+
psels = <NRF_PSEL(GRTC_CLKOUT_32K, 0, 1)>;
108+
};
109+
};
110+
111+
/omit-if-no-ref/ grtc_sleep: grtc_sleep {
112+
group1 {
113+
psels = <NRF_PSEL(GRTC_CLKOUT_FAST, 1, 8)>;
114+
low-power-enable;
115+
};
116+
group2 {
117+
psels = <NRF_PSEL(GRTC_CLKOUT_32K, 0, 1)>;
118+
low-power-enable;
119+
};
120+
};
101121
};

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ ipc0: &cpuapp_cpurad_ipc {
232232
child-owned-channels = <5 6>;
233233
nonsecure-channels = <5 6>;
234234
owned-channels = <4 5 6>;
235+
base-frequency = <DT_FREQ_M(16)>;
235236
};
236237

237238
&uart120 {

boards/nordic/nrf54l15dk/nrf54l15dk_nrf54l_05_10_15-pinctrl.dtsi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,24 @@
7777
low-power-enable;
7878
};
7979
};
80+
81+
/omit-if-no-ref/ grtc_default: grtc_default {
82+
group1 {
83+
psels = <NRF_PSEL(GRTC_CLKOUT_FAST, 1, 8)>;
84+
};
85+
group2 {
86+
psels = <NRF_PSEL(GRTC_CLKOUT_32K, 0, 4)>;
87+
};
88+
};
89+
90+
/omit-if-no-ref/ grtc_sleep: grtc_sleep {
91+
group1 {
92+
psels = <NRF_PSEL(GRTC_CLKOUT_FAST, 1, 8)>;
93+
low-power-enable;
94+
};
95+
group2 {
96+
psels = <NRF_PSEL(GRTC_CLKOUT_32K, 0, 4)>;
97+
low-power-enable;
98+
};
99+
};
80100
};

boards/nordic/nrf54l15dk/nrf54l_05_10_15_cpuapp_common.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
/* Channels 7-11 reserved for Zero Latency IRQs, 3-4 for FLPR */
5050
child-owned-channels = <3 4 7 8 9 10 11>;
5151
status = "okay";
52+
base-frequency = <DT_FREQ_M(16)>;
5253
};
5354

5455
&uart20 {

dts/bindings/timer/nordic,nrf-grtc.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,44 @@
44
# SPDX-License-Identifier: Apache-2.0
55
#
66

7-
description: Nordic GRTC (Global RTC)
7+
description: |
8+
Nordic GRTC (Global RTC)
9+
10+
Example of using clock outputs:
11+
&grtc {
12+
pinctrl-0 = <&grtc_default>;
13+
pinctrl-1 = <&grtc_sleep>;
14+
pinctrl-names = "default", "sleep";
15+
clkout-fast-frequency = <8000000>;
16+
clkout-32k;
17+
/* In case of nRF54H20 devices: */
18+
nordic,clockpin-enable = <NRF_FUN_GRTC_CLKOUT_FAST>;
19+
};
820
921
compatible: "nordic,nrf-grtc"
1022

1123
include:
1224
- "base.yaml"
1325
- "nordic,split-channels.yaml"
26+
- "pinctrl-device.yaml"
27+
- "nordic-clockpin.yaml"
1428

1529
properties:
1630
reg:
1731
required: true
1832

33+
base-frequency:
34+
type: int
35+
description: base clock frequency.
36+
37+
clkout-fast-frequency:
38+
type: int
39+
description: Fast output clock frequency.
40+
41+
clkout-32k:
42+
type: boolean
43+
description: 32768 Hz output clock frequency enable.
44+
1945
interrupts:
2046
required: true
2147

dts/common/nordic/nrf54l20.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@
498498
compatible = "nordic,nrf-grtc";
499499
reg = <0xe2000 0x1000>;
500500
cc-num = <12>;
501+
clocks = <&lfxo>;
501502
status = "disabled";
502503
};
503504

dts/common/nordic/nrf54l_05_10_15.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@
548548
compatible = "nordic,nrf-grtc";
549549
reg = <0xe2000 0x1000>;
550550
cc-num = <12>;
551+
clocks = <&lfxo>;
551552
status = "disabled";
552553
};
553554

0 commit comments

Comments
 (0)