armvirt: add options and driver modules for NXP Layerscape DPAA2 platform
authorMathew McBride <matt@traverse.com.au>
Wed, 31 May 2023 05:47:41 +0000 (05:47 +0000)
committerPetr Štetiar <ynezz@true.cz>
Fri, 2 Jun 2023 09:36:22 +0000 (11:36 +0200)
Tested with a Traverse Technologies Ten64 (LS1088A) board.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
target/linux/armvirt/64/config-6.1
target/linux/armvirt/config-6.1
target/linux/armvirt/image/Makefile
target/linux/armvirt/modules.mk [new file with mode: 0644]

index f3fa13f06f1cc9e26b10e57ef721070bd6d09353..6bb43c22caaada088111090a2dbcc32cdb8f1120 100644 (file)
@@ -1,9 +1,11 @@
 CONFIG_64BIT=y
+CONFIG_ARCH_LAYERSCAPE=y
 CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
 CONFIG_ARCH_MMAP_RND_BITS=18
 CONFIG_ARCH_MMAP_RND_BITS_MAX=24
 CONFIG_ARCH_MMAP_RND_BITS_MIN=18
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
+CONFIG_ARCH_NXP=y
 CONFIG_ARCH_PROC_KCORE_TEXT=y
 CONFIG_ARCH_STACKWALK=y
 CONFIG_ARCH_VEXPRESS=y
@@ -32,21 +34,33 @@ CONFIG_ARM64_PTR_AUTH_KERNEL=y
 CONFIG_ARM64_SME=y
 CONFIG_ARM64_SVE=y
 CONFIG_ARM64_TAGGED_ADDR_ABI=y
-CONFIG_ARM64_VA_BITS=39
-CONFIG_ARM64_VA_BITS_39=y
+CONFIG_ARM64_VA_BITS=48
+CONFIG_ARM64_VA_BITS_48=y
 CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
 CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
 CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
 CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
+# CONFIG_ARM_DMC620_PMU is not set
 CONFIG_ARM_SBSA_WATCHDOG=y
+CONFIG_ARM_SMC_WATCHDOG=y
+CONFIG_ARM_SMMU=y
+# CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is not set
+# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
+CONFIG_ARM_SMMU_V3=y
+# CONFIG_ARM_SMMU_V3_PMU is not set
+# CONFIG_ARM_SMMU_V3_SVA is not set
 CONFIG_ATOMIC64_SELFTEST=y
 CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BLK_PM=y
 CONFIG_CAVIUM_TX2_ERRATUM_219=y
 CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
+CONFIG_CLK_LS1028A_PLLDIG=y
+CONFIG_CLK_QORIQ=y
 CONFIG_CLK_SP810=y
 CONFIG_CLK_VEXPRESS_OSC=y
+# CONFIG_COMMON_CLK_FSL_FLEXSPI is not set
+# CONFIG_COMMON_CLK_FSL_SAI is not set
 # CONFIG_COMPAT_32BIT_TIME is not set
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_MENU=y
@@ -63,6 +77,7 @@ CONFIG_CRYPTO_BLAKE2S=y
 CONFIG_CRYPTO_CHACHA20=y
 CONFIG_CRYPTO_CHACHA20_NEON=y
 CONFIG_CRYPTO_CRYPTD=y
+# CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM is not set
 CONFIG_CRYPTO_GHASH_ARM64_CE=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y
@@ -98,13 +113,21 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 CONFIG_FB_CMDLINE=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_FRAME_POINTER=y
+CONFIG_FRAME_WARN=2048
+# CONFIG_FSL_DPAA is not set
+# CONFIG_FSL_DPAA2_QDMA is not set
 CONFIG_FSL_ERRATUM_A008585=y
+# CONFIG_FSL_FMAN is not set
+# CONFIG_FSL_IMX8_DDR_PMU is not set
+# CONFIG_FSL_PQ_MDIO is not set
 CONFIG_FUJITSU_ERRATUM_010001=y
 CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
 CONFIG_GENERIC_CSUM=y
 CONFIG_GENERIC_FIND_FIRST_BIT=y
+# CONFIG_GIANFAR is not set
 CONFIG_GPIO_GENERIC=y
 CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_GPIO_MPC8XXX=y
 CONFIG_HDMI=y
 # CONFIG_HISI_PMU is not set
 CONFIG_HW_RANDOM=y
@@ -113,7 +136,19 @@ CONFIG_HW_RANDOM_VIRTIO=y
 CONFIG_I2C=y
 CONFIG_I2C_ALGOBIT=y
 CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_IMX=y
+# CONFIG_I2C_SLAVE_TESTUNIT is not set
 CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
+# CONFIG_IMX2_WDT is not set
+# CONFIG_INPUT_IBM_PANEL is not set
+# CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
+CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
+CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y
+# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
+# CONFIG_IOMMU_IO_PGTABLE_DART is not set
+# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
+CONFIG_IOMMU_SUPPORT=y
 CONFIG_KCMP=y
 CONFIG_LCD_CLASS_DEVICE=m
 # CONFIG_LCD_PLATFORM is not set
@@ -122,6 +157,12 @@ CONFIG_MFD_SYSCON=y
 CONFIG_MFD_VEXPRESS_SYSREG=y
 CONFIG_MMC=y
 CONFIG_MMC_ARMMMCI=y
+CONFIG_MMC_RICOH_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ACPI=y
+CONFIG_MMC_SDHCI_OF_ESDHC=y
+CONFIG_MMC_SDHCI_PCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MODULES_USE_ELF_RELA=y
 CONFIG_NEED_SG_DMA_LENGTH=y
 CONFIG_NO_HZ=y
@@ -129,6 +170,10 @@ CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NR_CPUS=64
 CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y
+# CONFIG_NVMEM_LAYERSCAPE_SFP is not set
+CONFIG_PCIE_LAYERSCAPE=y
+CONFIG_PCI_LAYERSCAPE=y
+# CONFIG_PHY_FSL_LYNX_28G is not set
 CONFIG_PM=y
 CONFIG_PM_CLK=y
 CONFIG_PM_GENERIC_DOMAINS=y
@@ -136,26 +181,34 @@ CONFIG_PM_GENERIC_DOMAINS_OF=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_VEXPRESS=y
 CONFIG_POWER_SUPPLY=y
+CONFIG_QORIQ_THERMAL=y
 CONFIG_QUEUED_RWLOCKS=y
 CONFIG_QUEUED_SPINLOCKS=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
+# CONFIG_RTC_DRV_FSL_FTM_ALARM is not set
 CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_SERIAL_8250_FSL=y
 CONFIG_SMC91X=y
 CONFIG_SPARSEMEM=y
 CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPARSEMEM_VMEMMAP=y
 CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+# CONFIG_SPI_FSL_QUADSPI is not set
 # CONFIG_SPI_HISI_KUNPENG is not set
 # CONFIG_SPI_HISI_SFC_V3XX is not set
 CONFIG_SYNC_FILE=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
 CONFIG_THREAD_INFO_IN_TASK=y
+# CONFIG_UACCE is not set
 CONFIG_UNMAP_KERNEL_AT_EL0=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PLATFORM=y
 CONFIG_VEXPRESS_CONFIG=y
 CONFIG_VIDEOMODE_HELPERS=y
 CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
+# CONFIG_VIRTIO_IOMMU is not set
 CONFIG_VMAP_STACK=y
-CONFIG_WATCHDOG_CORE=y
 CONFIG_ZONE_DMA32=y
index 6cbc963913ce33c28ffba35db2628494a33d94a8..6e6b64a3138e7a39eb077b287b939b510a8249d4 100644 (file)
@@ -65,17 +65,17 @@ CONFIG_ARM64_VA_BITS_39=y
 CONFIG_ARM_AMBA=y
 CONFIG_ARM_ARCH_TIMER=y
 CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
-# CONFIG_ARM_DMC620_PMU is not set
 CONFIG_ARM_GIC=y
 CONFIG_ARM_GIC_V2M=y
 CONFIG_ARM_GIC_V3=y
 CONFIG_ARM_GIC_V3_ITS=y
 CONFIG_ARM_GIC_V3_ITS_PCI=y
 CONFIG_ARM_PSCI_FW=y
-# CONFIG_ARM_SMMU_V3_PMU is not set
 CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
 CONFIG_BALLOON_COMPACTION=y
 CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_NVME=y
+CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_MQ_PCI=y
 CONFIG_BLK_MQ_VIRTIO=y
 CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
@@ -177,6 +177,7 @@ CONFIG_HZ_PERIODIC=y
 # CONFIG_I2C_AMD_MP2 is not set
 CONFIG_I2C_HID_ACPI=y
 # CONFIG_I2C_HISI is not set
+# CONFIG_I2C_SLAVE_TESTUNIT is not set
 CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
 # CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
 CONFIG_INITRAMFS_SOURCE=""
@@ -208,6 +209,8 @@ CONFIG_NET_FLOW_LIMIT=y
 CONFIG_NLS=y
 CONFIG_NR_CPUS=256
 CONFIG_NVMEM=y
+CONFIG_NVME_CORE=y
+# CONFIG_NVME_MULTIPATH is not set
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
@@ -251,11 +254,19 @@ CONFIG_RWSEM_SPIN_ON_OWNER=y
 CONFIG_SCSI=y
 CONFIG_SCSI_COMMON=y
 CONFIG_SCSI_VIRTIO=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
+CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_EARLYCON=y
 CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SG_POOL=y
 CONFIG_SMP=y
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
@@ -282,9 +293,14 @@ CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y
 CONFIG_TREE_RCU=y
 CONFIG_TREE_SRCU=y
+# CONFIG_UACCE is not set
 CONFIG_UCS2_STRING=y
 CONFIG_UNMAP_KERNEL_AT_EL0=y
+CONFIG_USB=y
+CONFIG_USB_STORAGE=y
 CONFIG_USB_SUPPORT=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PCI=y
 CONFIG_VIRTIO=y
 CONFIG_VIRTIO_BALLOON=y
 CONFIG_VIRTIO_BLK=y
@@ -296,5 +312,6 @@ CONFIG_VIRTIO_PCI=y
 CONFIG_VIRTIO_PCI_LEGACY=y
 CONFIG_VIRTIO_PCI_LIB=y
 CONFIG_VMAP_STACK=y
+CONFIG_WATCHDOG_CORE=y
 CONFIG_XPS=y
 CONFIG_ZONE_DMA32=y
index 50c993b5225d6f3e273f8e080af93da590f0ef5f..2de26afb546b5043079953ad6e1b4812733e625a 100644 (file)
@@ -106,7 +106,8 @@ define Device/generic
   GRUB2_VARIANT := generic
   FILESYSTEMS := ext4 squashfs
   DEVICE_PACKAGES += kmod-amazon-ena kmod-e1000e kmod-vmxnet3 kmod-rtc-rx8025 \
-       kmod-i2c-mux-pca954x kmod-gpio-pca953x partx-utils
+       kmod-i2c-mux-pca954x kmod-gpio-pca953x partx-utils kmod-wdt-sp805 \
+       kmod-fsl-dpaa2-net kmod-sfp
 endef
 TARGET_DEVICES += generic
 
diff --git a/target/linux/armvirt/modules.mk b/target/linux/armvirt/modules.mk
new file mode 100644 (file)
index 0000000..3ac3f6a
--- /dev/null
@@ -0,0 +1,96 @@
+define KernelPackage/acpi-mdio
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=ACPI MDIO support
+  DEPENDS:=@(TARGET_armvirt_64) +kmod-libphy +kmod-mdio-devres
+  KCONFIG:=CONFIG_ACPI_MDIO
+  FILES:=$(LINUX_DIR)/drivers/net/mdio/acpi_mdio.ko
+  AUTOLOAD:=$(call AutoLoad,11,acpi_mdio)
+endef
+
+define KernelPackage/acpi-mdio/description
+ Kernel driver for ACPI MDIO support
+endef
+
+$(eval $(call KernelPackage,acpi-mdio))
+
+define KernelPackage/fsl-pcs-lynx
+  SUBMENU=$(NETWORK_DEVICES_MENU)
+  DEPENDS:=@(TARGET_armvirt_64) +kmod-libphy +kmod-of-mdio +kmod-phylink
+  TITLE:=NXP (Freescale) Lynx PCS
+  HIDDEN:=1
+  KCONFIG:=CONFIG_PCS_LYNX
+  FILES=$(LINUX_DIR)/drivers/net/pcs/pcs-lynx.ko
+  AUTOLOAD=$(call AutoLoad,30,pcs-lynx)
+endef
+
+$(eval $(call KernelPackage,fsl-pcs-lynx))
+
+define KernelPackage/fsl-xgmac-mdio
+  SUBMENU=$(NETWORK_DEVICES_MENU)
+  DEPENDS:=@(TARGET_armvirt_64) +kmod-libphy +kmod-of-mdio +kmod-acpi-mdio
+  TITLE:=NXP (Freescale) MDIO bus
+  KCONFIG:=CONFIG_FSL_XGMAC_MDIO
+  FILES=$(LINUX_DIR)/drivers/net/ethernet/freescale/xgmac_mdio.ko
+  AUTOLOAD=$(call AutoLoad,30,xgmac_mdio)
+endef
+
+$(eval $(call KernelPackage,fsl-xgmac-mdio))
+
+define KernelPackage/fsl-mc-dpio
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=NXP DPAA2 DPIO (Data Path IO) driver
+  HIDDEN:=1
+  KCONFIG:=CONFIG_FSL_MC_BUS=y \
+    CONFIG_FSL_MC_DPIO
+  FILES:=$(LINUX_DIR)/drivers/soc/fsl/dpio/fsl-mc-dpio.ko
+  AUTOLOAD=$(call AutoLoad,30,fsl-mc-dpio)
+endef
+
+$(eval $(call KernelPackage,fsl-mc-dpio))
+
+define KernelPackage/fsl-dpaa2-net
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=NXP DPAA2 Ethernet
+  DEPENDS:=@(TARGET_armvirt_64) +kmod-fsl-xgmac-mdio +kmod-phylink \
+    +kmod-fsl-pcs-lynx +kmod-fsl-mc-dpio
+  KCONFIG:= \
+    CONFIG_FSL_MC_UAPI_SUPPORT=y \
+    CONFIG_FSL_DPAA2_ETH
+  FILES:= \
+  $(LINUX_DIR)/drivers/net/ethernet/freescale/dpaa2/fsl-dpaa2-eth.ko
+  AUTOLOAD=$(call AutoLoad,35,fsl-dpaa2-eth)
+endef
+
+$(eval $(call KernelPackage,fsl-dpaa2-net))
+
+define KernelPackage/fsl-dpaa2-console
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=NXP DPAA2 Debug console
+  DEPENDS:=@(TARGET_armvirt_64)
+  KCONFIG:=CONFIG_DPAA2_CONSOLE
+  FILES=$(LINUX_DIR)/drivers/soc/fsl/dpaa2-console.ko
+  AUTOLOAD=$(call AutoLoad,40,dpaa2-console)
+endef
+
+define KernelPackage/fsl-dpaa2-console/description
+  Kernel modules for the NXP DPAA2 debug consoles
+  (Management Complex and AIOP).
+endef
+
+$(eval $(call KernelPackage,fsl-dpaa2-console))
+
+define KernelPackage/wdt-sp805
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=ARM SP805 Watchdog
+  KCONFIG:=CONFIG_ARM_SP805_WATCHDOG
+  FILES=$(LINUX_DIR)/drivers/watchdog/sp805_wdt.ko
+  AUTOLOAD=$(call AutoLoad,50,sp805_wdt)
+endef
+
+define KernelPackage/wdt-sp805/description
+  Support for the ARM SP805 wathchdog module.
+  This is present in the NXP Layerscape family,
+  HiSilicon HI3660 among others.
+endef
+
+$(eval $(call KernelPackage,wdt-sp805))