blob: 2ec09dbf3eebc699754374bf115426adbe3bc7bb [file] [log] [blame]
Tom Rinidec7ea02024-05-20 13:35:03 -06001# SPDX-License-Identifier: GPL-2.0-or-later
2#
3# (C) Copyright 2022 - Analog Devices, Inc.
4#
5# Written and/or maintained by Timesys Corporation
6#
7# Contact: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
8# Contact: Greg Malysa <greg.malysa@timesys.com>
9#
10
11# All 32-bit platforms require SYS_ARM_CACHE_WRITETHROUGH
12# But it is ignored if selected here, so it must be in the defconfig
13
14if ARCH_SC5XX
15
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010016choice
17 prompt "SC5xx SoC Select"
18 help
19 Selects which series of Analog Devices SC5xx chips to support.
20
Tom Rinidec7ea02024-05-20 13:35:03 -060021config SC57X
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010022 bool "SC57x series"
Tom Rinidec7ea02024-05-20 13:35:03 -060023 select COMMON_CLK_ADI_SC57X
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010024 select CPU_V7A
Tom Rinidec7ea02024-05-20 13:35:03 -060025
26config SC58X
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010027 bool "SC58x series"
Tom Rinidec7ea02024-05-20 13:35:03 -060028 select COMMON_CLK_ADI_SC58X
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010029 select CPU_V7A
Tom Rinidec7ea02024-05-20 13:35:03 -060030
31config SC59X
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010032 bool "SC59x 32-bit series"
Tom Rinidec7ea02024-05-20 13:35:03 -060033 select COMMON_CLK_ADI_SC594
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010034 select CPU_V7A
Tom Rinidec7ea02024-05-20 13:35:03 -060035 select NOP_PHY
36
37config SC59X_64
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010038 bool "SC59x 64-bit series"
Tom Rinidec7ea02024-05-20 13:35:03 -060039 select ARM64
Tom Rinidec7ea02024-05-20 13:35:03 -060040 select COMMON_CLK_ADI_SC598
41 select GICV3
42 select GIC_600_CLEAR_RDPD
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010043 select MMC_SDHCI_ADMA_FORCE_32BIT
Tom Rinidec7ea02024-05-20 13:35:03 -060044 select NOP_PHY
45
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010046endchoice
47
Tom Rinidec7ea02024-05-20 13:35:03 -060048config SC_BOOT_MODE
49 int "SC5XX boot mode select"
50 default 1
51 range 0 7
52 help
53 Mode 0: do nothing, just idle
54 Mode 1: boot ldr out of serial flash
55 Mode 7: boot ldr over uart
56
57config SC_BOOT_SPI_BUS
58 int "sc5xx spi boot bus"
59 default 2
60 range 0 4
61 help
62 This is the SPI peripheral number to use for booting, X in the
63 expression `sf probe X:Y`
64
65config SC_BOOT_SPI_SSEL
66 int "sc5xx spi boot chipselect"
67 default 1
68 range 0 6
69 help
70 This is the SPI chip select number to use for booting, Y in the
71 expression `sf probe X:Y`
72
73config SC_BOOT_OSPI_BUS
74 int "sc5xx ospi boot bus"
75 default 0
76 help
77 This is the OSPI peripheral number to use for booting, X in the
78 expression `sf probe X:Y`
79
80config SC_BOOT_OSPI_SSEL
81 int "sc5xx ospi boot chipselect"
82 default 0
83 help
84 This is the OSPI chip select number to use for booting, Y in the
85 expression `sf probe X:Y`
86
87config SYS_FLASH_BASE
88 hex
89 default 0x60000000
90
91config UART_CONSOLE
92 int
93 default 0
94
95config UART4_SERIAL
96 bool
97 depends on DM_SERIAL
98 default y
99
100config WDT_ADI
101 bool
102 default y
103
104config WATCHDOG_TIMEOUT_MSECS
105 int
106 default 30000
107
108config DW_PORTS
109 int
110 default 1
111
112config ADI_BUG_EZKHW21
113 bool "SC584 EZKIT phy bug workaround"
114 depends on SC58X
115 help
116 This workaround affects the SC584 EZKIT and addresses bug EZKHW21.
117 It disables gigabit ethernet mode and limits the board to 100 Mbps
118
119config ADI_CARRIER_SOMCRR_EZKIT
120 bool "Support the EV-SOMCRR-EZKIT"
121 depends on (SC59X || SC59X_64)
122 help
123 Say y to include support for the EV-SOMCRR-EZKIT carrier board,
124 which is compatible with the SC594 and SC598 SOMs. The EZKIT is
125 mutually incompatible with the EZLITE.
126
127config ADI_CARRIER_SOMCRR_EZLITE
128 bool "Support the EV-SOMCRR-EZLITE"
129 depends on (SC59X || SC59X_64)
130 help
131 Say y to include support for the EV-SOMCRR-EZLITE carrier board,
132 which is compatible with the SC594 and SC598 SOMs. The EZLITE is
133 mutually incompatible with the EZKIT.
134
135config ADI_SPL_FORCE_BMODE
136 int "Force the SPL to use this BMODE device during next boot stage"
137 default 0
138 range 0 9
139 depends on SPL
140 help
141 Force the SPL to use this BMODE device during next boot stage.
142 For example, if booting via QSPI, we can force the second stage
143 Of the boot process to use other peripherals via:
144 1 = QSPI -> QSPI
145 5 = QSPI -> OSPI
146 6 = QSPI -> eMMC
147
148config ADI_USE_DMC0
149 bool "Configure DMC0"
150 default y
151 help
152 During hardware initialization, channel 0 of the DMC will be
153 initialized. Select this if you have DMC0 connected to external
154 DDR memory. This is expected to be true for every board using
155 an SC5xx SoC.
156
157config ADI_USE_DMC1
158 bool "Configure DMC1"
159 help
160 During hardware initialization, channel 1 of the DMC will be
161 initialized. Not all processors have a DMC1. Select this if your
162 SoC has DMC1 and you have it connected to external DDR memory.
163
164config ADI_USE_DDR2
165 bool "Configure DMC for DDR2 mode"
166 help
167 Configure the DMC in DDR2 mode. The default is DDR3 and not all
168 parts may actually support DDR2. Please consult the manual for
169 the SoC that you are using to determine if DDR2 mode is supported.
170 This also requires that DDR2 memory is present on the board or it
171 will probably cause strange failure.
172
173menu "Clock configuration"
174
175config CGU0_DF_DIV
176 int "CGU0_DF_DIV"
177 range 0 1
178 help
179 Select 0 to pass CLKIN to PLL
180 Select 1 to pass CLKIN/2 to PLL
181
182config CGU0_VCO_MULT
183 int "CGU0_VCO_MULT"
184 range 0 127
185 help
186 VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL
187 A value of 0 means 128
188
189config CGU0_CCLK_DIV
190 int "CGU0_CCLK_DIV"
191 range 0 31
192 help
193 CCLK_DIV controls the core clock divider
194 A value of 0 means 32
195 CCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / CCLK_DIV
196
197config CGU0_SCLK_DIV
198 int "CGU0_SCLK_DIV"
199 range 0 31
200 help
201 SCLK_DIV controls the system clock divider
202 A value of 0 means 32
203 SCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / SYSCLK_DIV
204
205config CGU0_SCLK0_DIV
206 int "CGU0_SCLK0_DIV"
207 range 0 7
208 help
209 A value of 0 means 8
210 SCLK0 = SCLK / SCLK0_DIV
211
212config CGU0_SCLK1_DIV
213 int "CGU0_SCLK1_DIV"
214 depends on (SC57X || SC58X)
215 range 0 7
216 help
217 A value of 0 means 8
218 SCLK1 = SCLK / SCLK1_DIV
219
220config CGU0_DCLK_DIV
221 int "CGU0_DCLK_DIV"
222 range 0 31
223 help
224 DCLK_DIV controls the DDR clock divider
225 A value of 0 means 32
226 DCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / DCLK_DIV
227
228config CGU0_OCLK_DIV
229 int "CGU0_OCLK_DIV"
230 range 0 127
231 help
232 OCLK_DIV controls the output clock divider
233 A value of 0 means 128
234 OCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / OCLK_DIV
235
236config CGU0_DIV_S1SELEX
237 int "CGU0_DIV_S1SELEX"
238 depends on !SC57X && !SC58X
239 range 0 255
240 help
241 CGU0 SCLK1 Extended divisor register.
242 A value of 0 means 256.
243 SCLK1 = ((CLKIN / (1 + DF)) * VCO_MULT) / DIV_S1SELEX
244
245config CGU0_CLKOUTSEL
246 int "CGU0_CLKOUTSEL"
247 default 0
248 range 0 31
249 help
250 Select signal driven through CLKOUT pin multiplexer.
251 This value varies on each SOC. Refer to
252 CGU_CLKOUTSEL.CLKOUTSEL in the Hardware Reference Manual
253 for values applicable to each SOC.
254 Commonly, values 0 and 1 select CLKIN0 or CLKIN1 respectively.
255
256config CGU1_PLL3_DDRCLK
257 bool "DDRCLK From 3rd PLL"
258 depends on SC59X_64
259 help
260 3rd PLL output is connected to DMC block when set.
261 When cleared, DDR clock is CLKO3 output of CDU.
262
263config CGU1_PLL3_VCO_MSEL
264 int "CGU0_PLL3_VCO_MSEL"
265 depends on CGU1_PLL3_DDRCLK
266 range 1 128
267 help
268 PLL multiplier value for the 3rd PLL.
269 DCLK = (CLKIN * PLL3_VCO_MSEL) / PLL3_DCLK_DIV
270
271config CGU1_PLL3_DCLK_DIV
272 int "CGU0_PLL3_DCLK_DIV"
273 depends on CGU1_PLL3_DDRCLK
274 range 1 32
275 help
276 PLL divider value for the 3rd PLL.
277 DCLK = (CLKIN * PLL3_VCO_MSEL) / PLL3_DCLK_DIV
278
279config CGU1_DF_DIV
280 int "CGU1_DF_DIV"
281 range 0 1
282 help
283 Select 0 to pass CLKIN to PLL
284 Select 1 to pass CLKIN/2 to PLL
285
286config CGU1_VCO_MULT
287 int "CGU1_VCO_MULT"
288 range 0 127
289 help
290 VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL
291 A value of 0 means 128
292
293config CGU1_CCLK_DIV
294 int "CGU1_CCLK_DIV"
295 range 0 31
296 help
297 CCLK_DIV controls the core clock divider
298 A value of 0 means 32
299 CCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / CCLK_DIV
300
301config CGU1_SCLK_DIV
302 int "CGU1_SCLK_DIV"
303 range 0 31
304 help
305 SCLK_DIV controls the system clock divider
306 A value of 0 means 32
307 SCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / SYSCLK_DIV
308
309config CGU1_SCLK0_DIV
310 int "CGU1_SCLK0_DIV"
311 depends on (SC57X || SC58X || SC59X)
312 range 0 7
313 help
314 A value of 0 means 8
315 SCLK0 = SCLK / SCLK0_DIV
316
317config CGU1_SCLK1_DIV
318 int "CGU1_SCLK1_DIV"
319 depends on (SC57X || SC58X)
320 range 0 7
321 help
322 A value of 0 means 8
323 SCLK1 = SCLK / SCLK1_DIV
324
325config CGU1_DCLK_DIV
326 int "CGU1_DCLK_DIV"
327 range 0 31
328 help
329 DCLK_DIV controls the DDR clock divider
330 A value of 0 means 32
331 DCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / DCLK_DIV
332
333config CGU1_OCLK_DIV
334 int "CGU1_OCLK_DIV"
335 range 0 127
336 help
337 OCLK_DIV controls the output clock divider
338 A value of 0 means 128
339 OCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / OCLK_DIV
340
341config CGU1_DIV_S0SELEX
342 int "CGU1_DIV_S0SELEX"
343 depends on !SC57X && !SC58X && !SC59X
344 range 0 255
345 help
346 CGU1 SCLK0 Extended divisor register.
347 A value of 0 means 256.
348 SCLK0 = ((CLKIN / (1 + DF)) * VCO_MULT) / DIV_S0SELEX
349
350config CGU1_DIV_S1SELEX
351 int "CGU1_DIV_S1SELEX"
352 depends on !SC57X && !SC58X
353 range 0 255
354 help
355 CGU1 SCLK1 Extended divisor register.
356 A value of 0 means 256.
357 SCLK1 = ((CLKIN / (1 + DF)) * VCO_MULT) / DIV_S1SELEX
358
359config CDU0_CGU1_CLKIN
360 int "CDU0 CGU1 CLKINn Select"
361 default 0
362 range 0 1
363 help
364 Selects source clock for CGU1.
365 0 for CLKIN0
366 1 for CLKIN1
367
368config CDU0_CLKO0
369 int "CDU0_CLKO0"
370 range 1 7
371 help
372 Clock source select. Refer to SOC Hardware Reference Manual
373
374config CDU0_CLKO1
375 int "CDU0_CLKO1"
376 range 1 7
377 help
378 Clock source select. Refer to SOC Hardware Reference Manual
379
380config CDU0_CLKO2
381 int "CDU0_CLKO2"
382 range 1 7
383 help
384 Clock source select. Refer to SOC Hardware Reference Manual
385
386config CDU0_CLKO3
387 int "CDU0_CLKO3"
388 range 1 7
389 help
390 Clock source select. Refer to SOC Hardware Reference Manual
391
392config CDU0_CLKO4
393 int "CDU0_CLKO4"
394 range 1 7
395 help
396 Clock source select. Refer to SOC Hardware Reference Manual
397
398config CDU0_CLKO5
399 int "CDU0_CLKO5"
400 range 1 7
401 help
402 Clock source select. Refer to SOC Hardware Reference Manual
403
404config CDU0_CLKO6
405 int "CDU0_CLKO6"
406 range 1 7
407 help
408 Clock source select. Refer to SOC Hardware Reference Manual
409
410config CDU0_CLKO7
411 int "CDU0_CLKO7"
412 range 1 7
413 help
414 Clock source select. Refer to SOC Hardware Reference Manual
415
416config CDU0_CLKO8
417 int "CDU0_CLKO8"
418 range 1 7
419 help
420 Clock source select. Refer to SOC Hardware Reference Manual
421
422config CDU0_CLKO9
423 int "CDU0_CLKO9"
424 range 1 7
425 help
426 Clock source select. Refer to SOC Hardware Reference Manual
427
428config CDU0_CLKO10
429 int "CDU0_CLKO10"
430 range 1 7
431 depends on (SC59X || SC59X_64)
432 help
433 Clock source select. Refer to SOC Hardware Reference Manual
434
435config CDU0_CLKO12
436 int "CDU0_CLKO12"
437 range 1 7
438 depends on (SC59X || SC59X_64)
439 help
440 Clock source select. Refer to SOC Hardware Reference Manual
441
442config CDU0_CLKO13
443 int "CDU0_CLKO13"
444 range 1 7
445 depends on SC59X_64
446 help
447 Clock source select. Refer to SOC Hardware Reference Manual
448
449config CDU0_CLKO14
450 int "CDU0_CLKO14"
451 range 1 7
452 depends on SC59X_64
453 help
454 Clock source select. Refer to SOC Hardware Reference Manual
455
456endmenu
457
458config ADI_GPIO
459 bool
460 default y
461
462config PINCTRL_ADI
463 bool
464 default y
465
466endif