#@TYPE: Machine
#@NAME: ConnectCore 8X Single Board Computer Pro.
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 8X SBC Pro.

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

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

KERNEL_DEVICETREE ?= " \
    digi/ccimx8x-sbc-pro.dtb \
    digi/_ov_board_flexcan1_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_flexspi_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_gpio-watchdog_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_hsd101pfw2-lvds_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_lpuart3_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_lt8912-hdmi-dsi0_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_lvds1_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_parallel-camera_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_pcie-card_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_pcie-modem_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_user-leds_ccimx8x-sbc-pro.dtbo \
    digi/_ov_board_v1-v3_ccimx8x-sbc-pro.dtbo \
    digi/_ov_som_bt_ccimx8x.dtbo \
    digi/_ov_som_cm4_ccimx8x.dtbo \
    digi/_ov_som_mca-keypad_ccimx8x.dtbo \
    digi/_ov_som_quad_ccimx8x.dtbo \
    digi/_ov_som_wifi_ccimx8x.dtbo \
"

SERIAL_CONSOLES ?= "115200;ttyLP2"

# Bluetooth tty
BT_TTY ?= "ttyLP1"

# XBee
XBEE_RESET_N_GPIO ?= "mca-gpio@15"
XBEE_SLEEP_RQ_GPIO ?= "mca-gpio@11"
XBEE_TTY ?= "ttyMCA0"

# 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)}'

# Boot artifacts to be copied from the deploy dir to the installer ZIP
BOOTABLE_ARTIFACTS = " \
    imx-boot-ccimx8x-sbc-pro-B0.bin \
    imx-boot-ccimx8x-sbc-pro-C0.bin \
"

# Default overlayfs_etc mount point and type
OVERLAYFS_ETC_MOUNT_POINT ?= "/mnt/data"
OVERLAYFS_ETC_DEVICE ?= "/dev/mmcblk0p7"
OVERLAYFS_ETC_FSTYPE ?= "ext4"
