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