binman: Add support for selecting firmware to use with split-elf

In some cases it is desired for SPL to start TF-A instead of U-Boot
proper. Add support for a new property fit,firmware that picks a
valid entry and prepends the remaining valid entries to the
loadables list generated by the split-elf generator.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/entries.rst b/tools/binman/entries.rst
index 78f95da..7a04a61 100644
--- a/tools/binman/entries.rst
+++ b/tools/binman/entries.rst
@@ -721,6 +721,12 @@
     fit,data
         Generates a `data = <...>` property with the contents of the segment
 
+    fit,firmware
+        Generates a `firmware = <...>` property. Provides a list of possible
+        nodes to be used as the `firmware` property value. The first valid
+        node is picked as the firmware. Any remaining valid nodes is
+        prepended to the `loadable` property generated by `fit,loadables`
+
     fit,loadables
         Generates a `loadable = <...>` property with a list of the generated
         nodes (including all nodes if this operation is used multiple times)
@@ -791,7 +797,7 @@
             @config-SEQ {
                 description = "conf-NAME.dtb";
                 fdt = "fdt-SEQ";
-                firmware = "u-boot";
+                fit,firmware = "atf-1", "u-boot";
                 fit,loadables;
             };
         };
@@ -846,15 +852,15 @@
     configurations {
         default = "config-1";
         config-1 {
-            loadables = "atf-1", "atf-2", "atf-3", "tee-1", "tee-2";
+            loadables = "u-boot", "atf-2", "atf-3", "tee-1", "tee-2";
             description = "rk3399-firefly.dtb";
             fdt = "fdt-1";
-            firmware = "u-boot";
+            firmware = "atf-1";
         };
     };
 
-U-Boot SPL can then load the firmware (U-Boot proper) and all the loadables
-(ATF and TEE), then proceed with the boot.
+U-Boot SPL can then load the firmware (ATF) and all the loadables (U-Boot
+proper, ATF and TEE), then proceed with the boot.