Commit 0b3ce83d7b73b600ce4abb5168543aa2d983dd94

Authored by Philipp Tomsich
Committed by Simon Glass
1 parent 3c2bbd5886

defconfig: puma-rk3399: add defconfig for the RK3399-Q7 (Puma)

This commit adds the baseline defconfig for the RK3399-Q7 (Puma) SoM
(under the name 'puma-rk3399_defconfig') featuring the Rockchip RK3399
in a Qseven compatible module.

This subsumes the following changes:
 * defconfig: rk3399: migrate CONFIG_SPL_LIBCOMMON_SUPPORT/CONFIG_SPL_LIBGENERIC_SUPPORT
 * defconfig: rk3399-puma: add CONFIG_MMC_DW_ROCKCHIP
 * defconfig: rk3399-puma: disable CONFIG_SPL_OF_PLATDATA
 * defconfig: rk3399-puma: don't USE_TINY_PRINTF
 * defconfig: rk3399-puma: set up CONFIG_SYS_BOARD for the RK3399-Q7
 * defconfig: rk3399-puma: enable the multi-image loading via CONFIG_SPL_FIT
 * defconfig: rk3399-puma: SPL should be able to boot from MMC/SD card
 * defconfig: rk3399-puma: enable GMAC support
 * defconfig: rk3399-puma: enable support for SPI and Winbond SPI flash
 * defconfig: rk3399-puma: enable SPI as a boot-source in SPL
 * defconfig: rk3399-puma: disallow non-FIT images from being loaded
 * defconfig: rk3399-puma: rename to puma-rk3399
 * rockchip: config: rk3399: update defconfigs and rk3399_common

For the RK3399-Q7, we want a default boot-order of SPI -> MMC -> uSD.
This both follows how the BootROM probes devices and is a sane default
for customers in device-personalisation (e.g. it allows for quick and
easy factory programming of unpersonalised devices using an SD card)
and field usage (with customer devices expected to have their firmware
either in SPI or MMC).

However, when probing multiple interfaces (according to the result
from the board_boot_order function), we need to ensure that only valid
FIT images are considered and disable the fallback to assuming that a
raw (binary-only) U-Boot image is loaded (to avoid hangs/crashes from
jumping to random content loaded from devices that are probed, but
don't contain valid image content).

By disabling the SPL_RAW_IMAGE_SUPPORT and SPL_LEGACY_IMAGE_SUPPORT
options, we ensure that raw images (indistinguishable from random
data) are not considered for booting.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Simon Glass <sjg@chromium.org>
Drop CONFIG_DEBUG_UART_BOARD_INIT:
Signed-off-by: Simon Glass <sjg@chromium.org>

Showing 3 changed files with 74 additions and 2 deletions Side-by-side Diff

configs/evb-rk3399_defconfig
... ... @@ -12,6 +12,8 @@
12 12 CONFIG_SPL_STACK_R=y
13 13 CONFIG_SPL_STACK_R_ADDR=0x80000
14 14 CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000
  15 +CONFIG_SPL_LIBCOMMON_SUPPORT=y
  16 +CONFIG_SPL_LIBGENERIC_SUPPORT=y
15 17 CONFIG_SYS_MALLOC_F_LEN=0x4000
16 18 CONFIG_CMD_BOOTZ=y
17 19 # CONFIG_CMD_IMLS is not set
configs/puma-rk3399_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_ARCH_ROCKCHIP=y
  3 +CONFIG_SPL_LIBCOMMON_SUPPORT=y
  4 +CONFIG_SPL_LIBGENERIC_SUPPORT=y
  5 +CONFIG_SYS_MALLOC_F_LEN=0x4000
  6 +CONFIG_ROCKCHIP_RK3399=y
  7 +CONFIG_SPL_SPI_FLASH_SUPPORT=y
  8 +CONFIG_SPL_SPI_SUPPORT=y
  9 +CONFIG_SPL_STACK_R_ADDR=0x80000
  10 +CONFIG_DEFAULT_DEVICE_TREE="rk3399-puma"
  11 +CONFIG_FIT=y
  12 +CONFIG_SPL_FIT=y
  13 +CONFIG_SPL_LOAD_FIT=y
  14 +CONFIG_SPL_FIT_SOURCE="board/rockchip/evb_rk3399/fit_spl_atf.its"
  15 +# CONFIG_DISPLAY_CPUINFO is not set
  16 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
  17 +# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set
  18 +CONFIG_SPL_STACK_R=y
  19 +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000
  20 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
  21 +CONFIG_CMD_BOOTZ=y
  22 +# CONFIG_CMD_IMLS is not set
  23 +CONFIG_CMD_GPT=y
  24 +CONFIG_CMD_MMC=y
  25 +CONFIG_CMD_SF=y
  26 +CONFIG_CMD_SPI=y
  27 +CONFIG_CMD_USB=y
  28 +# CONFIG_CMD_SETEXPR is not set
  29 +CONFIG_CMD_TIME=y
  30 +CONFIG_SPL_OF_CONTROL=y
  31 +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  32 +CONFIG_REGMAP=y
  33 +CONFIG_SPL_REGMAP=y
  34 +CONFIG_SYSCON=y
  35 +CONFIG_SPL_SYSCON=y
  36 +CONFIG_CLK=y
  37 +CONFIG_SPL_CLK=y
  38 +CONFIG_ROCKCHIP_GPIO=y
  39 +CONFIG_MMC_DW=y
  40 +CONFIG_MMC_DW_ROCKCHIP=y
  41 +CONFIG_MMC_SDHCI=y
  42 +CONFIG_MMC_SDHCI_ROCKCHIP=y
  43 +CONFIG_SPI_FLASH=y
  44 +CONFIG_SPI_FLASH_WINBOND=y
  45 +CONFIG_PHY_MICREL=y
  46 +CONFIG_PHY_MICREL_KSZ9031=y
  47 +CONFIG_DM_ETH=y
  48 +CONFIG_ETH_DESIGNWARE=y
  49 +CONFIG_GMAC_ROCKCHIP=y
  50 +CONFIG_PINCTRL=y
  51 +CONFIG_SPL_PINCTRL=y
  52 +CONFIG_ROCKCHIP_RK3399_PINCTRL=y
  53 +CONFIG_REGULATOR_PWM=y
  54 +CONFIG_DM_REGULATOR_FIXED=y
  55 +CONFIG_PWM_ROCKCHIP=y
  56 +CONFIG_RAM=y
  57 +CONFIG_SPL_RAM=y
  58 +CONFIG_BAUDRATE=115200
  59 +CONFIG_DEBUG_UART=y
  60 +CONFIG_DEBUG_UART_BASE=0xFF180000
  61 +CONFIG_DEBUG_UART_CLOCK=24000000
  62 +CONFIG_DEBUG_UART_SHIFT=2
  63 +CONFIG_SYS_NS16550=y
  64 +CONFIG_ROCKCHIP_SPI=y
  65 +CONFIG_SYSRESET=y
  66 +CONFIG_USB=y
  67 +CONFIG_USB_XHCI_HCD=y
  68 +CONFIG_USB_XHCI_DWC3=y
  69 +CONFIG_USB_EHCI_HCD=y
  70 +CONFIG_USB_EHCI_GENERIC=y
  71 +CONFIG_USB_STORAGE=y
  72 +CONFIG_ERRNO_STR=y
include/configs/rk3399_common.h
... ... @@ -17,8 +17,6 @@
17 17 #define CONFIG_SKIP_LOWLEVEL_INIT
18 18 #define CONFIG_SPL_FRAMEWORK
19 19 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
20   -#define CONFIG_SPL_LIBCOMMON_SUPPORT
21   -#define CONFIG_SPL_LIBGENERIC_SUPPORT
22 20 #define CONFIG_SPL_SERIAL_SUPPORT
23 21  
24 22 #define COUNTER_FREQUENCY 24000000