From 2c2d77bd3bd4691c5f8f1760b9ef16f96f345255 Mon Sep 17 00:00:00 2001 From: Yangbo Lu Date: Mon, 3 Aug 2020 12:52:22 +0800 Subject: [PATCH] layerscape: add FRWY-LS1046A board support The LS1046A Freeway board (FRWY) is a high-performance computing, evaluation, and development platform that supports the QorIQ LS1046A architecture processor capable of support more than 32,000 CoreMark performance. The FRWY-LS1046A board supports the QorIQ LS1046A processor, onboard DDR4 memory, multiple Gigabit Ethernet, USB3.0 and M2_Type_E interfaces for Wi-Fi. The FRWY-LS1046A-TP includes the Coral Tensor Flow Processing Unit that offloads AI/ML inferencing from the CPU to provide significant boost for AI/ML applications. The FRWY-LS1046A-TP includes one M.2 TPU module and more modules can easily be added including USB versions of the module to scale the AI/ML performance. Signed-off-by: Yangbo Lu [rebase, use AUTORELEASE, fix sorting, add dtb to firmware part] Signed-off-by: Adrian Schmutzler --- package/boot/tfa-layerscape/Makefile | 18 +++++++- package/boot/uboot-layerscape/Makefile | 14 ++++++- .../files/fsl_ls1046a-frwy-sdboot-uEnv.txt | 8 ++++ .../files/fsl_ls1046a-frwy-uEnv.txt | 8 ++++ package/firmware/layerscape/ls-rcw/Makefile | 6 ++- .../base-files/lib/upgrade/platform.sh | 5 +++ target/linux/layerscape/image/armv8_64b.mk | 41 +++++++++++++++++++ 7 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 package/boot/uboot-layerscape/files/fsl_ls1046a-frwy-sdboot-uEnv.txt create mode 100644 package/boot/uboot-layerscape/files/fsl_ls1046a-frwy-uEnv.txt diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index bf3f132c086..c0efd3ad9e8 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tfa-layerscape PKG_VERSION:=LSDK-20.04-update-290520 -PKG_RELEASE:=2 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/atf @@ -74,6 +74,20 @@ define Package/tfa-ls1043a-rdb-sdboot BOOT_MODE:=sd endef +define Package/tfa-ls1046a-frwy + $(Package/tfa-generic) + TITLE:=NXP LS1046AFRWY Trusted Firmware + PLAT:=ls1046afrwy + BOOT_MODE:=qspi +endef + +define Package/tfa-ls1046a-frwy-sdboot + $(Package/tfa-generic) + TITLE:=NXP LS1046AFRWY SD Boot Trusted Firmware + PLAT:=ls1046afrwy + BOOT_MODE:=sd +endef + define Package/tfa-ls1046a-rdb $(Package/tfa-generic) TITLE:=NXP LS1046ARDB Trusted Firmware @@ -134,6 +148,8 @@ TFAS := \ ls1012a-frwy-sdboot \ ls1043a-rdb \ ls1043a-rdb-sdboot \ + ls1046a-frwy \ + ls1046a-frwy-sdboot \ ls1046a-rdb \ ls1046a-rdb-sdboot \ ls1088a-rdb \ diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index ec1b45d70fa..98b129f0ff1 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-layerscape PKG_VERSION:=LSDK-20.04-update-290520 -PKG_RELEASE:=2 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot @@ -55,6 +55,16 @@ define U-Boot/fsl_ls1043a-rdb-sdboot UBOOT_CONFIG:=ls1043ardb_tfa endef +define U-Boot/fsl_ls1046a-frwy + NAME:=NXP LS1046AFRWY + UBOOT_CONFIG:=ls1046afrwy_tfa +endef + +define U-Boot/fsl_ls1046a-frwy-sdboot + NAME:=NXP LS1046AFRWY SD Card Boot + UBOOT_CONFIG:=ls1046afrwy_tfa +endef + define U-Boot/fsl_ls1046a-rdb NAME:=NXP LS1046ARDB UBOOT_CONFIG:=ls1046ardb_tfa @@ -109,6 +119,8 @@ UBOOT_TARGETS := \ fsl_ls1012a-frwy-sdboot \ fsl_ls1043a-rdb \ fsl_ls1043a-rdb-sdboot \ + fsl_ls1046a-frwy \ + fsl_ls1046a-frwy-sdboot \ fsl_ls1046a-rdb \ fsl_ls1046a-rdb-sdboot \ fsl_ls1088a-rdb \ diff --git a/package/boot/uboot-layerscape/files/fsl_ls1046a-frwy-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1046a-frwy-sdboot-uEnv.txt new file mode 100644 index 00000000000..ed16dde9843 --- /dev/null +++ b/package/boot/uboot-layerscape/files/fsl_ls1046a-frwy-sdboot-uEnv.txt @@ -0,0 +1,8 @@ +fdtaddr=0x8f000000 +loadaddr=0x81000000 +bootm_size=0x10000000 +hwconfig=fsl_ddr:bank_intlv=auto +sd_boot=ext4load mmc 0:1 ${loadaddr} fitImage;bootm ${loadaddr} +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +bootcmd=echo starting openwrt ...;run sd_boot +bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1046a-frwy-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1046a-frwy-uEnv.txt new file mode 100644 index 00000000000..9daba4aedb2 --- /dev/null +++ b/package/boot/uboot-layerscape/files/fsl_ls1046a-frwy-uEnv.txt @@ -0,0 +1,8 @@ +fdtaddr=0x8f000000 +loadaddr=0x81000000 +bootm_size=0x10000000 +hwconfig=fsl_ddr:bank_intlv=auto +qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr +bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) +bootcmd=echo starting openwrt ...;run qspi_boot +bootdelay=3 diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile index 6245e89633d..421ef19e7b3 100644 --- a/package/firmware/layerscape/ls-rcw/Makefile +++ b/package/firmware/layerscape/ls-rcw/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ls-rcw PKG_VERSION:=LSDK-20.04-update-290520 -PKG_RELEASE:=2 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/rcw @@ -31,6 +31,8 @@ BOARDS := \ ls1012a-frwy-sdboot \ ls1043a-rdb \ ls1043a-rdb-sdboot \ + ls1046a-frwy \ + ls1046a-frwy-sdboot \ ls1046a-rdb \ ls1046a-rdb-sdboot \ ls1088a-rdb \ @@ -43,6 +45,8 @@ RCW_ls1012a-frdm :=ls1012afrdm/N_SSNP_3305/rcw_800.bin RCW_ls1012a-frwy-sdboot :=ls1012afrwy/N_SSNP_3305/rcw_1000_default.bin RCW_ls1043a-rdb :=ls1043ardb/RR_FQPP_1455/rcw_1600.bin RCW_ls1043a-rdb-sdboot :=ls1043ardb/RR_FQPP_1455/rcw_1600_sdboot.bin +RCW_ls1046a-frwy :=ls1046afrwy/NN_NNQNNPNP_3040_0506/rcw_1600_qspiboot.bin +RCW_ls1046a-frwy-sdboot :=ls1046afrwy/NN_NNQNNPNP_3040_0506/rcw_1600_sdboot.bin RCW_ls1046a-rdb :=ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot.bin RCW_ls1046a-rdb-sdboot :=ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_sdboot.bin RCW_ls1088a-rdb :=ls1088ardb/FCQQQQQQQQ_PPP_H_0x1d_0x0d/rcw_1600_qspi.bin diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index a8d83de7eaf..f9b1e57a434 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -72,6 +72,7 @@ platform_copy_config() { fsl,ls1021a-iot-sdboot | \ fsl,ls1021a-twr-sdboot | \ fsl,ls1043a-rdb-sdboot | \ + fsl,ls1046a-frwy-sdboot | \ fsl,ls1046a-rdb-sdboot | \ fsl,ls1088a-rdb-sdboot) platform_copy_config_sdboot @@ -95,6 +96,8 @@ platform_check_image() { fsl,ls1021a-twr-sdboot | \ fsl,ls1043a-rdb | \ fsl,ls1043a-rdb-sdboot | \ + fsl,ls1046a-frwy | \ + fsl,ls1046a-frwy-sdboot | \ fsl,ls1046a-rdb | \ fsl,ls1046a-rdb-sdboot | \ fsl,ls1088a-rdb | \ @@ -125,6 +128,7 @@ platform_do_upgrade() { fsl,ls1012a-rdb | \ fsl,ls1021a-twr | \ fsl,ls1043a-rdb | \ + fsl,ls1046a-frwy | \ fsl,ls1046a-rdb | \ fsl,ls1088a-rdb | \ fsl,ls2088a-rdb) @@ -135,6 +139,7 @@ platform_do_upgrade() { fsl,ls1021a-iot-sdboot | \ fsl,ls1021a-twr-sdboot | \ fsl,ls1043a-rdb-sdboot | \ + fsl,ls1046a-frwy-sdboot | \ fsl,ls1046a-rdb-sdboot | \ fsl,ls1088a-rdb-sdboot) platform_do_upgrade_sdboot "$1" diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 958faa270e8..c037061aa20 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -151,6 +151,47 @@ define Device/fsl_ls1043a-rdb-sdboot endef TARGET_DEVICES += fsl_ls1043a-rdb-sdboot +define Device/fsl_ls1046a-frwy + DEVICE_VENDOR := NXP + DEVICE_MODEL := FRWY-LS1046A + DEVICE_VARIANT := Default + DEVICE_PACKAGES += \ + layerscape-fman \ + tfa-ls1046a-frwy + DEVICE_DTS := freescale/fsl-ls1046a-frwy-sdk + IMAGE/firmware.bin := \ + ls-clean | \ + ls-append $(1)-bl2.pbl | pad-to 1M | \ + ls-append $(1)-fip.bin | pad-to 5M | \ + ls-append $(1)-uboot-env.bin | pad-to 9M | \ + ls-append fsl_ls1046a-rdb-fman.bin | pad-to 15M | \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ + append-kernel | pad-to 32M | \ + append-rootfs | pad-rootfs | check-size +endef +TARGET_DEVICES += fsl_ls1046a-frwy + +define Device/fsl_ls1046a-frwy-sdboot + $(Device/fsl-sdboot) + DEVICE_VENDOR := NXP + DEVICE_MODEL := FRWY-LS1046A + DEVICE_VARIANT := SD Card Boot + DEVICE_PACKAGES += \ + layerscape-fman \ + tfa-ls1046a-frwy-sdboot + DEVICE_DTS := freescale/fsl-ls1046a-frwy-sdk + IMAGE/sdcard.img.gz := \ + ls-clean | \ + ls-append-sdhead $(1) | pad-to 4K | \ + ls-append $(1)-bl2.pbl | pad-to 1M | \ + ls-append $(1)-fip.bin | pad-to 5M | \ + ls-append $(1)-uboot-env.bin | pad-to 9M | \ + ls-append fsl_ls1046a-rdb-fman.bin | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip +endef +TARGET_DEVICES += fsl_ls1046a-frwy-sdboot + define Device/fsl_ls1046a-rdb $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP -- 2.30.2