]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: Enable building a SPI ROM image on bob
authorSimon Glass <sjg@chromium.org>
Sun, 19 Jul 2020 19:55:58 +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 bob.

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

index 7bddc3acdbb2dec274b9191d576b3cb3af7dd149..390ac2bb5a9ab2a9682fc112eb6cb65f291cc385 100644 (file)
@@ -4,3 +4,7 @@
  */
 
 #include "rk3399-u-boot.dtsi"
+
+&spi_flash {
+       u-boot,dm-pre-reloc;
+};
index 7ac88392f2c2ddf877007b0ff28c08def08c002b..f9c5bb607ba55c8ae5aea2202875111c4195319f 100644 (file)
@@ -537,7 +537,7 @@ ap_i2c_audio: &i2c8 {
        pinctrl-names = "default", "sleep";
        pinctrl-1 = <&spi1_sleep>;
 
-       spiflash@0 {
+       spi_flash: spiflash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
 
index 8237782408528d6008844d2747484250f340866b..ecd230c7202a0660ffe15033919e3d6f1b797c8b 100644 (file)
@@ -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 {
 
 };
 
+#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;
 };
index 254b9c5b4d728dd2522b3266fbdaf2076105140e..17628f917127942e6cfc7ff93539dbe63312e40f 100644 (file)
@@ -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",