From patchwork Mon May 6 14:38:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martyn Welch X-Patchwork-Id: 1932040 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=bNvit3kr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VY3wM4HdRz1ydW for ; Tue, 7 May 2024 00:40:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A384D88625; Mon, 6 May 2024 16:39:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="bNvit3kr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 948E788638; Mon, 6 May 2024 16:39:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 835BB8860E for ; Mon, 6 May 2024 16:39:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=martyn.welch@collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1715006345; bh=6JSKrjy6iJE0wfOolFLiD8Ys06uloVwOwVOgRWPxRlk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bNvit3krzwn1JYlhkD048Q+FrPzvz+kN+vLNrNvQl4TBOkgdjyq+TJxbs6IV8VbjP i3SaHTZMIH/6H8IwSVmTRkm5NIVjxaILtS2V3EXonZMQm20pCrfwBFSoHQ3IxyRAto ssNC67NOMGQR0+Ft1w5pxDiIS2cq6Ss+OIDQsPDBqSzqTXUoGoB63VVdtGZsX8oPWa 1uPaJlJbutQIW/clrOQ998f1TLMv5RaHGmBU78qircjlNz6ewq9lVb+g/L6NidX0Ue ANgMi9bCSzhaxc0BKqTwWgFT4bHJ4xTZa1dPjCWTqEJtZJ2re7iRiNfygiXkDaVsJN uNGaWthGs/qqg== Received: from pan.lan (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: martyn) by madrid.collaboradmins.com (Postfix) with ESMTPSA id AF4AE3782134; Mon, 6 May 2024 14:39:04 +0000 (UTC) From: Martyn Welch To: Dave Gerlach , Tom Rini , Nishanth Menon , Robert Nelson Cc: Sjoerd Simons , Alexander Sverdlin , Mattijs Korpershoek , Martyn Welch , u-boot@lists.denx.de Subject: [PATCH v5 5/6] beagleplay: Add DFU support Date: Mon, 6 May 2024 15:38:45 +0100 Message-ID: <20240506143846.1252377-6-martyn.welch@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240506143846.1252377-1-martyn.welch@collabora.com> References: <20240506143846.1252377-1-martyn.welch@collabora.com> MIME-Version: 1.0 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 From: Sjoerd Simons DFU mode on a beagleplay can be used via the Type-C connector by holding the USR switch while powering on. Configuration is already provided as fragments for both the A53 and R5 u-boot parts. Include the am62x_a53_usbdfu.config config. The am62x_r5_usbdfu.config fragment needs to be added should DFU boot be required as this will disable booting from persistent storage due to binary size constraints. Signed-off-by: Sjoerd Simons Signed-off-by: Martyn Welch Reviewed-by: Mattijs Korpershoek Tested-by: Mattijs Korpershoek --- Changes in v5: - Use existing config fragment for a53 DFU configuration - Force usb0 into peripheral mode Changes in v4: - New patch arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 9 +++++++++ board/beagle/beagleplay/beagleplay.env | 1 + configs/am62x_beagleplay_a53_defconfig | 2 ++ 3 files changed, 12 insertions(+) diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi index fb2032068d..967a2bdcd1 100644 --- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi +++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi @@ -54,6 +54,15 @@ >; }; +&usbss0 { + bootph-all; +}; + +&usb0 { + dr_mode = "peripheral"; + bootph-all; +}; + #ifdef CONFIG_TARGET_AM625_A53_BEAGLEPLAY #define SPL_NODTB "spl/u-boot-spl-nodtb.bin" diff --git a/board/beagle/beagleplay/beagleplay.env b/board/beagle/beagleplay/beagleplay.env index bbf6b925d0..8dbfc2f7d2 100644 --- a/board/beagle/beagleplay/beagleplay.env +++ b/board/beagle/beagleplay/beagleplay.env @@ -1,5 +1,6 @@ #include #include +#include name_kern=Image console=ttyS2,115200n8 diff --git a/configs/am62x_beagleplay_a53_defconfig b/configs/am62x_beagleplay_a53_defconfig index 4f1be1df59..ec62670d55 100644 --- a/configs/am62x_beagleplay_a53_defconfig +++ b/configs/am62x_beagleplay_a53_defconfig @@ -121,3 +121,5 @@ CONFIG_EXT4_WRITE=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 CONFIG_LZO=y CONFIG_EFI_SET_TIME=y + +#include