summaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-07-29 21:16:08 -0400
committerTom Rini <trini@konsulko.com>2020-07-29 21:16:08 -0400
commit719f42190d5f0238cb01ef2ffba8af2285f7bc7a (patch)
treec789716a82ab552e0d0c1a9242fda7c41b04c238 /arch/arm/mach-rockchip
parent7cb2060b4e63a89c50739dc8a9fcd5d73f86f0be (diff)
parentb9390ce51cb46f4b4acda320e7ea8e0bd120e4b8 (diff)
Merge tag 'dm-pull-28jul20' of git://git.denx.de/u-boot-dm
Use binman instead of one of the Rockchip build scripts Refactor to allow any arch to create SPI-flash images New button uclass
Diffstat (limited to 'arch/arm/mach-rockchip')
-rw-r--r--arch/arm/mach-rockchip/Kconfig9
-rwxr-xr-xarch/arm/mach-rockchip/fit_spl_optee.sh84
-rw-r--r--arch/arm/mach-rockchip/rk3288/Kconfig3
-rw-r--r--arch/arm/mach-rockchip/rk3399/Kconfig2
-rw-r--r--arch/arm/mach-rockchip/spl.c3
5 files changed, 16 insertions, 85 deletions
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index fcab1d5cee..407bf3fbea 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -367,6 +367,15 @@ config TPL_ROCKCHIP_EARLYRETURN_TO_BROM
config SPL_MMC_SUPPORT
default y if !SPL_ROCKCHIP_BACK_TO_BROM
+config ROCKCHIP_SPI_IMAGE
+ bool "Build a SPI image for rockchip"
+ depends on HAS_ROM
+ help
+ Some Rockchip SoCs support booting from SPI flash. Enable this
+ option to produce a 4MB SPI-flash image (called u-boot.rom)
+ containing U-Boot. The image is built by binman. U-Boot sits near
+ the start of the image.
+
source "arch/arm/mach-rockchip/px30/Kconfig"
source "arch/arm/mach-rockchip/rk3036/Kconfig"
source "arch/arm/mach-rockchip/rk3128/Kconfig"
diff --git a/arch/arm/mach-rockchip/fit_spl_optee.sh b/arch/arm/mach-rockchip/fit_spl_optee.sh
deleted file mode 100755
index 4118472d9f..0000000000
--- a/arch/arm/mach-rockchip/fit_spl_optee.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright (C) 2019 Rockchip Electronic Co.,Ltd
-#
-# Script to generate FIT image source for 32-bit Rockchip SoCs with
-# U-Boot proper, OPTEE, and devicetree.
-#
-# usage: $0 <dt_name>
-
-[ -z "$TEE" ] && TEE="tee.bin"
-
-if [ ! -f $TEE ]; then
- echo "WARNING: TEE file $TEE NOT found, U-Boot.itb is non-functional" >&2
- echo "Please export path for TEE or copy tee.bin to U-Boot folder" >&2
- TEE=/dev/null
-fi
-
-dtname=$1
-text_base=`sed -n "/SYS_TEXT_BASE=/s/CONFIG_SYS_TEXT_BASE=//p" .config \
- |tr -d '\r'`
-dram_base=`sed -n "/SYS_SDRAM_BASE=/s/CONFIG_SYS_SDRAM_BASE=//p" \
- include/autoconf.mk|tr -d '\r'`
-tee_base=`echo "obase=16;$(($dram_base+0x8400000))"|bc`
-tee_base='0x'$tee_base
-
-cat << __HEADER_EOF
-/*
- * Copyright (C) 2017-2019 Rockchip Electronic Co.,Ltd
- *
- * Simple U-boot FIT source file containing U-Boot, dtb and optee
- */
-
-/dts-v1/;
-
-/ {
- description = "FIT image with OP-TEE support";
- #address-cells = <1>;
-
- images {
- uboot {
- description = "U-Boot";
- data = /incbin/("u-boot-nodtb.bin");
- type = "standalone";
- os = "U-Boot";
- arch = "arm";
- compression = "none";
- load = <$text_base>;
- };
- optee {
- description = "OP-TEE";
- data = /incbin/("$TEE");
- type = "firmware";
- arch = "arm";
- os = "tee";
- compression = "none";
- load = <$tee_base>;
- entry = <$tee_base>;
- };
- fdt {
- description = "$(basename $dtname .dtb)";
- data = /incbin/("$dtname");
- type = "flat_dt";
- compression = "none";
- };
-__HEADER_EOF
-
-cat << __CONF_HEADER_EOF
- };
-
- configurations {
- default = "conf";
- conf {
- description = "$(basename $dtname .dtb)";
- firmware = "optee";
- loadables = "uboot";
- fdt = "fdt";
- };
-__CONF_HEADER_EOF
-
-cat << __ITS_EOF
- };
-};
-__ITS_EOF
diff --git a/arch/arm/mach-rockchip/rk3288/Kconfig b/arch/arm/mach-rockchip/rk3288/Kconfig
index afb62fca78..20a00c5be7 100644
--- a/arch/arm/mach-rockchip/rk3288/Kconfig
+++ b/arch/arm/mach-rockchip/rk3288/Kconfig
@@ -5,7 +5,9 @@ choice
config TARGET_CHROMEBOOK_JERRY
bool "Google/Rockchip Veyron-Jerry Chromebook"
+ select HAS_ROM
select BOARD_LATE_INIT
+ select ROCKCHIP_SPI_IMAGE
help
Jerry is a RK3288-based clamshell device with 2 USB 3.0 ports,
HDMI, an 11.9 inch EDP display, micro-SD card, touchpad and
@@ -46,6 +48,7 @@ config TARGET_CHROMEBOOK_SPEEDY
config TARGET_EVB_RK3288
bool "Evb-RK3288"
+ select HAS_ROM
select BOARD_LATE_INIT
select TPL
help
diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig
index 254b9c5b4d..17628f9171 100644
--- a/arch/arm/mach-rockchip/rk3399/Kconfig
+++ b/arch/arm/mach-rockchip/rk3399/Kconfig
@@ -5,6 +5,8 @@ choice
config TARGET_CHROMEBOOK_BOB
bool "Asus Flip C101PA Chromebook (RK3399)"
+ select HAS_ROM
+ select ROCKCHIP_SPI_IMAGE
help
Bob is a small RK3299-based device similar in apperance to Minnie.
It has two USB 3.0 type-C ports, 4GB of SDRAM, WiFi and a 10.1",
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index cddf4fd3d5..f148d48b6a 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -54,7 +54,8 @@ u32 spl_boot_device(void)
#if defined(CONFIG_TARGET_CHROMEBOOK_JERRY) || \
defined(CONFIG_TARGET_CHROMEBIT_MICKEY) || \
defined(CONFIG_TARGET_CHROMEBOOK_MINNIE) || \
- defined(CONFIG_TARGET_CHROMEBOOK_SPEEDY)
+ defined(CONFIG_TARGET_CHROMEBOOK_SPEEDY) || \
+ defined(CONFIG_TARGET_CHROMEBOOK_BOB)
return BOOT_DEVICE_SPI;
#endif
if (CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM))