binman: tegra: Convert to use binman

Update tegra to use binman for image creation. This still includes the
current Makefile logic, but a later patch will remove this. Three output
files are created, all of which combine
SPL and U-Boot:

   u-boot-tegra.bin        - standard image
   u-boot-dtb-tegra.bin    - same as u-boot-tegra.bin
   u-boot-nodtb-target.bin - includes U-Boot without the appended device tree

The latter is useful for build systems where the device is appended later,
perhaps after being modified.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/Makefile b/Makefile
index e6d309a..9800d79 100644
--- a/Makefile
+++ b/Makefile
@@ -1149,6 +1149,11 @@
 endif
 
 ifneq ($(CONFIG_TEGRA),)
+ifneq ($(CONFIG_BINMAN),)
+u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin: \
+		spl/u-boot-spl u-boot.bin FORCE
+	$(call if_changed,binman)
+else
 OBJCOPYFLAGS_u-boot-nodtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)
 u-boot-nodtb-tegra.bin: spl/u-boot-spl u-boot-nodtb.bin FORCE
 	$(call if_changed,pad_cat)
@@ -1159,6 +1164,7 @@
 
 u-boot-dtb-tegra.bin: u-boot-tegra.bin FORCE
 	$(call if_changed,copy)
+endif  # binman
 endif
 
 OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI)