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

# Contains the ConnectCore 6 module.
include conf/machine/include/ccimx6.inc

# Wireless external module
WIRELESS_MODULE_append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'kernel-module-qualcomm', '', d)}"
HAS_WIFI_VIRTWLANS = "true"

# Firmware
MACHINE_FIRMWARE_append = " ${@oe.utils.conditional('HAVE_BT', '1' , 'firmware-atheros-ar3k firmware-qualcomm-qca6564-bt', '', d)}"
MACHINE_FIRMWARE_append = " ${@oe.utils.conditional('HAVE_WIFI', '1' , 'firmware-atheros-ath6kl firmware-qualcomm-qca6564-wifi', '', d)}"

PREFERRED_PROVIDER_virtual/libg2d_mx6 = "imx-gpu-g2d"

# U-Boot configurations
# Last one is the default (the one the symlinks point at)
UBOOT_CONFIG ??= "ccimx6dlsbc512MB ccimx6dlsbc ccimx6qsbc2GB ccimx6qsbc512MB ccimx6qsbc"
UBOOT_CONFIG[ccimx6dlsbc512MB] = "ccimx6dlsbc512MB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
UBOOT_CONFIG[ccimx6dlsbc] = "ccimx6dlsbc_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
UBOOT_CONFIG[ccimx6qsbc2GB] = "ccimx6qsbc2GB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
UBOOT_CONFIG[ccimx6qsbc512MB] = "ccimx6qsbc512MB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
UBOOT_CONFIG[ccimx6qsbc] = "ccimx6qsbc_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"

KERNEL_DEVICETREE ?= " \
    imx6dl-ccimx6sbc.dtb \
    imx6dl-ccimx6sbc-w.dtb \
    imx6dl-ccimx6sbc-wb.dtb \
    imx6q-ccimx6sbc.dtb \
    imx6q-ccimx6sbc-w.dtb \
    imx6q-ccimx6sbc-wb.dtb \
    imx6q-ccimx6sbc-wb-ldo-bypass.dtb \
    imx6q-ccimx6sbc-id129.dtb \
    imx6q-ccimx6sbc-id130.dtb \
    imx6dl-ccimx6sbc-id131.dtb \
"

SERIAL_CONSOLES ?= "115200;ttymxc3"

# Bluetooth tty
BT_TTY ?= "ttymxc1"

# XBee
XBEE_TTY ?= "ttymxc4"

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