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