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