From patchwork Mon May 7 05:51:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 909522 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) 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=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="qr7pP+0E"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40fX1z66pLz9s34 for ; Mon, 7 May 2018 15:56:55 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 77D0AC22059; Mon, 7 May 2018 05:54:15 +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.6 required=5.0 tests=RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9E009C22082; Mon, 7 May 2018 05:52:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A45F0C2207C; Mon, 7 May 2018 05:52:26 +0000 (UTC) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by lists.denx.de (Postfix) with ESMTPS id E7111C21FBA for ; Mon, 7 May 2018 05:52:14 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id c10so21965127pfi.12 for ; Sun, 06 May 2018 22:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LvzVmV5BLZMGMhlJ4jEUfeuaTQeAoFhngVc91scW3JU=; b=qr7pP+0EyG5Nr6bH8ktu+lLZMt360+8wJ1TI/NHJuRf5tmD4e4qwk8gwKDQIZqleDI fbCnPNtnS6OdTeg7KpqKi1yf8oBTBNktUezBdQdRUR+jiiyss8tIlXBx5XqexlBybfD+ aCyw7nNNrGs2256yRZTeG7dzqCjg8UFhkjRHc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LvzVmV5BLZMGMhlJ4jEUfeuaTQeAoFhngVc91scW3JU=; b=C/908TMPWg0b25KUhjLqaCzUGILhIm/CU7F3Ekx/g5P9rnLGwDIm32POXRqWC/XReK X3na5P2euqJ++wG7v7jxweC3m9uYOdwQqQ6AZn/tDHe6RXds9CFAlrXmE7lG6FmcKtF4 EweDblxiO97q8PoXmmOMwUND3PZjs0WFZQu+xDLZOKvHIwTYrxmbKHBU4yIAkmdv76ot gM3JAF5CzOFdWDt8Pv3uGaRmhN1j/7dg7G0ETC74qoYjIGmHxug3Un1o86FQSoc2Twfc 88osWAMO1Z60OFgiTb8IqAls/6Kbe5sC6fcyzyavCuPDhT0g1FeU9RP4U2P8+o06Gufz d7vA== X-Gm-Message-State: ALQs6tClJ3arJ+qGOdeF16SBE9atYEyEekbgb2NSYqUbRxPEaPsxQvmw q/xKt7f9S31xeIdPsrThac2Wtw== X-Google-Smtp-Source: AB8JxZoxERhOJHf0PshzQi3Dy/SuJRP0PCW1GMzUB2A3FLz9HRtp+x6/AzA4EZLMZxYXT4qI2/qSrw== X-Received: by 10.98.204.8 with SMTP id a8mr35401505pfg.219.1525672333483; Sun, 06 May 2018 22:52:13 -0700 (PDT) Received: from localhost.localdomain ([183.82.228.172]) by smtp.gmail.com with ESMTPSA id t11-v6sm35923747pgn.94.2018.05.06.22.52.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 06 May 2018 22:52:13 -0700 (PDT) From: Jagan Teki To: Stefano Babic Date: Mon, 7 May 2018 11:21:38 +0530 Message-Id: <20180507055140.28002-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180507055140.28002-1-jagan@amarulasolutions.com> References: <20180507055140.28002-1-jagan@amarulasolutions.com> Cc: Simone CIANNI , Shyam Saini , u-boot@lists.denx.de, Davide Bonfanti , Andrea CORTESE , Fabio maggi , Fabio Estevam , Raffaele RECALCATI , lamiaposta71@gmail.com Subject: [U-Boot] [PATCH v3 5/7] configs: imx6dl-mamoj: Add DFU support 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add DFU support for BTicino Mamoj board and update the same steps in README. Signed-off-by: Jagan Teki Signed-off-by: Simone CIANNI Signed-off-by: Raffaele RECALCATI --- board/bticino/mamoj/README | 37 +++++++++++++++++++++++++++++++++++++ configs/imx6dl_mamoj_defconfig | 2 ++ include/configs/imx6dl-mamoj.h | 4 +++- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/board/bticino/mamoj/README b/board/bticino/mamoj/README index eda9e45ed1..8b0e9c3e0c 100644 --- a/board/bticino/mamoj/README +++ b/board/bticino/mamoj/README @@ -13,6 +13,8 @@ The following methods can be used for booting Mamoj boards: 1. USB SDP boot +2. eMMC boot (via DFU) + 1. USB SDP boot: --------------- @@ -55,6 +57,41 @@ The following methods can be used for booting Mamoj boards: We can see U-Boot boot from USB SDP on minicom +2. eMMC boot via DFU: +-------------------- + + Once booted from USB SDP, program the eMMC as below(make sure to connect USB OTG) + + - Change eMMC partition config + + => mmc partconf 2 1 0 0 + + - Partition eMMC on host + + => ums 0 mmc 2 + + Host will able to detect the eMMC disk as UMS, partition the same. + + - Program SPL + + => setenv dfu_alt_info $dfu_alt_info_spl + => dfu 0 mmc 2 + + At Host + + # dfu-util -D SPL -a spl + + - Program u-boot-dtb.img + + => setenv dfu_alt_info $dfu_alt_info_uboot + => dfu 0 mmc 2 + + At Host + + # dfu-util -D u-boot-dtb.img -a u-boot + + Poweroff and Poweron the board and see U-Boot booting from eMMC. + -- Jagan Teki 03/12/18 diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defconfig index 08272077d2..e34c2d9be3 100644 --- a/configs/imx6dl_mamoj_defconfig +++ b/configs/imx6dl_mamoj_defconfig @@ -15,6 +15,7 @@ CONFIG_FASTBOOT_FLASH=y CONFIG_FASTBOOT_FLASH_MMC_DEV=2 CONFIG_SYS_PROMPT="=> " CONFIG_CRC32_VERIFY=y +CONFIG_CMD_DFU=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y @@ -44,5 +45,6 @@ CONFIG_USB_GADGET_MANUFACTURER="FSL" CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y +CONFIG_DFU_MMC=y CONFIG_IMX_THERMAL=y CONFIG_SYS_I2C_MXC=y diff --git a/include/configs/imx6dl-mamoj.h b/include/configs/imx6dl-mamoj.h index 929365af79..0ac238b82d 100644 --- a/include/configs/imx6dl-mamoj.h +++ b/include/configs/imx6dl-mamoj.h @@ -15,7 +15,7 @@ #include "mx6_common.h" /* Size of malloc() pool */ -#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M) +#define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M) /* Total Size of Environment Sector */ #define CONFIG_ENV_SIZE SZ_128K @@ -37,6 +37,8 @@ "fdt_addr_r=0x13000000\0" \ "kernel_addr_r=0x10008000\0" \ "fdt_high=0xffffffff\0" \ + "dfu_alt_info_spl=spl raw 0x2 0x400\0" \ + "dfu_alt_info_uboot=u-boot raw 0x8a 0x11400\0" \ BOOTENV #define BOOT_TARGET_DEVICES(func) \