public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: Sjoerd Simons <sjoerd@collabora.com>, u-boot@lists.denx.de
Cc: Martyn Welch <martyn.welch@collabora.com>,
	Nishanth Menon <nm@ti.com>, Andrew Davis <afd@ti.com>,
	Bryan Brattlof <bb@ti.com>, Dhruva Gole <d-gole@ti.com>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Manorit Chawdhry <m-chawdhry@ti.com>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Nikhil M Jain <n-jain1@ti.com>,
	Robert Nelson <robertcnelson@gmail.com>,
	Vignesh Raghavendra <vigneshr@ti.com>
Subject: Re: [PATCH v4 6/7] beagleplay: Add DFU support
Date: Fri, 12 Jan 2024 12:41:11 +0200	[thread overview]
Message-ID: <f43b81c8-1886-4560-b8fe-dfa6a88ea726@kernel.org> (raw)
In-Reply-To: <20240112085317.1866449-7-sjoerd@collabora.com>



On 12/01/2024 10:52, Sjoerd Simons wrote:
> DFU mode on a beagleplay can be used via the Type-C connector by holding
> the USR switch while powering on.
> 
> Configuration is only added for the A53 u-boot parts, for R5 the
> am62x_r5_usbdfu.config fragment should be used.
> 
> Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
> 
> ---
> 
> Changes in v4:
> - New patch
> 
>  arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi |  8 ++++++
>  board/beagle/beagleplay/beagleplay.env       |  1 +
>  configs/am62x_beagleplay_a53_defconfig       | 30 ++++++++++++++++++++
>  3 files changed, 39 insertions(+)
> 
> diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> index a723caa5805..0b1e5e70fe2 100644
> --- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> +++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> @@ -61,6 +61,14 @@
>  	>;
>  };
>  
> +&usbss0 {
> +	bootph-all;
> +};
> +
> +&usb0 {
> +	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 4f0a94a8113..85c94856017 100644
> --- a/board/beagle/beagleplay/beagleplay.env
> +++ b/board/beagle/beagleplay/beagleplay.env
> @@ -1,6 +1,7 @@
>  #include <env/ti/ti_common.env>
>  #include <env/ti/default_findfdt.env>
>  #include <env/ti/mmc.env>
> +#include <env/ti/k3_dfu.env>
>  
>  name_kern=Image
>  console=ttyS2,115200n8
> diff --git a/configs/am62x_beagleplay_a53_defconfig b/configs/am62x_beagleplay_a53_defconfig
> index 0be20045a97..dfe04b71810 100644
> --- a/configs/am62x_beagleplay_a53_defconfig
> +++ b/configs/am62x_beagleplay_a53_defconfig
> @@ -1,5 +1,6 @@
>  CONFIG_ARM=y
>  CONFIG_ARCH_K3=y
> +CONFIG_SYS_MALLOC_LEN=0x2000000
>  CONFIG_SYS_MALLOC_F_LEN=0x8000
>  CONFIG_SPL_GPIO=y
>  CONFIG_SPL_LIBCOMMON_SUPPORT=y
> @@ -43,15 +44,20 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=y
>  CONFIG_SPL_STACK_R=y
>  CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
>  CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400
> +CONFIG_SPL_ENV_SUPPORT=y
>  CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
>  CONFIG_SPL_I2C=y
>  CONFIG_SPL_DM_MAILBOX=y
>  CONFIG_SPL_POWER_DOMAIN=y
> +CONFIG_SPL_RAM_SUPPORT=y
> +CONFIG_SPL_RAM_DEVICE=y
>  CONFIG_SPL_YMODEM_SUPPORT=y
> +CONFIG_CMD_DFU=y
>  CONFIG_CMD_GPIO=y
>  CONFIG_CMD_GPIO_READ=y
>  CONFIG_CMD_I2C=y
>  CONFIG_CMD_MMC=y
> +CONFIG_CMD_USB=y
>  CONFIG_CMD_PMIC=y
>  CONFIG_CMD_REGULATOR=y
>  CONFIG_OF_CONTROL=y
> @@ -68,6 +74,10 @@ CONFIG_SPL_OF_TRANSLATE=y
>  CONFIG_CLK=y
>  CONFIG_SPL_CLK=y
>  CONFIG_CLK_TI_SCI=y
> +CONFIG_DFU_MMC=y
> +CONFIG_DFU_RAM=y
> +CONFIG_SYS_DFU_DATA_BUF_SIZE=0x5000
> +CONFIG_SYS_DFU_MAX_FILE_SIZE=0x800000
>  CONFIG_DMA_CHANNELS=y
>  CONFIG_TI_K3_NAVSS_UDMA=y
>  CONFIG_TI_SCI_PROTOCOL=y
> @@ -113,6 +123,26 @@ CONFIG_SOC_TI=y
>  CONFIG_SYSRESET=y
>  CONFIG_SPL_SYSRESET=y
>  CONFIG_SYSRESET_TI_SCI=y
> +CONFIG_USB=y
> +CONFIG_DM_USB_GADGET=y
> +CONFIG_SPL_DM_USB_GADGET=y
> +CONFIG_USB_XHCI_HCD=y
> +CONFIG_USB_XHCI_DWC3=y

XHCI features are really not required for DFU
but now I see that we depend on XHCI driver to get
probed even for device mode. lol.

> +CONFIG_USB_DWC3=y
> +CONFIG_USB_DWC3_GENERIC=y
> +CONFIG_SPL_USB_DWC3_GENERIC=y
> +CONFIG_SPL_USB_DWC3_AM62=y
> +CONFIG_USB_DWC3_AM62=y
> +CONFIG_USB_GADGET=y
> +CONFIG_SPL_USB_GADGET=y
> +CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
> +CONFIG_USB_GADGET_VENDOR_NUM=0x0451
> +CONFIG_USB_GADGET_PRODUCT_NUM=0x6165
> +CONFIG_USB_GADGET_DOWNLOAD=y
> +CONFIG_SPL_DFU=y
>  CONFIG_EXT4_WRITE=y
>  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
>  CONFIG_LZO=y
> +CONFIG_SYSCON=y
> +CONFIG_SPL_SYSCON=y
> +

-- 
cheers,
-roger

  reply	other threads:[~2024-01-12 10:41 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 [this message]
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
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=f43b81c8-1886-4560-b8fe-dfa6a88ea726@kernel.org \
    --to=rogerq@kernel.org \
    --cc=afd@ti.com \
    --cc=bb@ti.com \
    --cc=d-gole@ti.com \
    --cc=jan.kiszka@siemens.com \
    --cc=m-chawdhry@ti.com \
    --cc=martyn.welch@collabora.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=n-jain1@ti.com \
    --cc=nm@ti.com \
    --cc=robertcnelson@gmail.com \
    --cc=sjoerd@collabora.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