Skip to content

Commit d4f3eb4

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 adea8cc commit d4f3eb4

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
@@ -734,7 +734,6 @@
734734
cc-num = <6>;
735735
interrupts = <226 NRF_DEFAULT_IRQ_PRIORITY>;
736736
max-bit-width = <32>;
737-
clocks = <&hsfll120>;
738737
prescaler = <0>;
739738
};
740739

@@ -745,7 +744,6 @@
745744
cc-num = <6>;
746745
interrupts = <227 NRF_DEFAULT_IRQ_PRIORITY>;
747746
max-bit-width = <32>;
748-
clocks = <&hsfll120>;
749747
prescaler = <0>;
750748
};
751749

@@ -754,7 +752,6 @@
754752
reg = <0x8e4000 0x1000>;
755753
status = "disabled";
756754
interrupts = <228 NRF_DEFAULT_IRQ_PRIORITY>;
757-
clocks = <&hsfll120>;
758755
#pwm-cells = <3>;
759756
idleout-supported;
760757
};
@@ -765,7 +762,6 @@
765762
status = "disabled";
766763
easydma-maxcnt-bits = <15>;
767764
interrupts = <229 NRF_DEFAULT_IRQ_PRIORITY>;
768-
clocks = <&hsfll120>;
769765
max-frequency = <DT_FREQ_M(32)>;
770766
#address-cells = <1>;
771767
#size-cells = <0>;
@@ -778,7 +774,6 @@
778774
status = "disabled";
779775
easydma-maxcnt-bits = <15>;
780776
interrupts = <230 NRF_DEFAULT_IRQ_PRIORITY>;
781-
clocks = <&hsfll120>;
782777
max-frequency = <DT_FREQ_M(32)>;
783778
#address-cells = <1>;
784779
#size-cells = <0>;
@@ -792,7 +787,6 @@
792787
reg = <0x8e6000 0x1000>;
793788
status = "disabled";
794789
interrupts = <230 NRF_DEFAULT_IRQ_PRIORITY>;
795-
clocks = <&hsfll120>;
796790
endtx-stoptx-supported;
797791
frame-timeout-supported;
798792
zephyr,pm-device-runtime-auto;
@@ -804,7 +798,6 @@
804798
status = "disabled";
805799
easydma-maxcnt-bits = <15>;
806800
interrupts = <231 NRF_DEFAULT_IRQ_PRIORITY>;
807-
clocks = <&hsfll120>;
808801
max-frequency = <DT_FREQ_M(32)>;
809802
#address-cells = <1>;
810803
#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)