rockchip: Enable building a SPI ROM image on bob
Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot
produces a ROM for bob.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/arm/dts/rk3399-gru-u-boot.dtsi b/arch/arm/dts/rk3399-gru-u-boot.dtsi
index 7bddc3a..390ac2b 100644
--- a/arch/arm/dts/rk3399-gru-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-gru-u-boot.dtsi
@@ -4,3 +4,7 @@
*/
#include "rk3399-u-boot.dtsi"
+
+&spi_flash {
+ u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/rk3399-gru.dtsi b/arch/arm/dts/rk3399-gru.dtsi
index 7ac8839..f9c5bb6 100644
--- a/arch/arm/dts/rk3399-gru.dtsi
+++ b/arch/arm/dts/rk3399-gru.dtsi
@@ -537,7 +537,7 @@
pinctrl-names = "default", "sleep";
pinctrl-1 = <&spi1_sleep>;
- spiflash@0 {
+ spi_flash: spiflash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi
index 8237782..ecd230c 100644
--- a/arch/arm/dts/rk3399-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-u-boot.dtsi
@@ -4,11 +4,14 @@
*/
#define USB_CLASS_HUB 9
+#include "rockchip-u-boot.dtsi"
+
/ {
aliases {
mmc0 = &sdhci;
mmc1 = &sdmmc;
pci0 = &pcie0;
+ spi1 = &spi1;
};
cic: syscon@ff620000 {
@@ -55,7 +58,31 @@
reg = <0x0 0xff330000 0x0 0xe3d4>;
};
+};
+
+#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
+&binman {
+ rom {
+ filename = "u-boot.rom";
+ size = <0x400000>;
+ pad-byte = <0xff>;
+
+ mkimage {
+ args = "-n rk3399 -T rkspi";
+ u-boot-spl {
+ };
+ };
+ u-boot-img {
+ offset = <0x40000>;
+ };
+ u-boot {
+ offset = <0x300000>;
+ };
+ fdtmap {
+ };
+ };
};
+#endif
&cru {
u-boot,dm-pre-reloc;
diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig
index 254b9c5..17628f9 100644
--- a/arch/arm/mach-rockchip/rk3399/Kconfig
+++ b/arch/arm/mach-rockchip/rk3399/Kconfig
@@ -5,6 +5,8 @@
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",