#@TYPE: Machine
#@NAME: NXP i.MX6SoloX SabreSD
#@SOC: i.MX6SX
#@DESCRIPTION: Machine configuration for NXP i.MX6SoloX Sabre SD
#@MAINTAINER: Lauren Post <Lauren.Post@nxp.com>

MACHINEOVERRIDES =. "mx6sx:"

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

KERNEL_DEVICETREE = " \
    imx6sx-sdb.dtb \
    imx6sx-sdb-reva.dtb \
    imx6sx-sdb-sai.dtb \
"
KERNEL_DEVICETREE:append:use-nxp-bsp = " \
    imx6sx-sdb-btwifi.dtb \
    imx6sx-sdb-emmc.dtb \
    imx6sx-sdb-lcdif1.dtb \
    imx6sx-sdb-ldo.dtb \
    imx6sx-sdb-m4.dtb \
    imx6sx-sdb-mqs.dtb \
    imx6sx-sdb-pcie-ep.dtb \
    imx6sx-sdb-reva-ldo.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]       = "mx6sxsabresd_config,sdcard"
UBOOT_CONFIG[sd-optee] = "mx6sxsabresd_optee_config,sdcard"
UBOOT_CONFIG[emmc]     = "mx6sxsabresd_emmc_config,sdcard"
UBOOT_CONFIG[qspi2]    = "mx6sxsabresd_qspi2_config"
UBOOT_CONFIG[m4fastup] = "mx6sxsabresd_m4fastup_config"
UBOOT_CONFIG[mfgtool]  = "mx6sxsabresd_config"

OPTEE_BIN_EXT = "6sxsdb"

SERIAL_CONSOLES = "115200;ttymxc0"

MACHINE_FIRMWARE:append:mx6 = " linux-firmware-ath6k"

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