public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Sjoerd Simons <sjoerd@collabora.com>, Nishanth Menon <nm@ti.com>
Cc: u-boot@lists.denx.de, Martyn Welch <martyn.welch@collabora.com>,
	Roger Quadros <rogerq@kernel.org>, Bryan Brattlof <bb@ti.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Judith Mendez <jm@ti.com>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Neha Malcom Francis <n-francis@ti.com>,
	Nikhil M Jain <n-jain1@ti.com>,
	Robert Nelson <robertcnelson@gmail.com>
Subject: Re: [PATCH v4 7/7] doc: board: Add document for DFU boot on am62x SoCs
Date: Fri, 12 Jan 2024 14:18:32 +0100	[thread overview]
Message-ID: <87zfxalmfr.fsf@baylibre.com> (raw)
In-Reply-To: <5ee4497041ca512a11daa4323ec2d36ade06128d.camel@collabora.com>


Hi Sjoerd, Nishanth,

On Fri, Jan 12, 2024 at 13:58, Sjoerd Simons <sjoerd@collabora.com> wrote:

> On Fri, 2024-01-12 at 06:36 -0600, Nishanth Menon wrote:
>> On 09:52-20240112, Sjoerd Simons wrote:
>> > 
>> > +DFU based boot
>> > +--------------
>> > +
>> > +To boot the board over DFU, ensure there is no SD card inserted
>> > with a
>> > +bootloader. Hold the USR switch while plugging into the Type C to
>> > boot into DFU
>> > +mode. After power-on the build artifacts needs to be uploaded one
>> > by one with a
>> > +tool like dfu-util.
>> 
>> Don't we also need a wiped out emmc unfortunately?
>
> Nope just not having an SD card without boot artifacts is enough (or to
> keep things simple no SD card). the USR switch changes the bootmode to
> have SD as primary, DFU as fallback, so what's on the eMMC is luckily
> not relevant.
>
> So i've been happily testing with the factory eMMC image untouched to
> allow me to compare against the factory u-boot behaviour 

I've been using DFU for quite some time on Beagle Play and I observe
the same behaviour as Sjoerd. What is on eMMC is fortunetly not relevant
to have DFU mode functional.

>
>> 
>> > +
>> > +.. include::  ../ti/am62x_sk.rst
>> > +    :start-after: .. am62x_evm_rst_include_start_dfu_boot
>> > +    :end-before: .. am62x_evm_rst_include_end_dfu_boot
>> > +
>> >  Debugging U-Boot
>> >  ----------------
>> >  
>> > diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
>> > index b12dc85f06b..904a54cd5ff 100644
>> > --- a/doc/board/ti/am62x_sk.rst
>> > +++ b/doc/board/ti/am62x_sk.rst
>> > @@ -105,6 +105,20 @@ Set the variables corresponding to this
>> > platform:
>> >  
>> >  * 3.1 R5:
>> >  
>> > +.. include::  ../ti/k3.rst
>> > +    :start-after: .. k3_rst_include_start_build_steps_spl_r5
>> > +    :end-before: .. k3_rst_include_end_build_steps_spl_r5
>> > +
>> > +* 3.1.1 Alternatively build R5 for DFU boot:
>> > +
>> > +As the SPL size can get to big when building with support for
>> > booting both from
>> > +local storage *and* DFU an extra config fragment should be used to
>> > enable DFU
>> > +support (and disable storage support)
>> > +
>> > +.. prompt:: bash $
>> > +
>> > +  export UBOOT_CFG_CORTEXR=${UBOOT_CFG_CORTEXR}
>> > am62x_r5_usbdfu.config
>> > +
>> >  .. include::  ../ti/k3.rst
>> >      :start-after: .. k3_rst_include_start_build_steps_spl_r5
>> >      :end-before: .. k3_rst_include_end_build_steps_spl_r5
>> > @@ -251,6 +265,29 @@ https://www.ti.com/lit/pdf/spruiv7 under the
>> > `Boot Mode Pins` section.
>> >  
>> >  For SW2 and SW1, the switch state in the "ON" position = 1.
>> >  
>> > +DFU based boot
>> > +--------------
>> > +
>> > +To boot the board over DFU, set the switches to DFU mode and
>> > connect to the
>> > +USB Type C DRD Port on the board. After power-on the build
>> > artifacts needs to be
>> > +uploaded one by one with a tool like dfu-util.
>> > +
>> > +.. am62x_evm_rst_include_start_dfu_boot
>> > +
>> > +The initial ROM will have a DFU alt named `bootloader` for the
>> > initial R5 spl
>> > +upload. The next stages as exposed by u-boot have target alts
>> > matching the name
>> > +of the artifacts, for these a USB reset has to be done after each
>> > upload.
>> > +
>> > +When using dfu-util the following commands can be used to boot to
>> > a u-boot shell:
>> > +
>> > +.. prompt:: bash $
>> > +
>> > +  dfu-util -a bootloader -D tiboot3.bin
>> > +  dfu-util -R -a tispl -D tispl.bin
>> > +  dfu-util -R -a u-boot.img -D u-boot.img
>> > +
>> > +.. am62x_evm_rst_include_end_dfu_boot
>> > +
>> >  Debugging U-Boot
>> >  ----------------
>> >  
>> > -- 
>> > 2.43.0
>> > 
>> 
>
> -- 
> Sjoerd Simons
> Collabora Ltd.

  reply	other threads:[~2024-01-12 13:18 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12  8:52 [PATCH v4 0/7] Add DFU and usb boot for TI am62x SK and beagleplay Sjoerd Simons
2024-01-12  8:52 ` [PATCH v4 1/7] usb: dwc3: Add dwc3 glue driver for am62 Sjoerd Simons
2024-01-16 10:22   ` Mattijs Korpershoek
2024-05-01 13:56     ` Martyn Welch
2024-05-02  7:03       ` Mattijs Korpershoek
2024-04-12 20:34   ` Sverdlin, Alexander
2024-01-12  8:52 ` [PATCH v4 2/7] usb: dwc3: Switch to device mode on gadget start Sjoerd Simons
2024-01-12 10:39   ` Roger Quadros
2024-01-12 11:06     ` Sjoerd Simons
2024-01-12 12:56       ` Roger Quadros
2024-01-12 14:18         ` Sjoerd Simons
2024-01-15 13:40           ` Roger Quadros
2024-01-12 12:55   ` Caleb Connolly
2024-01-16 10:55     ` Mattijs Korpershoek
2024-01-16 10:46   ` Mattijs Korpershoek
2024-04-12 20:33   ` Sverdlin, Alexander
2024-01-12  8:52 ` [PATCH v4 3/7] board: ti: am62x: am62x: include env for DFU Sjoerd Simons
2024-01-16 10:57   ` Mattijs Korpershoek
2024-04-12 20:31   ` Sverdlin, Alexander
2024-01-12  8:52 ` [PATCH v4 4/7] arm: dts: k3-am625-sk: Enable usb port in u-boot Sjoerd Simons
2024-01-16 11:17   ` Mattijs Korpershoek
2024-01-16 11:21     ` Sjoerd Simons
2024-04-12 20:30   ` Sverdlin, Alexander
2024-01-12  8:52 ` [PATCH v4 5/7] configs: am62x_evm_*: Enable USB and DFU support Sjoerd Simons
2024-01-12  9:58   ` Roger Quadros
2024-01-12 10:44     ` Sjoerd Simons
2024-01-12 10:55       ` Roger Quadros
2024-01-12 12:37   ` Nishanth Menon
2024-01-12 13:09     ` Sjoerd Simons
2024-01-12 13:19       ` Nishanth Menon
2024-01-12 15:06         ` Sjoerd Simons
2024-01-12 15:40           ` Nishanth Menon
2024-01-12 15:58             ` Sjoerd Simons
2024-01-12 16:03               ` Tom Rini
2024-02-08 10:33   ` Mattijs Korpershoek
2024-01-12  8:52 ` [PATCH v4 6/7] beagleplay: Add " Sjoerd Simons
2024-01-12 10:41   ` Roger Quadros
2024-01-12 10:47     ` Sjoerd Simons
2024-01-12 12:34   ` Nishanth Menon
2024-01-12  8:52 ` [PATCH v4 7/7] doc: board: Add document for DFU boot on am62x SoCs Sjoerd Simons
2024-01-12 12:36   ` Nishanth Menon
2024-01-12 12:58     ` Sjoerd Simons
2024-01-12 13:18       ` Mattijs Korpershoek [this message]
2024-01-16 11:12   ` Mattijs Korpershoek
2024-01-16 10:09 ` [PATCH v4 0/7] Add DFU and usb boot for TI am62x SK and beagleplay Mattijs Korpershoek

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=87zfxalmfr.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=bb@ti.com \
    --cc=jm@ti.com \
    --cc=marcel.ziswiler@toradex.com \
    --cc=martyn.welch@collabora.com \
    --cc=n-francis@ti.com \
    --cc=n-jain1@ti.com \
    --cc=nm@ti.com \
    --cc=robertcnelson@gmail.com \
    --cc=rogerq@kernel.org \
    --cc=sjoerd@collabora.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox