#@TYPE: Machine
#@NAME: NXP LS1046ARDB
#@SOC: LSCH2
#@DESCRIPTION: Machine configuration for running LS1046A in 64-bit mode
#@MAINTAINER: Zhenhua Luo <zhenhua.luo@nxp.com>

MACHINEOVERRIDES =. "fsl-lsch2:ls1046a:"

require conf/machine/include/qoriq-arm64.inc
require conf/machine/include/arm/arch-arm64.inc

MACHINE_FEATURES += "optee"

KERNEL_CLASSES  = " kernel-fitimage "
KERNEL_IMAGETYPES = "fitImage"

UBOOT_DTB_LOADADDRESS = "0x90000000"
UBOOT_ENTRYPOINT = "0x80080000"

UBOOT_CONFIG ??= "tfa-secure-boot tfa"
UBOOT_CONFIG[tfa] = "ls1046ardb_tfa_defconfig"
UBOOT_CONFIG[tfa-secure-boot] = "ls1046ardb_tfa_SECURE_BOOT_defconfig"

KERNEL_DEVICETREE ?= "\
    freescale/fsl-ls1046a-rdb.dtb \
    freescale/fsl-ls1046a-qds.dtb \
"
# usdpaa dtb is used for dpdk. TODO: rename in kernel
KERNEL_DEVICETREE:prepend:use-nxp-bsp = "\
    freescale/fsl-ls1046a-rdb-sdk.dtb \
    freescale/fsl-ls1046a-rdb-usdpaa.dtb \
    freescale/fsl-ls1046a-rdb-usdpaa-shared.dtb \
    freescale/fsl-ls1046a-qds-sdk.dtb \
"
KERNEL_DEFCONFIG ?= "defconfig"

SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyAMA0 115200;ttyLP0"
SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}"

UEFI_QSPIBOOT ?= "LS1046ARDB_EFI_QSPIBOOT.fd"
RCWQSPI ?= "RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot"
RCWSD ?= "RR_FFSSPPPH_1133_5559/rcw_1800_sdboot"

FMAN_UCODE ?= "fsl_fman_ucode_ls1046_r1.0_106_4_18.bin"

EXTRA_IMAGEDEPENDS += "fm-ucode rcw uefi qoriq-atf qe-ucode ls2-phy"
USE_VT = "0"
