From: Eugen Hristev <eugen.hristev@collabora.com>
To: admin LI <admin@hifiphile.com>, Lukasz Majewski <lukma@denx.de>,
Marek Vasut <marex@denx.de>,
u-boot@lists.denx.de
Cc: mihai Sain <mihai.sain@microchip.com>, cristian.birsan@microchip.com
Subject: Re: USB mass storage gadget on SAMA5D2
Date: Sun, 21 May 2023 10:09:46 +0300 [thread overview]
Message-ID: <205b348b-e7fd-3b8f-e921-027add8fb9ba@collabora.com> (raw)
In-Reply-To: <CA+GyqebbPVbDm9sp2SicL7tn-LCsLyOUX3D1ASW4_8+wNTGTCw@mail.gmail.com>
Hi,
I believe someone from Microchip have tried this before
Some people in CC added
You can also open a case on support.microchip.com
Eugen
On 5/19/23 23:18, admin LI wrote:
> Hi,
>
> I'm trying to use ums to access EMMC on our SAMA5D2 board without success.
>
> My board_init(), without adding usba_udc_probe() ums will cause data abort
> error:
> int board_init(void)
> {
> /* address of boot parameters */
> gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
>
> #ifdef CONFIG_USB_GADGET_ATMEL_USBA
> at91_udp_hw_init();
> usba_udc_probe(&pdata);
> #endif
>
> return 0;
> }
>
> USB related config:
> CONFIG_USB=y
> CONFIG_USB_EHCI_HCD=y
> CONFIG_USB_STORAGE=y
> CONFIG_USB_GADGET=y
> CONFIG_USB_GADGET_VENDOR_NUM=0xdead
> CONFIG_USB_GADGET_PRODUCT_NUM=0xbeef
> CONFIG_USB_GADGET_ATMEL_USBA=y
> CONFIG_USB_GADGET_VBUS_DRAW=500
> CONFIG_USB_GADGET_DOWNLOAD=y
> CONFIG_USB_ETHER=y
>
> EMMC can be successfully accessed, Linux boot is ok:
> => mmc list
> sdio-host@a0000000: 0 (eMMC)
>
> => mmc info
> Device: sdio-host@a0000000
> Manufacturer ID: 70
> OEM: 100
> Name: M6270
> Bus Speed: 52000000
> Mode: MMC High Speed (52MHz)
> Rd Block Len: 512
> MMC version 5.1
> High Capacity: Yes
> Capacity: 3.6 GiB
> Bus Width: 4-bit
> Erase Group Size: 512 KiB
> HC WP Group Size: 4 MiB
> User Capacity: 3.6 GiB
> Boot Capacity: 2 MiB ENH
> RPMB Capacity: 512 KiB ENH
> Boot area 0 is not write protected
> Boot area 1 is not write protected
>
> => mmc part
>
> Partition Map for MMC device 0 -- Partition Type: DOS
>
> Part Start Sector Num Sectors UUID Type
> 1 2048 1044480 0508e2bf-01 83
>
> However, when I use "ums 0 mmc 0", the USB device is partially enumerated
> without a block device available, in the console the rotation cursor spins
> about 20s then USB is disconnected.
>
> On u-boot:
> => ums 0 mmc 0
> UMS: LUN 0, dev mmc 0, hwpart 0, sector 0x0, count 0x720000
> -=> (self-exit after 20s)
>
> On Linux:
> [ 699.920316] usb 3-5: new high-speed USB device number 5 using xhci_hcd
> [ 700.060766] usb 3-5: New USB device found, idVendor=dead,
> idProduct=beef, bcdDevice= 2.17
> [ 700.060772] usb 3-5: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [ 700.060774] usb 3-5: Product: USB download gadget
> [ 700.060776] usb 3-5: Manufacturer: U-Boot
> [ 700.081573] usb-storage 3-5:1.0: USB Mass Storage device detected
> [ 700.081780] scsi host0: usb-storage 3-5:1.0
> [ 700.081874] usbcore: registered new interface driver usb-storage
> [ 700.088339] usbcore: registered new interface driver uas
> [ 722.407008] usb 3-5: USB disconnect, device number 5
>
>
> Thanks,
next prev parent reply other threads:[~2023-05-21 7:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 20:18 USB mass storage gadget on SAMA5D2 admin LI
2023-05-21 7:09 ` Eugen Hristev [this message]
2023-05-22 9:00 ` admin LI
2023-05-25 17:16 ` Cristian.Birsan
2023-05-26 12:13 ` admin LI
2023-05-26 13:20 ` Mihai.Sain
2023-05-26 14:40 ` admin LI
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=205b348b-e7fd-3b8f-e921-027add8fb9ba@collabora.com \
--to=eugen.hristev@collabora.com \
--cc=admin@hifiphile.com \
--cc=cristian.birsan@microchip.com \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=mihai.sain@microchip.com \
--cc=u-boot@lists.denx.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