lin
2025-01-10 9ec4e21f2f615ef95b70a249569906799e36bace
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
if ARCH_SUNXI
 
 
config IDENT_STRING
   default " Allwinner Technology"
 
 
config AXP_PMIC_BUS
   bool "Sunxi AXP PMIC bus access helpers"
   help
     Select this PMIC bus access helpers for Sunxi platform PRCM or other
     AXP family PMIC devices.
config SUN6I_PRCM
          bool
          help
            Support for the PRCM (Power/Reset/Clock Management) unit available
       in A31 SoC.
config SUN8I_RSB
   bool "Allwinner sunXi Reduced Serial Bus Driver"
   help
     Say y here to enable support for Allwinner's Reduced Serial Bus
     (RSB) support. This controller is responsible for communicating
     with various RSB based devices, such as AXP223, AXP8XX PMICs,
     and AC100/AC200 ICs.
config SUNXI_NCAT
          bool
          help
            Support for the sunxi new memory layout.
 
config SUNXI_VERSION1
          bool
          help
            Support for the sunxi version 1 memory layout.
 
config SUNXI_SECURE
          bool
          help
            Support for the sunxi security
 
config SUNXI_SECURE_BOOT
   bool "Sunxi secure boot support"
   select SUNXI_IMAGE_VERIFIER
   help
     Enable secure boot, uboot will verify image in a secure boot.
 
config SUNXI_PART_VERIFY
   bool "Sunxi partition verify support"
       depends on SUNXI_SECURE_BOOT
   help
     Enable this, uboot will verify rootfs when boot
 
config SUNXI_MEM_MAPPING_CHECK
          bool
          default n
          help
            Support for the sunxi memory mapping check
 
config SUNXI_COMPARE_IMAGE_AND_FLASH
   bool "compare image and flash size"
   help
    Support comparison of image and flash before burning,
    if image is larger than flash, will exit burning.
   default n
 
config SUNXI_BURN_ROTPK_ON_SPRITE
          bool "Sunxi burn rotpk on sprite"
              depends on SUNXI_CE_DRIVER
          help
            Burn rotpk before set secure bit to 1
 
config SUNXI_INITRD_ROUTINE
   bool "Sunxi ramdisk init routine"
   default y
   help
       use sunxi ramdisk init routine ,witch copy ramdisk to addr defined
       in boot.img head, instead of original one, whitch will copy ramdisk
       to dynamically malloced addr.
 
# Note only one of these may be selected at a time! But hidden choices are
# not supported by Kconfig
config SUNXI_GEN_SUN4I
   bool
   ---help---
   Select this for sunxi SoCs which have resets and clocks set up
   as the original A10 (mach-sun4i).
 
config SUNXI_GEN_SUN6I
   bool
   ---help---
   Select this for sunxi SoCs which have sun6i like periphery, like
   separate ahb reset control registers, custom pmic bus, new style
   watchdog, etc.
 
 
 
choice
   prompt "Sunxi SoC Variant"
   optional
 
 
config MACH_SUN50I
   bool "sun50i (Allwinner A64)"
   select ARM64
   select DM_I2C
   select SUNXI_DE2
   select SUNXI_GEN_SUN6I
   select SUNXI_HIGH_SRAM
   select SUPPORT_SPL
   select SUNXI_DRAM_DW
   select SUNXI_DRAM_DW_32BIT
   select FIT
   select SPL_LOAD_FIT
 
config MACH_SUN50IW3
   bool "sun50i(Allwinner sun50iw3)"
   select SUNXI_ARM64
   select CPU_V7
   select SUN8I_RSB
   select SUNXI_NCAT
   select SUNXI_SECURE
 
config MACH_SUN50IW9
   bool "sun50i(Allwinner sun50iw9)"
   select SUNXI_ARM64
   select CPU_V7
   select SUN8I_RSB
   select SUNXI_NCAT
   select SUNXI_SECURE
 
config MACH_SUN50IW10
   bool "sun50i(Allwinner sun50iw10)"
   select SUNXI_ARM64
   select CPU_V7
   select SUN8I_RSB
   select SUNXI_NCAT
   select SUNXI_SECURE
 
config MACH_SUN50IW11
   bool "sun50i(Allwinner sun50iw11)"
   select SUNXI_ARM64
   select CPU_V7
   select SUN8I_RSB
   select SUNXI_NCAT
   select SUNXI_SECURE
 
config MACH_SUN8IW7
 
   bool "sun8i(Allwinner sun8iw7)"
   select CPU_V7
   select SUNXI_VERSION1
   select SUNXI_SECURE
 
config MACH_SUN8IW15
   bool "sun8i(Allwinner sun8iw15)"
   select CPU_V7
   select SUN8I_RSB
   select SUNXI_NCAT
   select SUNXI_SECURE
 
config MACH_SUN8IW16
   bool "sun8iw16(Allwinner sun8w16)"
   select CPU_V7
   select SUNXI_NCAT
 
config MACH_SUN8IW18
   bool "sun8i(Allwinner sun8iw18)"
   select CPU_V7
   select SUN8I_RSB
   select SUNXI_NCAT
   select SUNXI_SECURE
 
config MACH_SUN8IW19
   bool "sun8iw19(Allwinner sun8w19)"
   select CPU_V7
   select SUNXI_NCAT
 
endchoice
 
# The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33"
config MACH_SUN8I
   bool
   select SUN8I_RSB
   select SUN6I_PRCM
   default y if MACH_SUN8I_V3S
 
config RESERVE_ALLWINNER_BOOT0_HEADER
   bool "reserve space for Allwinner boot0 header"
   select ENABLE_ARM_SOC_BOOT0_HOOK
   ---help---
   Prepend a 1536 byte (empty) header to the U-Boot image file, to be
   filled with magic values post build. The Allwinner provided boot0
   blob relies on this information to load and execute U-Boot.
   Only needed on 64-bit Allwinner boards so far when using boot0.
config DRAM_PARA_ADDR
   hex
   ---help---
   show the dram init para for sprite.
config SUNXI_FDT_ADDR
   hex "device tree address for kernel"
   default 44000000
   ---help---
   set the address for start_kernel.
 
config SUNXI_FDT_SAVE
   bool "SUNXI FDT SVAE"
   default n
   depends on CMD_FDT
   help
     This is the SUNXI FDT SAVE
 
config SUNXI_DTB_RESERVE_SIZE
   hex "sunxi dtb reserve default size to 1M"
   default 0x100000
   depends on SUNXI_FDT_SAVE
   help
     set sunxi dtb reserve default size
 
config SUNXI_TURNNING_FLASH
   bool "SUNXI TURNNING FLASH SVAE"
   default y
   help
     This is the SUNXI TURNNING FLASH
 
config SUNXI_TURNNING_DRAM
   bool "SUNXI TURNNING DRAM SVAE"
   default y
   help
     This is the SUNXI TURNNING DRAM
 
config SUNXI_OTA_TURNNING
   bool "SUNXI OTA TURNNING SVAE"
   depends on (SUNXI_TURNNING_FLASH && SUNXI_TURNNING_DRAM)
   default n
   help
     This is the SUNXI OTA TURNNING SAVE
 
config SUNXI_DEBUG
   bool "the gating for uboot debug"
   default false
config SUNXI_NOR_IMG
   bool "crate u-boot-nor.bin"
   default false
 
config SYS_CLK_FREQ
   default 1008000000 if MACH_SUN50IW3
   default 1008000000 if MACH_SUN50IW9
   default 1008000000 if MACH_SUN50IW10
   default 1008000000 if MACH_SUN50IW11
   default 1008000000 if MACH_SUN8IW15
   default 1008000000 if MACH_SUN8IW16
   default 1008000000 if MACH_SUN8IW18
   default 1008000000 if MACH_SUN8IW19
   default 1008000000
 
config SYS_CONFIG_NAME
   default "sun50iw3p1" if  MACH_SUN50IW3
   default "sun50iw9p1" if  MACH_SUN50IW9
   default "sun50iw10p1" if  MACH_SUN50IW10
   default "sun50iw11p1" if  MACH_SUN50IW11
   default "sun8iw15p1" if  MACH_SUN8IW15
   default "sun8iw16p1" if  MACH_SUN8IW16
   default "sun8iw18p1" if MACH_SUN8IW18
   default "sun8iw19p1" if MACH_SUN8IW19
   default "sun8iw7p1" if MACH_SUN8IW7
 
config SUNXI_ARM64
   bool "set SUNXI ARM64"
   default y if MACH_SUN50IW3 || MACH_SUN50IW9 || MACH_SUN50IW10 || MACH_SUN50IW11
   ---help---
   set SUNXI_ARM64 when SUN50I
 
config SYS_BOARD
   default "sunxi"
 
config SYS_SOC
   default "sunxi"
 
config OLD_SUNXI_KERNEL_COMPAT
   bool "Enable workarounds for booting old kernels"
   default n
   ---help---
   Set this to enable various workarounds for old kernels, this results in
   sub-optimal settings for newer kernels, only enable if needed.
 
config MACPWR
   string "MAC power pin"
   default ""
   help
     Set the pin used to power the MAC. This takes a string in the format
     understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
 
config I2C0_ENABLE
   bool "Enable I2C/TWI controller 0"
   default n
   select CMD_I2C
   ---help---
   This allows enabling I2C/TWI controller 0 by muxing its pins, enabling
   its clock and setting up the bus. This is especially useful on devices
   with slaves connected to the bus or with pins exposed through e.g. an
   expansion port/header.
 
config I2C1_ENABLE
   bool "Enable I2C/TWI controller 1"
   default n
   select CMD_I2C
   ---help---
   See I2C1_ENABLE help text.
 
config I2C2_ENABLE
   bool "Enable I2C/TWI controller 2"
   default n
   select CMD_I2C
   ---help---
   See I2C2_ENABLE help text.
 
config I2C3_ENABLE
   bool "Enable I2C/TWI controller 3"
   default n
   select CMD_I2C
   ---help---
   See I2C3_ENABLE help text.
config I2C4_ENABLE
   bool "Enable I2C/TWI controller 4"
   default n
   select CMD_I2C
   ---help---
   See I2C4_ENABLE help text.
config I2C5_ENABLE
   bool "Enable I2C/TWI controller 5"
   default n
   select CMD_I2C
   ---help---
   See I2C5_ENABLE help text.
config R_I2C0_ENABLE
   bool "Enable R_I2C/R_TWI controller 0"
   default n
   select CMD_I2C
   ---help---
   See R_I2C0_ENABLE help text.
config R_I2C1_ENABLE
   bool "Enable R_I2C/R_TWI controller 1"
   default n
   select CMD_I2C
   ---help---
   See R_I2C1_ENABLE help text.
 
 
config AXP_GPIO
   bool "Enable support for gpio-s on axp PMICs"
   default n
   ---help---
   Say Y here to enable support for the gpio pins of the axp PMIC ICs.
 
 
config SATAPWR
   string "SATA power pin"
   default ""
   help
     Set the pins used to power the SATA. This takes a string in the
     format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of
     port H.
 
config GMAC_TX_DELAY
   int "GMAC Transmit Clock Delay Chain"
   default 0
   ---help---
   Set the GMAC Transmit Clock Delay Chain value.
 
config INITIAL_USB_SCAN_DELAY
   int "delay initial usb scan by x ms to allow builtin devices to init"
   default 0
   ---help---
   Some boards have on board usb devices which need longer than the
   USB spec's 1 second to connect from board powerup. Set this config
   option to a non 0 value to add an extra delay before the first usb
   bus scan.
 
config USB0_VBUS_PIN
   string "Vbus enable pin for usb0 (otg)"
   default ""
   ---help---
   Set the Vbus enable pin for usb0 (otg). This takes a string in the
   format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
 
config USB1_VBUS_PIN
   string "Vbus enable pin for usb1 (ehci0)"
   default ""
   ---help---
   Set the Vbus enable pin for usb1 (ehci0, usb0 is the otg). This takes
   a string in the format understood by sunxi_name_to_gpio, e.g.
   PH1 for pin 1 of port H.
 
config USB2_VBUS_PIN
   string "Vbus enable pin for usb2 (ehci1)"
   default ""
   ---help---
   See USB1_VBUS_PIN help text.
 
config USB3_VBUS_PIN
   string "Vbus enable pin for usb3 (ehci2)"
   default ""
   ---help---
   See USB1_VBUS_PIN help text.
endif