#@TYPE: Machine
#@NAME: IMX6Q/DL-PICO
#@SOC: i.MX6QDL
#@DESCRIPTION: Machine configuration for IMX6QDL-PICO board.
#@MAINTAINER: Otavio Salvador otavio.salvador@ossystems.com.br

MACHINEOVERRIDES =. "mx6q:mx6dl:"

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

IMX_DEFAULT_BSP = "mainline"
IMX_DEFAULT_BOOTLOADER = "u-boot-fslc"

SERIAL_CONSOLES = "115200;ttymxc0"

SPL_BINARY = "SPL"
UBOOT_SUFFIX = "img"
UBOOT_MAKE_TARGET = ""

UBOOT_EXTLINUX = "1"
UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}"
UBOOT_EXTLINUX_CONSOLE = "console=${console},${baudrate}"

UBOOT_CONFIG ??= "generic"
UBOOT_CONFIG[generic] = "pico-imx6_defconfig"

KERNEL_DEVICETREE = " \
    imx6dl-pico-dwarf.dtb \
    imx6dl-pico-hobbit.dtb \
    imx6dl-pico-nymph.dtb \
    imx6dl-pico-pi.dtb \
    imx6q-pico-dwarf.dtb \
    imx6q-pico-hobbit.dtb \
    imx6q-pico-nymph.dtb \
    imx6q-pico-pi.dtb \
"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \
    kernel-image \
    kernel-devicetree \
    u-boot-fslc \
"

MACHINE_EXTRA_RRECOMMENDS += " \
    bcm4339-nvram-config \
"

WKS_FILES ?= "imx-uboot-spl.wks.in"
WKS_FILE_DEPENDS ?= ""
IMAGE_FSTYPES = "wic.bmap wic.xz ext4.gz"

MACHINE_FIRMWARE:append = " linux-firmware-ath10k"

MACHINE_FEATURES += " pci bluetooth touchscreen wifi"
