controlcenterdc: Migrate CUSTOMER_BOARD_SUPPORT to Kconfig
[platform/kernel/u-boot.git] / arch / arm / mach-mvebu / Kconfig
1 if ARCH_MVEBU
2
3 config HAVE_MVEBU_EFUSE
4         bool
5
6 config ARMADA_32BIT
7         bool
8         select ARCH_MISC_INIT
9         select BOARD_EARLY_INIT_F
10         select CPU_V7A
11         select SPL_DM if SPL
12         select SPL_DM_SEQ_ALIAS if SPL
13         select SPL_OF_CONTROL if SPL
14         select SPL_SKIP_LOWLEVEL_INIT if SPL
15         select SPL_SIMPLE_BUS if SPL
16         select SUPPORT_SPL
17         select TRANSLATION_OFFSET
18
19 config ARMADA_64BIT
20         bool
21         select ARM64
22
23 # ARMv7 SoCs...
24 config ARMADA_375
25         bool
26         select ARMADA_32BIT
27
28 config ARMADA_38X
29         bool
30         select ARMADA_32BIT
31         select HAVE_MVEBU_EFUSE
32
33 config ARMADA_38X_HS_IMPEDANCE_THRESH
34         hex  "Armada 38x USB 2.0 High-Speed Impedance Threshold (0x0 - 0x7)"
35         depends on ARMADA_38X
36         default 0x6
37         range 0x0 0x7
38
39 config ARMADA_XP
40         bool
41         select ARMADA_32BIT
42
43 # ARMv8 SoCs...
44 config ARMADA_3700
45         bool
46         select ARM64
47
48 # Armada 7K and 8K are very similar - use only one Kconfig symbol for both
49 config ARMADA_8K
50         bool
51         select ARM64
52
53 # Armada PLL frequency (used for NAND clock generation)
54 config SYS_MVEBU_PLL_CLOCK
55         int
56         default "2000000000" if ARMADA_XP || ARMADA_3700 || ARMADA_8K || ARMADA_MSYS
57         default "1000000000" if ARMADA_38X || ARMADA_375
58
59 # Armada XP/38x SoC types...
60 config MV78230
61         bool
62         select ARMADA_XP
63
64 config MV78260
65         bool
66         select ARMADA_XP
67         imply CMD_SATA
68
69 config MV78460
70         bool
71         select ARMADA_XP
72
73 config ARMADA_MSYS
74         bool
75         select ARMADA_32BIT
76
77 config 98DX4251
78         bool
79         select ARMADA_MSYS
80
81 config 98DX3336
82         bool
83         select ARMADA_MSYS
84
85 config 98DX3236
86         bool
87         select ARMADA_MSYS
88
89 config 88F6820
90         bool
91         select ARMADA_38X
92
93 config CUSTOMER_BOARD_SUPPORT
94         bool
95
96 choice
97         prompt "Armada XP/375/38x/3700/7K/8K board select"
98         optional
99
100 config TARGET_CLEARFOG
101         bool "Support ClearFog"
102         select 88F6820
103         select BOARD_LATE_INIT
104
105 config TARGET_HELIOS4
106         bool "Support Helios4"
107         select 88F6820
108
109 config TARGET_MVEBU_ARMADA_37XX
110         bool "Support Armada 37xx platforms"
111         select ARMADA_3700
112         imply SCSI
113
114 config TARGET_DB_88F6720
115         bool "Support DB-88F6720 Armada 375"
116         select ARMADA_375
117
118 config TARGET_DB_88F6820_GP
119         bool "Support DB-88F6820-GP"
120         select 88F6820
121
122 config TARGET_DB_88F6820_AMC
123         bool "Support DB-88F6820-AMC"
124         select 88F6820
125
126 config TARGET_TURRIS_OMNIA
127         bool "Support Turris Omnia"
128         select 88F6820
129         select BOARD_LATE_INIT
130         select DM_I2C
131         select I2C_MUX
132         select I2C_MUX_PCA954x
133         select SPL_DRIVERS_MISC
134         select SPL_I2C_MUX
135         select SPL_SYS_MALLOC_SIMPLE
136         select SYS_I2C_MVTWSI
137         select ATSHA204A
138
139 config TARGET_TURRIS_MOX
140         bool "Support Turris Mox"
141         select ARMADA_3700
142
143 config TARGET_MVEBU_ARMADA_8K
144         bool "Support Armada 7k/8k platforms"
145         select ARMADA_8K
146         select BOARD_LATE_INIT
147         imply SCSI
148
149 config TARGET_OCTEONTX2_CN913x
150         bool "Support CN913x platforms"
151         select ARMADA_8K
152         imply BOARD_EARLY_INIT_R
153         select BOARD_LATE_INIT
154         imply SCSI
155
156 config TARGET_DB_MV784MP_GP
157         bool "Support db-mv784mp-gp"
158         select BOARD_ECC_SUPPORT
159         select MV78460
160
161 config TARGET_DS414
162         bool "Support Synology DS414"
163         select MV78230
164
165 config TARGET_MAXBCM
166         bool "Support maxbcm"
167         select BOARD_ECC_SUPPORT
168         select MV78460
169
170 config TARGET_THEADORABLE
171         bool "Support theadorable Armada XP"
172         select BOARD_LATE_INIT if USB
173         select MV78260
174         imply CMD_SATA
175
176 config TARGET_CONTROLCENTERDC
177         bool "Support CONTROLCENTERDC"
178         select 88F6820
179         select CUSTOMER_BOARD_SUPPORT
180
181 config TARGET_X530
182         bool "Support Allied Telesis x530"
183         select 88F6820
184
185 config TARGET_DB_XC3_24G4XG
186         bool "Support DB-XC3-24G4XG"
187         select 98DX3336
188
189 config TARGET_CRS3XX_98DX3236
190         bool "Support CRS3XX-98DX3236"
191         select 98DX3236
192
193 endchoice
194
195 choice
196         prompt "DDR bus width"
197         default DDR_64BIT
198         depends on ARMADA_XP
199
200 config DDR_64BIT
201         bool "64bit bus width"
202
203 config DDR_32BIT
204         bool "32bit bus width"
205
206 endchoice
207
208 config DDR_LOG_LEVEL
209         int "DDR training code log level"
210         depends on ARMADA_XP
211         default 0
212         range 0 3
213         help
214           Amount of information provided on error while running the DDR
215           training code.  At level 0, provides an error code in a case of
216           failure, RL, WL errors and other algorithm failure.  At level 1,
217           provides the D-Unit setup (SPD/Static configuration).  At level 2,
218           provides the windows margin as a results of DQS centeralization.
219           At level 3, rovides the windows margin of each DQ as a results of
220           DQS centeralization.
221
222 config DDR_RESET_ON_TRAINING_FAILURE
223         bool "Reset the board on DDR training failure instead of hanging"
224         depends on ARMADA_38X || ARMADA_XP
225         help
226           If DDR training fails in SPL, reset the board instead of hanging.
227           Some boards are known to fail DDR training occasionally and an
228           immediate reset may be preferable to waiting until the board is
229           reset by watchdog (if there even is one).
230
231           Note that if booting via UART and the DDR training fails, the
232           device will still hang - it doesn't make sense to reset the board
233           in such a case.
234
235 config BOARD_ECC_SUPPORT
236         bool
237
238 config SYS_BOARD
239         default "clearfog" if TARGET_CLEARFOG
240         default "helios4" if TARGET_HELIOS4
241         default "mvebu_armada-37xx" if TARGET_MVEBU_ARMADA_37XX
242         default "db-88f6720" if TARGET_DB_88F6720
243         default "db-88f6820-gp" if TARGET_DB_88F6820_GP
244         default "db-88f6820-amc" if TARGET_DB_88F6820_AMC
245         default "turris_omnia" if TARGET_TURRIS_OMNIA
246         default "turris_mox" if TARGET_TURRIS_MOX
247         default "mvebu_armada-8k" if TARGET_MVEBU_ARMADA_8K
248         default "octeontx2_cn913x" if TARGET_OCTEONTX2_CN913x
249         default "db-mv784mp-gp" if TARGET_DB_MV784MP_GP
250         default "ds414" if TARGET_DS414
251         default "maxbcm" if TARGET_MAXBCM
252         default "theadorable" if TARGET_THEADORABLE
253         default "a38x" if TARGET_CONTROLCENTERDC
254         default "x530" if TARGET_X530
255         default "db-xc3-24g4xg" if TARGET_DB_XC3_24G4XG
256         default "crs3xx-98dx3236" if TARGET_CRS3XX_98DX3236
257
258 config SYS_CONFIG_NAME
259         default "clearfog" if TARGET_CLEARFOG
260         default "helios4" if TARGET_HELIOS4
261         default "mvebu_armada-37xx" if TARGET_MVEBU_ARMADA_37XX
262         default "db-88f6720" if TARGET_DB_88F6720
263         default "db-88f6820-gp" if TARGET_DB_88F6820_GP
264         default "db-88f6820-amc" if TARGET_DB_88F6820_AMC
265         default "mvebu_armada-8k" if TARGET_MVEBU_ARMADA_8K
266         default "mvebu_armada-8k" if TARGET_OCTEONTX2_CN913x
267         default "db-mv784mp-gp" if TARGET_DB_MV784MP_GP
268         default "ds414" if TARGET_DS414
269         default "maxbcm" if TARGET_MAXBCM
270         default "theadorable" if TARGET_THEADORABLE
271         default "turris_omnia" if TARGET_TURRIS_OMNIA
272         default "turris_mox" if TARGET_TURRIS_MOX
273         default "controlcenterdc" if TARGET_CONTROLCENTERDC
274         default "x530" if TARGET_X530
275         default "db-xc3-24g4xg" if TARGET_DB_XC3_24G4XG
276         default "crs3xx-98dx3236" if TARGET_CRS3XX_98DX3236
277
278 config SYS_VENDOR
279         default "Marvell" if TARGET_DB_MV784MP_GP
280         default "Marvell" if TARGET_MVEBU_ARMADA_37XX
281         default "Marvell" if TARGET_DB_88F6720
282         default "Marvell" if TARGET_DB_88F6820_GP
283         default "Marvell" if TARGET_DB_88F6820_AMC
284         default "Marvell" if TARGET_MVEBU_ARMADA_8K
285         default "Marvell" if TARGET_OCTEONTX2_CN913x
286         default "Marvell" if TARGET_DB_XC3_24G4XG
287         default "Marvell" if TARGET_MVEBU_DB_88F7040
288         default "solidrun" if TARGET_CLEARFOG
289         default "kobol" if TARGET_HELIOS4
290         default "Synology" if TARGET_DS414
291         default "CZ.NIC" if TARGET_TURRIS_OMNIA
292         default "CZ.NIC" if TARGET_TURRIS_MOX
293         default "gdsys" if TARGET_CONTROLCENTERDC
294         default "alliedtelesis" if TARGET_X530
295         default "mikrotik" if TARGET_CRS3XX_98DX3236
296
297 config SYS_SOC
298         default "mvebu"
299
300 choice
301         prompt "Boot method"
302         depends on SPL
303
304 config MVEBU_SPL_BOOT_DEVICE_SPI
305         bool "SPI NOR flash"
306         imply ENV_IS_IN_SPI_FLASH
307         imply SPL_DM_SPI
308         imply SPL_SPI_FLASH_SUPPORT
309         imply SPL_SPI_LOAD
310         imply SPL_SPI
311         select SPL_BOOTROM_SUPPORT
312
313 config MVEBU_SPL_BOOT_DEVICE_MMC
314         bool "SDIO/MMC card"
315         imply ENV_IS_IN_MMC
316         # GPIO needed for eMMC/SD card presence detection
317         imply SPL_DM_GPIO
318         imply SPL_DM_MMC
319         imply SPL_GPIO
320         imply SPL_LIBDISK_SUPPORT
321         imply SPL_MMC
322         select SPL_BOOTROM_SUPPORT
323
324 config MVEBU_SPL_BOOT_DEVICE_SATA
325         bool "SATA"
326         imply SPL_SATA
327         imply SPL_LIBDISK_SUPPORT
328         select SPL_BOOTROM_SUPPORT
329
330 config MVEBU_SPL_BOOT_DEVICE_UART
331         bool "UART"
332         select SPL_BOOTROM_SUPPORT
333
334 endchoice
335
336 config MVEBU_EFUSE
337         bool "Enable eFuse support"
338         depends on HAVE_MVEBU_EFUSE
339         help
340           Enable support for reading and writing eFuses on mvebu SoCs.
341
342 config MVEBU_EFUSE_FAKE
343         bool "Fake eFuse access (dry run)"
344         depends on MVEBU_EFUSE
345         help
346           This enables a "dry run" mode where eFuses are not really programmed.
347           Instead the eFuse accesses are emulated by writing to and reading
348           from a memory block.
349           This is can be used for testing prog scripts.
350
351 config SECURED_MODE_IMAGE
352         bool "Build image for trusted boot"
353         default false
354         depends on 88F6820
355         help
356           Build an image that employs the ARMADA SoC's trusted boot framework
357           for securely booting images.
358
359 config SECURED_MODE_CSK_INDEX
360         int "Index of active CSK"
361         default 0
362         depends on SECURED_MODE_IMAGE
363
364 source "board/solidrun/clearfog/Kconfig"
365 source "board/kobol/helios4/Kconfig"
366
367 endif