From patchwork Tue Dec 27 08:43:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chirag Shilwant X-Patchwork-Id: 17261 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3651FC10F1B for ; Tue, 27 Dec 2022 08:44:06 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by mx.groups.io with SMTP id smtpd.web10.153352.1672130643157737668 for ; Tue, 27 Dec 2022 00:44:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=sGrHYaCm; spf=pass (domain: ti.com, ip: 198.47.19.142, mailfrom: c-shilwant@ti.com) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2BR8hsvQ067521; Tue, 27 Dec 2022 02:43:54 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1672130634; bh=bRQzVYao8zVptqBCPj+2woALfDHZw4bOzeCHulPjuTw=; h=From:To:CC:Subject:Date; b=sGrHYaCmQWsVbf62z9xWaRVB1L5MoTqjYchIRsRmumDXIyOiPGrDe9HD5kaorTQ+p MrBHFp2H1ZRTYkx2RLQ5Ol4A4ueFX8quR8t2mKTL6mK8uIlw2OCwnr3lDYEeEL8Kt8 YRp+osPH3bdLkv44HZbrtAcOARUyD6Ap6wMCrAOw= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2BR8hsPc075114 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 27 Dec 2022 02:43:54 -0600 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 27 Dec 2022 02:43:53 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 27 Dec 2022 02:43:53 -0600 Received: from chirag (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2BR8hr6Q014697; Tue, 27 Dec 2022 02:43:53 -0600 Received: from sadivi by chirag with local (Exim 4.90_1) (envelope-from ) id 1pA5Yu-0003Jx-0z; Tue, 27 Dec 2022 14:13:52 +0530 From: Chirag Shilwant To: Praneeth Bajjuri , Denys Dmytriyenko , Ryan Eatmon , CC: Sai Sree Kartheek Adivi , Paresh Bhagat , Gyan Gupta Subject: [meta-ti][dunfell][PATCH] machine: Add AM62Q HS-SE evm configuration Date: Tue, 27 Dec 2022 14:13:48 +0530 Message-ID: <20221227084348.12458-1-c-shilwant@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 27 Dec 2022 08:44:06 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/15504 Lets add the basic AM62Q HS-SE configuration. - Add configurations. - Add ti-sci-firmware overrides. - Add u-boot overrides. - Add optee overrides. - Add ti-rtos-firmware overrides. Signed-off-by: Chirag Shilwant --- conf/machine/am62xx-lp-evm-k3r5-hs-se.conf | 14 +++++++++ conf/machine/am62xx-lp-evm-k3r5.conf | 12 ++++++-- conf/machine/am62xx-lp-evm.conf | 6 +++- conf/machine/include/am62xx-lp.inc | 18 +++++++++++ conf/multiconfig/k3r5-hs-se.conf | 3 ++ recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 1 + .../trusted-firmware-a_%.bbappend | 4 +++ recipes-bsp/u-boot/u-boot-ti.inc | 1 + recipes-security/optee/optee-os_%.bbappend | 4 +++ recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb | 30 +++++++++++++++++++ 10 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 conf/machine/am62xx-lp-evm-k3r5-hs-se.conf create mode 100644 conf/machine/include/am62xx-lp.inc create mode 100644 conf/multiconfig/k3r5-hs-se.conf diff --git a/conf/machine/am62xx-lp-evm-k3r5-hs-se.conf b/conf/machine/am62xx-lp-evm-k3r5-hs-se.conf new file mode 100644 index 00000000..a2c9646b --- /dev/null +++ b/conf/machine/am62xx-lp-evm-k3r5-hs-se.conf @@ -0,0 +1,14 @@ +#@TYPE: Machine +#@NAME: AM62xx LPSK HS-SE EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM64xx SR2.0 HS-SE EVM (R5F core) + +# Booting HS-SE requires different SYSFW, the rest is handled at runtime + +require conf/machine/include/k3r5.inc +SOC_FAMILY_append = ":k3r5-hs-se" + +SYSFW_SOC = "am62x" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs" + +UBOOT_MACHINE = "am62x_lpsk_r5_defconfig" diff --git a/conf/machine/am62xx-lp-evm-k3r5.conf b/conf/machine/am62xx-lp-evm-k3r5.conf index ca4ced5a..0aaca286 100644 --- a/conf/machine/am62xx-lp-evm-k3r5.conf +++ b/conf/machine/am62xx-lp-evm-k3r5.conf @@ -1,11 +1,19 @@ #@TYPE: Machine -#@NAME: AM62XX LP EVM (R5F) -#@DESCRIPTION: Machine configuration for the TI AM62xx LP EVM (R5F core) +#@NAME: AM62XX LP GP EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM62xx LP GP EVM (R5F core) require conf/machine/include/k3r5.inc +SOC_FAMILY_append = ":k3r5-gp" SYSFW_SOC = "am62x" SYSFW_CONFIG = "evm" SYSFW_SUFFIX = "gp" +SYSFW_TIBOOT3_SYMLINK = "" + UBOOT_MACHINE = "am62x_lpsk_r5_defconfig" + +SPL_BINARY = "" +UBOOT_BINARY = "u-boot-spl.${UBOOT_SUFFIX}" +UBOOT_IMAGE = "u-boot-r5spl-gp-${MAINMACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_SYMLINK = "u-boot-r5spl-gp.${UBOOT_SUFFIX}" diff --git a/conf/machine/am62xx-lp-evm.conf b/conf/machine/am62xx-lp-evm.conf index ef8e8692..52360882 100644 --- a/conf/machine/am62xx-lp-evm.conf +++ b/conf/machine/am62xx-lp-evm.conf @@ -2,7 +2,7 @@ #@NAME: AM62XX LP EVM #@DESCRIPTION: Machine configuration for the TI AM62XX LP EVM -require conf/machine/include/am62xx.inc +require conf/machine/include/am62xx-lp.inc MACHINE_FEATURES += "gpu" @@ -13,4 +13,8 @@ KERNEL_DEVICETREE = " \ ti/k3-am625-sk-csi2-ov5640.dtbo \ " +SPL_BINARY = "tispl.bin_HS" +UBOOT_BINARY = "u-boot.img_HS" +UBOOT_SYMLINK = "u-boot.img" + UBOOT_MACHINE = "am62x_lpsk_a53_defconfig" diff --git a/conf/machine/include/am62xx-lp.inc b/conf/machine/include/am62xx-lp.inc new file mode 100644 index 00000000..782b5caf --- /dev/null +++ b/conf/machine/include/am62xx-lp.inc @@ -0,0 +1,18 @@ +require conf/machine/include/k3.inc +SOC_FAMILY_append = ":am62xx" + +MACHINE_FEATURES += "screen touchscreen" + +SERIAL_CONSOLES = "115200;ttyS2" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" + +TFA_K3_SYSTEM_SUSPEND = "1" + +# Default tiboot3.bin on AM62x LP is for HS-SE +BBMULTICONFIG += "k3r5-hs-se" +do_image_wic[mcdepends] += "mc::k3r5-hs-se:ti-sci-fw:do_deploy" +do_image_tar[mcdepends] += "mc::k3r5-hs-se:ti-sci-fw:do_deploy" + +TFA_BOARD = "lite" +OPTEEMACHINE = "k3-am62x" +OPTEEOUTPUTMACHINE = "k3" diff --git a/conf/multiconfig/k3r5-hs-se.conf b/conf/multiconfig/k3r5-hs-se.conf new file mode 100644 index 00000000..701f8e88 --- /dev/null +++ b/conf/multiconfig/k3r5-hs-se.conf @@ -0,0 +1,3 @@ +require k3r5.conf + +MACHINE_append = "-hs-se" diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb index 1b8530ec..0fb3a832 100644 --- a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb @@ -39,6 +39,7 @@ SYSFW_PREFIX_j784s4-evm-k3r5 = "fs" SYSFW_PREFIX_j784s4-hs-evm-k3r5 = "fs" SYSFW_PREFIX_am62xx-evm-k3r5 = "fs" SYSFW_PREFIX_am62xx-lp-evm-k3r5 = "fs" +SYSFW_PREFIX_am62xx-lp-evm-k3r5-hs-se = "fs" SYSFW_PREFIX_am62axx-evm-k3r5 = "fs" SYSFW_TISCI = "${S}/ti-sysfw/ti-${SYSFW_PREFIX}-firmware-${SYSFW_SOC}-*.bin" diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend index e3c171dc..bb969da2 100644 --- a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend +++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend @@ -31,6 +31,10 @@ do_compile_append_am64xx-evm() { tfa_sign_k3hs } +do_compile_append_am62xx-lp-evm() { + tfa_sign_k3hs +} + do_compile_append_j7-hs-evm() { tfa_sign_k3hs } diff --git a/recipes-bsp/u-boot/u-boot-ti.inc b/recipes-bsp/u-boot/u-boot-ti.inc index 90f60980..7932e072 100644 --- a/recipes-bsp/u-boot/u-boot-ti.inc +++ b/recipes-bsp/u-boot/u-boot-ti.inc @@ -34,6 +34,7 @@ PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/pdk-i PACKAGECONFIG_append_aarch64 = " atf optee" PACKAGECONFIG_append_j7 = " dm" PACKAGECONFIG_append_am62xx = " dm" +PACKAGECONFIG_append_am62xx-lp-evm = " dm" PACKAGECONFIG_append_am62axx = " dm" COMPATIBLE_MACHINE = "(ti-soc)" diff --git a/recipes-security/optee/optee-os_%.bbappend b/recipes-security/optee/optee-os_%.bbappend index 751dc3d0..89a86a91 100644 --- a/recipes-security/optee/optee-os_%.bbappend +++ b/recipes-security/optee/optee-os_%.bbappend @@ -66,6 +66,10 @@ do_compile_append_am64xx-evm() { optee_sign_k3hs } +do_compile_append_am62xx-lp-evm() { + optee_sign_k3hs +} + do_compile_append_j7-hs-evm() { optee_sign_k3hs } diff --git a/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb b/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb index 59145740..47b29632 100644 --- a/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb +++ b/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb @@ -24,6 +24,7 @@ PLAT_SFX_j784s4-hs-evm = "j784s4" PLAT_SFX_am65xx = "am65xx" PLAT_SFX_am64xx = "am64xx" PLAT_SFX_am62xx = "am62xx" +PLAT_SFX_am62xx-lp-evm = "am62xx" PLAT_SFX_am62axx = "am62axx" FILESEXTRAPATHS_prepend := "${METATIBASE}/recipes-bsp/ti-sci-fw/files/:" @@ -180,6 +181,15 @@ do_install_prepend_am62xx() { ) } +# AM62Q HS-SE support +do_install_prepend_am62xx-lp-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}; \ + ) +} + #Install all R5 & DSP ipc echo test binaries in lib/firmware/pdk-ipc, with softlinks up a level do_install() { @@ -355,6 +365,13 @@ do_install_am62xx() { install -m 0644 ${RTOS_DM_FW_DIR}/ipc_echo_testb_mcu1_0_release_strip.xer5f ${LEGACY_DM_FW_DIR} } +do_install_am62xx-lp-evm() { + install -d ${LEGACY_IPC_FW_DIR} + install -m 0644 ${RTOS_IPC_FW_DIR}/ipc_echo_baremetal_test_mcu2_0_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} +} + do_install_am62axx() { install -d ${LEGACY_IPC_FW_DIR} # DM+IPC Firmware @@ -372,6 +389,11 @@ do_deploy_am62xx() { install -m 0644 ${RTOS_DM_FW_DIR}/ipc_echo_testb_mcu1_0_release_strip.xer5f ${DEPLOYDIR} } +do_deploy_am62xx-lp-evm() { + install -d ${DEPLOYDIR} + install -m 0644 ${RTOS_DM_FW_DIR}/ipc_echo_testb_mcu1_0_release_strip.xer5f ${DEPLOYDIR} +} + do_deploy_am62axx() { install -d ${DEPLOYDIR} install -m 0644 ${RTOS_DM_FW_DIR}/ipc_echo_testb_mcu1_0_release_strip.xer5f ${DEPLOYDIR} @@ -395,6 +417,11 @@ ALTERNATIVE_${PN}_am62xx = "\ am62-main-r5f0_0-fw \ " +ALTERNATIVE_${PN}_am62xx-lp-evm = "\ + am62-mcu-m4f0_0-fw \ + am62-main-r5f0_0-fw \ + " + ALTERNATIVE_${PN}_am62axx = "\ am62a-mcu-r5f0_0-fw \ am62a-c71_0-fw \ @@ -532,6 +559,9 @@ TARGET_MCU_M4FSS0_0_am64xx = "am64-mcu-m4f0_0-fw" TARGET_MAIN_R5FSS0_0_am62xx = "am62-main-r5f0_0-fw" TARGET_MCU_M4FSS0_0_am62xx = "am62-mcu-m4f0_0-fw" +TARGET_MAIN_R5FSS0_0_am62xx-lp-evm = "am62-main-r5f0_0-fw" +TARGET_MCU_M4FSS0_0_am62xx-lp-evm = "am62-mcu-m4f0_0-fw" + TARGET_C7X_0_am62axx = "am62a-c71_0-fw" TARGET_MCU_R5F0_0_am62axx = "am62a-mcu-r5f0_0-fw"