]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: Enable building a SPI ROM image on jerry
authorSimon Glass <sjg@chromium.org>
Sun, 19 Jul 2020 19:55:57 +0000 (13:55 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 29 Jul 2020 01:30:39 +0000 (19:30 -0600)
Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot
produces a ROM for jerry.

Change the binman image definition to support multiple images, since it
may be used to build both u-boot-rockchip.bin and u-boot.rom

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/arm/dts/rk3288-u-boot.dtsi
arch/arm/dts/rockchip-u-boot.dtsi
arch/arm/mach-rockchip/Kconfig
arch/arm/mach-rockchip/rk3288/Kconfig

index 51b6e018bd73e2c9bdd2b16a34f069ae705326a9..c87f00141f1e511295be9edaa655f18d6a54edd9 100644 (file)
        };
 };
 
+#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
+&binman {
+       rom {
+               filename = "u-boot.rom";
+               size = <0x400000>;
+               pad-byte = <0xff>;
+
+               mkimage {
+                       args = "-n rk3288 -T rkspi";
+                       u-boot-spl {
+                       };
+               };
+               u-boot-img {
+                       offset = <0x20000>;
+               };
+               u-boot {
+                       offset = <0x300000>;
+               };
+               fdtmap {
+               };
+       };
+};
+#endif
+
 &dmc {
        u-boot,dm-pre-reloc;
 };
index a2559e2db083cf091ec4ec39f4928623cefbce8e..0451db735e7b3de06723455bccbb429312a7d38a 100644 (file)
@@ -6,7 +6,13 @@
 #include <config.h>
 
 / {
-       binman {
+       binman: binman {
+               multiple-images;
+       };
+};
+
+&binman {
+       simple-bin {
                filename = "u-boot-rockchip.bin";
                pad-byte = <0xff>;
 
index fcab1d5cee94f9d6974ffc72b603e65f30f53473..407bf3fbeae2c4f5a03706b35184583279b658eb 100644 (file)
@@ -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"
index afb62fca78e8308fdaebfdad9c3aeaf5823bbe9d..bb715e9d0e6b31cb981c7b194f2a12bc943ff01d 100644 (file)
@@ -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