blob: 30444f04fc474650e9313d251be33b65d00f563d [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 Gaskelld4f7cb52024-09-12 16:50:54 +010016config SYS_VENDOR
17 default "adi"
18
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010019choice
20 prompt "SC5xx SoC Select"
21 help
22 Selects which series of Analog Devices SC5xx chips to support.
23
Tom Rinidec7ea02024-05-20 13:35:03 -060024config SC57X
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010025 bool "SC57x series"
Tom Rinidec7ea02024-05-20 13:35:03 -060026 select COMMON_CLK_ADI_SC57X
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010027 select CPU_V7A
Oliver Gaskellcb0d39d2024-09-12 16:51:01 +010028 select TARGET_SC573_EZKIT
Tom Rinidec7ea02024-05-20 13:35:03 -060029
30config SC58X
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010031 bool "SC58x series"
Tom Rinidec7ea02024-05-20 13:35:03 -060032 select COMMON_CLK_ADI_SC58X
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010033 select CPU_V7A
Tom Rinidec7ea02024-05-20 13:35:03 -060034
35config SC59X
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010036 bool "SC59x 32-bit series"
Tom Rinidec7ea02024-05-20 13:35:03 -060037 select COMMON_CLK_ADI_SC594
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010038 select CPU_V7A
Oliver Gaskell14032b32024-09-12 16:50:56 +010039 select NOP_PHY if PHY
Tom Rinidec7ea02024-05-20 13:35:03 -060040
41config SC59X_64
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010042 bool "SC59x 64-bit series"
Tom Rinidec7ea02024-05-20 13:35:03 -060043 select ARM64
Tom Rinidec7ea02024-05-20 13:35:03 -060044 select COMMON_CLK_ADI_SC598
45 select GICV3
Oliver Gaskelld4f7cb52024-09-12 16:50:54 +010046 select GICV3_SUPPORT_GIC600
Tom Rinidec7ea02024-05-20 13:35:03 -060047 select GIC_600_CLEAR_RDPD
Oliver Gaskell3fe227b2024-09-12 16:50:53 +010048 select MMC_SDHCI_ADMA_FORCE_32BIT
Oliver Gaskelld4f7cb52024-09-12 16:50:54 +010049 select NOP_PHY if PHY
50
51endchoice
52
Oliver Gaskellcb0d39d2024-09-12 16:51:01 +010053if SC57X
54
55config TARGET_SC573_EZKIT
56 bool "Support SC573-EZKIT"
57
58endif
59
Oliver Gaskell053a1202024-09-12 16:50:58 +010060if SC58X
61
62choice
63 prompt "SC58x board select"
64
65config TARGET_SC584_EZKIT
66 bool
67 prompt "SC584-EZKIT"
68 select ADI_USE_DDR2
69
Oliver Gaskell5385eee2024-09-12 16:51:00 +010070config TARGET_SC589_MINI
71 bool
72 prompt "SC589-MINI"
73
Oliver Gaskellb5138e32024-09-12 16:50:59 +010074config TARGET_SC589_EZKIT
75 bool
76 prompt "SC589-EZKIT"
77
Oliver Gaskell053a1202024-09-12 16:50:58 +010078endchoice
79
80endif
81
Oliver Gaskell14032b32024-09-12 16:50:56 +010082if SC59X
83
84choice
85 prompt "SC59x 32-bit board select"
86
Oliver Gaskellbc139712024-09-12 16:50:57 +010087config TARGET_SC594_SOM_EZLITE
88 bool
89 prompt "SC594-SOM with SOMCRR-EZLITE"
90 select ADI_CARRIER_SOMCRR_EZLITE
91
Oliver Gaskell14032b32024-09-12 16:50:56 +010092config TARGET_SC594_SOM_EZKIT
93 bool
94 prompt "SC594-SOM with SOMCRR-EZKIT"
95 select ADI_CARRIER_SOMCRR_EZKIT
96
97endchoice
98
99endif
100
Oliver Gaskelld4f7cb52024-09-12 16:50:54 +0100101if SC59X_64
102
103choice
104 prompt "SC59x 64-bit board select"
105
Oliver Gaskellc69c7f82024-09-12 16:50:55 +0100106config TARGET_SC598_SOM_EZLITE
107 bool
108 prompt "SC598-SOM with SOMCRR-EZLITE"
109 select ADI_CARRIER_SOMCRR_EZLITE
110
Oliver Gaskelld4f7cb52024-09-12 16:50:54 +0100111config TARGET_SC598_SOM_EZKIT
112 bool
113 prompt "SC598-SOM with SOMCRR-EZKIT"
114 select ADI_CARRIER_SOMCRR_EZKIT
Tom Rinidec7ea02024-05-20 13:35:03 -0600115
Oliver Gaskell3fe227b2024-09-12 16:50:53 +0100116endchoice
117
Oliver Gaskelld4f7cb52024-09-12 16:50:54 +0100118endif
119
120config ADI_IMAGE
121 string "ADI fitImage type"
122 help
123 The image built by the ADI ADSP Linux build system.
124 Is one of tiny, minimal, full.
125
Tom Rinidec7ea02024-05-20 13:35:03 -0600126config SC_BOOT_MODE
127 int "SC5XX boot mode select"
128 default 1
129 range 0 7
130 help
131 Mode 0: do nothing, just idle
132 Mode 1: boot ldr out of serial flash
133 Mode 7: boot ldr over uart
134
135config SC_BOOT_SPI_BUS
136 int "sc5xx spi boot bus"
137 default 2
138 range 0 4
139 help
140 This is the SPI peripheral number to use for booting, X in the
141 expression `sf probe X:Y`
142
143config SC_BOOT_SPI_SSEL
144 int "sc5xx spi boot chipselect"
145 default 1
146 range 0 6
147 help
148 This is the SPI chip select number to use for booting, Y in the
149 expression `sf probe X:Y`
150
151config SC_BOOT_OSPI_BUS
152 int "sc5xx ospi boot bus"
153 default 0
154 help
155 This is the OSPI peripheral number to use for booting, X in the
156 expression `sf probe X:Y`
157
158config SC_BOOT_OSPI_SSEL
159 int "sc5xx ospi boot chipselect"
160 default 0
161 help
162 This is the OSPI chip select number to use for booting, Y in the
163 expression `sf probe X:Y`
164
Oliver Gaskelld4f7cb52024-09-12 16:50:54 +0100165config SYS_BOOTM_LEN
166 hex
167 default 0x1800000
168
Tom Rinidec7ea02024-05-20 13:35:03 -0600169config SYS_FLASH_BASE
170 hex
171 default 0x60000000
172
Oliver Gaskelld4f7cb52024-09-12 16:50:54 +0100173config SYS_MALLOC_F_LEN
174 default 0x14000
175
176config SYS_LOAD_ADDR
177 hex
178 default 0x0
179
180config SYS_MALLOC_LEN
181 hex
182 default 1048576
183
Tom Rinidec7ea02024-05-20 13:35:03 -0600184config UART_CONSOLE
185 int
186 default 0
187
188config UART4_SERIAL
189 bool
190 depends on DM_SERIAL
191 default y
192
193config WDT_ADI
194 bool
195 default y
196
197config WATCHDOG_TIMEOUT_MSECS
198 int
199 default 30000
200
201config DW_PORTS
202 int
203 default 1
204
205config ADI_BUG_EZKHW21
206 bool "SC584 EZKIT phy bug workaround"
207 depends on SC58X
208 help
209 This workaround affects the SC584 EZKIT and addresses bug EZKHW21.
210 It disables gigabit ethernet mode and limits the board to 100 Mbps
211
212config ADI_CARRIER_SOMCRR_EZKIT
213 bool "Support the EV-SOMCRR-EZKIT"
214 depends on (SC59X || SC59X_64)
215 help
216 Say y to include support for the EV-SOMCRR-EZKIT carrier board,
217 which is compatible with the SC594 and SC598 SOMs. The EZKIT is
218 mutually incompatible with the EZLITE.
219
220config ADI_CARRIER_SOMCRR_EZLITE
221 bool "Support the EV-SOMCRR-EZLITE"
222 depends on (SC59X || SC59X_64)
223 help
224 Say y to include support for the EV-SOMCRR-EZLITE carrier board,
225 which is compatible with the SC594 and SC598 SOMs. The EZLITE is
226 mutually incompatible with the EZKIT.
227
228config ADI_SPL_FORCE_BMODE
229 int "Force the SPL to use this BMODE device during next boot stage"
230 default 0
231 range 0 9
232 depends on SPL
233 help
234 Force the SPL to use this BMODE device during next boot stage.
235 For example, if booting via QSPI, we can force the second stage
236 Of the boot process to use other peripherals via:
237 1 = QSPI -> QSPI
238 5 = QSPI -> OSPI
239 6 = QSPI -> eMMC
240
241config ADI_USE_DMC0
242 bool "Configure DMC0"
243 default y
244 help
245 During hardware initialization, channel 0 of the DMC will be
246 initialized. Select this if you have DMC0 connected to external
247 DDR memory. This is expected to be true for every board using
248 an SC5xx SoC.
249
250config ADI_USE_DMC1
251 bool "Configure DMC1"
252 help
253 During hardware initialization, channel 1 of the DMC will be
254 initialized. Not all processors have a DMC1. Select this if your
255 SoC has DMC1 and you have it connected to external DDR memory.
256
257config ADI_USE_DDR2
258 bool "Configure DMC for DDR2 mode"
259 help
260 Configure the DMC in DDR2 mode. The default is DDR3 and not all
261 parts may actually support DDR2. Please consult the manual for
262 the SoC that you are using to determine if DDR2 mode is supported.
263 This also requires that DDR2 memory is present on the board or it
264 will probably cause strange failure.
265
266menu "Clock configuration"
267
268config CGU0_DF_DIV
269 int "CGU0_DF_DIV"
270 range 0 1
271 help
272 Select 0 to pass CLKIN to PLL
273 Select 1 to pass CLKIN/2 to PLL
274
275config CGU0_VCO_MULT
276 int "CGU0_VCO_MULT"
277 range 0 127
278 help
279 VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL
280 A value of 0 means 128
281
282config CGU0_CCLK_DIV
283 int "CGU0_CCLK_DIV"
284 range 0 31
285 help
286 CCLK_DIV controls the core clock divider
287 A value of 0 means 32
288 CCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / CCLK_DIV
289
290config CGU0_SCLK_DIV
291 int "CGU0_SCLK_DIV"
292 range 0 31
293 help
294 SCLK_DIV controls the system clock divider
295 A value of 0 means 32
296 SCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / SYSCLK_DIV
297
298config CGU0_SCLK0_DIV
299 int "CGU0_SCLK0_DIV"
300 range 0 7
301 help
302 A value of 0 means 8
303 SCLK0 = SCLK / SCLK0_DIV
304
305config CGU0_SCLK1_DIV
306 int "CGU0_SCLK1_DIV"
307 depends on (SC57X || SC58X)
308 range 0 7
309 help
310 A value of 0 means 8
311 SCLK1 = SCLK / SCLK1_DIV
312
313config CGU0_DCLK_DIV
314 int "CGU0_DCLK_DIV"
315 range 0 31
316 help
317 DCLK_DIV controls the DDR clock divider
318 A value of 0 means 32
319 DCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / DCLK_DIV
320
321config CGU0_OCLK_DIV
322 int "CGU0_OCLK_DIV"
323 range 0 127
324 help
325 OCLK_DIV controls the output clock divider
326 A value of 0 means 128
327 OCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / OCLK_DIV
328
329config CGU0_DIV_S1SELEX
330 int "CGU0_DIV_S1SELEX"
331 depends on !SC57X && !SC58X
332 range 0 255
333 help
334 CGU0 SCLK1 Extended divisor register.
335 A value of 0 means 256.
336 SCLK1 = ((CLKIN / (1 + DF)) * VCO_MULT) / DIV_S1SELEX
337
338config CGU0_CLKOUTSEL
339 int "CGU0_CLKOUTSEL"
340 default 0
341 range 0 31
342 help
343 Select signal driven through CLKOUT pin multiplexer.
344 This value varies on each SOC. Refer to
345 CGU_CLKOUTSEL.CLKOUTSEL in the Hardware Reference Manual
346 for values applicable to each SOC.
347 Commonly, values 0 and 1 select CLKIN0 or CLKIN1 respectively.
348
349config CGU1_PLL3_DDRCLK
350 bool "DDRCLK From 3rd PLL"
351 depends on SC59X_64
352 help
353 3rd PLL output is connected to DMC block when set.
354 When cleared, DDR clock is CLKO3 output of CDU.
355
356config CGU1_PLL3_VCO_MSEL
357 int "CGU0_PLL3_VCO_MSEL"
358 depends on CGU1_PLL3_DDRCLK
359 range 1 128
360 help
361 PLL multiplier value for the 3rd PLL.
362 DCLK = (CLKIN * PLL3_VCO_MSEL) / PLL3_DCLK_DIV
363
364config CGU1_PLL3_DCLK_DIV
365 int "CGU0_PLL3_DCLK_DIV"
366 depends on CGU1_PLL3_DDRCLK
367 range 1 32
368 help
369 PLL divider value for the 3rd PLL.
370 DCLK = (CLKIN * PLL3_VCO_MSEL) / PLL3_DCLK_DIV
371
372config CGU1_DF_DIV
373 int "CGU1_DF_DIV"
374 range 0 1
375 help
376 Select 0 to pass CLKIN to PLL
377 Select 1 to pass CLKIN/2 to PLL
378
379config CGU1_VCO_MULT
380 int "CGU1_VCO_MULT"
381 range 0 127
382 help
383 VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL
384 A value of 0 means 128
385
386config CGU1_CCLK_DIV
387 int "CGU1_CCLK_DIV"
388 range 0 31
389 help
390 CCLK_DIV controls the core clock divider
391 A value of 0 means 32
392 CCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / CCLK_DIV
393
394config CGU1_SCLK_DIV
395 int "CGU1_SCLK_DIV"
396 range 0 31
397 help
398 SCLK_DIV controls the system clock divider
399 A value of 0 means 32
400 SCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / SYSCLK_DIV
401
402config CGU1_SCLK0_DIV
403 int "CGU1_SCLK0_DIV"
404 depends on (SC57X || SC58X || SC59X)
405 range 0 7
406 help
407 A value of 0 means 8
408 SCLK0 = SCLK / SCLK0_DIV
409
410config CGU1_SCLK1_DIV
411 int "CGU1_SCLK1_DIV"
412 depends on (SC57X || SC58X)
413 range 0 7
414 help
415 A value of 0 means 8
416 SCLK1 = SCLK / SCLK1_DIV
417
418config CGU1_DCLK_DIV
419 int "CGU1_DCLK_DIV"
420 range 0 31
421 help
422 DCLK_DIV controls the DDR clock divider
423 A value of 0 means 32
424 DCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / DCLK_DIV
425
426config CGU1_OCLK_DIV
427 int "CGU1_OCLK_DIV"
428 range 0 127
429 help
430 OCLK_DIV controls the output clock divider
431 A value of 0 means 128
432 OCLK = ((CLKIN / (1 + DF)) * VCO_MULT) / OCLK_DIV
433
434config CGU1_DIV_S0SELEX
435 int "CGU1_DIV_S0SELEX"
436 depends on !SC57X && !SC58X && !SC59X
437 range 0 255
438 help
439 CGU1 SCLK0 Extended divisor register.
440 A value of 0 means 256.
441 SCLK0 = ((CLKIN / (1 + DF)) * VCO_MULT) / DIV_S0SELEX
442
443config CGU1_DIV_S1SELEX
444 int "CGU1_DIV_S1SELEX"
445 depends on !SC57X && !SC58X
446 range 0 255
447 help
448 CGU1 SCLK1 Extended divisor register.
449 A value of 0 means 256.
450 SCLK1 = ((CLKIN / (1 + DF)) * VCO_MULT) / DIV_S1SELEX
451
452config CDU0_CGU1_CLKIN
453 int "CDU0 CGU1 CLKINn Select"
454 default 0
455 range 0 1
456 help
457 Selects source clock for CGU1.
458 0 for CLKIN0
459 1 for CLKIN1
460
461config CDU0_CLKO0
462 int "CDU0_CLKO0"
463 range 1 7
464 help
465 Clock source select. Refer to SOC Hardware Reference Manual
466
467config CDU0_CLKO1
468 int "CDU0_CLKO1"
469 range 1 7
470 help
471 Clock source select. Refer to SOC Hardware Reference Manual
472
473config CDU0_CLKO2
474 int "CDU0_CLKO2"
475 range 1 7
476 help
477 Clock source select. Refer to SOC Hardware Reference Manual
478
479config CDU0_CLKO3
480 int "CDU0_CLKO3"
481 range 1 7
482 help
483 Clock source select. Refer to SOC Hardware Reference Manual
484
485config CDU0_CLKO4
486 int "CDU0_CLKO4"
487 range 1 7
488 help
489 Clock source select. Refer to SOC Hardware Reference Manual
490
491config CDU0_CLKO5
492 int "CDU0_CLKO5"
493 range 1 7
494 help
495 Clock source select. Refer to SOC Hardware Reference Manual
496
497config CDU0_CLKO6
498 int "CDU0_CLKO6"
499 range 1 7
500 help
501 Clock source select. Refer to SOC Hardware Reference Manual
502
503config CDU0_CLKO7
504 int "CDU0_CLKO7"
505 range 1 7
506 help
507 Clock source select. Refer to SOC Hardware Reference Manual
508
509config CDU0_CLKO8
510 int "CDU0_CLKO8"
511 range 1 7
512 help
513 Clock source select. Refer to SOC Hardware Reference Manual
514
515config CDU0_CLKO9
516 int "CDU0_CLKO9"
517 range 1 7
518 help
519 Clock source select. Refer to SOC Hardware Reference Manual
520
521config CDU0_CLKO10
522 int "CDU0_CLKO10"
523 range 1 7
524 depends on (SC59X || SC59X_64)
525 help
526 Clock source select. Refer to SOC Hardware Reference Manual
527
528config CDU0_CLKO12
529 int "CDU0_CLKO12"
530 range 1 7
531 depends on (SC59X || SC59X_64)
532 help
533 Clock source select. Refer to SOC Hardware Reference Manual
534
535config CDU0_CLKO13
536 int "CDU0_CLKO13"
537 range 1 7
538 depends on SC59X_64
539 help
540 Clock source select. Refer to SOC Hardware Reference Manual
541
542config CDU0_CLKO14
543 int "CDU0_CLKO14"
544 range 1 7
545 depends on SC59X_64
546 help
547 Clock source select. Refer to SOC Hardware Reference Manual
548
549endmenu
550
551config ADI_GPIO
552 bool
553 default y
554
555config PINCTRL_ADI
556 bool
557 default y
558
Oliver Gaskelld4f7cb52024-09-12 16:50:54 +0100559source "board/adi/sc598-som-ezkit/Kconfig"
Oliver Gaskellc69c7f82024-09-12 16:50:55 +0100560source "board/adi/sc598-som-ezlite/Kconfig"
Oliver Gaskell14032b32024-09-12 16:50:56 +0100561source "board/adi/sc594-som-ezkit/Kconfig"
Oliver Gaskellbc139712024-09-12 16:50:57 +0100562source "board/adi/sc594-som-ezlite/Kconfig"
Oliver Gaskellb5138e32024-09-12 16:50:59 +0100563source "board/adi/sc589-ezkit/Kconfig"
Oliver Gaskell5385eee2024-09-12 16:51:00 +0100564source "board/adi/sc589-mini/Kconfig"
Oliver Gaskell053a1202024-09-12 16:50:58 +0100565source "board/adi/sc584-ezkit/Kconfig"
Oliver Gaskellcb0d39d2024-09-12 16:51:01 +0100566source "board/adi/sc573-ezkit/Kconfig"
Oliver Gaskelld4f7cb52024-09-12 16:50:54 +0100567
Tom Rinidec7ea02024-05-20 13:35:03 -0600568endif