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