meta-nuvoton: add support to generate full flash image for npcm8xx
Nuvoton's npcm8xx full flash image includes TIP FW, Bootblock,
ATF, OPTEE and UBOOT with headers. Generating headers and merging
images are being done by Nuvoton's binary generator tool (Bingo)
which uses external parameters from XML files for that.
Thus, we need to add related fitimage and image type for npcm8xx.
However, before merge this commit, we must wait for below commits were merged.
meta-nuvoton: arm-trusted-firmware: add arm trusted firmware recipe
https://gerrit.openbmc.org/c/openbmc/openbmc/+/55234
meta-nuvoton: add npcm8xx-bootblock recipe
https://gerrit.openbmc.org/c/openbmc/openbmc/+/55117
meta-nuvoton: add npcm8xx-igps recipe
https://gerrit.openbmc.org/c/openbmc/openbmc/+/55099
meta-nuvoton: npcm7xx-bingo: upgrade latest version 0.0.5 support Arbel
https://gerrit.openbmc.org/c/openbmc/openbmc/+/55128
Signed-off-by: Tim Lee <timlee660101@gmail.com>
Change-Id: I4599e39d3873f07cde6904d0f10161964fc45c7a
diff --git a/meta-nuvoton/conf/machine/include/npcm8xx.inc b/meta-nuvoton/conf/machine/include/npcm8xx.inc
new file mode 100644
index 0000000..fafa92d
--- /dev/null
+++ b/meta-nuvoton/conf/machine/include/npcm8xx.inc
@@ -0,0 +1,48 @@
+#@TYPE: Machine
+#@NAME: Nuvoton NPCM8XX
+#@DESCRIPTION: Common machine configuration for Nuvoton NPCM8XX Chip
+
+require conf/machine/include/nuvoton.inc
+
+KERNEL_IMAGETYPE ?= "Image"
+KERNEL_EXTRA_ARGS ?= "UIMAGE_LOADADDR=0x00008000"
+
+UBOOT_MACHINE ?= "ArbelEVB_defconfig"
+UBOOT_ENTRYPOINT ?= "0"
+UBOOT_LOADADDRESS ?= "0"
+
+FLASH_SIZE ?= "32768"
+FLASH_UBOOT_OFFSET ?= "0"
+FLASH_KERNEL_OFFSET ?= "2048"
+FLASH_ROFS_OFFSET ?= "8192"
+FLASH_RWFS_OFFSET ?= "31744"
+
+# UBI volume sizes in KB unless otherwise noted.
+FLASH_UBI_RWFS_SIZE ?= "6144"
+FLASH_UBI_RWFS_TXT_SIZE ?= "6MiB"
+
+SERIAL_CONSOLES ?= "115200;ttyS0"
+
+SOC_FAMILY = "npcm8xx"
+include conf/machine/include/soc-family.inc
+MACHINEOVERRIDES .= ":npcm8xx"
+
+require conf/machine/include/arm/armv8a/tune-cortexa35.inc
+
+PREFERRED_VERSION_trusted-firmware-a = "2.6.0"
+
+UBOOT_MKIMAGE:append:npcm8xx = " -E -B 8"
+
+COMPATIBLE_MACHINE:npcm8xx = "npcm8xx"
+TFA_PLATFORM = "npcm845x"
+
+# Nuvoton prefers optee for BL32.
+TFA_SPD = "opteed"
+
+# Nuvoton prefers u-boot as BL33.
+TFA_UBOOT = "1"
+
+# Nuvoton prefers TFA default build is BL31.
+TFA_BUILD_TARGET = "bl31"
+
+OPTEEMACHINE ?= "nuvoton"