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