From patchwork Fri May 31 22:20:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942334 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=USTq63Fk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd0n6j6dz20PW for ; Sat, 1 Jun 2024 08:22:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0F98E8883C; Sat, 1 Jun 2024 00:21:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="USTq63Fk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E79D18883C; Sat, 1 Jun 2024 00:21:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 62BA48872E for ; Sat, 1 Jun 2024 00:21:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@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 44VMLY1U111750; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=ZB4Yg/YoBeu8s1O8mXYXK1nIo+TRa5YumnFSn1ikL7Y=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=USTq63FkKJofrhyw5m2gsI7xwKEetamAb1SmJnxpNNArz8h0h0fjJsrgqDYMH5+VU Vdmfhp0mgpavt1Kn9XlIoWNkogJInPcnVEvym65iO75IyZCt8IZCJmo0NH2n5YmGz7 tiupc04S7yNW7rsUR2SMUNDcRvgdeXqzEA2D0HV8= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLXR4089468 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:33 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:33 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLXjM006240; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 01/23] doc: uefi: capsules: Add Capsule Update porting section Date: Fri, 31 May 2024 17:20:56 -0500 Message-ID: <20240531222118.2618041-2-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Created a capsule update porting section in the documentation that outlines the steps a board developer must do when porting from an existing reference board implementation. In particular, added a big warning that new capsule GUID's need to be defined. Signed-off-by: Jonathan Humphreys --- doc/develop/uefi/uefi.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index 0389b269c01..36ac75278fa 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -631,6 +631,18 @@ where version.dtso looks like:: The properties of image-type-id and image-index must match the value defined in the efi_fw_image array as image_type_id and image_index. +Porting Capsule Updates to new boards +************************************* + +It is important, when using a reference board as a starting point for a custom +board, that certain steps are taken to properly support Capsule Updates. + +Capsule GUIDs need to be unique for each firmware and board. That is, if two +firmwares are built from the same source but result in different binaries +because they are built for different boards, they should have different GUIDs. +Therefore it is important when creating support for a new board, new GUIDs are +defined in the board's header file. *DO NOT* reuse capsule GUIDs. + Executing the boot manager ~~~~~~~~~~~~~~~~~~~~~~~~~~ From patchwork Fri May 31 22:20:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942339 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=qSC2tvdV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd1m0trpz20PW for ; Sat, 1 Jun 2024 08:23:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F20B988817; Sat, 1 Jun 2024 00:21:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="qSC2tvdV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DA27488853; Sat, 1 Jun 2024 00:21:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B78968880F for ; Sat, 1 Jun 2024 00:21:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYoB127031; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=rMhAjGkn2Lny++Ef4En9B8kIfNp7ueDs0YsEkvoGh/0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=qSC2tvdVp7DmMaFlv7K6/zpgL4ycGkIkj15WwSs2Uj/kFt6fXeiX2V05IabYUuLfu cm59NGJGONetz9sDV50E/ES2qcFf36pu+uQ7ciCvQiXkXsd+FU1rzk6GNENij2RgHz cUkffm7otkIf+65Uk4MktwcDlY8nJwWRJBg0Lhb0= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYUx006210 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:33 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLXXp026043; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 02/23] doc: ti: k3: Correct spelling mistakes and improve clarity Date: Fri, 31 May 2024 17:20:57 -0500 Message-ID: <20240531222118.2618041-3-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Few cosmetic fixes for clarity and spelling mistakes. Signed-off-by: Jonathan Humphreys Reviewed-by: Mattijs Korpershoek --- doc/board/ti/k3.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index a1c01d1cf02..927f3976d34 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -51,14 +51,14 @@ For all K3 SoCs the first core started will be inside the Security Management Subsystem (SMS) which will secure the device and start a core in the wakeup domain to run the ROM code. ROM will then initialize the boot media needed to load the binaries packaged inside `tiboot3.bin`, -including a 32bit U-Boot SPL, (called the wakup SPL) that ROM will jump +including a 32bit U-Boot SPL, (called the wakeup SPL) that ROM will jump to after it has finished loading everything into internal SRAM. .. image:: img/boot_flow_01.svg :alt: Boot flow up to wakeup domain SPL The wakeup SPL, running on a wakeup domain core, will initialize DDR and -any peripherals needed load the larger binaries inside the `tispl.bin` +any peripherals needed to load the larger binaries inside the `tispl.bin` into DDR. Once loaded the wakeup SPL will start one of the 'big' application cores inside the main domain to initialize the main domain, starting with Trusted Firmware-A (TF-A), before moving on to start @@ -94,7 +94,7 @@ essentially 4 unique but very similar flows: * Combined binary with a split firmware: (eg: AM62) For devices that utilize the split binary approach, ROM is not capable -of loading the firmware into the SoC requiring the wakeup domain's +of loading the firmware into the SoC, requiring the wakeup domain's U-Boot SPL to load the firmware. Devices with a split firmware will have two firmwares loaded into the @@ -114,8 +114,8 @@ K3 HS-SE (High Security - Security Enforced) devices enforce an authenticated boot flow for secure boot. HS-FS (High Security - Field Securable) is the state of a K3 device before it has been eFused with customer security keys. In the HS-FS state the authentication still can -function as in HS-SE but as there are no customer keys to verify the -signatures against the authentication will pass for certificates signed +function as in HS-SE, but as there are no customer keys to verify the +signatures against, the authentication will pass for certificates signed with any key. Chain of trust From patchwork Fri May 31 22:20:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942344 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=jz1M7zxN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd2h1Pr9z20PW for ; Sat, 1 Jun 2024 08:24:28 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E15E088875; Sat, 1 Jun 2024 00:21:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="jz1M7zxN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CF2678886C; Sat, 1 Jun 2024 00:21:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DECA48881E for ; Sat, 1 Jun 2024 00:21:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYlC017859; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=GPI/j+0xyYlAVFmFT7wKLRMbqcXO6xBCXFbY90XC2xM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jz1M7zxN3hnG1ZNvyW/tvQBeCVWnmv0pqKPW0cdQrao5pbkrEzBanQTZsNwSGmcrh H5VsjW8hloAhotg0joMuyTXtaHCyd9qHGQ5M7O8On8H6jPtPbBTyVnL6phmmeBrDNE v4lRrsDykN3ecM1hpO+W2Kn5BlrdNvJFMaBcOen0= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYl0006207 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:33 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLXA2006243; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 03/23] board: am64x: Define capsule update firmware info Date: Fri, 31 May 2024 17:20:58 -0500 Message-ID: <20240531222118.2618041-4-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Define the firmware components updatable via EFI capsule update, including defining capsule GUIDs for the various firmware components for the AM64x SK. Signed-off-by: Jonathan Humphreys --- board/ti/am64x/evm.c | 34 ++++++++++++++++++++++++++++++++++ include/configs/am64x_evm.h | 24 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c index b8de69da06c..609e5cf6d51 100644 --- a/board/ti/am64x/evm.c +++ b/board/ti/am64x/evm.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include @@ -27,6 +28,39 @@ DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = AM64X_SK_TIBOOT3_IMAGE_GUID, + .fw_name = u"AM64X_SK_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = AM64X_SK_SPL_IMAGE_GUID, + .fw_name = u"AM64X_SK_SPL", + .image_index = 2, + }, + { + .image_type_id = AM64X_SK_UBOOT_IMAGE_GUID, + .fw_name = u"AM64X_SK_UBOOT", + .image_index = 3, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=tiboot3.bin raw 0 100000;" + "tispl.bin raw 100000 200000;u-boot.img raw 300000 400000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h index f9f8c7bc2f6..9db83621ea8 100644 --- a/include/configs/am64x_evm.h +++ b/include/configs/am64x_evm.h @@ -9,6 +9,30 @@ #ifndef __CONFIG_AM642_EVM_H #define __CONFIG_AM642_EVM_H +/** + * define AM64X_SK_TIBOOT3_IMAGE_GUID - firmware GUID for AM64X sk tiboot3.bin + * define AM64X_SK_SPL_IMAGE_GUID - firmware GUID for AM64X sk SPL + * define AM64X_SK_UBOOT_IMAGE_GUID - firmware GUID for AM64X sk UBOOT + * + * These GUIDs are used in capsules updates to identify the corresponding + * firmware object. + * + * Board developers using this as a starting reference should + * define their own GUIDs to ensure that firmware repositories (like + * LVFS) do not confuse them. + */ +#define AM64X_SK_TIBOOT3_IMAGE_GUID \ + EFI_GUID(0xede0a0d5, 0x9116, 0x4bfb, 0xaa, 0x54, \ + 0x09, 0xe9, 0x7b, 0x5a, 0xfe, 0x1a) + +#define AM64X_SK_SPL_IMAGE_GUID \ + EFI_GUID(0x77678f5c, 0x64d4, 0x4910, 0xad, 0x75, \ + 0x52, 0xc9, 0xd9, 0x5c, 0xdb, 0x1d) + +#define AM64X_SK_UBOOT_IMAGE_GUID \ + EFI_GUID(0xc6ad43a9, 0x7d31, 0x4f5d, 0x83, 0xe9, \ + 0xb8, 0xef, 0xec, 0xae, 0x05, 0xbf) + /* Now for the remaining common defines */ #include From patchwork Fri May 31 22:20:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942329 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=V6Hrumgc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (unknown [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrczr6glHz20PW for ; Sat, 1 Jun 2024 08:22:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 217A9887E2; Sat, 1 Jun 2024 00:21:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="V6Hrumgc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BDDA088607; Sat, 1 Jun 2024 00:21:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DD525881AD for ; Sat, 1 Jun 2024 00:21:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYMw017863; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=IXnYIo5gKpmmJYUBOvYzMLbPuUV1w4sU5b81/zNmkx8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=V6HrumgcNeWorfEAh/VHQOT9FALrLklWmQ63K5Gx7Udwmo05taSamNjfyzVRb3J1i Szj7LNyHBvMDIF0WnL6r2u8isqc2UJDtHwCh5+CT5RPA1WmxbCEeGfryk38emaKIlS WfZMK6t2eJStnWfz1Zsa24LjpfrNUKWi41Ek4UL0= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYPE005568 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:33 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLXD4026049; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 04/23] configs: am64x: Enable EFI capsule update Date: Fri, 31 May 2024 17:20:59 -0500 Message-ID: <20240531222118.2618041-5-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Enable on disk, raw capsule update. Signed-off-by: Jonathan Humphreys --- configs/am64x_evm_a53_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index e000549d6d0..c9bdd7b54cc 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -178,3 +178,5 @@ CONFIG_USB_FUNCTION_MASS_STORAGE=y CONFIG_SPL_DFU=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y From patchwork Fri May 31 22:21:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942352 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=admxjHBI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd4M5Nv1z20Pb for ; Sat, 1 Jun 2024 08:25:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8BE1388897; Sat, 1 Jun 2024 00:21:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="admxjHBI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22BC78880B; Sat, 1 Jun 2024 00:21:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7084588845 for ; Sat, 1 Jun 2024 00:21:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYJL017871; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=K5bfWiPhHFv7+39mexlJIPsoYS/qjCtXmr5HgZNF5KE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=admxjHBIXX/OJJiQ/i85RBrx/4cLWkSCAV44Ifs7I/m/sktJ+91L4k802vv/C32AZ l1+JJTg6Kot3czx2Jarm0xaDOvtqelLka+eNYDojY0uFhfFk8tHB8mpsDNh/znaCCh 7y2PgRC76YBtcTw0mMETxubRCtxzP5QLbZs19kKU= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLY3D006216 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:33 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) 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.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLXoh006246; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 05/23] doc: board: ti: am64x: document OSPI layout Date: Fri, 31 May 2024 17:21:00 -0500 Message-ID: <20240531222118.2618041-6-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Added OSPI flash layout diagram, as well as example commands to flash firmware to it. Signed-off-by: Jonathan Humphreys --- doc/board/ti/am64x_evm.rst | 24 + doc/board/ti/img/ospi_sysfw-am64.svg | 802 +++++++++++++++++++++++++++ 2 files changed, 826 insertions(+) create mode 100644 doc/board/ti/img/ospi_sysfw-am64.svg diff --git a/doc/board/ti/am64x_evm.rst b/doc/board/ti/am64x_evm.rst index 6ae35b3fee3..88997b6a283 100644 --- a/doc/board/ti/am64x_evm.rst +++ b/doc/board/ti/am64x_evm.rst @@ -140,6 +140,30 @@ Image formats: .. image:: img/nodm_tispl.bin.svg :alt: tispl.bin image format +OSPI: +----- +ROM supports booting from OSPI from offset 0x0. + +Flashing images to OSPI: + +Below commands can be used to download tiboot3.bin, tispl.bin, and u-boot.img, +over tftp and then flash those to OSPI at their respective addresses. + +.. prompt:: bash => + + sf probe + tftp ${loadaddr} tiboot3.bin + sf update $loadaddr 0x0 $filesize + tftp ${loadaddr} tispl.bin + sf update $loadaddr 0x100000 $filesize + tftp ${loadaddr} u-boot.img + sf update $loadaddr 0x300000 $filesize + +Flash layout for OSPI: + +.. image:: img/ospi_sysfw-am64.svg + :alt: OSPI flash partition layout + Switch Setting for Boot Mode ---------------------------- diff --git a/doc/board/ti/img/ospi_sysfw-am64.svg b/doc/board/ti/img/ospi_sysfw-am64.svg new file mode 100644 index 00000000000..f6244dce596 --- /dev/null +++ b/doc/board/ti/img/ospi_sysfw-am64.svg @@ -0,0 +1,802 @@ + + + + + + + + + + + + + + + + + + + ospi.tiboot3(1M) + + + + ospi.tiboot3(1M) + + + + + + + + + + + + + + 0x0 + + + + + 0x0 + + + + + + + + + + + + + ospi.tispl(2M) + + + + ospi.tispl(2M) + + + + + + + + + + + + + + 0x100000 + + + + + 0x100000 + + + + + + + + + + + + + ospi.u-boot(4M) + + + + ospi.u-boot(4M) + + + + + + + + + + + + + + 0x300000 + + + + + 0x300000 + + + + + + + + + + + + + ospi.env(128K) + + + + ospi.env(128K) + + + + + + + + + + + + + + 0x700000 + + + + + 0x700000 + + + + + + + + + + + + + ospi.env.backup(128K) + + + + ospi.env.backup(128K) + + + + + + + + + + + + + + 0x720000 + + + + + 0x720000 + + + + + + + + + + + + + padding(768K) + + + + padding(768K) + + + + + + + + + + + + + + 0x740000 + + + + + 0x740000 + + + + + + + + + + + + + ospi.rootfs(UBIFS) + + + + ospi.rootfs(UBIFS) + + + + + + + + + + + + + + 0x800000 + + + + + 0x800000 + + + + + + + + + + + + + ospi.phypattern(256k) + + + + ospi.phypattern(256k) + + + + + + + + + + + + + + 0x3FC0000 + + + + + 0x3FC0000 + + + + + From patchwork Fri May 31 22:21:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942338 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=r03KKkFX; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd1Z3K2Lz20PW for ; Sat, 1 Jun 2024 08:23:30 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8E78588854; Sat, 1 Jun 2024 00:21:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="r03KKkFX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CA3668883C; Sat, 1 Jun 2024 00:21:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 82B8B8880B for ; Sat, 1 Jun 2024 00:21:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYxx127059; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=CpOKD3C8F8kXy+HsorTDYSmdIwf8bURGVQ5d/FM3wt4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=r03KKkFXcUageRT9qIEQhIOVpM/jcqphwt14f/oCSavJdOzeB+wEWg1d0CdWkJmFb XpMTRlKSHJRNzK9+h/z8dvaySu/G0tU9eUMNB1Y7YFe5GiPddk+v4Lp7kI9quPclXi PXAOgaYMJQqXL8SdCBZ73fx8AiEyKqoHQrnTXAMY= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYCm089475 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:33 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLXxA026052; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 06/23] board: j721e: Define capsule update firmware info Date: Fri, 31 May 2024 17:21:01 -0500 Message-ID: <20240531222118.2618041-7-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Define the firmware components updatable via EFI capsule update, including defining capsule GUIDs for the various firmware components for the SK-TDA4VM. Signed-off-by: Jonathan Humphreys --- board/ti/j721e/evm.c | 40 +++++++++++++++++++++++++++++++++++++ include/configs/j721e_evm.h | 29 +++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index 539eaf47186..f3452ff0a8f 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include @@ -32,6 +33,45 @@ DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = J721E_SK_TIBOOT3_IMAGE_GUID, + .fw_name = u"J721E_SK_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = J721E_SK_SPL_IMAGE_GUID, + .fw_name = u"J721E_SK_SPL", + .image_index = 2, + }, + { + .image_type_id = J721E_SK_UBOOT_IMAGE_GUID, + .fw_name = u"J721E_SK_UBOOT", + .image_index = 3, + }, + { + .image_type_id = J721E_SK_SYSFW_IMAGE_GUID, + .fw_name = u"J721E_SK_SYSFW", + .image_index = 4, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;" + "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000;" + "sysfw.itb raw 6C0000 100000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h index c26438c8684..a5140ea6a11 100644 --- a/include/configs/j721e_evm.h +++ b/include/configs/j721e_evm.h @@ -22,6 +22,35 @@ #define CFG_SYS_UBOOT_BASE 0x50080000 #endif +/** + * define J721E_SK_TIBOOT3_IMAGE_GUID - firmware GUID for J721e sk tiboot3.bin + * define J721E_SK_SPL_IMAGE_GUID - firmware GUID for J721e sk SPL + * define J721E_SK_UBOOT_IMAGE_GUID - firmware GUID for J721e sk UBOOT + * define J721E_SK_SYSFW_IMAGE_GUID - firmware GUID for J721e sk SYSFW + * + * These GUIDs are used in capsules updates to identify the corresponding + * firmware object. + * + * Board developers using this as a starting reference should + * define their own GUIDs to ensure that firmware repositories (like + * LVFS) do not confuse them. + */ +#define J721E_SK_TIBOOT3_IMAGE_GUID \ + EFI_GUID(0xe672b518, 0x7cd7, 0x4014, 0xbd, 0x8d, \ + 0x40, 0x72, 0x4d, 0x0a, 0xd4, 0xdc) + +#define J721E_SK_SPL_IMAGE_GUID \ + EFI_GUID(0x86f710ad, 0x10cf, 0x46ea, 0xac, 0x67, \ + 0x85, 0x6a, 0xe0, 0x6e, 0xfa, 0xd2) + +#define J721E_SK_UBOOT_IMAGE_GUID \ + EFI_GUID(0x81b58fb0, 0x3b00, 0x4add, 0xa2, 0x0a, \ + 0xc1, 0x85, 0xbb, 0xac, 0xa1, 0xed) + +#define J721E_SK_SYSFW_IMAGE_GUID \ + EFI_GUID(0x6fd10680, 0x361b, 0x431f, 0x80, 0xaa, \ + 0x89, 0x94, 0x55, 0x81, 0x9e, 0x11) + /* Now for the remaining common defines */ #include From patchwork Fri May 31 22:21:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942333 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=cAUCQvvm; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd0b0pm6z20PW for ; Sat, 1 Jun 2024 08:22:39 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9CF2A88838; Sat, 1 Jun 2024 00:21:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="cAUCQvvm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 493F2885AF; Sat, 1 Jun 2024 00:21:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 27C14881BC for ; Sat, 1 Jun 2024 00:21:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYcd017867; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=Nr/7Gb32CASZAF1Ls4DiRELkC+P4jZbpkqyCgzkyeJw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=cAUCQvvmoAo0AUCbqazD2WzBX8Bi6Vg0fBhB++C1aM6OUI15/73o67mYUEDmg4I/9 4J1VypELZxzS/S8S/K5sw69DmYvDAxMmHUiNRj95cEMp7gyJH35BN0SVBMEVjDL8pR FuIXdxwdKopGmU/JJWUIfT0wdLcxR7RdAxfsDI0s= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYfl089471 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLXj2026055; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 07/23] configs: j721e: Enable EFI capsule update Date: Fri, 31 May 2024 17:21:02 -0500 Message-ID: <20240531222118.2618041-8-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Enable on disk, raw capsule update. Signed-off-by: Jonathan Humphreys --- configs/j721e_evm_a72_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig index 3d8e9391987..e2c2ad27ef8 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -210,3 +210,5 @@ CONFIG_UFS=y CONFIG_CADENCE_UFS=y CONFIG_TI_J721E_UFS=y CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y From patchwork Fri May 31 22:21:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942351 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=JbStMHgr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd411mPsz20Pb for ; Sat, 1 Jun 2024 08:25:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8AEA888866; Sat, 1 Jun 2024 00:21:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="JbStMHgr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3D75788842; Sat, 1 Jun 2024 00:21:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 60A3788836 for ; Sat, 1 Jun 2024 00:21:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYjc017875; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=dC3ug1f9QVHP5/uLuJOmvvTf0Nxe/opFuSF0lJd29XI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=JbStMHgrUkiLaPS4kf1wc9HxVM51uW62czMLSe0CcYbYB+Gy45qUUfw57KX7F7cFT P40YXE6WN46PFPUJ6Y0Y1z+4NZGosDPKG2FTvCDgQa6Ww7C3NwlfBJNWg2Q1VFdhag h8emafBWd5K9M6kLbpgAXtY37Zs+BEvDuA/dBqiI= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYuT005574 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLX4l006250; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 08/23] doc: board: ti: j721e: document OSPI layout Date: Fri, 31 May 2024 17:21:03 -0500 Message-ID: <20240531222118.2618041-9-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Updated OSPI flash layout diagram. Signed-off-by: Jonathan Humphreys --- doc/board/ti/img/ospi_sysfw.svg | 1464 +++++++++++++++++-------------- doc/board/ti/j721e_evm.rst | 58 +- 2 files changed, 847 insertions(+), 675 deletions(-) diff --git a/doc/board/ti/img/ospi_sysfw.svg b/doc/board/ti/img/ospi_sysfw.svg index 648f6fd03e5..2a2fd3f4863 100644 --- a/doc/board/ti/img/ospi_sysfw.svg +++ b/doc/board/ti/img/ospi_sysfw.svg @@ -1,725 +1,897 @@ - + + inkscape:current-layer="g19241" /> + id="defs19023" /> - - - - - + id="g19241"> + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 35px; margin-left: 121px;"> ospi.tiboot3(512k) + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: center;"> + ospi.tiboot3(512k) + - - - ospi.tiboot3(512k) - - - - - - - + + ospi.tiboot3(512k) + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 58px; height: 1px; padding-top: 20px; margin-left: 60px;"> - 0x0 + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: right;"> + + 0x0 + - - - 0x0 - - - - - - - + + 0x0 + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 75px; margin-left: 121px;"> ospi.tispl(2M) + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: center;"> + ospi.tispl(2M) + - - - ospi.tispl(2M) - - - - - - - + + ospi.tispl(2M) + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 118px; height: 1px; padding-top: 60px; margin-left: 0px;"> - 0x80000 + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: right;"> + + 0x80000 + - - - 0x80000 - - - - - - - + + 0x80000 + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 115px; margin-left: 121px;"> ospi.u-boot(4M) + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: center;"> + ospi.u-boot(4M) + - - - ospi.u-boot(4M) - - - - - - - + + ospi.u-boot(4M) + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 118px; height: 1px; padding-top: 100px; margin-left: 0px;"> - 0x280000 + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: right;"> + + 0x280000 + - - - 0x280000 - - - - - - - + + 0x280000 + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 155px; margin-left: 121px;"> ospi.env(128K) + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: center;"> + ospi.env(128K) + - - - ospi.env(128K) - - - - - - - + + ospi.env(128K) + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 118px; height: 1px; padding-top: 140px; margin-left: 0px;"> - 0x680000 + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: right;"> + + 0x680000 + - - - 0x680000 - - - - - - - + + 0x680000 + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 195px; margin-left: 121px;"> ospi.env.backup(128K) + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: center;"> + ospi.env.backup(128K) + - - - ospi.env.backup(128K) - - - - - - - + + ospi.env.backup(128K) + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 118px; height: 1px; padding-top: 180px; margin-left: 0px;"> - 0x6A0000 + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: right;"> + + 0x6A0000 + - - - 0x6A0000 - - - - - - - + + 0x6A0000 + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 235px; margin-left: 121px;"> ospi.sysfw(1M) + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: center;"> + ospi.sysfw(1M) + - - - ospi.sysfw(1M) - - - - - - - + + ospi.sysfw(1M) + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 118px; height: 1px; padding-top: 220px; margin-left: 0px;"> - 0x6C0000 + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: right;"> + + 0x6C0000 + - - - 0x6C0000 - - - - - - - + + 0x6C0000 + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 275px; margin-left: 121px;"> padding(256K) + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: center;"> + padding(256K) + - - - padding(256K) - - - - - - - + + padding(256K) + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 118px; height: 1px; padding-top: 260px; margin-left: 0px;"> - 0x7C0000 + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: right;"> + + 0x7C0000 + - - - 0x7C0000 - - - - - - - + + 0x7C0000 + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 315px; margin-left: 121px;"> ospi.rootfs(UBIFS) + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: center;"> + ospi.rootfs(UBIFS) + - - - ospi.rootfs(UBIFS) - - - - - - - + + ospi.rootfs(UBIFS) + + + + + + + + + + + + + + 0x800000 + + + + + 0x800000 + + + + + + + + + + + + + ospi.phypattern(128k) + + + + ospi.phypattern(128k) + + + + + + + + + + + style="display: flex; align-items: unsafe center; justify-content: unsafe flex-end; width: 118px; height: 1px; padding-top: 340px; margin-left: 0px;"> - 0x800000 + data-drawio-colors="color: rgb(0, 0, 0); " + style="box-sizing: border-box; font-size: 0px; text-align: right;"> + + 0x3FE0000 + - - - 0x800000 - + + 0x3FE0000 + + - - - - Text is not SVG - cannot display - - diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst index a422a9bf1a0..80d91cafab0 100644 --- a/doc/board/ti/j721e_evm.rst +++ b/doc/board/ti/j721e_evm.rst @@ -150,6 +150,33 @@ Image formats: .. image:: img/sysfw.itb.svg :alt: sysfw.itb image format +OSPI: +----- +ROM supports booting from OSPI from offset 0x0. + +Flashing images to OSPI: + +Below commands can be used to download tiboot3.bin, tispl.bin, u-boot.img, +and sysfw.itb over tftp and then flash those to OSPI at their respective +addresses. + +.. prompt:: bash => + + sf probe + tftp ${loadaddr} tiboot3.bin + sf update $loadaddr 0x0 $filesize + tftp ${loadaddr} tispl.bin + sf update $loadaddr 0x80000 $filesize + tftp ${loadaddr} u-boot.img + sf update $loadaddr 0x280000 $filesize + tftp ${loadaddr} sysfw.itb + sf update $loadaddr 0x6C0000 $filesize + +Flash layout for OSPI: + +.. image:: img/ospi_sysfw.svg + :alt: OSPI flash partition layout + R5 Memory Map: -------------- @@ -193,35 +220,8 @@ R5 Memory Map: - 0x41cffbfc - 0x41cfffff -OSPI: ------ -ROM supports booting from OSPI from offset 0x0. - -Flashing images to OSPI: - -Below commands can be used to download tiboot3.bin, tispl.bin, u-boot.img, -and sysfw.itb over tftp and then flash those to OSPI at their respective -addresses. - -.. prompt:: bash => - - sf probe - tftp ${loadaddr} tiboot3.bin - sf update $loadaddr 0x0 $filesize - tftp ${loadaddr} tispl.bin - sf update $loadaddr 0x80000 $filesize - tftp ${loadaddr} u-boot.img - sf update $loadaddr 0x280000 $filesize - tftp ${loadaddr} sysfw.itb - sf update $loadaddr 0x6C0000 $filesize - -Flash layout for OSPI: - -.. image:: img/ospi_sysfw.svg - :alt: OSPI flash partition layout - -Firmwares: ----------- +Firmware: +--------- The J721e u-boot allows firmware to be loaded for the Cortex-R5 subsystem. The CPSW5G in J7200 and CPSW9G in J721E present in MAIN domain is configured From patchwork Fri May 31 22:21:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942337 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=LHg/zvPN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd1N1HPnz20PW for ; Sat, 1 Jun 2024 08:23:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2E3E888758; Sat, 1 Jun 2024 00:21:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="LHg/zvPN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3B12D887DA; Sat, 1 Jun 2024 00:21:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 563AD882BE for ; Sat, 1 Jun 2024 00:21:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYgt017879; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=/yj+eccG0P9U0pYe+1kKTynCBv8PQ7LB0yYB9E06a/c=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=LHg/zvPNRsR+Yb2oj3oLdDWq3iI889jSEZ7c/K8LarE3bGAbLqUg8lXXq6Ho1vd8H airaRCRQGEgVnPZd14N4gf2Lip7eWOZPMrFTfxLNElpHFl/OPZZP2wk0XvZctWcyAM iy0Im/eWJFXv9i+tR08NC0KZjJT7qQKTbTchZCwI= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLY4k046170 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:33 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLXVr006257; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 09/23] board: beagleplay: Define capsule update firmware info Date: Fri, 31 May 2024 17:21:04 -0500 Message-ID: <20240531222118.2618041-10-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Define the firmware components updatable via EFI capsule update, including defining capsule GUIDs for the various firmware components for the BeaglePlay. Note this involved creating BeaglePlay's own beagleplay.h board header file instead of reusing am62_evm's. Signed-off-by: Jonathan Humphreys --- board/beagle/beagleplay/Kconfig | 4 +-- board/beagle/beagleplay/beagleplay.c | 34 +++++++++++++++++++++++ include/configs/beagleplay.h | 41 ++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 include/configs/beagleplay.h diff --git a/board/beagle/beagleplay/Kconfig b/board/beagle/beagleplay/Kconfig index 7dbd833acb4..b0e67dc8ef3 100644 --- a/board/beagle/beagleplay/Kconfig +++ b/board/beagle/beagleplay/Kconfig @@ -35,7 +35,7 @@ config SYS_VENDOR default "beagle" config SYS_CONFIG_NAME - default "am62x_evm" + default "beagleplay" source "board/ti/common/Kconfig" @@ -50,7 +50,7 @@ config SYS_VENDOR default "beagle" config SYS_CONFIG_NAME - default "am62x_evm" + default "beagleplay" config SPL_LDSCRIPT default "arch/arm/mach-omap2/u-boot-spl.lds" diff --git a/board/beagle/beagleplay/beagleplay.c b/board/beagle/beagleplay/beagleplay.c index af36439e2e2..a21f09e3122 100644 --- a/board/beagle/beagleplay/beagleplay.c +++ b/board/beagle/beagleplay/beagleplay.c @@ -6,6 +6,7 @@ * Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation */ +#include #include #include #include @@ -15,6 +16,39 @@ DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = BEAGLEPLAY_TIBOOT3_IMAGE_GUID, + .fw_name = u"BEAGLEPLAY_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = BEAGLEPLAY_SPL_IMAGE_GUID, + .fw_name = u"BEAGLEPLAY_SPL", + .image_index = 2, + }, + { + .image_type_id = BEAGLEPLAY_UBOOT_IMAGE_GUID, + .fw_name = u"BEAGLEPLAY_UBOOT", + .image_index = 3, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "mmc 0=tiboot3.bin raw 0 2000 mmcpart 1;" + "tispl.bin fat 0 1;u-boot.img fat 0 1", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/include/configs/beagleplay.h b/include/configs/beagleplay.h new file mode 100644 index 00000000000..4baeab664af --- /dev/null +++ b/include/configs/beagleplay.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Configuration header file for BeaglePlay + * + * https://beagleplay.org/ + * + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ + */ + +#ifndef __CONFIG_BEAGLEPLAY_H +#define __CONFIG_BEAGLEPLAY_H + +/** + * define BEAGLEPLAY_TIBOOT3_IMAGE_GUID - firmware GUID for BeaglePlay + * tiboot3.bin + * define BEAGLEPLAY_SPL_IMAGE_GUID - firmware GUID for BeaglePlay SPL + * define BEAGLEPLAY_UBOOT_IMAGE_GUID - firmware GUID for BeaglePlay UBOOT + * + * These GUIDs are used in capsules updates to identify the corresponding + * firmware object. + * + * Board developers using this as a starting reference should + * define their own GUIDs to ensure that firmware repositories (like + * LVFS) do not confuse them. + */ +#define BEAGLEPLAY_TIBOOT3_IMAGE_GUID \ + EFI_GUID(0x0e225a09, 0xf720, 0x4d57, 0x91, 0x20, \ + 0xe2, 0x8f, 0x73, 0x7f, 0x5a, 0x5e) + +#define BEAGLEPLAY_SPL_IMAGE_GUID \ + EFI_GUID(0xb2e7cc49, 0x1a5a, 0x4036, 0xae, 0x01, \ + 0x33, 0x87, 0xc3, 0xbe, 0xf6, 0x57) + +#define BEAGLEPLAY_UBOOT_IMAGE_GUID \ + EFI_GUID(0x92c92b11, 0xa7ee, 0x486f, 0xaa, 0xa2, \ + 0x71, 0x3d, 0x84, 0x42, 0x5b, 0x0e) + +/* Now for the remaining common defines */ +#include + +#endif /* __CONFIG_BEAGLEPLAY_H */ From patchwork Fri May 31 22:21:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942341 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=HunAY/PK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd270Shhz20PW for ; Sat, 1 Jun 2024 08:23:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C11638886B; Sat, 1 Jun 2024 00:21:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="HunAY/PK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 11B1E881AD; Sat, 1 Jun 2024 00:21:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 50754881BC for ; Sat, 1 Jun 2024 00:21:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYPg113684; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=V7UqHPd1UzWtvccNC4EBC55h1l89B9bqpnfRQxhMoJs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=HunAY/PKFB9UAQR8Z7rXsAXueXhjX9R2GcGJVx9Cy/7nM7a5Kg/+1rM0mY9dFxxAY F6t52+3275gAmvOEXTDaoa5NJfPwHNajQtNU2an8fDnszll5ptu9z8Ho5/rYKNBBL+ k+D1bbF6zs/p5meyu9PWard/kLytifbOUA4c4CF8= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYln046160 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) 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.23; Fri, 31 May 2024 17:21:33 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLXbn026059; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 10/23] configs: beagleplay: Enable DFU for MMC Date: Fri, 31 May 2024 17:21:05 -0500 Message-ID: <20240531222118.2618041-11-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean MMC DFU is required for capsule updates. Signed-off-by: Jonathan Humphreys --- configs/am62x_beagleplay_a53_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/am62x_beagleplay_a53_defconfig b/configs/am62x_beagleplay_a53_defconfig index ec62670d55d..dbdbaf98348 100644 --- a/configs/am62x_beagleplay_a53_defconfig +++ b/configs/am62x_beagleplay_a53_defconfig @@ -70,6 +70,9 @@ CONFIG_SPL_OF_TRANSLATE=y CONFIG_CLK=y CONFIG_SPL_CLK=y CONFIG_CLK_TI_SCI=y +CONFIG_DFU_MMC=y +CONFIG_SYS_DFU_DATA_BUF_SIZE=0x40000 +CONFIG_SYS_DFU_MAX_FILE_SIZE=0x180000 CONFIG_DMA_CHANNELS=y CONFIG_TI_K3_NAVSS_UDMA=y CONFIG_TI_SCI_PROTOCOL=y From patchwork Fri May 31 22:21:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942336 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=IhDp+MKk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd1D3xSpz20PW for ; Sat, 1 Jun 2024 08:23:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C3CD58884F; Sat, 1 Jun 2024 00:21:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="IhDp+MKk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 162498883C; Sat, 1 Jun 2024 00:21:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7CA188879C for ; Sat, 1 Jun 2024 00:21:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLY88111754; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=Z0RvKuz68jHZUBsy+Byda8XTk+odCzU4M9VHxO0BkiM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=IhDp+MKkbnY5A4vm9oGqZq5IcGCFvI1sdXhrvA5FKOQIeJ3gAqo2wk1Phq9YqOFng 7pZLgtxTZVQwwVezYChBKsrBHLJx+f9i8qBXn+3DWukRKwWxaPjSZspC0OyQLgETX9 VPJ48YzCv5QwSgC4JgWwRU6Px3N1f+c8Njx6MC6E= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLY15046163 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:33 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) 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.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLXBA026062; Fri, 31 May 2024 17:21:33 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 11/23] configs: beagleplay: Enable EFI capsule update Date: Fri, 31 May 2024 17:21:06 -0500 Message-ID: <20240531222118.2618041-12-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Enable on disk, raw capsule update. Signed-off-by: Jonathan Humphreys --- configs/am62x_beagleplay_a53_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/am62x_beagleplay_a53_defconfig b/configs/am62x_beagleplay_a53_defconfig index dbdbaf98348..e2e3032cb7f 100644 --- a/configs/am62x_beagleplay_a53_defconfig +++ b/configs/am62x_beagleplay_a53_defconfig @@ -124,5 +124,7 @@ CONFIG_EXT4_WRITE=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 CONFIG_LZO=y CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y #include From patchwork Fri May 31 22:21:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942335 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=GnzGpbsL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd0z75bfz20PW for ; Sat, 1 Jun 2024 08:22:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6ABC28884C; Sat, 1 Jun 2024 00:21:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="GnzGpbsL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F0395887C9; Sat, 1 Jun 2024 00:21:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6489588607 for ; Sat, 1 Jun 2024 00:21:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYWg111758; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=O1lopdBrQ+kIHGkvS+ogp8RwvVWVNlwHra5OGWATEtA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GnzGpbsL4DW5qSOGhcTCOFBncGR5wLqxAwQ/+8tS4SGvVoFyG6yuOpQ+t4a5XKqBi nAFMzW5av6wMm3K5TEfR8hmD2HrABUw/JNgMJ6KPLZ1Gr2ZYiqeFOdDk4Mu4Y6CTpb ZHlDi+RTNo2Ssi4CMFUEOacXJ+68QSfRQEbvnebo= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYwo046167 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:33 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYRg026065; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 12/23] board: am62x: Define capsule update firmware info Date: Fri, 31 May 2024 17:21:07 -0500 Message-ID: <20240531222118.2618041-13-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Define the firmware components updatable via EFI capsule update, including defining capsule GUIDs for the various firmware components for the AM62x SK. Signed-off-by: Jonathan Humphreys --- board/ti/am62x/evm.c | 34 ++++++++++++++++++++++++++++++++++ include/configs/am62x_evm.h | 24 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index b3e8680dfab..9bdd0223cdb 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include @@ -46,6 +47,39 @@ int splash_screen_prepare(void) } #endif +struct efi_fw_image fw_images[] = { + { + .image_type_id = AM62X_SK_TIBOOT3_IMAGE_GUID, + .fw_name = u"AM62X_SK_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = AM62X_SK_SPL_IMAGE_GUID, + .fw_name = u"AM62X_SK_SPL", + .image_index = 2, + }, + { + .image_type_id = AM62X_SK_UBOOT_IMAGE_GUID, + .fw_name = u"AM62X_SK_UBOOT", + .image_index = 3, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;" + "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h index c8fe59b7531..0d98f14a4bc 100644 --- a/include/configs/am62x_evm.h +++ b/include/configs/am62x_evm.h @@ -9,6 +9,30 @@ #ifndef __CONFIG_AM625_EVM_H #define __CONFIG_AM625_EVM_H +/** + * define AM62X_SK_TIBOOT3_IMAGE_GUID - firmware GUID for AM62X sk tiboot3.bin + * define AM62X_SK_SPL_IMAGE_GUID - firmware GUID for AM62X sk SPL + * define AM62X_SK_UBOOT_IMAGE_GUID - firmware GUID for AM62X sk UBOOT + * + * These GUIDs are used in capsules updates to identify the corresponding + * firmware object. + * + * Board developers using this as a starting reference should + * define their own GUIDs to ensure that firmware repositories (like + * LVFS) do not confuse them. + */ +#define AM62X_SK_TIBOOT3_IMAGE_GUID \ + EFI_GUID(0xabcb83d2, 0x9cb6, 0x4351, 0xb8, 0xf1, \ + 0x64, 0x94, 0xbb, 0xe3, 0x70, 0x0a) + +#define AM62X_SK_SPL_IMAGE_GUID \ + EFI_GUID(0xaee355fc, 0xbf97, 0x4264, 0x8c, 0x82, \ + 0x43, 0x72, 0x55, 0xef, 0xdc, 0x1d) + +#define AM62X_SK_UBOOT_IMAGE_GUID \ + EFI_GUID(0x28ab8c6c, 0xfca8, 0x41d3, 0x8e, 0xa1, \ + 0x5f, 0x17, 0x1b, 0x7d, 0x29, 0x29) + /* Now for the remaining common defines */ #include From patchwork Fri May 31 22:21:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942345 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=NbRTF+Gs; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd2s5Zwlz20PW for ; Sat, 1 Jun 2024 08:24:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 45BD48887C; Sat, 1 Jun 2024 00:21:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="NbRTF+Gs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9EC88886C; Sat, 1 Jun 2024 00:21:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5789B88831 for ; Sat, 1 Jun 2024 00:21:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYLe113688; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=39FhDo1tNpb2UESZqOLX7MqOjcdhlUYBSbH4HTFS20Y=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=NbRTF+Gs2vletV6r/QauQDM0H0vAIxZ17CT/Vj4eWAp57bHRlRnGjH2IbFJlfsFWn uvSAlNZQhFKIQc0YxikjYItX08wopJSZV1XAgv6JyOhBUGC9Lg60zw4DEY/YFLxNMu kt6ZYYqv8NAdfYLxIEjCGrxtXc/JXnofKWXKGUSQ= 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 44VMLYuj089478 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) 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.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLY0R006265; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 13/23] configs: am62x: Enable EFI capsule update Date: Fri, 31 May 2024 17:21:08 -0500 Message-ID: <20240531222118.2618041-14-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Enable on disk, raw capsule update. Signed-off-by: Jonathan Humphreys --- configs/am62x_evm_a53_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig index 16294a6a794..f44e2bcf3d3 100644 --- a/configs/am62x_evm_a53_defconfig +++ b/configs/am62x_evm_a53_defconfig @@ -112,5 +112,7 @@ CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y #include From patchwork Fri May 31 22:21:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942343 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=A4J4LJxP; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd2V0CnBz20PW for ; Sat, 1 Jun 2024 08:24:18 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8E27F8886F; Sat, 1 Jun 2024 00:21:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="A4J4LJxP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CA82088783; Sat, 1 Jun 2024 00:21:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9A2B288817 for ; Sat, 1 Jun 2024 00:21:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYHO017887; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=o2//n13a3h+i1WJPii/ErLgG3L6cVQHZIbeuSdcyrO8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=A4J4LJxPBI9P62Nqov2PZA9KfanEbpUsSQYjOBPQOptOXJw/U3IxxUuBA0qo91kxf hjuF0PSL3aa//tS3MHGnihBgMwrilfloETKiDSKP5OK5hiPnGZcTL6ibfPnuSsABq1 VWgMGxJHHiFzC0FRcwkbfVExVQkAjRL4vbk1hWVA= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYib089481 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYoa026068; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 14/23] doc: board: ti: am62x: document OSPI layout Date: Fri, 31 May 2024 17:21:09 -0500 Message-ID: <20240531222118.2618041-15-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Added OSPI flash layout diagram, as well as example commands to flash firmware to it. Signed-off-by: Jonathan Humphreys --- doc/board/ti/am62x_sk.rst | 24 + doc/board/ti/img/ospi_sysfw2.svg | 802 +++++++++++++++++++++++++++++++ 2 files changed, 826 insertions(+) create mode 100644 doc/board/ti/img/ospi_sysfw2.svg diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index d5f7fe3b036..2a25e84f6c9 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -164,6 +164,30 @@ Image formats: .. image:: img/dm_tispl.bin.svg :alt: tispl.bin image format +OSPI: +----- +ROM supports booting from OSPI from offset 0x0. + +Flashing images to OSPI: + +Below commands can be used to download tiboot3.bin, tispl.bin, and u-boot.img, +over tftp and then flash those to OSPI at their respective addresses. + +.. prompt:: bash => + + sf probe + tftp ${loadaddr} tiboot3.bin + sf update $loadaddr 0x0 $filesize + tftp ${loadaddr} tispl.bin + sf update $loadaddr 0x80000 $filesize + tftp ${loadaddr} u-boot.img + sf update $loadaddr 0x280000 $filesize + +Flash layout for OSPI: + +.. image:: img/ospi_sysfw2.svg + :alt: OSPI flash partition layout + A53 SPL DDR Memory Layout ------------------------- diff --git a/doc/board/ti/img/ospi_sysfw2.svg b/doc/board/ti/img/ospi_sysfw2.svg new file mode 100644 index 00000000000..06711df4117 --- /dev/null +++ b/doc/board/ti/img/ospi_sysfw2.svg @@ -0,0 +1,802 @@ + + + + + + + + + + + + + + + + + + + ospi.tiboot3(512k) + + + + ospi.tiboot3(512k) + + + + + + + + + + + + + + 0x0 + + + + + 0x0 + + + + + + + + + + + + + ospi.tispl(2M) + + + + ospi.tispl(2M) + + + + + + + + + + + + + + 0x80000 + + + + + 0x80000 + + + + + + + + + + + + + ospi.u-boot(4M) + + + + ospi.u-boot(4M) + + + + + + + + + + + + + + 0x280000 + + + + + 0x280000 + + + + + + + + + + + + + ospi.env(128K) + + + + ospi.env(128K) + + + + + + + + + + + + + + 0x680000 + + + + + 0x680000 + + + + + + + + + + + + + ospi.env.backup(128K) + + + + ospi.env.backup(128K) + + + + + + + + + + + + + + 0x6C0000 + + + + + 0x6C0000 + + + + + + + + + + + + + padding(768K) + + + + padding(768K) + + + + + + + + + + + + + + 0x740000 + + + + + 0x740000 + + + + + + + + + + + + + ospi.rootfs(UBIFS) + + + + ospi.rootfs(UBIFS) + + + + + + + + + + + + + + 0x800000 + + + + + 0x800000 + + + + + + + + + + + + + ospi.phypattern(256k) + + + + ospi.phypattern(256k) + + + + + + + + + + + + + + 0x3FC0000 + + + + + 0x3FC0000 + + + + + From patchwork Fri May 31 22:21:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942346 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=AVYcEEkB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd326cHmz20PW for ; Sat, 1 Jun 2024 08:24:46 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A6BCB8882F; Sat, 1 Jun 2024 00:21:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="AVYcEEkB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EE95088607; Sat, 1 Jun 2024 00:21:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3A79E88826 for ; Sat, 1 Jun 2024 00:21:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYXg017889; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=sPa4d6nOCoSTRgkssq0Y8RJ87tcIu5h48K93bhXcoGY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=AVYcEEkBTVzTlahAObpKw1JiMSfi7AQQURVVsZA8ch+Rka3XNUgpnqwSgHjpfLQEW eBF0kC9ZtGc9PsUDRNIJHQ5kb/up5mwVLvJ8WNXqsoqphYULks4oMJn27hccU9qMaD DrZHj3Yx0zOSOONp/obRRnwr6o5CaangVDBuirUY= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYko089482 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYP3006268; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 15/23] board: am62px: Define capsule update firmware info Date: Fri, 31 May 2024 17:21:10 -0500 Message-ID: <20240531222118.2618041-16-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Define the firmware components updatable via EFI capsule update, including defining capsule GUIDs for the various firmware components for the AM62px SK. Signed-off-by: Jonathan Humphreys --- board/ti/am62px/evm.c | 34 ++++++++++++++++++++++++++++++++++ include/configs/am62px_evm.h | 24 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/board/ti/am62px/evm.c b/board/ti/am62px/evm.c index 97a95ce8cc2..1a2c46c462b 100644 --- a/board/ti/am62px/evm.c +++ b/board/ti/am62px/evm.c @@ -6,6 +6,7 @@ * */ +#include #include #include #include @@ -13,6 +14,39 @@ #include #include +struct efi_fw_image fw_images[] = { + { + .image_type_id = AM62PX_SK_TIBOOT3_IMAGE_GUID, + .fw_name = u"AM62PX_SK_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = AM62PX_SK_SPL_IMAGE_GUID, + .fw_name = u"AM62PX_SK_SPL", + .image_index = 2, + }, + { + .image_type_id = AM62PX_SK_UBOOT_IMAGE_GUID, + .fw_name = u"AM62PX_SK_UBOOT", + .image_index = 3, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;" + "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/include/configs/am62px_evm.h b/include/configs/am62px_evm.h index 06b12860e21..57a1ba9dc3c 100644 --- a/include/configs/am62px_evm.h +++ b/include/configs/am62px_evm.h @@ -8,6 +8,30 @@ #ifndef __CONFIG_AM62PX_EVM_H #define __CONFIG_AM62PX_EVM_H +/** + * define AM62PX_SK_TIBOOT3_IMAGE_GUID - firmware GUID for AM62PX sk tiboot3.bin + * define AM62PX_SK_SPL_IMAGE_GUID - firmware GUID for AM62PX sk SPL + * define AM62PX_SK_UBOOT_IMAGE_GUID - firmware GUID for AM62PX sk UBOOT + * + * These GUIDs are used in capsules updates to identify the corresponding + * firmware object. + * + * Board developers using this as a starting reference should + * define their own GUIDs to ensure that firmware repositories (like + * LVFS) do not confuse them. + */ +#define AM62PX_SK_TIBOOT3_IMAGE_GUID \ + EFI_GUID(0xb08471b7, 0xbe2d, 0x4489, 0x87, 0xa1, \ + 0xca, 0xb2, 0x8a, 0x0c, 0xf7, 0x43) + +#define AM62PX_SK_SPL_IMAGE_GUID \ + EFI_GUID(0xd02ed781, 0x6d71, 0x4c1a, 0xa9, 0x99, \ + 0x3c, 0x6a, 0x41, 0xc3, 0x63, 0x24) + +#define AM62PX_SK_UBOOT_IMAGE_GUID \ + EFI_GUID(0x7e6aea51, 0x965c, 0x44ab, 0xb3, 0x88, \ + 0xda, 0xeb, 0x03, 0xb5, 0x4f, 0x66) + /* Now for the remaining common defines */ #include From patchwork Fri May 31 22:21:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942342 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=IMkOOT9Q; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd2J4n5rz20PW for ; Sat, 1 Jun 2024 08:24:08 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 30A4688826; Sat, 1 Jun 2024 00:21:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="IMkOOT9Q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9EC9D88855; Sat, 1 Jun 2024 00:21:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 83585885AF for ; Sat, 1 Jun 2024 00:21:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLY9c113692; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=XqMsU8swO0VcryCPPNhDC7PZDiOEG2ybtnLCXB7nTgQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=IMkOOT9QDiBh3rk8cvqjc//W19glHjWTZ8j7NzJA4cojRuqmP5i/cm9iBj1jEklV4 +tAGdPWAaOQlVKxTbLWYgIOEWqNdvrRPFRgUc7WNT8pfQqkauEzqk6mdYXzS5LiSYA GysUVHl85wsXJATnj41cfExr1bU/WyIoloYfnRjo= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYUC046173 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) 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.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYWv026073; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 16/23] configs: am62px: Enable EFI capsule update Date: Fri, 31 May 2024 17:21:11 -0500 Message-ID: <20240531222118.2618041-17-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Enable on disk, raw capsule update. Signed-off-by: Jonathan Humphreys --- configs/am62px_evm_a53_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/am62px_evm_a53_defconfig b/configs/am62px_evm_a53_defconfig index 9f40c9a0b3c..7494148c88b 100644 --- a/configs/am62px_evm_a53_defconfig +++ b/configs/am62px_evm_a53_defconfig @@ -179,3 +179,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6165 CONFIG_SPL_DFU=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y From patchwork Fri May 31 22:21:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942350 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=o+Hj928A; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd3p71F7z20Pb for ; Sat, 1 Jun 2024 08:25:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3B6018879C; Sat, 1 Jun 2024 00:21:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="o+Hj928A"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DD88D88842; Sat, 1 Jun 2024 00:21:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3FB46882BE for ; Sat, 1 Jun 2024 00:21:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYP1111762; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=UU8bty0DbXnKVLpPrLJnPmvuUYludXGycZt1EHygiFI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=o+Hj928AuZnX6cLGxVhepDt9oyGWVX02kBRr5tZbFrIkPfPbkkfD8Rgy4o7NIjjEy 4rZwcFg/fxZogAuvuVet6wSVSwhiv/FP2SYaOuJuSRIIwJbmx1GtJ4N6Sy8ydumOMO byWKoBFXk65hAMLe0xPar4MOM/stZO2bIyUBRVVE= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYce005577 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) 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.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLY3x026076; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 17/23] doc: board: ti: am62px: document OSPI layout Date: Fri, 31 May 2024 17:21:12 -0500 Message-ID: <20240531222118.2618041-18-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Added OSPI flash layout diagram, as well as example commands to flash firmware to it. Signed-off-by: Jonathan Humphreys --- doc/board/ti/am62px_sk.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/board/ti/am62px_sk.rst b/doc/board/ti/am62px_sk.rst index 1f2982c36f9..c80b5068117 100644 --- a/doc/board/ti/am62px_sk.rst +++ b/doc/board/ti/am62px_sk.rst @@ -156,6 +156,30 @@ Image formats: .. image:: img/dm_tispl.bin.svg :alt: tispl.bin image format +OSPI: +----- +ROM supports booting from OSPI from offset 0x0. + +Flashing images to OSPI: + +Below commands can be used to download tiboot3.bin, tispl.bin, and u-boot.img, +over tftp and then flash those to OSPI at their respective addresses. + +.. prompt:: bash => + + sf probe + tftp ${loadaddr} tiboot3.bin + sf update $loadaddr 0x0 $filesize + tftp ${loadaddr} tispl.bin + sf update $loadaddr 0x80000 $filesize + tftp ${loadaddr} u-boot.img + sf update $loadaddr 0x280000 $filesize + +Flash layout for OSPI: + +.. image:: img/ospi_sysfw2.svg + :alt: OSPI flash partition layout + A53 SPL DDR Memory Layout ------------------------- From patchwork Fri May 31 22:21:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942330 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=KYNeqjG5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrczw2HWsz20PW for ; Sat, 1 Jun 2024 08:22:04 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7ACD288804; Sat, 1 Jun 2024 00:21:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="KYNeqjG5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9396882BE; Sat, 1 Jun 2024 00:21:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2B23B881BA for ; Sat, 1 Jun 2024 00:21:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYFT017883; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=ZcHYTDQfsEbrH3dAipffE7uv3IbF3BybiVBzfLSWDx8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=KYNeqjG5A0m9jHS+THUX9KD3WIJxgLOS4FFgI+TobVxXjR64n3gCf0ELoSpwlm6EX vBnwaZ12YaIY86yorfoRkkeoxo3R8pFc6W43+o5GRTDWRSzvLZCT5K1r/PV9JnEyXh p66kEtf1sb47ujaSqht4ICjJANNLRKdIXfLfEQu8= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYTS046176 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYk6006271; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 18/23] board: beagleboneai64: Define capsule update firmware info Date: Fri, 31 May 2024 17:21:13 -0500 Message-ID: <20240531222118.2618041-19-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Define the firmware components updatable via EFI capsule update, including defining capsule GUIDs for the various firmware components for the BeagleBoneAI64. Note this involved creating BeagleBoneAI64's own beagleboneai64.h board header file instead of reusing j721e_evm's. Signed-off-by: Jonathan Humphreys --- board/beagle/beagleboneai64/Kconfig | 4 +- board/beagle/beagleboneai64/beagleboneai64.c | 39 ++++++++++++++ include/configs/beagleboneai64.h | 55 ++++++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 include/configs/beagleboneai64.h diff --git a/board/beagle/beagleboneai64/Kconfig b/board/beagle/beagleboneai64/Kconfig index 7cfccf9baf0..0f21582614d 100644 --- a/board/beagle/beagleboneai64/Kconfig +++ b/board/beagle/beagleboneai64/Kconfig @@ -37,7 +37,7 @@ config SYS_VENDOR default "beagle" config SYS_CONFIG_NAME - default "j721e_evm" + default "beagleboneai64" source "board/ti/common/Kconfig" @@ -52,7 +52,7 @@ config SYS_VENDOR default "beagle" config SYS_CONFIG_NAME - default "j721e_evm" + default "beagleboneai64" source "board/ti/common/Kconfig" diff --git a/board/beagle/beagleboneai64/beagleboneai64.c b/board/beagle/beagleboneai64/beagleboneai64.c index c5b4ff7df47..1e43d1c1bd2 100644 --- a/board/beagle/beagleboneai64/beagleboneai64.c +++ b/board/beagle/beagleboneai64/beagleboneai64.c @@ -7,6 +7,7 @@ * Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation */ +#include #include #include #include @@ -14,6 +15,44 @@ DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = BEAGLEBONEAI64_SPL_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_SPL", + .image_index = 2, + }, + { + .image_type_id = BEAGLEBONEAI64_UBOOT_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_UBOOT", + .image_index = 3, + }, + { + .image_type_id = BEAGLEBONEAI64_SYSFW_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_SYSFW", + .image_index = 4, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "mmc 0=tiboot3.bin raw 0 2000 mmcpart 1;" + "tispl.bin fat 0 1;u-boot.img fat 0 1; sysfw.itb fat 0 1", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/include/configs/beagleboneai64.h b/include/configs/beagleboneai64.h new file mode 100644 index 00000000000..85d57248bb6 --- /dev/null +++ b/include/configs/beagleboneai64.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Configuration header file for BeagleBoneAI64 + * + * https://beagleboard.org/ai-64 + * + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ + */ + +#ifndef __CONFIG_BEAGLEBONEAI64_H +#define __CONFIG_BEAGLEBONEAI64_H + +/* FLASH Configuration */ +#define CFG_SYS_FLASH_BASE 0x000000000 + +/* SPL Loader Configuration */ +#define CFG_SYS_UBOOT_BASE 0x50080000 + +/** + * define BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID - firmware GUID for BeagleBoneAI64 + * tiboot3.bin + * define BEAGLEBONEAI64_SPL_IMAGE_GUID - firmware GUID for BeagleBoneAI64 + * SPL + * define BEAGLEBONEAI64_UBOOT_IMAGE_GUID - firmware GUID for BeagleBoneAI64 + * UBOOT + * define BEAGLEBONEAI64_SYSFW_IMAGE_GUID - firmware GUID for BeagleBoneAI64 + * SYSFW + * + * These GUIDs are used in capsules updates to identify the corresponding + * firmware object. + * + * Board developers using this as a starting reference should + * define their own GUIDs to ensure that firmware repositories (like + * LVFS) do not confuse them. + */ +#define BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID \ + EFI_GUID(0x772a4810, 0x2194, 0x4923, 0x87, 0x54, \ + 0x01, 0x15, 0x87, 0x0e, 0xf3, 0x67) + +#define BEAGLEBONEAI64_SPL_IMAGE_GUID \ + EFI_GUID(0x83447222, 0x1e26, 0x40cd, 0xa3, 0x95, \ + 0xb7, 0xde, 0x09, 0x57, 0xe8, 0x75) + +#define BEAGLEBONEAI64_UBOOT_IMAGE_GUID \ + EFI_GUID(0x4249ff77, 0xc17d, 0x4eb7, 0xa1, 0xdb, \ + 0x45, 0xaa, 0x98, 0x87, 0xd4, 0x9e) + +#define BEAGLEBONEAI64_SYSFW_IMAGE_GUID \ + EFI_GUID(0xdfc9c683, 0x49b7, 0x46bd, 0xb3, 0xc1, \ + 0x3a, 0x3b, 0x2f, 0xdb, 0x13, 0x5b) + +/* Now for the remaining common defines */ +#include + +#endif /* __CONFIG_BEAGLEBONEAI64_H */ From patchwork Fri May 31 22:21:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942332 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=lYnMMXXi; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd0P3ZSCz20PW for ; Sat, 1 Jun 2024 08:22:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 412A588829; Sat, 1 Jun 2024 00:21:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="lYnMMXXi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3C8A9881AD; Sat, 1 Jun 2024 00:21:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 20D20881BA for ; Sat, 1 Jun 2024 00:21:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYQK017893; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=9A5+/HvGZs2h5n4AQ7ejXRS7uQtr65K53jAHY+ES0D0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=lYnMMXXifhdDl1jNlhvr48Tn/V5dxtnW3S2KKEtgpiIIDo4rIYsasGwWQLZENFicP FdzZqSuqGM96kiP35HvJ7tEIpdNDo2o9k+l8dZzWEr2WtOSP4aHxjwOyLFJ2+0oGfm 86MfRWY2tRFxUWPuLQ7V/uJ8spU1GGUbKDT6si5g= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYcN046179 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYLA026079; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 19/23] configs: beagleboneai64: Enable EFI capsule update Date: Fri, 31 May 2024 17:21:14 -0500 Message-ID: <20240531222118.2618041-20-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Enable on disk, raw capsule update. Signed-off-by: Jonathan Humphreys --- configs/j721e_beagleboneai64_a72_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/j721e_beagleboneai64_a72_defconfig b/configs/j721e_beagleboneai64_a72_defconfig index a354876f8c2..ead1d8389c6 100644 --- a/configs/j721e_beagleboneai64_a72_defconfig +++ b/configs/j721e_beagleboneai64_a72_defconfig @@ -172,3 +172,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6163 CONFIG_SPL_DFU=y CONFIG_LZO=y CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y From patchwork Fri May 31 22:21:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942348 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=aY3OZYJ6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd3Q5njZz20PW for ; Sat, 1 Jun 2024 08:25:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 75EE888888; Sat, 1 Jun 2024 00:21:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="aY3OZYJ6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AE2CA8887E; Sat, 1 Jun 2024 00:21:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9FEF18883B for ; Sat, 1 Jun 2024 00:21:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLZKw111770; Fri, 31 May 2024 17:21:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194095; bh=+8NPEgx+zkCCs1cYI1e5oLx9KLsk/800mMYh2bc+czE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=aY3OZYJ6yyAgPgFvvH9MraWpe6n/zI92HkZTdUKyJaC/S/lsWqcQY49N5tcd5wKJt FuW9QMobSzxsuv57NrC0w9UR4vWpMtV/M3cUaQ9Zt4z3lSLRDb94iohBQthbJLUDlI qOUISG1PlYGj2x+m4+M2bQ60J8pGY23iNBKa/Wu4= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLZ5L046182 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:35 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYwK006275; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 20/23] configs: j784s4_evm: Enable serial flash DFU support Date: Fri, 31 May 2024 17:21:15 -0500 Message-ID: <20240531222118.2618041-21-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Enable serial flash DFU support for capsule update of firmware. Signed-off-by: Jonathan Humphreys --- configs/j784s4_evm_a72_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/j784s4_evm_a72_defconfig b/configs/j784s4_evm_a72_defconfig index e999a25319d..d7709f554fd 100644 --- a/configs/j784s4_evm_a72_defconfig +++ b/configs/j784s4_evm_a72_defconfig @@ -84,6 +84,9 @@ CONFIG_CLK=y CONFIG_SPL_CLK=y CONFIG_CLK_CCF=y CONFIG_CLK_TI_SCI=y +CONFIG_DFU_SF=y +CONFIG_SYS_DFU_DATA_BUF_SIZE=0x40000 +CONFIG_SYS_DFU_MAX_FILE_SIZE=0x800000 CONFIG_DMA_CHANNELS=y CONFIG_TI_K3_NAVSS_UDMA=y CONFIG_TI_SCI_PROTOCOL=y From patchwork Fri May 31 22:21:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942340 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=qFE81REE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd1x2KXzz20PW for ; Sat, 1 Jun 2024 08:23:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5AB988885D; Sat, 1 Jun 2024 00:21:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="qFE81REE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0F09688851; Sat, 1 Jun 2024 00:21:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 293248831F for ; Sat, 1 Jun 2024 00:21:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYXt113697; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=XFt7mowSCo5gmKM1tT1wbXaxFS4F5/2lBODaQdjptYc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=qFE81REE62dPJtgutpOBd6bCVCyifKYqaYYcq5lBzaT/JwVrtPwmk2ZZXGcMW0f1r 415otfx/DBDJFlbmLidyjZQ8HlDmyKmbYqCgcx+JehIEF7scPof80eEPZTzGFY7Szg mcbCAWXcG0vJXP9vqkRK9RY2LbeLjm79HsfZpzdA= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYEK089487 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYpa026082; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 21/23] board: sk-am69: Define capsule update firmware info Date: Fri, 31 May 2024 17:21:16 -0500 Message-ID: <20240531222118.2618041-22-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Define the firmware components updatable via EFI capsule update, including defining capsule GUIDs for the various firmware components for the AM69 SK. TODO: possibly make the struct's sk specific. TODO: add doc commit (and make sure doc is sk/NOR specific, and add OSIP boot mode) TODO: update doc to show sk defconfig when building Signed-off-by: Jonathan Humphreys --- board/ti/j784s4/evm.c | 34 ++++++++++++++++++++++++++++++++++ include/configs/j784s4_evm.h | 24 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/board/ti/j784s4/evm.c b/board/ti/j784s4/evm.c index aed0ea5b949..548dbd5925d 100644 --- a/board/ti/j784s4/evm.c +++ b/board/ti/j784s4/evm.c @@ -7,12 +7,46 @@ * */ +#include #include #include #include "../common/fdt_ops.h" DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = AM69_SK_TIBOOT3_IMAGE_GUID, + .fw_name = u"AM69_SK_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = AM69_SK_SPL_IMAGE_GUID, + .fw_name = u"AM69_SK_SPL", + .image_index = 2, + }, + { + .image_type_id = AM69_SK_UBOOT_IMAGE_GUID, + .fw_name = u"AM69_SK_UBOOT", + .image_index = 3, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;" + "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/include/configs/j784s4_evm.h b/include/configs/j784s4_evm.h index 4a2ccdce144..53eb2bff221 100644 --- a/include/configs/j784s4_evm.h +++ b/include/configs/j784s4_evm.h @@ -9,6 +9,30 @@ #ifndef __CONFIG_J784S4_EVM_H #define __CONFIG_J784S4_EVM_H +/** + * define AM69_SK_TIBOOT3_IMAGE_GUID - firmware GUID for AM69 SK tiboot3.bin + * define AM69_SK_SPL_IMAGE_GUID - firmware GUID for AM69 SK SPL + * define AM69_SK_UBOOT_IMAGE_GUID - firmware GUID for AM69 SK UBOOT + * + * These GUIDs are used in capsules updates to identify the corresponding + * firmware object. + * + * Board developers using this as a starting reference should + * define their own GUIDs to ensure that firmware repositories (like + * LVFS) do not confuse them. + */ +#define AM69_SK_TIBOOT3_IMAGE_GUID \ + EFI_GUID(0xadf49ec5, 0x61bb, 0x4dbe, 0x8b, 0x8d, \ + 0x39, 0xdf, 0x4d, 0x7e, 0xbf, 0x46) + +#define AM69_SK_SPL_IMAGE_GUID \ + EFI_GUID(0x787f0059, 0x63a1, 0x461c, 0xa1, 0x8e, \ + 0x9d, 0x83, 0x83, 0x45, 0xfe, 0x8e) + +#define AM69_SK_UBOOT_IMAGE_GUID \ + EFI_GUID(0x9300505d, 0x6ec5, 0x4ff8, 0x99, 0xe4, \ + 0x54, 0x59, 0xa0, 0x4b, 0xe6, 0x17) + /* Now for the remaining common defines */ #include From patchwork Fri May 31 22:21:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942349 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=LA9vmdMa; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd3c5FYHz20Pb for ; Sat, 1 Jun 2024 08:25:16 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DCAAA887C7; Sat, 1 Jun 2024 00:21:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="LA9vmdMa"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CACD38887E; Sat, 1 Jun 2024 00:21:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1140688842 for ; Sat, 1 Jun 2024 00:21:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYP3111766; Fri, 31 May 2024 17:21:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194094; bh=tS3hBoSQxYpQ7FzHp4bP9MZOuYG8lB00rjAzCl3pbDU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=LA9vmdMaVmXZ4O72FTpHghQF2UZPNa2/G7avcSy19bXcn3BR+Zwr7BtaDTnkP40I4 O2d9CyjbAvVjH7NKLZkt3i6QLZN5VTsGB0/KILnElqamwS9ZIZvsi/++bn0hc6XJAt bEtTNUK2kISypyL9jUBv4vUl9O5S3RS4fADzqmPY= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLYWj005580 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:34 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) 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.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYol006278; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 22/23] configs: j784s4: Enable EFI capsule update Date: Fri, 31 May 2024 17:21:17 -0500 Message-ID: <20240531222118.2618041-23-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Enable on disk, raw capsule update. Signed-off-by: Jonathan Humphreys --- configs/j784s4_evm_a72_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/j784s4_evm_a72_defconfig b/configs/j784s4_evm_a72_defconfig index d7709f554fd..9cf1352cf7b 100644 --- a/configs/j784s4_evm_a72_defconfig +++ b/configs/j784s4_evm_a72_defconfig @@ -158,3 +158,5 @@ CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y CONFIG_DM_THERMAL=y CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y From patchwork Fri May 31 22:21:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1942347 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=KshLj1+S; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vrd3D4YWnz20PW for ; Sat, 1 Jun 2024 08:24:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 18A2B88853; Sat, 1 Jun 2024 00:21:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="KshLj1+S"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5D6A388881; Sat, 1 Jun 2024 00:21:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 755698882F for ; Sat, 1 Jun 2024 00:21:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLZ4k017901; Fri, 31 May 2024 17:21:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717194095; bh=LT6qkYOCXyx21IuX5owr9ltbmH7mO2i0535QE0s9/x8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=KshLj1+SccLExkTRunM3scPl7jJnM/uHkCjK5NVxHTyvom505dohZ7BgCL2KDj6nC sDHX2KCtMEbf2kJ1m+xXt/FGYla8yiXsKRTuI+CjW5dfj5jEo5twUccymKz+JuuFST kePJzPv6yVKURLOTx5fy8BCSPPbns5sWRh/yRJX0= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44VMLZiF006222 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2024 17:21:35 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 31 May 2024 17:21:34 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 31 May 2024 17:21:34 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44VMLYVY026085; Fri, 31 May 2024 17:21:34 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v5 23/23] doc: board: ti: j784s4: document OSPI NOR layout Date: Fri, 31 May 2024 17:21:18 -0500 Message-ID: <20240531222118.2618041-24-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531222118.2618041-1-j-humphreys@ti.com> References: <20240531222118.2618041-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Added OSPI NOR flash layout diagram, as well as example commands to flash firmware to it. Added OSPI boot mode pin setting. Signed-off-by: Jonathan Humphreys --- doc/board/ti/img/ospi_sysfw3.svg | 802 +++++++++++++++++++++++++++++++ doc/board/ti/j784s4_evm.rst | 28 ++ 2 files changed, 830 insertions(+) create mode 100644 doc/board/ti/img/ospi_sysfw3.svg diff --git a/doc/board/ti/img/ospi_sysfw3.svg b/doc/board/ti/img/ospi_sysfw3.svg new file mode 100644 index 00000000000..382867c6f4f --- /dev/null +++ b/doc/board/ti/img/ospi_sysfw3.svg @@ -0,0 +1,802 @@ + + + + + + + + + + + + + + + + + + + ospi.tiboot3(512k) + + + + ospi.tiboot3(512k) + + + + + + + + + + + + + + 0x0 + + + + + 0x0 + + + + + + + + + + + + + ospi.tispl(2M) + + + + ospi.tispl(2M) + + + + + + + + + + + + + + 0x80000 + + + + + 0x80000 + + + + + + + + + + + + + ospi.u-boot(4M) + + + + ospi.u-boot(4M) + + + + + + + + + + + + + + 0x280000 + + + + + 0x280000 + + + + + + + + + + + + + ospi.env(128K) + + + + ospi.env(128K) + + + + + + + + + + + + + + 0x680000 + + + + + 0x680000 + + + + + + + + + + + + + ospi.env.backup(128K) + + + + ospi.env.backup(128K) + + + + + + + + + + + + + + 0x6A0000 + + + + + 0x6A0000 + + + + + + + + + + + + + padding(1280K) + + + + padding(1280K) + + + + + + + + + + + + + + 0x6C0000 + + + + + 0x6C0000 + + + + + + + + + + + + + ospi.rootfs(UBIFS) + + + + ospi.rootfs(UBIFS) + + + + + + + + + + + + + + 0x800000 + + + + + 0x800000 + + + + + + + + + + + + + ospi.phypattern(256k) + + + + ospi.phypattern(256k) + + + + + + + + + + + + + + 0x3FC0000 + + + + + 0x3FC0000 + + + + + diff --git a/doc/board/ti/j784s4_evm.rst b/doc/board/ti/j784s4_evm.rst index 5c4bd2c927d..2ffec3dbd3b 100644 --- a/doc/board/ti/j784s4_evm.rst +++ b/doc/board/ti/j784s4_evm.rst @@ -153,6 +153,31 @@ Image formats .. image:: img/dm_tispl.bin.svg :alt: tispl.bin format +OSPI: +----- +ROM supports booting from OSPI from offset 0x0. + +Flashing images to OSPI NOR: + +Below commands can be used to download tiboot3.bin, tispl.bin, and +u-boot.img over tftp and then flash those to OSPI at their respective +addresses. + +.. prompt:: bash => + + sf probe + tftp ${loadaddr} tiboot3.bin + sf update $loadaddr 0x0 $filesize + tftp ${loadaddr} tispl.bin + sf update $loadaddr 0x80000 $filesize + tftp ${loadaddr} u-boot.img + sf update $loadaddr 0x280000 $filesize + +Flash layout for OSPI NOR: + +.. image:: img/ospi_sysfw3.svg + :alt: OSPI NOR flash partition layout + R5 Memory Map ------------- @@ -262,6 +287,9 @@ section. * - SD - 0000 + * - OSPI + - 0010 + * - EMMC - 0110