From patchwork Wed Sep 23 03:52:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 521576 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 096B61401AF for ; Wed, 23 Sep 2015 13:53:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=LW6nDaaq; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0BB414B83A; Wed, 23 Sep 2015 05:53:06 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HURKXkRvmrch; Wed, 23 Sep 2015 05:53:05 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 742AB4B7E8; Wed, 23 Sep 2015 05:53:05 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 722294B7E8 for ; Wed, 23 Sep 2015 05:53:02 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vaU89CF8vDQe for ; Wed, 23 Sep 2015 05:53:02 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yk0-f178.google.com (mail-yk0-f178.google.com [209.85.160.178]) by theia.denx.de (Postfix) with ESMTPS id 0DD724B795 for ; Wed, 23 Sep 2015 05:52:58 +0200 (CEST) Received: by ykft14 with SMTP id t14so30361138ykf.0 for ; Tue, 22 Sep 2015 20:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=fqFtp/3BWeKT0rTkawXYXj7rGc4d8k8PoM1c/zfhFEc=; b=LW6nDaaqHkxELHGFVvqLJMk4OYcviFvEzjxTUZnZrqCRf6F+uD3NRwLX3Gz1fJZv7Y QN/PQVVa4DvxbMZnCjf30LmkzI6PHeO/tnT7LRaXFkSgL6gdGyoxPq22Co86sFXXw4j7 2NL6BWOc0g2XqPZ8rWKOjsG+s/IBXsZvURo3Kfg2awDgE50YM1JEOaCSXz7urBZfgLaM Z7zHpq9YzWpoI+tWomLgpytVoaZ6dmcc6vAbxRKbc15VvjYzvUJ4J8zx8QpxqTQ1uspk 5j7QNeNOGYdKSTyeUPF9gEMMHlEJ98B7P0jRSkQZuV/Ls/J/G8GegCphJDfFbWPpW4lA W8RA== X-Received: by 10.13.255.4 with SMTP id p4mr13958788ywf.88.1442980377144; Tue, 22 Sep 2015 20:52:57 -0700 (PDT) Received: from localhost.localdomain ([187.64.230.127]) by smtp.gmail.com with ESMTPSA id c197sm3152726ywb.48.2015.09.22.20.52.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Sep 2015 20:52:56 -0700 (PDT) From: Fabio Estevam To: sbabic@denx.de Date: Wed, 23 Sep 2015 00:52:33 -0300 Message-Id: <1442980353-4073-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Fabio Estevam , u-boot@lists.denx.de Subject: [U-Boot] [PATCH] mx6sabre_common: Add DFU support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" From: Fabio Estevam Add DFU support. Tested by flashing SPL and u-boot.img into SPI NOR flash with the following commands: => setenv dfu_alt_info ${dfu_alt_info_spl} => run dfuspi On the host PC: $ sudo dfu-util -D SPL -a spl On the target: CTRL+C => setenv dfu_alt_info ${dfu_alt_info_img} => run dfuspi On the host PC: $ sudo dfu-util -D u-boot.img -a u-boot Signed-off-by: Fabio Estevam --- include/configs/mx6sabre_common.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 98eb042..ba21659 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -80,6 +80,10 @@ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "console=" CONFIG_CONSOLE_DEV "\0" \ + "dfuspi=dfu 0 sf 0:0:10000000:0\0" \ + "dfu_alt_info_spl=spl raw 0x400\0" \ + "dfu_alt_info_img=u-boot raw 0x10000\0" \ + "dfu_alt_info=spl raw 0x400\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ @@ -238,6 +242,13 @@ #define CONFIG_G_DNL_VENDOR_NUM 0x0525 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 #define CONFIG_G_DNL_MANUFACTURER "FSL" + +/* USB Device Firmware Update support */ +#define CONFIG_CMD_DFU +#define CONFIG_USB_FUNCTION_DFU +#define CONFIG_DFU_MMC +#define CONFIG_DFU_SF + #endif #endif /* __MX6QSABRE_COMMON_CONFIG_H */