#@TYPE: Machine
#@NAME: orange-pi-zero-2
#@DESCRIPTION: Machine configuration for the orange-pi-zero-2, based on Allwinner H616 CPU

require conf/machine/include/sun50i-h616.inc

KERNEL_DEVICETREE = "allwinner/sun50i-h616-orangepi-zero2w.dtb \
    allwinner/overlay/sun50i-h616-disable-leds.dtbo \
    allwinner/overlay/sun50i-h616-disable-uart0.dtbo \
    allwinner/overlay/sun50i-h616-gpu.dtbo \
    allwinner/overlay/sun50i-h616-ir.dtbo \
    allwinner/overlay/sun50i-h616-ph-i2c1.dtbo \
    allwinner/overlay/sun50i-h616-ph-i2c2.dtbo \
    allwinner/overlay/sun50i-h616-ph-i2c3.dtbo \
    allwinner/overlay/sun50i-h616-ph-i2c4.dtbo \
    allwinner/overlay/sun50i-h616-ph-pwm12.dtbo \
    allwinner/overlay/sun50i-h616-ph-pwm34.dtbo \
    allwinner/overlay/sun50i-h616-ph-uart2.dtbo \
    allwinner/overlay/sun50i-h616-ph-uart5.dtbo \
    allwinner/overlay/sun50i-h616-pi-i2c0.dtbo \
    allwinner/overlay/sun50i-h616-pi-i2c1.dtbo \
    allwinner/overlay/sun50i-h616-pi-i2c2.dtbo \
    allwinner/overlay/sun50i-h616-pi-pwm1.dtbo \
    allwinner/overlay/sun50i-h616-pi-pwm2.dtbo \
    allwinner/overlay/sun50i-h616-pi-pwm3.dtbo \
    allwinner/overlay/sun50i-h616-pi-pwm4.dtbo \
    allwinner/overlay/sun50i-h616-pi-uart2.dtbo \
    allwinner/overlay/sun50i-h616-pi-uart3.dtbo \
    allwinner/overlay/sun50i-h616-pi-uart4.dtbo \
    allwinner/overlay/sun50i-h616-spi0-spidev.dtbo \
    allwinner/overlay/sun50i-h616-spi1-cs0-cs1-spidev.dtbo \
    allwinner/overlay/sun50i-h616-spi1-cs0-spidev.dtbo \
    allwinner/overlay/sun50i-h616-spi1-cs1-spidev.dtbo \
    allwinner/overlay/sun50i-h616-usb0-host.dtbo \
    allwinner/overlay/sun50i-h616-zero2w-disable-led.dtbo \
"
UBOOT_MACHINE = "orangepi_zero2w_defconfig"

SPL_BINARY = "u-boot-sunxi-with-spl.bin"

# as for now neither graphics nor audio is supported
MACHINE_FEATURES:remove = "alsa x11"
MACHINE_FEATURES:append = "bluetooth wifi"

MACHINE_EXTRA_RRECOMMENDS = "uwe5622-firmware"