@@ -104,6 +104,29 @@ static const struct test_clk_context cpurad_hsfll_test_clk_contexts[] = {
104
104
};
105
105
#endif
106
106
107
+ const struct nrf_clock_spec test_clk_specs_global_hsfll [] = {
108
+ {
109
+ .frequency = MHZ (320 ),
110
+ },
111
+ {
112
+ .frequency = MHZ (256 ),
113
+ },
114
+ {
115
+ .frequency = MHZ (128 ),
116
+ },
117
+ {
118
+ .frequency = MHZ (64 ),
119
+ },
120
+ };
121
+
122
+ static const struct test_clk_context global_hsfll_test_clk_contexts [] = {
123
+ {
124
+ .clk_dev = DEVICE_DT_GET (DT_NODELABEL (hsfll120 )),
125
+ .clk_specs = test_clk_specs_global_hsfll ,
126
+ .clk_specs_size = ARRAY_SIZE (test_clk_specs_global_hsfll ),
127
+ },
128
+ };
129
+
107
130
const struct nrf_clock_spec test_clk_specs_lfclk [] = {
108
131
{
109
132
.frequency = 32768 ,
@@ -151,8 +174,10 @@ static void test_request_release_clock_spec(const struct device *clk_dev,
151
174
zassert_ok (ret );
152
175
zassert_ok (res );
153
176
ret = clock_control_get_rate (clk_dev , NULL , & rate );
154
- zassert_ok (ret );
155
- zassert_equal (rate , clk_spec -> frequency );
177
+ if (ret != - ENOSYS ) {
178
+ zassert_ok (ret );
179
+ zassert_equal (rate , clk_spec -> frequency );
180
+ }
156
181
k_msleep (1000 );
157
182
ret = nrf_clock_control_release (clk_dev , clk_spec );
158
183
zassert_equal (ret , ONOFF_STATE_ON );
@@ -249,6 +274,13 @@ ZTEST(nrf2_clock_control, test_lfclk_control)
249
274
test_clock_control_request (lfclk_test_clk_contexts , ARRAY_SIZE (lfclk_test_clk_contexts ));
250
275
}
251
276
277
+ ZTEST (nrf2_clock_control , test_global_hsfll_control )
278
+ {
279
+ TC_PRINT ("Global HSFLL test\n" );
280
+ test_clock_control_request (global_hsfll_test_clk_contexts ,
281
+ ARRAY_SIZE (global_hsfll_test_clk_contexts ));
282
+ }
283
+
252
284
ZTEST (nrf2_clock_control , test_safe_request_cancellation )
253
285
{
254
286
int ret = 0 ;
0 commit comments