#@TYPE: Machine
#@NAME: NXP i.MX 8M Plus EVK with LPDDR4
#@SOC: i.MX8MP
#@DESCRIPTION: Machine configuration for NXP i.MX 8M Plus Evaluation Kit with LPDDR4
#@MAINTAINER: Jun Zhu <junzhu@nxp.com>

require include/imx8mp-evk.inc

# The device tree name is implicit for LPDDR4, so can't use MACHINE here
KERNEL_DEVICETREE_BASENAME = "imx8mp-evk"

# NXP kernel has additional DTB files for various board configuration and
# derivates. Include them here for NXP BSP only
KERNEL_DEVICETREE:append:use-nxp-bsp = " \
    freescale/imx8mp-ab2.dtb \
    freescale/imx8mp-evk-basler.dtb \
    freescale/imx8mp-evk-basler-ov2775.dtb \
    freescale/imx8mp-evk-basler-ov5640.dtb \
    freescale/imx8mp-evk-dpdk.dtb \
    freescale/imx8mp-evk-dsp.dtb \
    freescale/imx8mp-evk-dual-basler.dtb \
    freescale/imx8mp-evk-dual-os08a20.dtb \
    freescale/imx8mp-evk-dual-ov2775.dtb \
    freescale/imx8mp-evk-ecspi-slave.dtb \
    freescale/imx8mp-evk-flexcan2.dtb \
    freescale/imx8mp-evk-hifiberry-dacplus.dtb \
    freescale/imx8mp-evk-inmate.dtb \
    freescale/imx8mp-evk-iqaudio-dacplus.dtb \
    freescale/imx8mp-evk-iqaudio-dacpro.dtb \
    freescale/imx8mp-evk-it6263-lvds-dual-channel.dtb \
    freescale/imx8mp-evk-jdi-wuxga-lvds-panel.dtb \
    freescale/imx8mp-evk-ndm.dtb \
    freescale/imx8mp-evk-os08a20.dtb \
    freescale/imx8mp-evk-os08a20-ov5640.dtb \
    freescale/imx8mp-evk-ov2775.dtb \
    freescale/imx8mp-evk-ov2775-ov5640.dtb \
    freescale/imx8mp-evk-pcie-ep.dtb \
    freescale/imx8mp-evk-revA3-8mic-revE.dtb \
    freescale/imx8mp-evk-rm67191.dtb \
    freescale/imx8mp-evk-rm67199.dtb \
    freescale/imx8mp-evk-root.dtb \
    freescale/imx8mp-evk-rpmsg.dtb \
    freescale/imx8mp-evk-rpmsg-lpv.dtb \
    freescale/imx8mp-evk-sof-wm8960.dtb \
    freescale/imx8mp-evk-spdif-lb.dtb \
    freescale/imx8mp-evk-usdhc1-m2.dtb \
    freescale/imx8mp-evk-8mic-swpdm.dtb \
"

UBOOT_CONFIG_BASENAME = "imx8mp_evk"
UBOOT_CONFIG[fspi] = "${UBOOT_CONFIG_BASENAME}_defconfig"
UBOOT_CONFIG[ndm]  = "${UBOOT_CONFIG_BASENAME}_ndm_defconfig"

# Set DDR FIRMWARE
DDR_FIRMWARE_VERSION = "202006"
DDR_FIRMWARE_NAME = " \
    lpddr4_pmu_train_1d_dmem_${DDR_FIRMWARE_VERSION}.bin \
    lpddr4_pmu_train_1d_imem_${DDR_FIRMWARE_VERSION}.bin \
    lpddr4_pmu_train_2d_dmem_${DDR_FIRMWARE_VERSION}.bin \
    lpddr4_pmu_train_2d_imem_${DDR_FIRMWARE_VERSION}.bin \
"

IMXBOOT_TARGETS_BASENAME = "flash_evk"

# Mainline BSP doesn't support LPDDR4 so it must be set to nxp.
# Also this machine isn't supported by u-boot-fslc but imx8mn-evk.inc already
# set the bootloader to u-boot-imx instead when NXP BSP is used.
IMX_DEFAULT_BSP = "nxp"
