From: Roger Quadros <rogerq@kernel.org>
To: Siddharth Vadapalli <s-vadapalli@ti.com>,
vigneshr@ti.com, bb@ti.com, trini@konsulko.com, marex@denx.de,
hnagalla@ti.com, mkorpershoek@baylibre.com,
caleb.connolly@linaro.org, neil.armstrong@linaro.org,
jan.kiszka@siemens.com, jonas@kwiboo.se, j-humphreys@ti.com,
nm@ti.com, devarsht@ti.com, ilias.apalodimas@linaro.org
Cc: u-boot@lists.denx.de, srk@ti.com
Subject: Re: [PATCH 0/2] AM62A DWC3: Add support for USB DFU boot in OTG mode
Date: Thu, 28 Nov 2024 14:45:04 +0200 [thread overview]
Message-ID: <ea2bb69c-280a-4ab2-85ef-cd0d9e6e3f76@kernel.org> (raw)
In-Reply-To: <20241126120322.1760862-1-s-vadapalli@ti.com>
On 26/11/2024 14:03, Siddharth Vadapalli wrote:
> Hello,
>
> This series adds support for USB DFU boot on TI's AM62A SoC which has
> two instances of DWC3 USB Controllers namely USB0 and USB1. The USB0
> instance of the USB Controller supports USB DFU boot:
> ROM => tiboot3.bin => tispl.bin => u-boot.img
>
> USB DFU Boot requires the USB Controller to be configured for Gadget
> mode of operation. Since the USB0 instance of the DWC3 USB Controller
> supports both Host and Gadget modes of operation via the Type-C interface
> on the AM62A7-SK board, the device-tree specifies the "dr_mode" as "OTG".
> However, there is currently no support for dynamically switching the "mode"
> from Host to Gadget and vice-versa with the help of a state-machine.
> The OTG mode is treated as a separate mode in itself rather than being
> treated as an intermediate stage before assuming the Host/Gadget mode.
> Due to this, USB DFU boot via the Type-C interface doesn't work as the
> USB Controller hasn't been appropriately configured for Device/Gadget
> mode of operation. One option is to change the device-tree to specify
> "dr_mode" as "peripheral" and force the controller to assume the Device
> role. This will imply that the U-Boot device-tree for AM62A diverges
> from its Linux counterpart. Therefore, with the intent of keeping the
> device-tree uniform across Linux and U-Boot, and at the same time, in
> order to enable USB DFU boot in "OTG" mode with the DWC3 Controller,
> the first patch in this series sets the "mode" on the basis of the
> caller function, rather than using the "dr_mode" property in the
> device-tree. There are only two callers of "dwc3_generic_probe()",
> each of which clearly specify the expected mode of configuration.
> This will enable both Host and Device mode of operation based on the
> command executed by the user, thereby truly supporting "OTG"
> functionality when the USB Controller supports it.
We don't really support OTG state machine. All you are supporting is
user initiated role change.
>
> The second patch in this series adds USB DFU environment for AM62A,
> enabling USB DFU Boot and USB DFU flash on AM62A.
>
> In addition to the patches in this series, the following device-tree
> changes will be required to test USB DFU on AM62A (bootph-all property
> to be added to ensure that USB Controller is present at all stages
> for DFU Boot):
> https://gist.github.com/Siddharth-Vadapalli-at-TI/53ba02cb0ff4a09c47e920d08247065f
> The above device-tree changes will be made to the Linux device-tree,
> which shall ensure that the same shall be a part of U-Boot device-tree
> eventually.
>
> The USB DFU config fragments for AM62x have been used for enabling
> USB DFU boot on AM62a as follows:
> R5 => am62ax_evm_r5_defconfig + am62x_r5_usbdfu.config
> A53 => am62ax_evm_a53_defconfig + am62x_a53_usbdfu.config
>
> Logs validating USB DFU boot with this series:
> https://gist.github.com/Siddharth-Vadapalli-at-TI/daa71da1b0e478a51afea42605fb2d2c
>
> Series is based on commit
> 3073246d1be Prepare v2025.01-rc3
> of the master branch of U-Boot.
>
> Regards,
> Siddharth.
>
> Siddharth Vadapalli (2):
> usb: dwc3-generic: set "mode" based on caller of dwc3_generic_probe()
> board: ti: am62ax: env: include environment for DFU
>
> board/ti/am62ax/am62ax.env | 1 +
> drivers/usb/dwc3/dwc3-generic.c | 9 +++++----
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
--
cheers,
-roger
next prev parent reply other threads:[~2024-11-28 12:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 12:03 [PATCH 0/2] AM62A DWC3: Add support for USB DFU boot in OTG mode Siddharth Vadapalli
2024-11-26 12:03 ` [PATCH 1/2] usb: dwc3-generic: set "mode" based on caller of dwc3_generic_probe() Siddharth Vadapalli
2024-11-28 13:10 ` Roger Quadros
2024-11-28 17:20 ` Siddharth Vadapalli
2024-11-29 12:28 ` Roger Quadros
2024-12-02 5:42 ` Siddharth Vadapalli
2024-12-02 14:09 ` Roger Quadros
2024-12-04 22:24 ` Roger Quadros
2024-12-13 19:45 ` Marek Vasut
2024-11-26 12:03 ` [PATCH 2/2] board: ti: am62ax: env: include environment for DFU Siddharth Vadapalli
2024-12-04 22:25 ` Roger Quadros
2024-11-28 12:45 ` Roger Quadros [this message]
2024-11-28 16:47 ` [PATCH 0/2] AM62A DWC3: Add support for USB DFU boot in OTG mode Siddharth Vadapalli
2024-12-13 23:16 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ea2bb69c-280a-4ab2-85ef-cd0d9e6e3f76@kernel.org \
--to=rogerq@kernel.org \
--cc=bb@ti.com \
--cc=caleb.connolly@linaro.org \
--cc=devarsht@ti.com \
--cc=hnagalla@ti.com \
--cc=ilias.apalodimas@linaro.org \
--cc=j-humphreys@ti.com \
--cc=jan.kiszka@siemens.com \
--cc=jonas@kwiboo.se \
--cc=marex@denx.de \
--cc=mkorpershoek@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=nm@ti.com \
--cc=s-vadapalli@ti.com \
--cc=srk@ti.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.