#@TYPE: Machine
#@NAME: ConnectCore 8M Nano Development Kit.
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 8M Nano DVK.

# Include the machine configuration for Digi's ConnectCore 8M module.
include conf/machine/include/ccimx8m.inc

DIGI_FAMILY = "ccimx8mn"
MACHINEOVERRIDES =. "mx8:mx8m:mx8mn:ccimx8m:${DIGI_FAMILY}:"

BOOTLOADER_SEEK = "32"

# U-Boot configurations
# Last one is the default (the one the symlinks point at)
UBOOT_CONFIG ??= "ccimx8mn_dvk"
UBOOT_CONFIG[ccimx8mn_dvk] = "ccimx8mn_dvk_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
SPL_BINARY = "spl/u-boot-spl.bin"

# Set u-boot DTB
UBOOT_DTB_NAME = "ccimx8mn-dvk.dtb"

ATF_PLATFORM = "imx8mn"

KERNEL_DEVICETREE ?= " \
    digi/ccimx8mn-dvk.dtb \
    digi/_ov_board_flexspi_ccimx8m-dvk.dtbo \
    digi/_ov_board_gpio-watchdog_ccimx8m-dvk.dtbo \
    digi/_ov_board_hsd101pfw2-lvds_ccimx8m-dvk.dtbo \
    digi/_ov_board_lvds_ccimx8m-dvk.dtbo \
    digi/_ov_board_user-leds_ccimx8m-dvk.dtbo \
    digi/_ov_board_v1-v2_ccimx8mn-dvk.dtbo \
    digi/_ov_som_bt_ccimx8m.dtbo \
    digi/_ov_som_mca-keypad_ccimx8m.dtbo \
    digi/_ov_som_v1_ccimx8mn.dtbo \
    digi/_ov_som_wifi_ccimx8m.dtbo \
"

SERIAL_CONSOLES ?= "115200;ttymxc0"

# Bluetooth tty
BT_TTY ?= "ttymxc1"

# XBees
XBEE_RESET_N_GPIO ?= "mca-gpio@15,gpio1@8"
XBEE_SLEEP_RQ_GPIO ?= "mca-gpio@11,gpio1@7"
XBEE_TTY ?= "ttymxc3"

# Image FS types
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
				       "boot.vfat tar.bz2 recovery.vfat squashfs", \
				       "boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
