From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Siddharth Vadapalli <s-vadapalli@ti.com>
Cc: Siddharth Vadapalli <s-vadapalli@ti.com>,
vigneshr@ti.com, bb@ti.com, trini@konsulko.com, lukma@denx.de,
n-francis@ti.com, afd@ti.com, glaroque@baylibre.com,
sjoerd@collabora.com, martyn.welch@collabora.com,
rasmus.villemoes@prevas.dk, caleb.connolly@linaro.org,
j-humphreys@ti.com, rogerq@kernel.org, nm@ti.com,
u-boot@lists.denx.de, srk@ti.com
Subject: Re: [PATCH 2/4] board: ti: am62px: env: include environment for DFU Boot
Date: Wed, 18 Dec 2024 12:00:08 +0100 [thread overview]
Message-ID: <87msgtw91j.fsf@baylibre.com> (raw)
In-Reply-To: <g7pupq6leeait24a4uqf3toncr5knxl2ffjvxtqesp4uymacdq@c3vsv5ee5mdt>
On mer., déc. 18, 2024 at 15:44, Siddharth Vadapalli <s-vadapalli@ti.com> wrote:
> On Wed, Dec 18, 2024 at 10:57:36AM +0100, Mattijs Korpershoek wrote:
>
> Hello Mattijs,
>
>> Hi Siddharth,
>>
>> Thank you for the patch.
>>
>> On mar., déc. 17, 2024 at 18:46, Siddharth Vadapalli <s-vadapalli@ti.com> wrote:
>>
>> > Include the TI K3 DFU environment to support DFU Boot and DFU Flash.
>> > Also add "usb" to the list of "boot_targets".
>> >
>> > Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
>> > ---
>> > board/ti/am62px/am62px.env | 5 +++--
>> > 1 file changed, 3 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/board/ti/am62px/am62px.env b/board/ti/am62px/am62px.env
>> > index 7ef54079aa8..e0838196e3a 100644
>> > --- a/board/ti/am62px/am62px.env
>> > +++ b/board/ti/am62px/am62px.env
>> > @@ -1,5 +1,6 @@
>> > #include <env/ti/ti_common.env>
>> > #include <env/ti/mmc.env>
>> > +#include <env/ti/k3_dfu.env>
>> >
>> > name_kern=Image
>> > console=ttyS2,115200n8
>> > @@ -7,7 +8,7 @@ args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
>> > ${mtdparts}
>> > run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
>> >
>> > -boot_targets=mmc1 mmc0 pxe dhcp
>> > +boot_targets=mmc1 mmc0 usb pxe dhcp
>> > boot=mmc
>> > mmcdev=1
>> > bootpart=1:2
>> > @@ -17,4 +18,4 @@ rd_spec=-
>> > #if CONFIG_BOOTMETH_ANDROID
>> > #include <env/ti/android.env>
>> > adtb_idx=3
>> > -#endif
>> > \ No newline at end of file
>> > +#endif
>>
>> This change seems un-related, is it needed?
>
> My editor automatically adds a newline, thereby fixing the warning/error
> regarding the absence of a newline. I assume that a newline is expected.
> Please let me know if you want me to undo this in the v2 series.
This is editor dependant. I'm not sure if there is a coding style entry
for having a newline present/absent.
I'm in favor of keeping the newline addition, however, please mention
it in the commit message.
Something between the lines of "while at it, also add a missing newline
to the am62p.env file".
>
>>
>> Also, looking at Martyn's/Sjoerd's series, I see a couple of things
>> missing:
>> 1. Documentation. now that am62px is compatible with the
>> am62x_r5_usbdfu.config fragment, we need to document this in the board
>> docs. See: commit def64b493748 ("doc: board: Add document for DFU boot on am62x SoCs")
>
> I planned on documenting it once this series got merged. The reason
> behind it is that I was unsure if the device-tree patch in this series
> will be accepted or will be asked to be enabled via the Linux DT Sync
> process. In the latter case, documenting this feature will be incorrect
> in the event of a partial merge (i.e. the documentation patch gets
> merged but the device-tree patch doesn't).
Hmm, I'm not the one deciding if [PATCH 4/4] will get applied so I can't
chime in on that. However, I think it's good practice to send the
documentation changes along with the code changes. Otherwise, doc
updates might be forgotten/de-prioritized.
I won't block the series if doc does not get send, though.
Maybe for future submissions, you can consider writing this in the cover
letter:
"Since i'm unsure that PATCH 4/4 will be accepted, I've decided to send
the documentation changes in a future series"
>
>>
>> 2. Including configs/am62x_a53_usbdfu.config in configs/am62px_evm_a53_defconfig.
>> This is how it's done for am62x, see:
>> commit dfc2dff5a844 ("configs: am62x_evm_*: Enable USB and DFU support")
>>
>> Note that If we don't do 2), we cannot use USB gadget from a U-Boot that
>> has been booted over DFU:
>>
>> => fastboot usb 0
>> No USB device found
>> USB init failed: -19
>> => usb list
>> USB is stopped. Please issue 'usb start' first.
>> => usb start
>> starting USB...
>> No USB controllers found
>> =>
>>
>> For 2, this diff fixes it:
>>
>> diff --git a/configs/am62px_evm_a53_defconfig b/configs/am62px_evm_a53_defconfig
>> index 9635beb1b27e..81f433c997b5 100644
>> --- a/configs/am62px_evm_a53_defconfig
>> +++ b/configs/am62px_evm_a53_defconfig
>> @@ -183,3 +183,4 @@ CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
>> CONFIG_EFI_SET_TIME=y
>>
>> #include <configs/k3_efi_capsule.config>
>> +#include <configs/am62x_a53_usbdfu.config>
>>
>> In my opinion, 2) is a valid use case:
>> 1. On a blank board, we boot the bootloaders over DFU
>> 2. Once U-Boot is started, we start fastboot to flash all images to eMMC.
>>
>> Could this be added for v2, please?
>
> Sure, I will include it in the v2 series. Thank you for reviewing this
> patch and sharing feedback.
Make sure to check that am62px_evm_a53_defconfig does not contain any
duplicate entries with the dfu fragment, like:
CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
CONFIG_USB_GADGET_VENDOR_NUM=0x0451
CONFIG_USB_GADGET_PRODUCT_NUM=0x6165
>
> Regards,
> Siddharth.
next prev parent reply other threads:[~2024-12-18 11:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 13:16 [PATCH 0/4] Add support for USB DFU boot on AM62Px Siddharth Vadapalli
2024-12-17 13:16 ` [PATCH 1/4] dfu: do not overwrite "dfu_alt_info" Siddharth Vadapalli
2024-12-17 20:55 ` Jon Humphreys
2024-12-18 4:55 ` Siddharth Vadapalli
2024-12-17 13:16 ` [PATCH 2/4] board: ti: am62px: env: include environment for DFU Boot Siddharth Vadapalli
2024-12-18 9:57 ` Mattijs Korpershoek
2024-12-18 10:14 ` Siddharth Vadapalli
2024-12-18 11:00 ` Mattijs Korpershoek [this message]
2024-12-18 11:38 ` Siddharth Vadapalli
2024-12-17 13:16 ` [PATCH 3/4] configs: am62x_r5_usbdfu: extend for AM62Px Siddharth Vadapalli
2024-12-18 9:58 ` Mattijs Korpershoek
2024-12-17 13:16 ` [PATCH 4/4] arm: dts: k3-am62p5-sk-u-boot: enable USB0 for USB DFU boot Siddharth Vadapalli
2024-12-18 10:00 ` Mattijs Korpershoek
2024-12-18 9:43 ` [PATCH 0/4] Add support for USB DFU boot on AM62Px 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=87msgtw91j.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=afd@ti.com \
--cc=bb@ti.com \
--cc=caleb.connolly@linaro.org \
--cc=glaroque@baylibre.com \
--cc=j-humphreys@ti.com \
--cc=lukma@denx.de \
--cc=martyn.welch@collabora.com \
--cc=n-francis@ti.com \
--cc=nm@ti.com \
--cc=rasmus.villemoes@prevas.dk \
--cc=rogerq@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=sjoerd@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox