Skip to content

Commit 318bfa5

Browse files
dts: drivers: nordic: Don't manage hsfll120 from drivers
The hsfll120 is requested automatically by hardware which needs it, CLOCK_CONTROL can be used to set to lower the frequency it runs at, but this is a quirk which may be handled by the application if desired. Disable the global clocks and remove references to the hsfll120 from devices in the devicetree, and update samples which specifically test the control of the clocks using CLOCK_CONTROL to enable them. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent d8f3ca9 commit 318bfa5

File tree

11 files changed

+48
-34
lines changed

11 files changed

+48
-34
lines changed

drivers/can/can_nrf.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ static int configure_hsfll(const struct device *dev, bool on)
139139
const struct can_nrf_config *config = mcan_config->custom;
140140
struct nrf_clock_spec spec = { 0 };
141141

142+
if (config->hsfll == NULL) {
143+
/* Frequency fixed at max */
144+
return 0;
145+
}
146+
142147
/* If CAN is on, HSFLL frequency >= AUXPLL frequency */
143148
if (on) {
144149
int ret;
@@ -158,7 +163,7 @@ static int can_nrf_init(const struct device *dev)
158163
const struct can_nrf_config *config = mcan_config->custom;
159164
int ret;
160165

161-
if (!device_is_ready(config->auxpll) || !device_is_ready(config->hsfll)) {
166+
if (!device_is_ready(config->auxpll)) {
162167
return -ENODEV;
163168
}
164169

@@ -215,7 +220,7 @@ static int can_nrf_init(const struct device *dev)
215220
.mram = CAN_MCAN_DT_INST_MRAM_ADDR(n), \
216221
.auxpll = DEVICE_DT_GET(DT_INST_CLOCKS_CTLR_BY_NAME(n, auxpll)), \
217222
.pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(n), \
218-
.hsfll = DEVICE_DT_GET(DT_INST_CLOCKS_CTLR_BY_NAME(n, hsfll)), \
223+
.hsfll = DEVICE_DT_GET_OR_NULL(DT_INST_CLOCKS_CTLR_BY_NAME(n, hsfll)), \
219224
.irq = DT_INST_IRQN(n), \
220225
.irq_configure = can_nrf_irq_configure##n, \
221226
}; \

dts/arm/nordic/nrf54h20_cpuapp.dtsi

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,6 @@ wdt011: &cpuapp_wdt011 {};
6767
interrupts = <109 NRF_DEFAULT_IRQ_PRIORITY>;
6868
};
6969

70-
&fll16m {
71-
status = "okay";
72-
};
73-
74-
&hsfll120 {
75-
status = "okay";
76-
};
77-
78-
&lfclk {
79-
status = "okay";
80-
};
81-
8270
&gdpwr {
8371
status = "okay";
8472
};

dts/arm/nordic/nrf54h20_cpurad.dtsi

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,6 @@ wdt011: &cpurad_wdt011 {};
108108
status = "okay";
109109
};
110110

111-
&fll16m {
112-
status = "okay";
113-
};
114-
115-
&hsfll120 {
116-
status = "okay";
117-
};
118-
119-
&lfclk {
120-
status = "okay";
121-
};
122-
123111
&gdpwr {
124112
status = "okay";
125113
};

dts/vendor/nordic/nrf54h20.dtsi

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,6 @@
745745
cc-num = <6>;
746746
interrupts = <226 NRF_DEFAULT_IRQ_PRIORITY>;
747747
max-bit-width = <32>;
748-
clocks = <&hsfll120>;
749748
prescaler = <0>;
750749
};
751750

@@ -756,7 +755,6 @@
756755
cc-num = <6>;
757756
interrupts = <227 NRF_DEFAULT_IRQ_PRIORITY>;
758757
max-bit-width = <32>;
759-
clocks = <&hsfll120>;
760758
prescaler = <0>;
761759
};
762760

@@ -765,7 +763,6 @@
765763
reg = <0x8e4000 0x1000>;
766764
status = "disabled";
767765
interrupts = <228 NRF_DEFAULT_IRQ_PRIORITY>;
768-
clocks = <&hsfll120>;
769766
#pwm-cells = <3>;
770767
idleout-supported;
771768
};
@@ -776,7 +773,6 @@
776773
status = "disabled";
777774
easydma-maxcnt-bits = <15>;
778775
interrupts = <229 NRF_DEFAULT_IRQ_PRIORITY>;
779-
clocks = <&hsfll120>;
780776
max-frequency = <DT_FREQ_M(32)>;
781777
#address-cells = <1>;
782778
#size-cells = <0>;
@@ -789,7 +785,6 @@
789785
status = "disabled";
790786
easydma-maxcnt-bits = <15>;
791787
interrupts = <230 NRF_DEFAULT_IRQ_PRIORITY>;
792-
clocks = <&hsfll120>;
793788
max-frequency = <DT_FREQ_M(32)>;
794789
#address-cells = <1>;
795790
#size-cells = <0>;
@@ -803,7 +798,6 @@
803798
reg = <0x8e6000 0x1000>;
804799
status = "disabled";
805800
interrupts = <230 NRF_DEFAULT_IRQ_PRIORITY>;
806-
clocks = <&hsfll120>;
807801
endtx-stoptx-supported;
808802
frame-timeout-supported;
809803
zephyr,pm-device-runtime-auto;
@@ -815,7 +809,6 @@
815809
status = "disabled";
816810
easydma-maxcnt-bits = <15>;
817811
interrupts = <231 NRF_DEFAULT_IRQ_PRIORITY>;
818-
clocks = <&hsfll120>;
819812
max-frequency = <DT_FREQ_M(32)>;
820813
#address-cells = <1>;
821814
#size-cells = <0>;

samples/boards/nordic/clock_control/configs/cpuapp_hsfll.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
sample-clock = &cpuapp_hsfll;
1010
};
1111
};
12+
13+
&cpuapp_hsfll {
14+
status = "okay";
15+
};

samples/boards/nordic/clock_control/configs/fll16m.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
sample-clock = &fll16m;
1010
};
1111
};
12+
13+
&fll16m {
14+
status = "okay";
15+
};

samples/boards/nordic/clock_control/configs/global_hsfll.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
sample-clock = &hsfll120;
1010
};
1111
};
12+
13+
&hsfll120 {
14+
status = "okay";
15+
};

samples/boards/nordic/clock_control/configs/lfclk.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
sample-clock = &lfclk;
1010
};
1111
};
12+
13+
&lfclk {
14+
status = "okay";
15+
};

samples/boards/nordic/clock_control/configs/uart135.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@
1414
status = "okay";
1515
memory-regions = <&cpuapp_dma_region>;
1616
};
17+
18+
&fll16m {
19+
status = "okay";
20+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&fll16m {
8+
status = "okay";
9+
};
10+
11+
&hsfll120 {
12+
status = "okay";
13+
};
14+
15+
&lfclk {
16+
status = "okay";
17+
};
18+
19+
&canpll {
20+
status = "okay";
21+
};

0 commit comments

Comments
 (0)