Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33883C678D5 for ; Tue, 7 Mar 2023 07:51:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1663785A6C; Tue, 7 Mar 2023 08:51:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1678175486; bh=4359o3qlShojPyE76Evv92p5an/rr4p7sciGM2Xedho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MeA0/aZMUDCQXVjP+OKqhL3oZN00+VYOJVefJ3nSIQtrRcTEDLaNcCGzDzPQsc1Cj fer3eXe3BK4fQ3zIie9L1QOhGm0aAPAMJ+/XkqlHbyFf2d7z7Ove9h0/G3UAA8V4mO rfZxy53beAIGZPq6meFS+Qua1nhQGuJtOK8hu2QGCwifV8HdZMLuKZgQmLoP4LqiXZ +I/8F2+UJOC9B2l3YeYrEXh4yaHAT60+HuBzOJOgoW5U29LJO8yr8QWAFn4480LsPG +XVrTBKUNDmtk60mUSqELxraC1D2XW1QzTlk68CuNPwM4ETIgBM0OWFfhPdeXttsWd hXPNUMej6TJPw== Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 670608598E; Tue, 7 Mar 2023 08:51:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1678175481; bh=4359o3qlShojPyE76Evv92p5an/rr4p7sciGM2Xedho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dAZkGFD6DaM10FLRELtwJLvTn8+DoyDswIyz6aG4zZBOTmGbzvJamQRLROvNURqOU I7udPvgmUGnuCUHyAAP00cD4w4LHfWdbWV1e+zKNVHCufxyt147ts0wSJhcpxChoXQ fGbHkYOgqhpMfWDZ06AFE+r3FkGoLxxIt6tnxsg/i71ssLlXRd3SrBGC+RU4SrN7u0 9n2WxVlb1HAaiBOSEq90Pt1oNz6EgRNB1+IlJqIMJWbIejORDZPhE8TgCdvs9Z6jTc HH1ImRKPI0iMM4PY9QUnruqnUOn2GxzNReB7T4CxeZeP7dqcLIN9iCJHBz2Ph0sdmv u5K6gH9+SNkHw== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Andreas Geisreiter , Christoph Niedermaier , Fabio Estevam , "NXP i . MX U-Boot Team" , Stefano Babic , u-boot@dh-electronics.com Subject: [PATCH 2/2] ARM: imx: Enable SDP download in SPL on DH i.MX6 DHSOM Date: Tue, 7 Mar 2023 08:51:05 +0100 Message-Id: <20230307075105.132331-2-marex@denx.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307075105.132331-1-marex@denx.de> References: <20230307075105.132331-1-marex@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 SDP protocol support in SPL for DH i.MX6 DHSOM, now that those components fit into the SPL due to LTO. To start U-Boot via SDP upload on i.MX6 DHSOM based board, proceed as follows: - Compile imx_usb [1] . - Power off the i.MX6 DHSOM based board. - Connect both USB-serial console and USB-OTG miniB ports to host PC. - Switch board to USB boot mode. - Power on the board. - Verify using '$ dmesg' that a new device has been detected as follows: New USB device found, idVendor=15a2, idProduct=0054, bcdDevice= 0.01 New USB device strings: Mfr=1, Product=2, SerialNumber=0 Product: SE Blank ARIK Manufacturer: Freescale SemiConductor Inc - Upload U-Boot SPL: $ imx_usb u-boot-with-spl.imx - Wait for SPL to come up, the following print ought to be the last on UART console: SDP: handle requests... - Upload U-Boot proper: $ imx_usb u-boot.img [1] https://github.com/boundarydevices/imx_usb_loader.git Signed-off-by: Marek Vasut --- Cc: Andreas Geisreiter Cc: Christoph Niedermaier Cc: Fabio Estevam Cc: NXP i.MX U-Boot Team Cc: Stefano Babic Cc: u-boot@dh-electronics.com --- configs/dh_imx6_defconfig | 5 +++++ include/configs/dh_imx6.h | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig index cf52b0e3a00..3de974f139d 100644 --- a/configs/dh_imx6_defconfig +++ b/configs/dh_imx6_defconfig @@ -40,6 +40,10 @@ CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_SYS_SPL_MALLOC=y CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x11400 +CONFIG_SPL_USB_HOST=y +CONFIG_SPL_USB_GADGET=y +CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_SPL_WATCHDOG=y CONFIG_SYS_MAXARGS=32 CONFIG_SYS_PBSIZE=532 CONFIG_CMD_MEMTEST=y @@ -113,6 +117,7 @@ CONFIG_USB_GADGET_MANUFACTURER="dh" CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y +CONFIG_SDP_LOADADDR=0x17ffffc0 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_IMX_WATCHDOG=y diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index 5cf73274d5e..ef27e483295 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -31,7 +31,6 @@ #define CFG_MXC_UART_BASE UART1_BASE /* USB Configs */ -#ifdef CONFIG_CMD_USB #define CFG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CFG_MXC_USB_FLAGS 0 @@ -39,7 +38,6 @@ #if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE) #define DFU_DEFAULT_POLL_TIMEOUT 300 #endif -#endif #define CFG_EXTRA_ENV_SETTINGS \ "console=ttymxc0,115200\0" \ -- 2.39.2