This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM69:直接映像从主机 PC 通过 USB 刷写到 eMMC

Guru**** 2419530 points
Other Parts Discussed in Thread: SK-AM69

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1530011/am69-direct-image-flashing-to-emmc-over-usb-from-host-pc

器件型号:AM69


工具/软件:

你好。

我正在与 AM69 一起构建电路板、并且对此有一些问题。

问题 1: 是否有任何文档介绍如何使用  AM69 上的有线接口(尤其是 USB)将映像直接从 HostPC 写入 eMMC?
->我相信 AM69 可以支持这种情况(在 TRM 中找到一些信息)。   

问题 2: 如果 AM69 具有这样的功能、是否有办法先在 SK-AM69 上进行测试?

谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    有一种称为 ums(USB 大容量存储)的器件可以从 HostPC 将映像直接写入 eMMC。

    这些是在 TI J784S4 EVM 上启用 UMS 和快速引导功能所需的补丁。

    1: https://serenity.dal.design.ti.com/patchwork/project/linux-patch-review/patch/20241001040449.3268386-1-s-vadapalli@ti.com/
    2: https://serenity.dal.design.ti.com/patchwork/project/linux-patch-review/patch/20241008112833.1914173-1-s-vadapalli@ti.com/

    3:

    diff --git a/arch/arm/dts/k3-j784s4-evm-u-boot.dtsi b/arch/arm/dts/k3-j784s4-evm-u-boot.dtsi
    index 3795bfe6b1c..2f77677427f 100644
    --- a/arch/arm/dts/k3-j784s4-evm-u-boot.dtsi
    +++ b/arch/arm/dts/k3-j784s4-evm-u-boot.dtsi
    @@ -88,11 +88,13 @@
     };
     
     &usbss0 {
    +       ti,usb2-only;
            bootph-pre-ram;
     };
     
     &usb0 {
            dr_mode = "peripheral";
    +       maximum-speed = "high-speed";
            bootph-pre-ram;
     };
     
    diff --git a/configs/j784s4_evm_a72_defconfig b/configs/j784s4_evm_a72_defconfig
    index 26a5e363862..79933dcaabb 100644
    --- a/configs/j784s4_evm_a72_defconfig
    +++ b/configs/j784s4_evm_a72_defconfig
    @@ -194,3 +194,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6168
     CONFIG_USB_GADGET_DOWNLOAD=y
     CONFIG_SPL_DFU=y
     CONFIG_SYS_MALLOC_LEN=0x2000000
    +CONFIG_CMD_USB_MASS_STORAGE=y

    此致

    Gokul

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    很抱歉晚回答。

    您向我显示的链接似乎已过期。 我无法触及。

    因此、我可以假设设备应该已准备好使用您共享的补丁进行 USB 写入。

    是否有任何关于如何上传的必要程序或文件?
    我只需要插入 USB 电缆、然后运行 dfu-utils?

    谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好、民洙、

    我将附加上述链接中共享的修补程序、因为您无法访问它。 是否可以确保已应用以下修补程序?

    diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
    index d11175dc5b6..7fa51d0fd70 100644
    --- a/drivers/usb/cdns3/gadget.c
    +++ b/drivers/usb/cdns3/gadget.c
    @@ -965,6 +965,12 @@  int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,
     	if (priv_dev->dev_ver <= DEV_VER_V2)
     		cdns3_wa1_tray_restore_cycle_bit(priv_dev, priv_ep);
     
    +	/* Flush TRBs */
    +	flush_dcache_range((unsigned long)priv_ep->trb_pool,
    +			   (unsigned long)priv_ep->trb_pool +
    +			   ROUND(sizeof(struct cdns3_trb) * priv_ep->num_trbs,
    +				 CONFIG_SYS_CACHELINE_SIZE));
    +
     	trace_cdns3_prepare_trb(priv_ep, priv_req->trb);
     
     	/*
    @@ -1153,6 +1159,13 @@  static void cdns3_transfer_completed(struct cdns3_device *priv_dev,
     				priv_ep->endpoint.desc->bEndpointAddress);
     #endif
     
    +		/* Invalidate TRBs */
    +		invalidate_dcache_range((unsigned long)priv_ep->trb_pool,
    +					(unsigned long)priv_ep->trb_pool +
    +					ROUND(sizeof(struct cdns3_trb) *
    +					      priv_ep->num_trbs,
    +					      CONFIG_SYS_CACHELINE_SIZE));
    +
     		if (!cdns3_request_handled(priv_ep, priv_req))
     			goto prepare_next_td;
     

    diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
    index d11175dc5b6..3f4743f1e01 100644
    --- a/drivers/usb/cdns3/gadget.c
    +++ b/drivers/usb/cdns3/gadget.c
    @@ -1624,6 +1624,14 @@  void cdns3_ep_config(struct cdns3_endpoint *priv_ep)
     	else
     		priv_ep->trb_burst_size = 16;
     
    +	/*
    +	 * The Endpoint is configured to handle a maximum packet size of
    +	 * max_packet_size. Hence, set priv_ep->endpoint.maxpacket to
    +	 * max_packet_size. This is necessary to ensure that the TD_SIZE
    +	 * is calculated correctly in cdns3_ep_run_transfer().
    +	 */
    +	priv_ep->endpoint.maxpacket = max_packet_size;
    +
     	ret = cdns3_ep_onchip_buffer_reserve(priv_dev, buffering + 1,
     					     !!priv_ep->dir);
     	if (ret) {
    

    此致

    Gokul