#@TYPE: Machine
#@NAME: NXP i.MX7D SABRE Smart Device
#@SOC: i.MX7D
#@DESCRIPTION: Machine configuration for NXP i.MX7D SABRE Smart Device
#@MAINTAINER: Lauren Post <Lauren.Post@nxp.com>

MACHINEOVERRIDES =. "mx7:mx7d:"

require conf/machine/include/imx-base.inc
include conf/machine/include/arm/armv7a/tune-cortexa7.inc

MACHINE_FEATURES += "pci wifi bluetooth bcm4339 bcm43455 nxp8987-sdio"

KERNEL_DEVICETREE = "imx7d-sdb.dtb"
KERNEL_DEVICETREE:append:use-nxp-bsp = " \
    imx7d-sdb-epdc.dtb \
    imx7d-sdb-gpmi-weim.dtb \
    imx7d-sdb-m4.dtb \
    imx7d-sdb-mipi-dsi.dtb \
    imx7d-sdb-mqs.dtb \
    imx7d-sdb-pcie-ep.dtb \
    imx7d-sdb-qspi.dtb \
    imx7d-sdb-reva.dtb \
    imx7d-sdb-sht11.dtb \
    imx7d-sdb-usd-wifi.dtb \
"

UBOOT_MAKE_TARGET = "u-boot.imx"
UBOOT_SUFFIX = "imx"

UBOOT_CONFIG ??= " \
    sd \
    ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
"
UBOOT_CONFIG[sd]       = "mx7dsabresd_config,sdcard"
UBOOT_CONFIG[sd-optee] = "mx7dsabresd_optee_config,sdcard"
UBOOT_CONFIG[nonsec]   = "mx7dsabresd_nonsec_config,sdcard"
UBOOT_CONFIG[qspi1]    = "mx7dsabresd_qspi1_config"
UBOOT_CONFIG[nand]     = "mx7dsabresd_nand_config,ubifs"
UBOOT_CONFIG[epdc]     = "mx7dsabresd_epdc_config"
UBOOT_CONFIG[mfgtool]  = "mx7dsabresd_config"

OPTEE_BIN_EXT = "7dsdb"

XSERVER += "mesa-driver-swrast"
