# $NetBSD: files.imx,v 1.3 2023/05/04 13:25:07 bouyer Exp $
#
# Configuration info for the Freescale i.MX6
#
file arch/arm/nxp/imx6_platform.c soc_imx
# SOC parameters
defflag opt_soc.h SOC_IMX
defflag opt_soc.h SOC_IMX6DL: SOC_IMX
defflag opt_soc.h SOC_IMX6Q: SOC_IMX
defflag opt_soc.h SOC_IMX6QDL: SOC_IMX
defflag opt_soc.h SOC_IMX6SX: SOC_IMX
defflag opt_soc.h SOC_IMX7D: SOC_IMX
defflag opt_imx.h IMX6
# Clock
device imx6ccm : clk
attach imx6ccm at fdt
file arch/arm/nxp/imx6_clk.c imx6ccm
device imx6sxccm : clk
attach imx6sxccm at fdt
file arch/arm/nxp/imx6sx_clk.c imx6sxccm
file arch/arm/nxp/imx6_ccm.c imx6ccm | imx6sxccm
# Common FDT clock framework
define imx_ccm: clk
file arch/arm/nxp/imx_ccm.c imx_ccm
file arch/arm/nxp/imx_ccm_composite.c imx_ccm
file arch/arm/nxp/imx_ccm_div.c imx_ccm
file arch/arm/nxp/imx_ccm_extclk.c imx_ccm
file arch/arm/nxp/imx_ccm_fixed.c imx_ccm
file arch/arm/nxp/imx_ccm_fixed_factor.c imx_ccm
file arch/arm/nxp/imx_ccm_gate.c imx_ccm
file arch/arm/nxp/imx_ccm_mux.c imx_ccm
file arch/arm/nxp/imx_ccm_pll.c imx_ccm
# CCM (iMX7D)
device imx7dccm: imx_ccm
attach imx7dccm at fdt with imx7d_ccm
file arch/arm/nxp/imx7d_ccm.c imx7d_ccm
# CCM (iMX8MQ)
device imx8mqccm: imx_ccm
attach imx8mqccm at fdt with imx8mq_ccm
file arch/arm/nxp/imx8mq_ccm.c imx8mq_ccm
# GPC
device imxgpc
attach imxgpc at fdt
file arch/arm/nxp/imx6_gpc.c imxgpc
device imx7gpc
attach imx7gpc at fdt
file arch/arm/nxp/imx7_gpc.c imx7gpc
# IOMUX
device imxiomux
attach imxiomux at fdt
file arch/arm/nxp/imx6_iomux.c imxiomux
# GPIO controller
device imxgpio: gpiobus
attach imxgpio at fdt
file arch/arm/imx/imxgpio.c imxgpio needs-flag
file arch/arm/nxp/imx_gpio.c imxgpio
# UART
device imxuart: tty
attach imxuart at fdt with imx_com
file arch/arm/imx/imxuart.c imxuart needs-flag
file arch/arm/nxp/imx_com.c imx_com needs-flag
defflag opt_imxuart.h IMXUARTCONSOLE
# FEC
device enet: ether, ifnet, arp, mii, bus_dma_generic
attach enet at fdt with enet_fdt
file arch/arm/imx/if_enet.c enet
file arch/arm/nxp/if_enet_imx.c enet_fdt
# SATA
attach ahcisata at fdt with imx_ahcisata
file arch/arm/nxp/imx_ahcisata.c imx_ahcisata
# USB Controller
device imxusbc { [unit=-1], [irq=-1] } : bus_dma_generic
attach imxusbc at fdt with imxusbc_fdt
file arch/arm/nxp/imx6_usb.c imxusbc_fdt
attach ehci at imxusbc with imxehci
file arch/arm/imx/imxusb.c imxehci
# USB PHY
device imxusbphy
attach imxusbphy at fdt
file arch/arm/nxp/imx6_usbphy.c imxusbphy
device imx8mqusbphy
attach imx8mqusbphy at fdt
file arch/arm/nxp/imx8mq_usbphy.c imx8mqusbphy
# SDMMC
attach sdhc at fdt with imx_sdhc
file arch/arm/nxp/imx_sdhc.c imx_sdhc
# PCIe
device imxpcie: pcibus, clk
attach imxpcie at fdt with imxpcie_fdt
file arch/arm/nxp/imxpcie.c imxpcie
file arch/arm/nxp/imx6_pcie.c imxpcie_fdt
# iMX iic controller
device imxi2c: motoi2c, i2cbus, i2cexec
attach imxi2c at fdt
file arch/arm/imx/imxi2c.c imxi2c
file arch/arm/nxp/imx_i2c.c imxi2c
# SPI bus controller
device imxspi: spibus
attach imxspi at fdt with imxspi_fdt
file arch/arm/imx/imxspi.c imxspi
file arch/arm/nxp/imx6_spi.c imxspi_fdt
defparam opt_imxspi.h IMXSPI_DEBUG
# iMX6 On-Chip OTP controller
device imxocotp
attach imxocotp at fdt
file arch/arm/nxp/imx6_ocotp.c imxocotp needs-flag
# iMX6 Enhanced Periodic Interrupt Timer
#device imxclock
#attach imxclock at axi
#file arch/arm/imx/imxclock.c imxclock
#file arch/arm/imx/imx6_clock.c imxclock
# iMX6 Secure Non-Volatile Storage (SNVS)
device imxsnvs
attach imxsnvs at fdt
file arch/arm/imx/imxsnvs.c imxsnvs
file arch/arm/nxp/imx_snvs.c imxsnvs
# Watchdog
device imxwdog: sysmon_wdog
attach imxwdog at fdt
file arch/arm/nxp/imxwdog.c imxwdog
# PWM
device imxpwm: pwm, clk
attach imxpwm at fdt with imxpwm_fdt
file arch/arm/imx/imxpwm.c imxpwm
file arch/arm/nxp/imx6_pwm.c imxpwm_fdt
# HDMI TX (Designware based)
attach dwhdmi at fdt with imx6_dwhdmi
file arch/arm/nxp/imx6_dwhdmi.c imx6_dwhdmi
makeoptions imx6_dwhdmi "CPPFLAGS.imx6_dwhdmi"+="${CPPFLAGS.drmkms}"