armvirt: 64: Add NXP i.MX 8M Mini/Nano/Quad/Plus EVK support
authorAnton Antonov <Anton.Antonov@arm.com>
Tue, 30 May 2023 02:55:16 +0000 (02:55 +0000)
committerPetr Štetiar <ynezz@true.cz>
Fri, 2 Jun 2023 09:36:27 +0000 (11:36 +0200)
Also includes Advantech RSB-3720 (iMX8 Plus) support.

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Mathew McBride <matt@traverse.com.au>
[Re-sort into kernel config, move network into modules]

target/linux/armvirt/64/config-6.1
target/linux/armvirt/base-files/etc/inittab
target/linux/armvirt/image/Makefile
target/linux/armvirt/modules.mk

index 343a333542fbca6a259a5d84f32c41d9a19d1f32..b10c84b85839e04888fe2f88e1b920927b5bb463 100644 (file)
@@ -368,6 +368,8 @@ CONFIG_RTC_I2C_AND_SPI=y
 # CONFIG_SERIAL_8250_EXAR is not set
 CONFIG_SERIAL_8250_FSL=y
 CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_FSL_LPUART=y
+CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
 CONFIG_SERIAL_MVEBU_CONSOLE=y
 CONFIG_SERIAL_MVEBU_UART=y
 CONFIG_SERIAL_SAMSUNG=y
index 837d7f32a41f0ff233034a06649ee00a113065fe..83b1888c5c33befec4fae803e72bf6aa54b10d53 100644 (file)
@@ -3,3 +3,6 @@
 ttyAMA0::askfirst:/usr/libexec/login.sh
 ttyS0::askfirst:/usr/libexec/login.sh
 hvc0::askfirst:/usr/libexec/login.sh
+ttymxc0::askfirst:/usr/libexec/login.sh
+ttymxc1::askfirst:/usr/libexec/login.sh
+ttymxc2::askfirst:/usr/libexec/login.sh
index ef27d6a728fe2170c11ba60258797bd3006d05d2..7c4ba60b9b0c3a4dc076c4c6df453695575104ad 100644 (file)
@@ -108,9 +108,9 @@ define Device/generic
   DEVICE_PACKAGES += kmod-amazon-ena kmod-e1000e kmod-vmxnet3 kmod-rtc-rx8025 \
        kmod-i2c-mux-pca954x kmod-gpio-pca953x partx-utils kmod-wdt-sp805 \
        kmod-mvneta kmod-mvpp2 kmod-fsl-dpaa1-net kmod-fsl-dpaa2-net \
-       kmod-fsl-enetc-net kmod-sfp \
-       kmod-phy-aquantia kmod-phy-broadcom kmod-phy-marvell kmod-phy-marvell-10g \
-       kmod-atlantic
+       kmod-fsl-enetc-net kmod-dwmac-imx kmod-fsl-fec kmod-sfp \
+       kmod-phy-aquantia kmod-phy-broadcom kmod-phy-marvell \
+       kmod-phy-marvell-10g kmod-atlantic
 endef
 TARGET_DEVICES += generic
 
index 919685bf64af3e68de91a994c0178c2b9e7c61d0..1ff523c7bd9b1edf5b6f64b0081f9ee00888dd95 100644 (file)
@@ -25,6 +25,29 @@ endef
 
 $(eval $(call KernelPackage,fsl-pcs-lynx))
 
+define KernelPackage/pcs-xpcs
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=Synopsis DesignWare PCS driver
+  DEPENDS:=@(TARGET_armvirt_64) +kmod-phylink
+  KCONFIG:=CONFIG_PCS_XPCS
+  FILES:=$(LINUX_DIR)/drivers/net/pcs/pcs_xpcs.ko
+  AUTOLOAD:=$(call AutoLoad,20,pcs_xpcs)
+endef
+
+$(eval $(call KernelPackage,pcs-xpcs))
+
+define KernelPackage/fsl-fec
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  DEPENDS:=@(TARGET_armvirt_64) +kmod-libphy +kmod-of-mdio \
+    +kmod-ptp +kmod-net-selftests
+  TITLE:=NXP (Freescale) FEC Ethernet controller (i.MX)
+  KCONFIG:=CONFIG_FEC
+  FILES:=$(LINUX_DIR)/drivers/net/ethernet/freescale/fec.ko
+  AUTOLOAD:=$(call AutoLoad,35,fec)
+endef
+
+$(eval $(call KernelPackage,fsl-fec))
+
 define KernelPackage/fsl-xgmac-mdio
   SUBMENU=$(NETWORK_DEVICES_MENU)
   DEPENDS:=@(TARGET_armvirt_64) +kmod-libphy +kmod-of-mdio +kmod-acpi-mdio
@@ -162,6 +185,55 @@ endef
 
 $(eval $(call KernelPackage,mvpp2))
 
+define KernelPackage/imx2-wdt
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=NXP (Freescale) i.MX2+ and Layerscape watchdog driver
+  KCONFIG:=CONFIG_IMX2_WDT
+  FILES=$(LINUX_DIR)/drivers/watchdog/imx2_wdt.ko
+  AUTOLOAD=$(call AutoLoad,60,imx2_wdt)
+endef
+
+$(eval $(call KernelPackage,imx2-wdt))
+
+define KernelPackage/imx7-ulp-wdt
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=NXP (Freescale) i.MX7ULP and later watchdog
+  KCONFIG:=CONFIG_IMX7ULP_WDT
+  FILES=$(LINUX_DIR)/drivers/watchdog/imx7ulp_wdt.ko
+  AUTOLOAD=$(call AutoLoad,60,imx7ulp_wdt)
+endef
+
+$(eval $(call KernelPackage,imx7-ulp-wdt))
+
+define KernelPackage/stmmac-core
+  SUBMENU=$(NETWORK_DEVICES_MENU)
+  TITLE:=Synopsis Ethernet Controller core (NXP,STMMicro,others)
+  DEPENDS:=@(TARGET_armvirt_64) +kmod-pcs-xpcs +kmod-ptp \
+    +kmod-of-mdio
+  KCONFIG:=CONFIG_STMMAC_ETH \
+    CONFIG_STMMAC_SELFTESTS=n \
+    CONFIG_STMMAC_PLATFORM \
+    CONFIG_CONFIG_DWMAC_DWC_QOS_ETH=n \
+    CONFIG_DWMAC_GENERIC
+  FILES=$(LINUX_DIR)/drivers/net/ethernet/stmicro/stmmac/stmmac.ko \
+    $(LINUX_DIR)/drivers/net/ethernet/stmicro/stmmac/stmmac-platform.ko \
+    $(LINUX_DIR)/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.ko
+  AUTOLOAD=$(call AutoLoad,40,stmmac stmmac-platform dwmac-generic)
+endef
+
+$(eval $(call KernelPackage,stmmac-core))
+
+define KernelPackage/dwmac-imx
+  SUBMENU=$(NETWORK_DEVICES_MENU)
+  TITLE:=NXP i.MX8 Ethernet controller
+  DEPENDS:=+kmod-stmmac-core
+  KCONFIG:=CONFIG_DWMAC_IMX8
+  FILES=$(LINUX_DIR)/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.ko
+  AUTOLOAD=$(call AutoLoad,45,dwmac-imx)
+endef
+
+$(eval $(call KernelPackage,dwmac-imx))
+
 define KernelPackage/wdt-sp805
   SUBMENU:=$(OTHER_MENU)
   TITLE:=ARM SP805 Watchdog