From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: pcm720 Date: Sun, 28 Jun 2020 21:00:59 +0300 Subject: support SPI flash boot Port dhivael's commit to current upstream Original commit contents: From: dhivael Date: Thu, 6 Feb 2020 22:34:34 +0100 Subject: support SPI flash boot SPI uboot images can be built with tools/mkimage -n rk3399 -T rkspi -d tpl/u-boot-tpl-dtb.bin:spl/u-boot-spl-dtb.bin spl.bin cat <(dd if=spl.bin bs=512K conv=sync) u-boot.itb >spiflash.bin and written to spi flash with uboot sf commands, any hardware flasher available, rkdeveloptool, or possibly other methods. --- arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 6 +++++- configs/pinebook-pro-rk3399_defconfig | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi index 2d87bea933..8263257377 100644 --- a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +++ b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi @@ -8,7 +8,7 @@ / { chosen { - u-boot,spl-boot-order = "same-as-spl", &sdhci, &spiflash, &sdmmc; + u-boot,spl-boot-order = "same-as-spl", &spiflash, &sdhci, &sdmmc; }; config { @@ -45,3 +45,7 @@ &vdd_log { regulator-init-microvolt = <950000>; }; + +&pcie0 { + u-boot,dm-pre-reloc; +}; diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig index d7378f5eb3..b8dae24860 100644 --- a/configs/pinebook-pro-rk3399_defconfig +++ b/configs/pinebook-pro-rk3399_defconfig @@ -93,3 +93,12 @@ CONFIG_VIDEO_ROCKCHIP=y CONFIG_DISPLAY_ROCKCHIP_EDP=y CONFIG_SPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y +CONFIG_CMD_NVME=y +CONFIG_MTD=y +CONFIG_DM_MTD=y +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPL_DM_SPI=y +CONFIG_SPL_SPI_FLASH_TINY=n +CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPL_SPI_LOAD=y +CONFIG_SYS_SPI_U_BOOT_OFFS=0x80000 -- Armbian