#@TYPE: Machine
#@NAME: IMX7D-PICO
#@SOC: i.MX7D
#@DESCRIPTION: Machine configuration for IMX7D-PICO board.
#@MAINTAINER: Vanessa Maegima <vanessa.maegima@nxp.com>

MACHINEOVERRIDES =. "mx7:mx7d:"

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

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

SERIAL_CONSOLES = "115200;ttymxc4"

KERNEL_DEVICETREE = " \
    imx7d-pico-dwarf.dtb \
    imx7d-pico-hobbit.dtb \
    imx7d-pico-pi.dtb \
"

SPL_BINARY = "SPL"
UBOOT_BINARY = "u-boot-dtb.img"
UBOOT_SUFFIX = "img"
UBOOT_MAKE_TARGET = ""

UBOOT_CONFIG ??= "dwarf hobbit nymph pi generic"
UBOOT_CONFIG[dwarf] = "pico-dwarf-imx7d_defconfig"
UBOOT_CONFIG[generic] = "pico-imx7d_defconfig"
UBOOT_CONFIG[hobbit] = "pico-hobbit-imx7d_defconfig"
UBOOT_CONFIG[nymph] = "pico-nymph-imx7d_defconfig"
UBOOT_CONFIG[pi] = "pico-pi-imx7d_defconfig"

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

MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \
    kernel-image \
    kernel-devicetree \
    u-boot-fslc \
"

MACHINE_EXTRA_RRECOMMENDS += " \
  bcm4339-nvram-config \
  linux-firmware-ath10k \
"

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