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