From patchwork Mon Mar 19 19:47:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 887857 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="HFZ7D/3V"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 404mt46cZ5z9s3Y for ; Tue, 20 Mar 2018 06:51:56 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 85550C21DF9; Mon, 19 Mar 2018 19:49:53 +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=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, 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 6CF7AC21C4A; Mon, 19 Mar 2018 19:48:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3CA3AC21C51; Mon, 19 Mar 2018 19:48:04 +0000 (UTC) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by lists.denx.de (Postfix) with ESMTPS id 42D87C21DEC for ; Mon, 19 Mar 2018 19:47:55 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id z10so7438405pfh.13 for ; Mon, 19 Mar 2018 12:47:55 -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=NJGmV+JdbdXboOprPTEbyQnzLRZSd6l7a2RYgh8sjOk=; b=HFZ7D/3VrY2a4v7NCL6XAPYsuzhRpu58j+KAspHHh0wJivAcRILFkrTsjPSg1mW6SR VjBb4jJDsYwduCl6iCBA466xRDyzTIytph33bR6Vv/JRE17gz5Z9CrtKrwsgcMqVu5z1 /kUG8i6F72wC00/1G9aSlqndnf6VfVsXLSfHU= 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=NJGmV+JdbdXboOprPTEbyQnzLRZSd6l7a2RYgh8sjOk=; b=kpLhhJDcZeyrb6eLt430DOESAmmT/b+itUeOy8wmcw54DnpuR/HUvJ64Mioafyb1N2 PWRrDWAwYey3AlQK7YIpZYXT3Gm9h/DRnhglENhl+iQSmSK/wvfwvqkABl885MQNWFcY bjcKwMrxjxeaPIuE/W9IfGTFcMDl07prNRjzVFl0JUdOKaHMkpcwHc8nDvaCp64yPm/h 3NG8HiyWh/PkEv6gJ5gwinwtnNMugc+l+SVxaa0N9NUgvYh74AGht1s4hLIAxOLxSZp8 5lY6M+3S3Gy8f3HvWjdgfEdZOUDyZTjBGB3gVcANSU9w3WOJny2TRLO7LocoSx1w/r6t eSzw== X-Gm-Message-State: AElRT7GY4zqBQmLlyvmaesBmlrdd+hGiU+YHC71FiBsIsodHNQF6ppx/ JvVk3qrRowze5Er6IFxe7uNgBA== X-Google-Smtp-Source: AG47ELt0MibC4KLQLMfPMDS/EDmAP9SfZ8FVC5JWIO+7TBT/10DnW1fzBeeUXSpawejPJm1ug8k1Pg== X-Received: by 10.99.109.203 with SMTP id i194mr10252841pgc.314.1521488873431; Mon, 19 Mar 2018 12:47:53 -0700 (PDT) Received: from localhost.localdomain ([115.97.190.51]) by smtp.gmail.com with ESMTPSA id a14sm1083082pff.75.2018.03.19.12.47.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Mar 2018 12:47:52 -0700 (PDT) From: Jagan Teki To: Stefano Babic Date: Tue, 20 Mar 2018 01:17:10 +0530 Message-Id: <20180319194711.23323-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180319194711.23323-1-jagan@amarulasolutions.com> References: <20180319194711.23323-1-jagan@amarulasolutions.com> Cc: Shyam Saini , u-boot@lists.denx.de, "davide . bonfanti" , Andrea CORTESE , Fabio maggi , Fabio Estevam , Simone CIANNI , Raffaele RECALCATI , lamiaposta71@gmail.com Subject: [U-Boot] [PATCH 5/6] 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 f782516101..84110eafc1 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/20/18 diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defconfig index 25ae4299d7..c4a5fa22f9 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) \