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