Skip to contentSkip to conversation

Add J7200 HS platform support

PATCH New Yogesh Siraswar 1 participant 4 messages Nov 16, 2021

lore
Share & tools
lore
#0 lore raw

cover Add J7200 HS platform support

This series adds J7200 HS support for HS-SE devices.

Yogesh Siraswar (3):
conf: machine: Add j7200 hs platform
ti-rtos-firmware: Add j7200 hs support
j7200-hs: changes to support new hs platform

 conf/machine/j7200-hs-evm-k3r5.conf           | 13 +++++++
 conf/machine/j7200-hs-evm.conf                | 22 ++++++++++++
 recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb        | 18 ++++++++++
 .../trusted-firmware-a_%.bbappend             |  8 +++++
 recipes-bsp/u-boot/u-boot-ti.inc              |  6 ++++
 recipes-security/optee/optee-os_%.bbappend    |  4 +++
 recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb    | 34 +++++++++++++++++++
 7 files changed, 105 insertions(+)
 create mode 100644 conf/machine/j7200-hs-evm-k3r5.conf
 create mode 100644 conf/machine/j7200-hs-evm.conf
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/3 conf: machine: Add j7200 hs platform

Machine conf for J7200 HS platform.
Used am64xx hs and j721e hs as reference.

---
 conf/machine/j7200-hs-evm-k3r5.conf | 13 +++++++++++++
 conf/machine/j7200-hs-evm.conf      | 22 ++++++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 conf/machine/j7200-hs-evm-k3r5.conf
 create mode 100644 conf/machine/j7200-hs-evm.conf
conf/machine/j7200-hs-evm-k3r5.conf new file +13 -0
new file mode 100644
index 00000000..488f19ec
@@ -0,0 +1,13 @@
+#@TYPE: Machine
+#@NAME: J7200 HS EVM (R5F)
+#@DESCRIPTION: Machine configuration for the TI J7200 HS EVM (R5F core)
+
+require conf/machine/include/k3r5.inc
+
+SYSFW_SOC = "j7200"
+SYSFW_CONFIG = "evm"
+SYSFW_SUFFIX = "hs"
+
+UBOOT_MACHINE = "j7200_hs_evm_r5_defconfig"
+
+TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
conf/machine/j7200-hs-evm.conf new file +22 -0
new file mode 100644
index 00000000..c55be005
@@ -0,0 +1,22 @@
+#@TYPE: Machine
+#@NAME: J7200 HS EVM
+#@DESCRIPTION: Machine configuration for the TI J7200 HS EVM
+
+require conf/machine/j7-evm.conf
+
+UBOOT_MACHINE = "j7200_hs_evm_a72_defconfig"
+
+UBOOT_ENTRYPOINT =       "0x80080000"
+UBOOT_LOADADDRESS =      "0x80080000"
+UBOOT_RD_LOADADDRESS =   "0x84000000"
+UBOOT_RD_ENTRYPOINT =    "0x84000000"
+UBOOT_DTB_LOADADDRESS =  "0x83000000"
+UBOOT_DTBO_LOADADDRESS = "0x83080000"
+UBOOT_DTBO_OFFSET =      "0x00010000"
+
+SPL_BINARY = "tispl.bin_HS"
+SPL_BINARYNAME = "tispl.bin"
+UBOOT_BINARY = "u-boot.img_HS"
+IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+
+TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/3 ti-rtos-firmware: Add j7200 hs support

In reply to Yogesh Siraswar

We cannot use j7200 keyword for match b'n j7200-evm and j7200-hs-evm due to existing j7 keyword, we need to duplicate all the j7200 entries for hs.

Also sign the DM firmware for J7200 similar to J7 HS

---
 recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb +34 -0
index ea69ad89..6d24f7fe 100644
@@ -15,6 +15,7 @@ inherit update-alternatives
 PLAT_SFX = ""
 PLAT_SFX_j7 = "j721e"
 PLAT_SFX_j7200-evm = "j7200"
+PLAT_SFX_j7200-hs-evm = "j7200"
 PLAT_SFX_am65xx = "am65xx"
 PLAT_SFX_am64xx = "am64xx"
 
@@ -55,6 +56,15 @@ do_install_prepend_j7-hs-evm() {
 	)
 }
 
+# J7 HS support
+do_install_prepend_j7200-hs-evm() {
+        export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG}
+        ( cd ${RTOS_DM_FW_DIR}; \
+                mv ${DM_FIRMWARE} ${DM_FIRMWARE}.unsigned; \
+                ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${DM_FIRMWARE}.unsigned ${DM_FIRMWARE}; \
+        )
+}
+
 # Update the am64xx ipc binaries to be consistent with other platforms
 do_install_prepend_am64xx() {
         ( cd ${RTOS_IPC_FW_DIR}; \
@@ -100,6 +110,18 @@ do_install_j7200-evm() {
     install -m 0644 ${RTOS_ETH_FW_DIR}/app_remoteswitchcfg_server_strip.xer5f ${LEGACY_ETH_FW_DIR}
 }
 
+do_install_j7200-hs-evm() {
+    install -d ${LEGACY_IPC_FW_DIR}
+    install -m 0644 ${RTOS_IPC_FW_DIR}/ipc_echo_test_mcu1_1_release_strip.xer5f ${LEGACY_IPC_FW_DIR}
+    install -m 0644 ${RTOS_IPC_FW_DIR}/ipc_echo_test_mcu2_0_release_strip.xer5f ${LEGACY_IPC_FW_DIR}
+    install -m 0644 ${RTOS_IPC_FW_DIR}/ipc_echo_test_mcu2_1_release_strip.xer5f ${LEGACY_IPC_FW_DIR}
+    # DM Firmware
+    install -m 0644 ${RTOS_DM_FW_DIR}/ipc_echo_testb_mcu1_0_release_strip.xer5f ${LEGACY_DM_FW_DIR}
+    # ETH firmware
+    install -d ${LEGACY_ETH_FW_DIR}
+    install -m 0644 ${RTOS_ETH_FW_DIR}/app_remoteswitchcfg_server_strip.xer5f ${LEGACY_ETH_FW_DIR}
+}
+
 do_install_am65xx() {
     install -d ${LEGACY_IPC_FW_DIR}
     install -m 0644 ${RTOS_IPC_FW_DIR}/ipc_echo_test_mcu1_0_release_strip.xer5f ${LEGACY_IPC_FW_DIR}
@@ -148,6 +170,13 @@ ALTERNATIVE_${PN}_j7200-evm = "\
                     j7200-main-r5f0_1-fw \
                     "
 
+ALTERNATIVE_${PN}_j7200-hs-evm = "\
+                    j7200-mcu-r5f0_0-fw \
+                    j7200-mcu-r5f0_1-fw \
+                    j7200-main-r5f0_0-fw \
+                    j7200-main-r5f0_1-fw \
+                    "
+
 # Set up link names for the firmwares
 
 TARGET_MCU_R5FSS0_0_am65xx = "am65x-mcu-r5f0_0-fw"
@@ -174,6 +203,11 @@ TARGET_MCU_R5FSS0_1_j7200-evm = "j7200-mcu-r5f0_1-fw"
 TARGET_MAIN_R5FSS0_0_j7200-evm = "j7200-main-r5f0_0-fw"
 TARGET_MAIN_R5FSS0_1_j7200-evm = "j7200-main-r5f0_1-fw"
 
+TARGET_MCU_R5FSS0_0_j7200-hs-evm = "j7200-mcu-r5f0_0-fw"
+TARGET_MCU_R5FSS0_1_j7200-hs-evm = "j7200-mcu-r5f0_1-fw"
+TARGET_MAIN_R5FSS0_0_j7200-hs-evm = "j7200-main-r5f0_0-fw"
+TARGET_MAIN_R5FSS0_1_j7200-hs-evm = "j7200-main-r5f0_1-fw"
+
 ALTERNATIVE_LINK_NAME[am65x-mcu-r5f0_0-fw] = "${base_libdir}/firmware/${TARGET_MCU_R5FSS0_0}"
 ALTERNATIVE_LINK_NAME[am65x-mcu-r5f0_1-fw] = "${base_libdir}/firmware/${TARGET_MCU_R5FSS0_1}"
 
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/3 j7200-hs: changes to support new hs platform

In reply to Yogesh Siraswar

Changes to support new j7200 hs platform in:
1) optee: sign the image
2) atf: sign the image
3) u-boot: Add u-boot-spl image for combined boot image
4) ti-sci-fw_git: Update firmware prefix for j7200 hs

---
 recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb         | 18 ++++++++++++++++++
 .../trusted-firmware-a_%.bbappend              |  8 ++++++++
 recipes-bsp/u-boot/u-boot-ti.inc               |  6 ++++++
 recipes-security/optee/optee-os_%.bbappend     |  4 ++++
 4 files changed, 36 insertions(+)
recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +18 -0
index 9c70120c..4f1dd145 100644
@@ -2,6 +2,7 @@ require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
 
 DEPENDS = "openssl-native u-boot-mkimage-native dtc-native"
 DEPENDS_append_j7200-evm-k3r5 = " virtual/bootloader"
+DEPENDS_append_j7200-hs-evm-k3r5 = " virtual/bootloader"
 DEPENDS_append_am64xx-evm-k3r5 = " virtual/bootloader"
 DEPENDS_append_am64xx-hs-evm-k3r5 = " virtual/bootloader"
 
@@ -24,6 +25,7 @@ SYSFW_PREFIX = "ti-sci-firmware"
 SYSFW_PREFIX_j7-evm-k3r5 = "ti-fs-firmware"
 SYSFW_PREFIX_j7200-evm-k3r5 = "ti-fs-firmware"
 SYSFW_PREFIX_j7-hs-evm-k3r5 = "ti-fs-firmware"
+SYSFW_PREFIX_j7200-hs-evm-k3r5 = "ti-fs-firmware"
 
 SYSFW_SUFFIX ?= "unknown"
 
@@ -54,6 +56,7 @@ EXTRA_OEMAKE_HS = " \
 EXTRA_OEMAKE_append = "${@['',' ${EXTRA_OEMAKE_HS}']['${SYSFW_SUFFIX}' == 'hs']}"
 
 EXTRA_OEMAKE_append_j7200-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
+EXTRA_OEMAKE_append_j7200-hs-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
 EXTRA_OEMAKE_append_am64xx-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
 EXTRA_OEMAKE_append_am64xx-hs-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
 
@@ -103,6 +106,21 @@ do_deploy_j7200-evm-k3r5() {
 	install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
 }
 
+do_install_j7200-hs-evm-k3r5() {
+        install -d ${D}/boot
+        install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
+        ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
+        ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+}
+
+do_deploy_j7200-hs-evm-k3r5() {
+        install -d ${DEPLOYDIR}
+        install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+        ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
+        ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
+        install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
+}
+
 do_install_am64xx-evm-k3r5() {
 	install -d ${D}/boot
 	install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend +8 -0
index 90fa0333..2a8f41ee 100644
@@ -31,3 +31,11 @@ do_compile_append_j7-hs-evm() {
 		${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \
 	)
 }
+
+do_compile_append_j7200-hs-evm() {
+        export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG}
+        ( cd ${B}/${BUILD_DIR}/release/; \
+                mv bl31.bin bl31.bin.unsigned; \
+                ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \
+        )
+}
recipes-bsp/u-boot/u-boot-ti.inc +6 -0
index 131c03e8..f9cbb074 100644
@@ -65,6 +65,7 @@ SPL_UART_BINARY_keystone = ""
 SPL_UART_BINARY_k3r5 = ""
 SPL_UART_BINARY_lego-ev3 = ""
 SPL_UART_BINARY_j7200-evm-k3r5 = "u-boot-spl.bin"
+SPL_UART_BINARY_j7200-hs-evm-k3r5 = "u-boot-spl.bin"
 SPL_UART_BINARY_am64xx-evm-k3r5 = "u-boot-spl.bin"
 SPL_UART_BINARY_am64xx-hs-evm-k3r5 = "u-boot-spl.bin"
 
@@ -397,6 +398,11 @@ do_deploy_append_j7200-evm-k3r5 () {
 	mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true
 }
 
+do_deploy_append_j7200-hs-evm-k3r5 () {
+	mv ${DEPLOYDIR}/tiboot3.bin ${DEPLOYDIR}/tiboot3-r5spl.bin || true
+	mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true
+}
+
 do_deploy_append_am64xx-evm-k3r5 () {
 	mv ${DEPLOYDIR}/tiboot3.bin ${DEPLOYDIR}/tiboot3-r5spl.bin || true
 	mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true
recipes-security/optee/optee-os_%.bbappend +4 -0
index 401ac534..9bd0b933 100644
@@ -69,6 +69,10 @@ do_compile_append_j7-hs-evm() {
     optee_sign_k3hs
 }
 
+do_compile_append_j7200-hs-evm() {
+    optee_sign_k3hs
+}
+
 do_install_append_ti-soc() {
     install -m 644 ${B}/*.optee ${D}${nonarch_base_libdir}/firmware/ || true
     install -m 644 ${B}/bl32.bin ${D}${nonarch_base_libdir}/firmware/ || true
Signature · 1 line
2.17.1