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