armv8: ls1028a: move FSL_LAYERSCAPE to kconfig
[platform/kernel/u-boot.git] / arch / arm / cpu / armv8 / fsl-layerscape / Kconfig
1 config ARCH_LS1012A
2         bool
3         select ARMV8_SET_SMPEN
4         select ARM_ERRATA_855873 if !TFABOOT
5         select FSL_LAYERSCAPE
6         select FSL_LSCH2
7         select SYS_FSL_SRDS_1
8         select SYS_HAS_SERDES
9         select SYS_FSL_DDR_BE
10         select SYS_FSL_MMDC
11         select SYS_FSL_ERRATUM_A010315
12         select SYS_FSL_ERRATUM_A009798
13         select SYS_FSL_ERRATUM_A008997
14         select SYS_FSL_ERRATUM_A009007
15         select SYS_FSL_ERRATUM_A009008
16         select ARCH_EARLY_INIT_R
17         select BOARD_EARLY_INIT_F
18         select SYS_I2C_MXC
19         select SYS_I2C_MXC_I2C1 if !DM_I2C
20         select SYS_I2C_MXC_I2C2 if !DM_I2C
21         imply PANIC_HANG
22
23 config ARCH_LS1028A
24         bool
25         select ARMV8_SET_SMPEN
26         select FSL_LAYERSCAPE
27         select FSL_LSCH3
28         select NXP_LSCH3_2
29         select SYS_FSL_HAS_CCI400
30         select SYS_FSL_SRDS_1
31         select SYS_HAS_SERDES
32         select SYS_FSL_DDR
33         select SYS_FSL_DDR_LE
34         select SYS_FSL_DDR_VER_50
35         select SYS_FSL_HAS_DDR3
36         select SYS_FSL_HAS_DDR4
37         select SYS_FSL_HAS_SEC
38         select SYS_FSL_SEC_COMPAT_5
39         select SYS_FSL_SEC_LE
40         select FSL_TZASC_1
41         select ARCH_EARLY_INIT_R
42         select BOARD_EARLY_INIT_F
43         select SYS_I2C_MXC
44         select SYS_FSL_ERRATUM_A008997
45         select SYS_FSL_ERRATUM_A009007
46         select SYS_FSL_ERRATUM_A008514 if !TFABOOT
47         select SYS_FSL_ERRATUM_A009663 if !TFABOOT
48         select SYS_FSL_ERRATUM_A009942 if !TFABOOT
49         select SYS_FSL_ERRATUM_A050382
50         select RESV_RAM if GIC_V3_ITS
51         imply PANIC_HANG
52
53 config ARCH_LS1043A
54         bool
55         select ARMV8_SET_SMPEN
56         select ARM_ERRATA_855873 if !TFABOOT
57         select FSL_LAYERSCAPE
58         select FSL_LSCH2
59         select SYS_FSL_SRDS_1
60         select SYS_HAS_SERDES
61         select SYS_FSL_DDR
62         select SYS_FSL_DDR_BE
63         select SYS_FSL_DDR_VER_50
64         select SYS_FSL_ERRATUM_A008850 if !TFABOOT
65         select SYS_FSL_ERRATUM_A008997
66         select SYS_FSL_ERRATUM_A009007
67         select SYS_FSL_ERRATUM_A009008
68         select SYS_FSL_ERRATUM_A009660 if !TFABOOT
69         select SYS_FSL_ERRATUM_A009663 if !TFABOOT
70         select SYS_FSL_ERRATUM_A009798
71         select SYS_FSL_ERRATUM_A009929
72         select SYS_FSL_ERRATUM_A009942 if !TFABOOT
73         select SYS_FSL_ERRATUM_A010315
74         select SYS_FSL_ERRATUM_A010539
75         select SYS_FSL_HAS_DDR3
76         select SYS_FSL_HAS_DDR4
77         select ARCH_EARLY_INIT_R
78         select BOARD_EARLY_INIT_F
79         select SYS_I2C_MXC if !DM_I2C
80         select SYS_I2C_MXC_I2C1 if !DM_I2C
81         select SYS_I2C_MXC_I2C2 if !DM_I2C
82         select SYS_I2C_MXC_I2C3 if !DM_I2C
83         select SYS_I2C_MXC_I2C4 if !DM_I2C
84         imply CMD_PCI
85
86 config ARCH_LS1046A
87         bool
88         select ARMV8_SET_SMPEN
89         select FSL_LAYERSCAPE
90         select FSL_LSCH2
91         select SYS_FSL_SRDS_1
92         select SYS_HAS_SERDES
93         select SYS_FSL_DDR
94         select SYS_FSL_DDR_BE
95         select SYS_FSL_DDR_VER_50
96         select SYS_FSL_ERRATUM_A008336 if !TFABOOT
97         select SYS_FSL_ERRATUM_A008511 if !TFABOOT
98         select SYS_FSL_ERRATUM_A008850 if !TFABOOT
99         select SYS_FSL_ERRATUM_A008997
100         select SYS_FSL_ERRATUM_A009007
101         select SYS_FSL_ERRATUM_A009008
102         select SYS_FSL_ERRATUM_A009798
103         select SYS_FSL_ERRATUM_A009801
104         select SYS_FSL_ERRATUM_A009803 if !TFABOOT
105         select SYS_FSL_ERRATUM_A009942 if !TFABOOT
106         select SYS_FSL_ERRATUM_A010165 if !TFABOOT
107         select SYS_FSL_ERRATUM_A010539
108         select SYS_FSL_HAS_DDR4
109         select SYS_FSL_SRDS_2
110         select ARCH_EARLY_INIT_R
111         select BOARD_EARLY_INIT_F
112         select SYS_I2C_MXC if !DM_I2C
113         select SYS_I2C_MXC_I2C1 if !DM_I2C
114         select SYS_I2C_MXC_I2C2 if !DM_I2C
115         select SYS_I2C_MXC_I2C3 if !DM_I2C
116         select SYS_I2C_MXC_I2C4 if !DM_I2C
117         imply SCSI
118         imply SCSI_AHCI
119
120 config ARCH_LS1088A
121         bool
122         select ARMV8_SET_SMPEN
123         select ARM_ERRATA_855873 if !TFABOOT
124         select FSL_LAYERSCAPE
125         select FSL_LSCH3
126         select SYS_FSL_SRDS_1
127         select SYS_HAS_SERDES
128         select SYS_FSL_DDR
129         select SYS_FSL_DDR_LE
130         select SYS_FSL_DDR_VER_50
131         select SYS_FSL_EC1
132         select SYS_FSL_EC2
133         select SYS_FSL_ERRATUM_A009803 if !TFABOOT
134         select SYS_FSL_ERRATUM_A009942 if !TFABOOT
135         select SYS_FSL_ERRATUM_A010165 if !TFABOOT
136         select SYS_FSL_ERRATUM_A008511 if !TFABOOT
137         select SYS_FSL_ERRATUM_A008850 if !TFABOOT
138         select SYS_FSL_ERRATUM_A009007
139         select SYS_FSL_HAS_CCI400
140         select SYS_FSL_HAS_DDR4
141         select SYS_FSL_HAS_RGMII
142         select SYS_FSL_HAS_SEC
143         select SYS_FSL_SEC_COMPAT_5
144         select SYS_FSL_SEC_LE
145         select SYS_FSL_SRDS_1
146         select SYS_FSL_SRDS_2
147         select FSL_TZASC_1
148         select FSL_TZASC_400
149         select FSL_TZPC_BP147
150         select ARCH_EARLY_INIT_R
151         select BOARD_EARLY_INIT_F
152         select SYS_I2C_MXC
153         select SYS_I2C_MXC_I2C1 if !TFABOOT
154         select SYS_I2C_MXC_I2C2 if !TFABOOT
155         select SYS_I2C_MXC_I2C3 if !TFABOOT
156         select SYS_I2C_MXC_I2C4 if !TFABOOT
157         select RESV_RAM if GIC_V3_ITS
158         imply SCSI
159         imply PANIC_HANG
160
161 config ARCH_LS2080A
162         bool
163         select ARMV8_SET_SMPEN
164         select ARM_ERRATA_826974
165         select ARM_ERRATA_828024
166         select ARM_ERRATA_829520
167         select ARM_ERRATA_833471
168         select FSL_LAYERSCAPE
169         select FSL_LSCH3
170         select SYS_FSL_SRDS_1
171         select SYS_HAS_SERDES
172         select SYS_FSL_DDR
173         select SYS_FSL_DDR_LE
174         select SYS_FSL_DDR_VER_50
175         select SYS_FSL_HAS_CCN504
176         select SYS_FSL_HAS_DP_DDR
177         select SYS_FSL_HAS_SEC
178         select SYS_FSL_HAS_DDR4
179         select SYS_FSL_SEC_COMPAT_5
180         select SYS_FSL_SEC_LE
181         select SYS_FSL_SRDS_2
182         select FSL_TZASC_1
183         select FSL_TZASC_2
184         select FSL_TZASC_400
185         select FSL_TZPC_BP147
186         select SYS_FSL_ERRATUM_A008336 if !TFABOOT
187         select SYS_FSL_ERRATUM_A008511 if !TFABOOT
188         select SYS_FSL_ERRATUM_A008514 if !TFABOOT
189         select SYS_FSL_ERRATUM_A008585
190         select SYS_FSL_ERRATUM_A008997
191         select SYS_FSL_ERRATUM_A009007
192         select SYS_FSL_ERRATUM_A009008
193         select SYS_FSL_ERRATUM_A009635
194         select SYS_FSL_ERRATUM_A009663 if !TFABOOT
195         select SYS_FSL_ERRATUM_A009798
196         select SYS_FSL_ERRATUM_A009801
197         select SYS_FSL_ERRATUM_A009803 if !TFABOOT
198         select SYS_FSL_ERRATUM_A009942 if !TFABOOT
199         select SYS_FSL_ERRATUM_A010165 if !TFABOOT
200         select SYS_FSL_ERRATUM_A009203
201         select ARCH_EARLY_INIT_R
202         select BOARD_EARLY_INIT_F
203         select SYS_I2C_MXC
204         select SYS_I2C_MXC_I2C1 if !TFABOOT
205         select SYS_I2C_MXC_I2C2 if !TFABOOT
206         select SYS_I2C_MXC_I2C3 if !TFABOOT
207         select SYS_I2C_MXC_I2C4 if !TFABOOT
208         select RESV_RAM if GIC_V3_ITS
209         imply DISTRO_DEFAULTS
210         imply PANIC_HANG
211
212 config ARCH_LX2160A
213         bool
214         select ARMV8_SET_SMPEN
215         select FSL_LSCH3
216         select NXP_LSCH3_2
217         select SYS_HAS_SERDES
218         select SYS_FSL_SRDS_1
219         select SYS_FSL_SRDS_2
220         select SYS_NXP_SRDS_3
221         select SYS_FSL_DDR
222         select SYS_FSL_DDR_LE
223         select SYS_FSL_DDR_VER_50
224         select SYS_FSL_EC1
225         select SYS_FSL_EC2
226         select SYS_FSL_ERRATUM_A050106
227         select SYS_FSL_HAS_RGMII
228         select SYS_FSL_HAS_SEC
229         select SYS_FSL_HAS_CCN508
230         select SYS_FSL_HAS_DDR4
231         select SYS_FSL_SEC_COMPAT_5
232         select SYS_FSL_SEC_LE
233         select ARCH_EARLY_INIT_R
234         select BOARD_EARLY_INIT_F
235         select SYS_I2C_MXC
236         select RESV_RAM if GIC_V3_ITS
237         imply DISTRO_DEFAULTS
238         imply PANIC_HANG
239         imply SCSI
240         imply SCSI_AHCI
241
242 config FSL_LSCH2
243         bool
244         select SYS_FSL_HAS_CCI400
245         select SYS_FSL_HAS_SEC
246         select SYS_FSL_SEC_COMPAT_5
247         select SYS_FSL_SEC_BE
248
249 config FSL_LSCH3
250         select ARCH_MISC_INIT
251         bool
252
253 config NXP_LSCH3_2
254         bool
255
256 menu "Layerscape architecture"
257         depends on FSL_LSCH2 || FSL_LSCH3
258
259 config FSL_LAYERSCAPE
260         bool
261
262 config HAS_FEATURE_GIC64K_ALIGN
263         bool
264         default y if ARCH_LS1043A
265
266 config HAS_FEATURE_ENHANCED_MSI
267         bool
268         default y if ARCH_LS1043A
269
270 menu "Layerscape PPA"
271 config FSL_LS_PPA
272         bool "FSL Layerscape PPA firmware support"
273         depends on !ARMV8_PSCI
274         select ARMV8_SEC_FIRMWARE_SUPPORT
275         select SEC_FIRMWARE_ARMV8_PSCI
276         select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT if FSL_LSCH2
277         help
278           The FSL Primary Protected Application (PPA) is a software component
279           which is loaded during boot stage, and then remains resident in RAM
280           and runs in the TrustZone after boot.
281           Say y to enable it.
282
283 config SPL_FSL_LS_PPA
284         bool "FSL Layerscape PPA firmware support for SPL build"
285         depends on !ARMV8_PSCI
286         select SPL_ARMV8_SEC_FIRMWARE_SUPPORT
287         select SEC_FIRMWARE_ARMV8_PSCI
288         select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT if FSL_LSCH2
289         help
290           The FSL Primary Protected Application (PPA) is a software component
291           which is loaded during boot stage, and then remains resident in RAM
292           and runs in the TrustZone after boot. This is to load PPA during SPL
293           stage instead of the RAM version of U-Boot. Once PPA is initialized,
294           the rest of U-Boot (including RAM version) runs at EL2.
295 choice
296         prompt "FSL Layerscape PPA firmware loading-media select"
297         depends on FSL_LS_PPA
298         default SYS_LS_PPA_FW_IN_MMC if SD_BOOT
299         default SYS_LS_PPA_FW_IN_NAND if NAND_BOOT
300         default SYS_LS_PPA_FW_IN_XIP
301
302 config SYS_LS_PPA_FW_IN_XIP
303         bool "XIP"
304         help
305           Say Y here if the PPA firmware locate at XIP flash, such
306           as NOR or QSPI flash.
307
308 config SYS_LS_PPA_FW_IN_MMC
309         bool "eMMC or SD Card"
310         help
311           Say Y here if the PPA firmware locate at eMMC/SD card.
312
313 config SYS_LS_PPA_FW_IN_NAND
314         bool "NAND"
315         help
316           Say Y here if the PPA firmware locate at NAND flash.
317
318 endchoice
319
320 config LS_PPA_ESBC_HDR_SIZE
321         hex "Length of PPA ESBC header"
322         depends on FSL_LS_PPA && CHAIN_OF_TRUST && !SYS_LS_PPA_FW_IN_XIP
323         default 0x2000
324         help
325           Length (in bytes) of PPA ESBC header to be copied from MMC/SD or
326           NAND to memory to validate PPA image.
327
328 endmenu
329
330 config SYS_FSL_ERRATUM_A008997
331         bool "Workaround for USB PHY erratum A008997"
332
333 config SYS_FSL_ERRATUM_A009007
334         bool
335         help
336           Workaround for USB PHY erratum A009007
337
338 config SYS_FSL_ERRATUM_A009008
339         bool "Workaround for USB PHY erratum A009008"
340
341 config SYS_FSL_ERRATUM_A009798
342         bool "Workaround for USB PHY erratum A009798"
343
344 config SYS_FSL_ERRATUM_A050106
345         bool "Workaround for USB PHY erratum A050106"
346         help
347           USB3.0 Receiver needs to enable fixed equalization
348           for each of PHY instances in an SOC. This is similar
349           to erratum A-009007, but this one is for LX2160A,
350           and the register value is different.
351
352 config SYS_FSL_ERRATUM_A010315
353         bool "Workaround for PCIe erratum A010315"
354
355 config SYS_FSL_ERRATUM_A010539
356         bool "Workaround for PIN MUX erratum A010539"
357
358 config MAX_CPUS
359         int "Maximum number of CPUs permitted for Layerscape"
360         default 2 if ARCH_LS1028A
361         default 4 if ARCH_LS1043A
362         default 4 if ARCH_LS1046A
363         default 16 if ARCH_LS2080A
364         default 8 if ARCH_LS1088A
365         default 16 if ARCH_LX2160A
366         default 1
367         help
368           Set this number to the maximum number of possible CPUs in the SoC.
369           SoCs may have multiple clusters with each cluster may have multiple
370           ports. If some ports are reserved but higher ports are used for
371           cores, count the reserved ports. This will allocate enough memory
372           in spin table to properly handle all cores.
373
374 config EMC2305
375         bool "Fan controller"
376         help
377          Enable the EMC2305 fan controller for configuration of fan
378          speed.
379
380 config NXP_ESBC
381         bool "NXP_ESBC"
382         help
383                 Enable Freescale Secure Boot feature
384
385 config QSPI_AHB_INIT
386         bool "Init the QSPI AHB bus"
387         help
388           The default setting for QSPI AHB bus just support 3bytes addressing.
389           But some QSPI flash size up to 64MBytes, so initialize the QSPI AHB
390           bus for those flashes to support the full QSPI flash size.
391
392 config FSPI_AHB_EN_4BYTE
393         bool "Enable 4-byte Fast Read command for AHB mode"
394         default n
395         help
396           The default setting for FlexSPI AHB bus just supports 3-byte addressing.
397           But some FlexSPI flash sizes are up to 64MBytes.
398           This flag enables fast read command for AHB mode and modifies required
399           LUT to support full FlexSPI flash.
400
401 config SYS_CCI400_OFFSET
402         hex "Offset for CCI400 base"
403         depends on SYS_FSL_HAS_CCI400
404         default 0x3090000 if ARCH_LS1088A || ARCH_LS1028A
405         default 0x180000 if FSL_LSCH2
406         help
407           Offset for CCI400 base
408           CCI400 base addr = CCSRBAR + CCI400_OFFSET
409
410 config SYS_FSL_IFC_BANK_COUNT
411         int "Maximum banks of Integrated flash controller"
412         depends on ARCH_LS1043A || ARCH_LS1046A || ARCH_LS2080A || ARCH_LS1088A
413         default 4 if ARCH_LS1043A
414         default 4 if ARCH_LS1046A
415         default 8 if ARCH_LS2080A || ARCH_LS1088A
416
417 config SYS_FSL_HAS_CCI400
418         bool
419
420 config SYS_FSL_HAS_CCN504
421         bool
422
423 config SYS_FSL_HAS_CCN508
424         bool
425
426 config SYS_FSL_HAS_DP_DDR
427         bool
428
429 config SYS_FSL_SRDS_1
430         bool
431
432 config SYS_FSL_SRDS_2
433         bool
434
435 config SYS_NXP_SRDS_3
436         bool
437
438 config SYS_HAS_SERDES
439         bool
440
441 config FSL_TZASC_1
442         bool
443
444 config FSL_TZASC_2
445         bool
446
447 config FSL_TZASC_400
448         bool
449
450 config FSL_TZPC_BP147
451         bool
452 endmenu
453
454 menu "Layerscape clock tree configuration"
455         depends on FSL_LSCH2 || FSL_LSCH3
456
457 config SYS_FSL_CLK
458         bool "Enable clock tree initialization"
459         default y
460
461 config CLUSTER_CLK_FREQ
462         int "Reference clock of core cluster"
463         depends on ARCH_LS1012A
464         default 100000000
465         help
466           This number is the reference clock frequency of core PLL.
467           For most platforms, the core PLL and Platform PLL have the same
468           reference clock, but for some platforms, LS1012A for instance,
469           they are provided sepatately.
470
471 config SYS_FSL_PCLK_DIV
472         int "Platform clock divider"
473         default 1 if ARCH_LS1028A
474         default 1 if ARCH_LS1043A
475         default 1 if ARCH_LS1046A
476         default 1 if ARCH_LS1088A
477         default 2
478         help
479           This is the divider that is used to derive Platform clock from
480           Platform PLL, in another word:
481                 Platform_clk = Platform_PLL_freq / this_divider
482
483 config SYS_FSL_DSPI_CLK_DIV
484         int "DSPI clock divider"
485         default 1 if ARCH_LS1043A
486         default 2
487         help
488           This is the divider that is used to derive DSPI clock from Platform
489           clock, in another word DSPI_clk = Platform_clk / this_divider.
490
491 config SYS_FSL_DUART_CLK_DIV
492         int "DUART clock divider"
493         default 1 if ARCH_LS1043A
494         default 4 if ARCH_LX2160A
495         default 2
496         help
497           This is the divider that is used to derive DUART clock from Platform
498           clock, in another word DUART_clk = Platform_clk / this_divider.
499
500 config SYS_FSL_I2C_CLK_DIV
501         int "I2C clock divider"
502         default 1 if ARCH_LS1043A
503         default 4 if ARCH_LS1012A
504         default 4 if ARCH_LS1028A
505         default 8 if ARCH_LX2160A
506         default 8 if ARCH_LS1088A
507         default 2
508         help
509           This is the divider that is used to derive I2C clock from Platform
510           clock, in another word I2C_clk = Platform_clk / this_divider.
511
512 config SYS_FSL_IFC_CLK_DIV
513         int "IFC clock divider"
514         default 1 if ARCH_LS1043A
515         default 4 if ARCH_LS1012A
516         default 4 if ARCH_LS1028A
517         default 8 if ARCH_LX2160A
518         default 8 if ARCH_LS1088A
519         default 2
520         help
521           This is the divider that is used to derive IFC clock from Platform
522           clock, in another word IFC_clk = Platform_clk / this_divider.
523
524 config SYS_FSL_LPUART_CLK_DIV
525         int "LPUART clock divider"
526         default 1 if ARCH_LS1043A
527         default 2
528         help
529           This is the divider that is used to derive LPUART clock from Platform
530           clock, in another word LPUART_clk = Platform_clk / this_divider.
531
532 config SYS_FSL_SDHC_CLK_DIV
533         int "SDHC clock divider"
534         default 1 if ARCH_LS1043A
535         default 1 if ARCH_LS1012A
536         default 2
537         help
538           This is the divider that is used to derive SDHC clock from Platform
539           clock, in another word SDHC_clk = Platform_clk / this_divider.
540
541 config SYS_FSL_QMAN_CLK_DIV
542         int "QMAN clock divider"
543         default 1 if ARCH_LS1043A
544         default 2
545         help
546           This is the divider that is used to derive QMAN clock from Platform
547           clock, in another word QMAN_clk = Platform_clk / this_divider.
548 endmenu
549
550 config RESV_RAM
551         bool
552         help
553           Reserve memory from the top, tracked by gd->arch.resv_ram. This
554           reserved RAM can be used by special driver that resides in memory
555           after U-Boot exits. It's up to implementation to allocate and allow
556           access to this reserved memory. For example, the reserved RAM can
557           be at the high end of physical memory. The reserve RAM may be
558           excluded from memory bank(s) passed to OS, or marked as reserved.
559
560 config SYS_FSL_EC1
561         bool
562         help
563           Ethernet controller 1, this is connected to
564           MAC17 for LX2160A or to MAC3 for other SoCs
565           Provides DPAA2 capabilities
566
567 config SYS_FSL_EC2
568         bool
569         help
570           Ethernet controller 2, this is connected to
571           MAC18 for LX2160A or to MAC4 for other SoCs
572           Provides DPAA2 capabilities
573
574 config SYS_FSL_ERRATUM_A008336
575         bool
576
577 config SYS_FSL_ERRATUM_A008514
578         bool
579
580 config SYS_FSL_ERRATUM_A008585
581         bool
582
583 config SYS_FSL_ERRATUM_A008850
584         bool
585
586 config SYS_FSL_ERRATUM_A009203
587         bool
588
589 config SYS_FSL_ERRATUM_A009635
590         bool
591
592 config SYS_FSL_ERRATUM_A009660
593         bool
594
595 config SYS_FSL_ERRATUM_A009929
596         bool
597
598 config SYS_FSL_ERRATUM_A050382
599         bool
600
601 config SYS_FSL_HAS_RGMII
602         bool
603         depends on SYS_FSL_EC1 || SYS_FSL_EC2
604
605 config SPL_LDSCRIPT
606         default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARCH_LS1043A || ARCH_LS1046A || ARCH_LS2080A
607
608 config HAS_FSL_XHCI_USB
609         bool
610         default y if ARCH_LS1043A || ARCH_LS1046A
611         help
612           For some SoC(such as LS1043A and LS1046A), USB and QE-HDLC multiplex use
613           pins, select it when the pins are assigned to USB.