4 bool "Support Rockchip PX30"
10 select TPL_TINY_FRAMEWORK if TPL
11 select TPL_NEEDS_SEPARATE_STACK if TPL
12 imply SPL_SEPARATE_BSS
15 select DEBUG_UART_BOARD_INIT
16 imply ROCKCHIP_COMMON_BOARD
17 imply SPL_ROCKCHIP_COMMON_BOARD
19 The Rockchip PX30 is a ARM-based SoC with a quad-core Cortex-A35
20 including NEON and GPU, Mali-400 graphics, several DDR3 options
21 and video codec support. Peripherals include Gigabit Ethernet,
22 USB2 host and OTG, SDIO, I2S, UART, SPI, I2C and PWMs.
24 config ROCKCHIP_RK3036
25 bool "Support Rockchip RK3036"
29 imply USB_FUNCTION_ROCKUSB
31 imply ROCKCHIP_COMMON_BOARD
33 The Rockchip RK3036 is a ARM-based SoC with a dual-core Cortex-A7
34 including NEON and GPU, Mali-400 graphics, several DDR3 options
35 and video codec support. Peripherals include Gigabit Ethernet,
36 USB2 host and OTG, SDIO, I2S, UART, SPI, I2C and PWMs.
38 config ROCKCHIP_RK3066
39 bool "Support Rockchip RK3066"
41 select SPL_BOARD_INIT if SPL
46 select TPL_ROCKCHIP_BACK_TO_BROM
47 select TPL_ROCKCHIP_EARLYRETURN_TO_BROM
48 imply ROCKCHIP_COMMON_BOARD
49 imply SPL_ROCKCHIP_COMMON_BOARD
51 imply TPL_ROCKCHIP_COMMON_BOARD
54 The Rockchip RK3066 is a ARM-based SoC with a dual-core Cortex-A9
55 including NEON and GPU, 512KB L2 cache, Mali-400 graphics, two
56 video interfaces, several memory options and video codec support.
57 Peripherals include Fast Ethernet, USB2 host and OTG, SDIO, I2S,
58 UART, SPI, I2C and PWMs.
60 config ROCKCHIP_RK3128
61 bool "Support Rockchip RK3128"
63 imply ROCKCHIP_COMMON_BOARD
65 The Rockchip RK3128 is a ARM-based SoC with a quad-core Cortex-A7
66 including NEON and GPU, Mali-400 graphics, several DDR3 options
67 and video codec support. Peripherals include Gigabit Ethernet,
68 USB2 host and OTG, SDIO, I2S, UART, SPI, I2C and PWMs.
70 config ROCKCHIP_RK3188
71 bool "Support Rockchip RK3188"
73 select SPL_BOARD_INIT if SPL
80 select SPL_DRIVERS_MISC
81 select SPL_ROCKCHIP_EARLYRETURN_TO_BROM
82 select SPL_ROCKCHIP_BACK_TO_BROM
83 select BOARD_LATE_INIT
84 imply ROCKCHIP_COMMON_BOARD
85 imply SPL_ROCKCHIP_COMMON_BOARD
87 The Rockchip RK3188 is a ARM-based SoC with a quad-core Cortex-A9
88 including NEON and GPU, 512KB L2 cache, Mali-400 graphics, two
89 video interfaces, several memory options and video codec support.
90 Peripherals include Fast Ethernet, USB2 host and OTG, SDIO, I2S,
91 UART, SPI, I2C and PWMs.
93 config ROCKCHIP_RK322X
94 bool "Support Rockchip RK3228/RK3229"
104 select TPL_NEEDS_SEPARATE_STACK if TPL
105 select SPL_DRIVERS_MISC
106 imply ROCKCHIP_COMMON_BOARD
108 imply SPL_ROCKCHIP_COMMON_BOARD
109 select SPL_OPTEE_IMAGE if SPL_FIT
111 imply TPL_ROCKCHIP_COMMON_BOARD
112 select TPL_LIBCOMMON_SUPPORT
113 select TPL_LIBGENERIC_SUPPORT
115 The Rockchip RK3229 is a ARM-based SoC with a dual-core Cortex-A7
116 including NEON and GPU, Mali-400 graphics, several DDR3 options
117 and video codec support. Peripherals include Gigabit Ethernet,
118 USB2 host and OTG, SDIO, I2S, UART, SPI, I2C and PWMs.
120 config ROCKCHIP_RK3288
121 bool "Support Rockchip RK3288"
123 select OF_SYSTEM_SETUP
124 select SKIP_LOWLEVEL_INIT_ONLY
129 imply PRE_CONSOLE_BUFFER
130 imply ROCKCHIP_COMMON_BOARD
131 imply SPL_ROCKCHIP_COMMON_BOARD
134 imply TPL_DRIVERS_MISC
135 imply TPL_LIBCOMMON_SUPPORT
136 imply TPL_LIBGENERIC_SUPPORT
137 imply TPL_NEEDS_SEPARATE_STACK
139 imply TPL_OF_PLATDATA
142 imply TPL_ROCKCHIP_COMMON_BOARD
145 imply USB_FUNCTION_ROCKUSB
148 The Rockchip RK3288 is a ARM-based SoC with a quad-core Cortex-A17
149 including NEON and GPU, 1MB L2 cache, Mali-T7 graphics, two
150 video interfaces supporting HDMI and eDP, several DDR3 options
151 and video codec support. Peripherals include Gigabit Ethernet,
152 USB2 host and OTG, SDIO, I2S, UARTs, SPI, I2C and PWMs.
154 config ROCKCHIP_RK3308
155 bool "Support Rockchip RK3308"
161 select SPL_ATF_NO_PLATFORM_PARAM
164 imply ARMV8_SET_SMPEN
166 imply LEGACY_IMAGE_FORMAT
170 imply ROCKCHIP_COMMON_BOARD
173 imply SPL_DM_SEQ_ALIAS
174 imply SPL_FIT_SIGNATURE
178 imply SPL_ROCKCHIP_COMMON_BOARD
179 imply SPL_SEPARATE_BSS
183 The Rockchip RK3308 is a ARM-based Soc which embedded with quad
184 Cortex-A35 and highly integrated audio interfaces.
186 config ROCKCHIP_RK3328
187 bool "Support Rockchip RK3328"
193 select TPL_NEEDS_SEPARATE_STACK if TPL
195 imply ARMV8_SET_SMPEN
199 imply PRE_CONSOLE_BUFFER
200 imply ROCKCHIP_COMMON_BOARD
202 imply ROCKCHIP_SDRAM_COMMON
203 imply SPL_ROCKCHIP_COMMON_BOARD
204 imply SPL_SEPARATE_BSS
208 The Rockchip RK3328 is a ARM-based SoC with a quad-core Cortex-A53.
209 including NEON and GPU, 1MB L2 cache, Mali-T7 graphics, two
210 video interfaces supporting HDMI and eDP, several DDR3 options
211 and video codec support. Peripherals include Gigabit Ethernet,
212 USB2 host and OTG, SDIO, I2S, UARTs, SPI, I2C and PWMs.
214 config ROCKCHIP_RK3368
215 bool "Support Rockchip RK3368"
219 select TPL_NEEDS_SEPARATE_STACK if TPL
220 imply ROCKCHIP_COMMON_BOARD
221 imply SPL_ROCKCHIP_COMMON_BOARD
222 imply SPL_SEPARATE_BSS
225 imply TPL_ROCKCHIP_COMMON_BOARD
227 The Rockchip RK3368 is a ARM-based SoC with a octa-core (organised
228 into a big and little cluster with 4 cores each) Cortex-A53 including
229 AdvSIMD, 512KB L2 cache (for the big cluster) and 256 KB L2 cache
230 (for the little cluster), PowerVR G6110 based graphics, one video
231 output processor supporting LVDS/HDMI/eDP, several DDR3 options and
234 On-chip peripherals include Gigabit Ethernet, USB2 host and OTG, SDIO,
235 I2S, UARTs, SPI, I2C and PWMs.
237 config ROCKCHIP_RK3399
238 bool "Support Rockchip RK3399"
244 select SPL_BOARD_INIT if SPL
246 select SPL_CLK if SPL
247 select SPL_PINCTRL if SPL
248 select SPL_RAM if SPL
249 select SPL_REGMAP if SPL
250 select SPL_SYSCON if SPL
251 select TPL_NEEDS_SEPARATE_STACK if TPL
252 select SPL_SEPARATE_BSS
254 select SPL_DRIVERS_MISC
262 select DM_REGULATOR_FIXED
263 select BOARD_LATE_INIT
265 imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
268 imply PARTITION_TYPE_GUID
269 imply PRE_CONSOLE_BUFFER
270 imply ROCKCHIP_COMMON_BOARD
272 imply ROCKCHIP_SDRAM_COMMON
273 imply SPL_ROCKCHIP_COMMON_BOARD
274 imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
277 imply TPL_DRIVERS_MISC
278 imply TPL_LIBCOMMON_SUPPORT
279 imply TPL_LIBGENERIC_SUPPORT
283 imply TPL_ROCKCHIP_COMMON_BOARD
285 imply TPL_SYS_MALLOC_SIMPLE
287 imply TPL_TINY_MEMSET
289 The Rockchip RK3399 is a ARM-based SoC with a dual-core Cortex-A72
290 and quad-core Cortex-A53.
291 including NEON and GPU, 1MB L2 cache, Mali-T7 graphics, two
292 video interfaces supporting HDMI and eDP, several DDR3 options
293 and video codec support. Peripherals include Gigabit Ethernet,
294 USB2 host and OTG, SDIO, I2S, UARTs, SPI, I2C and PWMs.
296 config ROCKCHIP_RK3568
297 bool "Support Rockchip RK3568"
306 select BOARD_LATE_INIT
307 select DM_REGULATOR_FIXED
312 imply MMC_HS200_SUPPORT if MMC_SDHCI_ROCKCHIP
313 imply OF_LIBFDT_OVERLAY
314 imply PHY_GIGE if DWC_ETH_QOS_ROCKCHIP
316 imply ROCKCHIP_COMMON_BOARD
318 imply SPL_ATF_NO_PLATFORM_PARAM if SPL_ATF
319 imply SPL_MMC_HS200_SUPPORT if SPL_MMC && MMC_HS200_SUPPORT
321 The Rockchip RK3568 is a ARM-based SoC with quad-core Cortex-A55,
322 including NEON and GPU, 512K L3 cache, Mali-G52 based graphics,
323 two video interfaces supporting HDMI and eDP, several DDR3 options
324 and video codec support. Peripherals include Gigabit Ethernet,
325 USB2 host and OTG, SDIO, I2S, UARTs, SPI, I2C and PWMs.
327 config ROCKCHIP_RK3588
328 bool "Support Rockchip RK3588"
337 select BOARD_LATE_INIT
338 select DM_REGULATOR_FIXED
344 imply MMC_HS200_SUPPORT if MMC_SDHCI_ROCKCHIP
345 imply OF_LIBFDT_OVERLAY
346 imply PHY_GIGE if DWC_ETH_QOS_ROCKCHIP
348 imply ROCKCHIP_COMMON_BOARD
351 imply SPL_ATF_NO_PLATFORM_PARAM if SPL_ATF
352 imply SPL_MMC_HS200_SUPPORT if SPL_MMC && MMC_HS200_SUPPORT
354 The Rockchip RK3588 is a ARM-based SoC with quad-core Cortex-A76 and
355 quad-core Cortex-A55 including NEON and GPU, 6TOPS NPU, Mali-G610 MP4,
356 HDMI Out, HDMI In, DP, eDP, MIPI DSI, MIPI CSI2, LPDDR4/4X/5, eMMC5.1,
357 SD3.0/MMC4.5, USB OTG 3.0, Type-C, USB 2.0, PCIe 3.0, SATA 3, Ethernet,
358 SDIO3.0 I2C, UART, SPI, GPIO and PWM.
360 config ROCKCHIP_RV1108
361 bool "Support Rockchip RV1108"
363 imply ROCKCHIP_COMMON_BOARD
365 The Rockchip RV1108 is a ARM-based SoC with a single-core Cortex-A7
368 config ROCKCHIP_RV1126
369 bool "Support Rockchip RV1126"
371 select SKIP_LOWLEVEL_INIT_ONLY
374 select TPL_NEEDS_SEPARATE_STACK
375 select TPL_ROCKCHIP_BACK_TO_BROM
383 select ROCKCHIP_SDRAM_COMMON
387 select DM_REGULATOR_FIXED
389 select REGULATOR_RK8XX
391 select BOARD_LATE_INIT
392 imply ROCKCHIP_COMMON_BOARD
393 select SPL_OPTEE_IMAGE if SPL_FIT
394 imply OF_LIBFDT_OVERLAY
398 imply TPL_LIBCOMMON_SUPPORT
399 imply TPL_LIBGENERIC_SUPPORT
401 imply TPL_OF_PLATDATA
403 imply TPL_ROCKCHIP_COMMON_BOARD
407 imply SPL_DRIVERS_MISC
408 imply SPL_LIBCOMMON_SUPPORT
409 imply SPL_LIBGENERIC_SUPPORT
413 imply SPL_ROCKCHIP_COMMON_BOARD
417 config ROCKCHIP_USB_UART
418 bool "Route uart output to usb pins"
420 Rockchip SoCs have the ability to route the signals of the debug
421 uart through the d+ and d- pins of a specific usb phy to enable
422 some form of closed-case debugging. With this option supported
423 SoCs will enable this routing as a debug measure.
425 config SPL_ROCKCHIP_BACK_TO_BROM
426 bool "SPL returns to bootrom"
427 default y if ROCKCHIP_RK3036
428 select ROCKCHIP_BROM_HELPER
429 select SPL_BOOTROM_SUPPORT
432 Rockchip SoCs have ability to load SPL & U-Boot binary. If enabled,
433 SPL will return to the boot rom, which will then load the U-Boot
434 binary to keep going on.
436 config TPL_ROCKCHIP_BACK_TO_BROM
437 bool "TPL returns to bootrom"
439 select ROCKCHIP_BROM_HELPER if !ROCKCHIP_RK3066
440 select TPL_BOOTROM_SUPPORT
443 Rockchip SoCs have ability to load SPL & U-Boot binary. If enabled,
444 SPL will return to the boot rom, which will then load the U-Boot
445 binary to keep going on.
447 config ROCKCHIP_COMMON_BOARD
448 bool "Rockchip common board file"
450 Rockchip SoCs have similar boot process, Common board file is mainly
451 in charge of common process of board_init() and board_late_init() for
454 config SPL_ROCKCHIP_COMMON_BOARD
455 bool "Rockchip SPL common board file"
458 Rockchip SoCs have similar boot process, SPL is mainly in charge of
459 load and boot Trust ATF/U-Boot firmware, and DRAM init if there is
460 no TPL for the board.
462 config TPL_ROCKCHIP_COMMON_BOARD
463 bool "Rockchip TPL common board file"
466 Rockchip SoCs have similar boot process, prefer to use TPL for DRAM
467 init and back to bootrom, and SPL as Trust ATF/U-Boot loader. TPL
468 common board is a basic TPL board init which can be shared for most
469 of SoCs to avoid copy-paste for different SoCs.
471 config ROCKCHIP_EXTERNAL_TPL
472 bool "Use external TPL binary"
473 default y if ROCKCHIP_RK3308 || ROCKCHIP_RK3568 || ROCKCHIP_RK3588
475 Some Rockchip SoCs require an external TPL to initialize DRAM.
476 Enable this option and build with ROCKCHIP_TPL=/path/to/ddr.bin to
477 include the external TPL in the image built by binman.
479 config ROCKCHIP_BOOT_MODE_REG
480 hex "Rockchip boot mode flag register address"
482 The Soc will enter to different boot mode(defined in asm/arch-rockchip/boot_mode.h)
483 according to the value from this register.
485 config ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON
486 bool "Disable device boot on power plug-in"
487 depends on PMIC_RK8XX
489 Say Y here to prevent the device from booting up because of a plug-in
490 event. When set, the device will boot briefly to determine why it was
491 powered on, and if it was determined because of a plug-in event
492 instead of a button press event it will shut back off.
494 config ROCKCHIP_STIMER
495 bool "Rockchip STIMER support"
498 Enable Rockchip STIMER support.
500 config ROCKCHIP_STIMER_BASE
502 depends on ROCKCHIP_STIMER
504 config ROCKCHIP_SPL_RESERVE_IRAM
505 hex "Size of IRAM reserved in SPL"
508 SPL may need reserve memory for firmware loaded by SPL, whose load
509 address is in IRAM and may overlay with SPL text area if not
512 config ROCKCHIP_BROM_HELPER
515 config SPL_ROCKCHIP_EARLYRETURN_TO_BROM
516 bool "SPL requires early-return (for RK3188-style BROM) to BROM"
517 depends on SPL && ENABLE_ARM_SOC_BOOT0_HOOK
519 Some Rockchip BROM variants (e.g. on the RK3188) load the
520 first stage in segments and enter multiple times. E.g. on
521 the RK3188, the first 1KB of the first stage are loaded
522 first and entered; after returning to the BROM, the
523 remainder of the first stage is loaded, but the BROM
524 re-enters at the same address/to the same code as previously.
526 This enables support code in the BOOT0 hook for the SPL stage
527 to allow multiple entries.
529 config ROCKCHIP_DISABLE_FORCE_JTAG
530 bool "Disable force_jtag feature"
534 Rockchip SoCs can automatically switch between jtag and sdmmc based
535 on the following rules:
536 - all the SDMMC pins including SDMMC_DET set as SDMMC function in
538 - force_jtag bit in GRF is 1,
539 - SDMMC_DET is low (no card detected),
541 Some HW design may not route the SD card card detect to SDMMC_DET
542 pin, thus breaking the SD card support in some cases because JTAG
543 would be auto-enabled by mistake.
545 Also, enabling JTAG at runtime may be an undesired feature, e.g.
546 because it could be a security vulnerability.
548 This disables force_jtag feature, which you may want for debugging
553 config TPL_ROCKCHIP_EARLYRETURN_TO_BROM
554 bool "TPL requires early-return (for RK3188-style BROM) to BROM"
555 depends on TPL && ENABLE_ARM_SOC_BOOT0_HOOK
557 Some Rockchip BROM variants (e.g. on the RK3188) load the
558 first stage in segments and enter multiple times. E.g. on
559 the RK3188, the first 1KB of the first stage are loaded
560 first and entered; after returning to the BROM, the
561 remainder of the first stage is loaded, but the BROM
562 re-enters at the same address/to the same code as previously.
564 This enables support code in the BOOT0 hook for the TPL stage
565 to allow multiple entries.
568 default y if !SPL_ROCKCHIP_BACK_TO_BROM
570 config ROCKCHIP_SPI_IMAGE
571 bool "Build a SPI image for rockchip"
573 Some Rockchip SoCs support booting from SPI flash. Enable this
574 option to produce a SPI-flash image containing U-Boot. The image
575 is built by binman. U-Boot sits near the start of the image.
577 config LNX_KRNL_IMG_TEXT_OFFSET_BASE
580 config ROCKCHIP_COMMON_STACK_ADDR
582 depends on SPL_SHARES_INIT_SP_ADDR
583 select HAS_CUSTOM_SYS_INIT_SP_ADDR
584 imply SPL_LIBCOMMON_SUPPORT if SPL
585 imply SPL_LIBGENERIC_SUPPORT if SPL
586 imply SPL_ROCKCHIP_COMMON_BOARD if SPL
587 imply SPL_SYS_MALLOC_F if SPL
588 imply SPL_SYS_MALLOC_SIMPLE if SPL
589 imply TPL_LIBCOMMON_SUPPORT if TPL
590 imply TPL_LIBGENERIC_SUPPORT if TPL
591 imply TPL_ROCKCHIP_COMMON_BOARD if TPL
592 imply TPL_SYS_MALLOC_F if TPL
593 imply TPL_SYS_MALLOC_SIMPLE if TPL
596 default 10 if ROCKCHIP_EXTERNAL_TPL
598 source "arch/arm/mach-rockchip/px30/Kconfig"
599 source "arch/arm/mach-rockchip/rk3036/Kconfig"
600 source "arch/arm/mach-rockchip/rk3066/Kconfig"
601 source "arch/arm/mach-rockchip/rk3128/Kconfig"
602 source "arch/arm/mach-rockchip/rk3188/Kconfig"
603 source "arch/arm/mach-rockchip/rk322x/Kconfig"
604 source "arch/arm/mach-rockchip/rk3288/Kconfig"
605 source "arch/arm/mach-rockchip/rk3308/Kconfig"
606 source "arch/arm/mach-rockchip/rk3328/Kconfig"
607 source "arch/arm/mach-rockchip/rk3368/Kconfig"
608 source "arch/arm/mach-rockchip/rk3399/Kconfig"
609 source "arch/arm/mach-rockchip/rk3568/Kconfig"
610 source "arch/arm/mach-rockchip/rk3588/Kconfig"
611 source "arch/arm/mach-rockchip/rv1108/Kconfig"
612 source "arch/arm/mach-rockchip/rv1126/Kconfig"
614 if ROCKCHIP_COMMON_STACK_ADDR && SPL_SHARES_INIT_SP_ADDR
616 config CUSTOM_SYS_INIT_SP_ADDR
619 config SYS_MALLOC_F_LEN
620 default 0x10000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
622 config SPL_SYS_MALLOC_F_LEN
623 default 0x8000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
625 config TPL_SYS_MALLOC_F_LEN
626 default 0x4000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
629 default 0x00200000 if ARM64
634 config SPL_HAS_BSS_LINKER_SECTION
637 config SPL_BSS_START_ADDR
640 config SPL_BSS_MAX_SIZE
641 default 0x8000 if SPL_BSS_START_ADDR = 0x3f80000
644 default y if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
646 config SPL_STACK_R_ADDR
647 default 0x3e00000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
649 config SPL_STACK_R_MALLOC_SIMPLE_LEN
650 default 0x200000 if SPL_STACK_R_ADDR = 0x3e00000