From patchwork Mon Nov 18 13:46:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Raghavendra, Vignesh" X-Patchwork-Id: 1196789 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="b79CjVCs"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 47GqzS26zxz9sPJ for ; Tue, 19 Nov 2019 00:48:19 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id B33D3C21E26; Mon, 18 Nov 2019 13:47:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1F58AC21E42; Mon, 18 Nov 2019 13:46:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9AEA8C21E42; Mon, 18 Nov 2019 13:46:30 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lists.denx.de (Postfix) with ESMTPS id E8EB7C21DB3 for ; Mon, 18 Nov 2019 13:46:27 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAIDkNnq024064; Mon, 18 Nov 2019 07:46:23 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574084783; bh=u9cQAtQWctb+mRcJB3+S+NV5lrHLUUyGv8DENmC9I44=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=b79CjVCsBjMusHOcSAAYhbaKgl6LaJDJlaoVovjAcL3sl1Bm7fNuAUFr8u/tTyOAa gnoSSK8jmvqCMNO8nS4TP8qHl/VrR2f6pt/8MOWpzpiyHVQsHPPv4UdeOY3TV97/dH FLy2vTwBGaLe+tnfcDlyT+hpFLmAG3x8bce/fPfQ= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAIDkNje113129; Mon, 18 Nov 2019 07:46:23 -0600 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 18 Nov 2019 07:46:22 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) 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.1847.3 via Frontend Transport; Mon, 18 Nov 2019 07:46:22 -0600 Received: from a0132425.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAIDkFin129814; Mon, 18 Nov 2019 07:46:21 -0600 From: Vignesh Raghavendra To: Lokesh Vutla , Marek Vasut Date: Mon, 18 Nov 2019 19:16:34 +0530 Message-ID: <20191118134636.17762-3-vigneshr@ti.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191118134636.17762-1-vigneshr@ti.com> References: <20191118134636.17762-1-vigneshr@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: Tom Rini , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 2/4] environment: ti: Add DFU environment variables k3_dfu.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Setup env variables for updating firmwares on eMMC/OSPI/MMC via DFU Signed-off-by: Vignesh Raghavendra --- include/configs/j721e_evm.h | 10 +++++++ include/environment/ti/k3_dfu.h | 46 +++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 include/environment/ti/k3_dfu.h diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h index 639d87a4e578..b21eabc873f7 100644 --- a/include/configs/j721e_evm.h +++ b/include/configs/j721e_evm.h @@ -14,6 +14,7 @@ #include #include #include +#include #define CONFIG_ENV_SIZE (128 << 10) @@ -102,12 +103,21 @@ "7 /lib/firmware/j7-c66_1-fw " \ "8 /lib/firmware/j7-c71_0-fw " +/* set default dfu_bufsiz to 128KB (sector size of OSPI) */ +#define EXTRA_ENV_DFUARGS \ + "dfu_bufsiz=0x20000\0" \ + DFU_ALT_INFO_MMC \ + DFU_ALT_INFO_EMMC \ + DFU_ALT_INFO_RAM \ + DFU_ALT_INFO_OSPI + /* Incorporate settings into the U-Boot environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_MMC_TI_ARGS \ EXTRA_ENV_J721E_BOARD_SETTINGS \ EXTRA_ENV_J721E_BOARD_SETTINGS_MMC \ EXTRA_ENV_RPROC_SETTINGS \ + EXTRA_ENV_DFUARGS \ DEFAULT_UFS_TI_ARGS /* Now for the remaining common defines */ diff --git a/include/environment/ti/k3_dfu.h b/include/environment/ti/k3_dfu.h new file mode 100644 index 000000000000..2f503b8de880 --- /dev/null +++ b/include/environment/ti/k3_dfu.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for DFU on TI K3 SoCs. + * + */ + +#ifndef __TI_DFU_H +#define __TI_DFU_H + +#define DFU_ALT_INFO_MMC \ + "dfu_alt_info_mmc=" \ + "boot part 1 1;" \ + "rootfs part 1 2;" \ + "tiboot3.bin fat 1 1;" \ + "tispl.bin fat 1 1;" \ + "u-boot.img fat 1 1;" \ + "uEnv.txt fat 1 1;" \ + "sysfw.itb fat 1 1\0" + +#define DFU_ALT_INFO_EMMC \ + "dfu_alt_info_emmc=" \ + "rawemmc raw 0 0x800000 mmcpart 1;" \ + "rootfs part 0 1 mmcpart 0;" \ + "tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;" \ + "tispl.bin.raw raw 0x400 0x1000 mmcpart 1;" \ + "u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;" \ + "u-env.raw raw 0x3400 0x100 mmcpart 1;" \ + "sysfw.itb.raw raw 0x3600 0x800 mmcpart 1\0" + +#define DFU_ALT_INFO_OSPI \ + "dfu_alt_info_ospi=" \ + "tiboot3.bin raw 0x0 0x080000;" \ + "tispl.bin raw 0x080000 0x200000;" \ + "u-boot.img raw 0x280000 0x400000;" \ + "u-boot-env raw 0x680000 0x020000;" \ + "sysfw.itb raw 0x6c0000 0x100000;" \ + "rootfs raw 0x800000 0x3800000\0" + +#define DFU_ALT_INFO_RAM \ + "dfu_alt_info_ram=" \ + "tispl.bin ram 0x80080000 0x100000;" \ + "u-boot.img ram 0x81000000 0x100000\0" \ + +#endif /* __TI_DFU_H */