Skip to content

Commit cbc6fea

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 1ed3fb9 commit cbc6fea

File tree

5 files changed

+74
-1
lines changed

5 files changed

+74
-1
lines changed

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-pinctrl.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,22 @@
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+
};
115+
group2 {
116+
psels = <NRF_PSEL(GRTC_CLKOUT_32K, 0, 1)>;
117+
};
118+
};
101119
};

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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,22 @@
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+
};
94+
group2 {
95+
psels = <NRF_PSEL(GRTC_CLKOUT_32K, 0, 4)>;
96+
};
97+
};
8098
};

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: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,53 @@
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-frequency = <32768>;
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+
pinctrl-0:
34+
required: false
35+
36+
pinctrl-names:
37+
required: false
38+
39+
base-frequency:
40+
type: int
41+
description: base clock frequency.
42+
required: true
43+
44+
clkout-fast-frequency:
45+
type: int
46+
description: Fast output clock frequency.
47+
48+
clkout-32k-frequency:
49+
type: int
50+
description: Slow output clock frequency.
51+
enum:
52+
- 32768
53+
1954
interrupts:
2055
required: true
2156

0 commit comments

Comments
 (0)