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 B1F2AEB64D8 for ; Thu, 22 Jun 2023 09:59:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3A60F8478D; Thu, 22 Jun 2023 11:59:29 +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="TTyxYckZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA2F58478D; Thu, 22 Jun 2023 11:59:25 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (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 BCEBE847D7 for ; Thu, 22 Jun 2023 11:59:21 +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=eugen.hristev@collabora.com Received: from eugen-station.. (unknown [192.166.149.251]) (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: ehristev) by madras.collabora.co.uk (Postfix) with ESMTPSA id 5D76A660700E; Thu, 22 Jun 2023 10:59:19 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1687427961; bh=WPwy3tNjRoHXB1wwHGRlhzs71J/4Uwb+rhAdr3mgPtk=; h=From:To:Cc:Subject:Date:From; b=TTyxYckZPLsA+ZNriRgswfPYrsS22eLL+aSV00b2ODvV41lArGHTdcpwWoRb1hp3c hitsGRzW8LI4n334//Sofmx5VohBfLpY95fyqBRcAE8/8D2TtF8tkIvufyeV3srXOs pHu8ZspO0Kw4te1TGAAGhqPxvitwb3/8DGxkYVSUYOulbM7+SgwcFsbkw/lV9DvbE+ D6ZEpscidbMndIUE6rrz1sAR61cD9M60uUXAyL+Xe5cHFlntzFFNXTbSPUJIcWj6ty H7TCOoiZkF1NCwMzOfi7WYrmg/A88J8Lc+lcujd1Zf7QWUSoWeoJEnGH5sCXvSmF3s ZKTHMdqegulbg== From: Eugen Hristev To: kever.yang@rock-chips.com Cc: marex@denx.de, jonas@kwiboo.se, jagan@edgeble.ai, venkatesh.abbarapu@amd.com, eugen.hristev@collabora.com, u-boot@lists.denx.de Subject: [PATCH 00/10] rockchip: rk3588: add support for DFU in SPL Date: Thu, 22 Jun 2023 12:58:39 +0300 Message-Id: <20230622095849.498702-1-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 This series adds support for DFU in SPL for rockchip rk3588 on rock5b board. Namely, when SPL is loaded via rockusb (thus via USB), having the `same-as-spl` boot order item, after having detected that it was loaded from USB, it will lookup the gadget USB node in DT and boot via DFU. Some changes were required namely: - DFU needs environment, hence adding environment variables into DFU - added bootph-all to nodes such that they are available in SPL - insert gadget into boot order I had to port one patch for DWC3 from Linux, and include in this series the patches that are floating from Venkatesh that fixup the DWC3 (https://marc.info/?l=u-boot&m=168351919807081&w=2 ) I know that Marek NAKed them and I am fine with it, also this patch `usb: dwc3: Increase DWC3 controller halt timeout` is in the same bucket so Marek you can NAK this one as well, no problem, I am just sending out all the series so maybe the rockchip part for the gadget can be picked up and if people want to use the DFU SPL gadget can also manually pick the DWC3 patches. The branch with all the patches is available here : https://gitlab.collabora.com/hardware-enablement/rockchip-3588/u-boot The series also depends on my previous usb3 series: https://marc.info/?l=u-boot&m=168535453215908&w=2 Thanks! I am resending because I forgot to CC the list. Eugen Hristev (7): rockchip: allow env defines for SPL build usb: dwc3: Increase DWC3 controller halt timeout ARM: dts: rockchip: rk3588-rock-5b-u-boot: add bootph-all to gadget nodes ARM: mach-rockchip: spl-boot-order: add possibility to DFU ARM: mach-rockchip: rk3588: add gadget device to the boot order rockchip: rk3588: prepare env for DFU configs: rockchip: rock5b-rk3588: enable DFU and related configs Venkatesh Yadav Abbarapu (3): usb: dwc3: core: improve reset sequence usb: dwc3: gadget: Don't send unintended link state change usb: dwc3: core: Only handle soft-reset in DCTL arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 6 +++++ arch/arm/mach-rockchip/rk3588/rk3588.c | 1 + arch/arm/mach-rockchip/spl-boot-order.c | 3 +++ configs/rock5b-rk3588_defconfig | 17 ++++++++++--- drivers/usb/dwc3/core.c | 32 +++++++++++++++---------- drivers/usb/dwc3/gadget.c | 20 +++++++--------- drivers/usb/dwc3/gadget.h | 14 +++++++++++ include/configs/rk3588_common.h | 9 ++++++- include/configs/rockchip-common.h | 4 ---- 9 files changed, 75 insertions(+), 31 deletions(-) -- 2.34.1