Skip to content

Commit e67f629

Browse files
joerchancarlescufi
authored andcommitted
drivers: clock_control: Deprecate Kconfig for MCO configuration
Deprecate support for configuring the MCO source and prescaler from Kconfig configurations. This is now done by devicetree and an MCO driver instead, which also configures the pin to be used by the MCO peripheral. Signed-off-by: Joakim Andersson <[email protected]>
1 parent b4ada0d commit e67f629

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

drivers/clock_control/Kconfig.stm32

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ config CLOCK_STM32_MCO
9797
bool
9898
default y
9999
depends on DT_HAS_ST_STM32_CLOCK_MCO_ENABLED || DT_HAS_ST_STM32F1_CLOCK_MCO_ENABLED
100-
# MCO configuration via Kconfig takes priority over Device Tree.
100+
# Although deprecated, MCO configuration via Kconfig takes priority over Device Tree.
101101
# Prevent DT-based MCO driver from compiling when Kconfig is used.
102102
depends on CLOCK_STM32_MCO1_SRC_NOCLOCK && CLOCK_STM32_MCO2_SRC_NOCLOCK
103103

@@ -113,8 +113,10 @@ config CLOCK_STM32_MCO1_SRC_NOCLOCK
113113
config CLOCK_STM32_MCO1_SRC_EXT_HSE
114114
bool "EXT_HSE"
115115
depends on SOC_STM32F10X_CONNECTIVITY_LINE_DEVICE
116+
select DEPRECATED
116117
help
117118
Use EXT_HSE as source of MCO1
119+
This option is deprecated, please use devicetree instead.
118120

119121
config CLOCK_STM32_MCO1_SRC_LSE
120122
bool "LSE"
@@ -125,8 +127,10 @@ config CLOCK_STM32_MCO1_SRC_LSE
125127
SOC_SERIES_STM32H7RSX || \
126128
SOC_SERIES_STM32H5X || \
127129
SOC_SERIES_STM32U5X
130+
select DEPRECATED
128131
help
129132
Use LSE as source of MCO1
133+
This option is deprecated, please use devicetree instead.
130134

131135
config CLOCK_STM32_MCO1_SRC_HSE
132136
bool "HSE"
@@ -138,33 +142,43 @@ config CLOCK_STM32_MCO1_SRC_HSE
138142
SOC_SERIES_STM32H7RSX || \
139143
SOC_SERIES_STM32H5X || \
140144
SOC_SERIES_STM32U5X
145+
select DEPRECATED
141146
help
142147
Use HSE as source of MCO1
148+
This option is deprecated, please use devicetree instead.
143149

144150
config CLOCK_STM32_MCO1_SRC_LSI
145151
bool "LSI"
146152
depends on SOC_SERIES_STM32L4X || \
147153
SOC_SERIES_STM32U5X
154+
select DEPRECATED
148155
help
149156
Use LSI as source of MCO1
157+
This option is deprecated, please use devicetree instead.
150158

151159
config CLOCK_STM32_MCO1_SRC_MSI
152160
bool "MSI"
153161
depends on SOC_SERIES_STM32L4X
162+
select DEPRECATED
154163
help
155164
Use MSI as source of MCO1
165+
This option is deprecated, please use devicetree instead.
156166

157167
config CLOCK_STM32_MCO1_SRC_MSIK
158168
bool "MSIK"
159169
depends on SOC_SERIES_STM32U5X
170+
select DEPRECATED
160171
help
161172
Use MSIK as source of MCO1
173+
This option is deprecated, please use devicetree instead.
162174

163175
config CLOCK_STM32_MCO1_SRC_MSIS
164176
bool "MSIS"
165177
depends on SOC_SERIES_STM32U5X
178+
select DEPRECATED
166179
help
167180
Use MSIS as source of MCO1
181+
This option is deprecated, please use devicetree instead.
168182

169183
config CLOCK_STM32_MCO1_SRC_HSI
170184
bool "HSI"
@@ -174,15 +188,19 @@ config CLOCK_STM32_MCO1_SRC_HSI
174188
SOC_SERIES_STM32H7X || \
175189
SOC_SERIES_STM32H7RSX || \
176190
SOC_SERIES_STM32H5X
191+
select DEPRECATED
177192
help
178193
Use HSI as source of MCO1
194+
This option is deprecated, please use devicetree instead.
179195

180196
config CLOCK_STM32_MCO1_SRC_HSI16
181197
bool "HSI16"
182198
depends on SOC_SERIES_STM32L4X || \
183199
SOC_SERIES_STM32U5X
200+
select DEPRECATED
184201
help
185202
Use HSI16 as source of MCO1
203+
This option is deprecated, please use devicetree instead.
186204

187205
config CLOCK_STM32_MCO1_SRC_HSI48
188206
bool "HSI48"
@@ -191,57 +209,74 @@ config CLOCK_STM32_MCO1_SRC_HSI48
191209
SOC_SERIES_STM32H7RSX || \
192210
SOC_SERIES_STM32H5X || \
193211
SOC_SERIES_STM32U5X
212+
select DEPRECATED
194213
help
195214
Use HSI48 as source of MCO1
215+
This option is deprecated, please use devicetree instead.
196216

197217
config CLOCK_STM32_MCO1_SRC_PLLCLK
198218
bool "PLLCLK"
199219
depends on SOC_SERIES_STM32F4X || \
200220
SOC_SERIES_STM32F7X || \
201221
SOC_SERIES_STM32L4X || \
202222
SOC_SERIES_STM32U5X
223+
select DEPRECATED
203224
help
204225
Use PLLCLK as source of MCO1
226+
This option is deprecated, please use devicetree instead.
205227

206228
config CLOCK_STM32_MCO1_SRC_PLLQCLK
207229
bool "PLLQ"
208230
depends on SOC_SERIES_STM32H7X || \
209231
SOC_SERIES_STM32H7RSX || \
210232
SOC_SERIES_STM32H5X
233+
select DEPRECATED
211234
help
212235
Use PLLQ as source of MCO1
236+
This option is deprecated, please use devicetree instead.
213237

214238
config CLOCK_STM32_MCO1_SRC_PLLCLK_DIV2
215239
bool "PLLCLK_DIV2"
216240
depends on SOC_SERIES_STM32F1X
241+
select DEPRECATED
217242
help
218243
Use PLLCLK/2 as source of MCO1
244+
This option is deprecated, please use devicetree instead.
219245

220246
config CLOCK_STM32_MCO1_SRC_PLL2CLK
221247
bool "PLL2CLK"
222248
depends on SOC_STM32F10X_CONNECTIVITY_LINE_DEVICE
249+
select DEPRECATED
223250
help
224251
Use PLL2CLK as source of MCO1
252+
This option is deprecated, please use devicetree instead.
225253

226254
config CLOCK_STM32_MCO1_SRC_PLLI2SCLK
227255
bool "PLLI2SCLK"
228256
depends on SOC_STM32F10X_CONNECTIVITY_LINE_DEVICE
257+
select DEPRECATED
229258
help
230259
Use PLLI2SCLK as source of MCO1
260+
This option is deprecated, please use devicetree instead.
231261

232262
config CLOCK_STM32_MCO1_SRC_PLLI2SCLK_DIV2
233263
bool "PLLI2SCLK_DIV2"
234264
depends on SOC_STM32F10X_CONNECTIVITY_LINE_DEVICE
265+
select DEPRECATED
235266
help
236267
Use PLLI2SCLK/2 as source of MCO1
268+
This option is deprecated, please use devicetree instead.
237269

238270
config CLOCK_STM32_MCO1_SRC_SYSCLK
239271
bool "SYSCLK"
240272
depends on SOC_SERIES_STM32F1X || \
241273
SOC_SERIES_STM32L4X || \
242274
SOC_SERIES_STM32U5X
275+
select DEPRECATED
243276
help
244277
Use SYSCLK as source of MCO1
278+
This option is deprecated, please use devicetree instead.
279+
245280
endchoice
246281

247282
config CLOCK_STM32_MCO1_DIV
@@ -261,6 +296,7 @@ config CLOCK_STM32_MCO1_DIV
261296
range 1 16 if SOC_SERIES_STM32L4X || SOC_SERIES_STM32U5X
262297
help
263298
Prescaler for MCO1 output clock
299+
This option is deprecated, please use devicetree instead.
264300

265301
choice
266302
prompt "STM32 MCO2 Clock Source"
@@ -278,14 +314,18 @@ config CLOCK_STM32_MCO2_SRC_SYSCLK
278314
SOC_SERIES_STM32H7X || \
279315
SOC_SERIES_STM32H7RSX || \
280316
SOC_SERIES_STM32H5X
317+
select DEPRECATED
281318
help
282319
Use SYSCLK as source of MCO2
320+
This option is deprecated, please use devicetree instead.
283321

284322
config CLOCK_STM32_MCO2_SRC_PLLI2S
285323
bool "PLLI2S"
286324
depends on SOC_SERIES_STM32F4X || SOC_SERIES_STM32F7X
325+
select DEPRECATED
287326
help
288327
Use PLLI2S as source of MCO2
328+
This option is deprecated, please use devicetree instead.
289329

290330
config CLOCK_STM32_MCO2_SRC_HSE
291331
bool "HSE"
@@ -294,8 +334,10 @@ config CLOCK_STM32_MCO2_SRC_HSE
294334
SOC_SERIES_STM32H7X || \
295335
SOC_SERIES_STM32H7RSX || \
296336
SOC_SERIES_STM32H5X
337+
select DEPRECATED
297338
help
298339
Use HSE as source of MCO2
340+
This option is deprecated, please use devicetree instead.
299341

300342
config CLOCK_STM32_MCO2_SRC_LSI
301343
bool "LSI"
@@ -304,36 +346,46 @@ config CLOCK_STM32_MCO2_SRC_LSI
304346
SOC_SERIES_STM32H5X
305347
help
306348
Use LSI as source of MCO2
349+
This option is deprecated, please use devicetree instead.
307350

308351
config CLOCK_STM32_MCO2_SRC_CSI
309352
bool "CSI"
310353
depends on SOC_SERIES_STM32H7X || \
311354
SOC_SERIES_STM32H7RSX || \
312355
SOC_SERIES_STM32H5X
356+
select DEPRECATED
313357
help
314358
Use CSI as source of MCO2
359+
This option is deprecated, please use devicetree instead.
315360

316361
config CLOCK_STM32_MCO2_SRC_PLLCLK
317362
bool "PLLCLK"
318363
depends on SOC_SERIES_STM32F4X || SOC_SERIES_STM32F7X
364+
select DEPRECATED
319365
help
320366
Use PLLCLK as source of MCO2
367+
This option is deprecated, please use devicetree instead.
321368

322369
config CLOCK_STM32_MCO2_SRC_PLLPCLK
323370
bool "PLLPCLK"
324371
depends on SOC_SERIES_STM32H7X || \
325372
SOC_SERIES_STM32H7RSX || \
326373
SOC_SERIES_STM32H5X
374+
select DEPRECATED
327375
help
328376
Use PLLPCLK as source of MC02
377+
This option is deprecated, please use devicetree instead.
329378

330379
config CLOCK_STM32_MCO2_SRC_PLL2PCLK
331380
bool "PLL2PCLK"
332381
depends on SOC_SERIES_STM32H7X || \
333382
SOC_SERIES_STM32H7RSX || \
334383
SOC_SERIES_STM32H5X
384+
select DEPRECATED
335385
help
336386
Use PLL2PCLK as source of MC02
387+
This option is deprecated, please use devicetree instead.
388+
337389
endchoice
338390

339391
config CLOCK_STM32_MCO2_DIV

0 commit comments

Comments
 (0)