Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2021 19:57:39 -0700
From:      Mark Millard via freebsd-arm <freebsd-arm@freebsd.org>
To:        William Carson <freebsd@dsllsn.net>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Boot from USB on RPi4 8GB?
Message-ID:  <DFD0AA16-2B52-4095-B12E-DB805E870A3D@yahoo.com>
In-Reply-To: <E1FE1FF5-809D-4136-8464-ED09501A2A8B@dsllsn.net>
References:  <4F3EE8D2-649B-4522-AD5A-7C308291802F@dsllsn.net> <43FAEEAC-EE36-4810-88AA-FF82AFBCC128@yahoo.com> <2F58272B-BD9C-464B-9A98-BF638971BA86@dsllsn.net> <D82CA5FE-1755-4D38-928E-B8234A4F38D4@yahoo.com> <E267DA59-F294-40D4-B2DB-4E6DF8C87DCF@yahoo.com> <FA5F90A1-0E02-4CC8-A860-38C62E0ED93E@dsllsn.net> <E1FE1FF5-809D-4136-8464-ED09501A2A8B@dsllsn.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-Jun-10, at 17:22, William Carson via freebsd-arm <freebsd-arm at =
freebsd.org> wrote:

> On May 30, 2021, at 6:54 PM, William Carson via freebsd-arm =
<freebsd-arm@freebsd.org> wrote:
>>=20
>>>=20
>>> On May 30, 2021, at 4:08 PM, Mark Millard <marklmi@yahoo.com> wrote:
>>>=20
>>> On 2021-May-30, at 13:50, Mark Millard via freebsd-arm <freebsd-arm =
at freebsd.org> wrote:
>>>=20
>>>> On 2021-May-30, at 10:59, William Carson via freebsd-arm =
<freebsd-arm at freebsd.org> wrote:
>>>>=20
>>>>>> . . .
>>>>>> I use a USB3 SSD that has small enough power requirements
>>>>>> to not require a powered hub. (I also use a 5.1V 3.5A
>>>>>> power supply as part of that context.) I've never tried
>>>>>> spinning rust or higher powered USB3 media.
>>>>=20
>>>> I view the power supply that I use as just giving a little
>>>> more margin,  not as a way to increase what the devices
>>>> total to.
>>>>=20
>>>>> . . . I'm not sure what's considered "high powered" but the =
Samsung tech specs say this particular model uses 5.7 W on average and =
10.0 W maximum. But it does seem curious that the Raspberry PI OS will =
boot this disk without issue, so I don't think it's the drive. I also =
tried a Samsung 950 PRO using a different enclosure (QNINE NVME =
Enclosure, M.2 PCIe SSD (M Key) to USB 3.0 External Case), but it =
behaved the same.
>>>> . . .
>>>>=20
>>>> Then you need to use a powered hub for that device.
>>>=20
>>> I should have just referred to independent power. You
>>> had written:
>>>=20
>>> QUOTE
>>> I'm trying to use a SAMSUNG (MZ-V7E500BW) 970 EVO SSD 500GB - M.2 =
NVMe, attached via the Geekworm X872 M.2 NVMe 2280/2260/2242/2230 SSD =
Expansion Board.
>>> END QUOTE
>>>=20
>>> =
https://geekworm.com/products/raspberry-pi-4-x872-m-2-nvme-2280-2260-2242-=
2230-ssd-expansion-board
>>>=20
>>> shows that it has its own power connector and has an image
>>> that says "please power x872 via DC Jack of XH2.54 connector
>>> if SSD is not recognized or low power". Later text on the
>>> page says:
>>>=20
>>> QUOTE
>>> Specifications:
>>> Power Supply
>>> 	=E2=80=A2 5Vdc +/-5% , Powered by Raspberry Pi USB port
>>> 	=E2=80=A2 5Vdc via DC power jack or XH2.5 connector, Extra power =
for the SSD
>>> END QUOTE
>>>=20
>>> So, if I gather right, you need to connect a power
>>> supply to the X872 and another to the RPi4B.
>>>=20
>>> Another image says "Note: NOT recommended to use SAMSUNG SSD,
>>> if use SAMSUNG SSD, please close WiFi". Later text on the page
>>> says the same.
>>=20
>> A-ha, indeed. I just noticed that as well. I've gone ahead and =
ordered a supplementary power supply and a lower-power NVMe to do more =
testing. I'll send an update once I've received and tested them.
>>=20
>> Thank you for hopefully pointing me in the right direction.
>=20
> Alright, so, I ended up buying a WDS500G2B0C, which seems to only use =
a maximum of 75 mW (this seems ... low, to say the least, but the column =
is unlabeled in the spec sheet I found here =
https://documents.westerndigital.com/content/dam/doc-library/en_us/assets/=
public/western-digital/product/internal-drives/wd-blue-nvme-ssd/product-br=
ief-wd-blue-sn550-nvme-ssd.pdf).

That document says for WDS500G2B0C:

QUOTE
Maximum Operating power    3.5W
END QUOTE

So at about 5V: about 0.7A maximum. Of itself, that is under the 1.2A
figure. The X872 must take some power as well. But I do not find any
W or A specifications for it.

I do not know what other power draws in the overall system might be.
Any combination that might use more than about 0.5A? (So: more than
about 2.5W total)?

Unless you specify otherwise, I'm going to presume: no. So I'm not
expecting power to be a problem.

> Sadly, it also would not boot from either of my NVMe-USB adapters.

Is the failing behavior identical to before? If not, what
evidence is it now producing when trying to boot? ("would
not boot" leaves open all possible ways of failing.)

You previously reported getting:

QUOTE
scanning bus xhci_pci for devices... Device NOT ready
   Request Sense returned 02 04 01
END QUOTE

Someone else recently was getting that and got around
the problem while trying 3 U-Boot extra steps. They
are listed below and I leave in the indication of which
happened to work in that context. The point is to
establish a configuration setting before U-Boot tries to
scan the USB buses looking for the storage media.
Otherwise a "usb reset" would need to happen after
making the configuration change.

QUOTE
> Looking around on the web I see reports of the:
>=20
>  Request Sense returned 02 04 01
>=20
> (and the matching Device NOT ready) mean that the
> problem will occur and that repeating usb start
> or usb reset again until it does not report that
> leads to things working.
>=20
> But I've also seen other, more complete information
> indicating that there is a environment setting
> (showing an example value):
>=20
> usb_ready_retry=3D5
>=20
> to set up before the usb restart (or usb start)
> command. It deals with the issue more explicitly
> for slow devices.
>=20
> Another one is (units: msec):
>=20
> usb_pgood_delay=3D10000
>=20
Presto! using editenv usb_pgood_delay prompted for input, typing 10000
and hitting return set the value and the disk was found.

It looks like the setting can only be saved to microSD. With
no card saveenv reports
Saving Environment to FAT... Card did not respond to voltage select!
Failed (1)

> There are also device that have problems with
> large transfers and require extra protocol to
> deal with transfer problems before they will
> work again, U-Boot not doing that.
>=20
> usb_max_blk=3D20
>=20
> sets a old historical value that generally
> just works for such devices form what I read.
>=20
> I see no indication that other usb commands are
> worthwhile until one has avoided that "Request
> Sense returned 02 04 01" message for usb reset
> (a.k.a. usb start).
>=20
> The reports of this sort of thing are not limited
> to RPi's and go back to at least 2014.
>=20
> If I understand correctly, usb_ready_retry and
> usb_pgood_delay and usb_max_blk are part of
> normal U-Boot builds these days. But I'm not
> certain of that.

END QUOTE


> After a while of getting frustrating forgetting which combination of =
image + usb adapter + drive configuration I had or hadn't tried, I =
thought to myself.. what would happen if I tried one of the USB2 ports? =
Bingo! It booted FreeBSD no problem.
>=20
> So I'm not sure what exactly that means, except that I know the =
power/usb adapter/drive/image is not the issue.

For the new device, anyway.

> I don't think I really "need" the performance improvement of the USB3 =
port at the moment, but maybe that's something that will help =
troubleshoot the issue? It would certainly be nice to use little USB =
bridge pcb "cable" to have a neater installation though.
>=20
> Any ideas?

See above.

>>> =
https://www.raspberrypi.org/documentation/hardware/raspberrypi/power/READM=
E.md
>>>> lists:
>>>>=20
>>>> "Maximum total USB peripheral current draw" as: 1.2A ,
>>>> which at 5.1V is 6W.

I either should have listed 5V or instead have
listed 6.12W.

>>>> That figure is the total for all USB devices attached
>>>> that are not powered independently.
>>>>=20
>>>> That document also says that a 5.1V supply is required,
>>>> not 5V.
>>>>=20
>>>> The power supply that the RPi folks supply is 5.1V @ 3A
>>>> or 15.3W. Even the 5.1V 3.5A power supply that I use
>>>> only multiplies out to 17.85W.
>>>=20
>>=20


=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DFD0AA16-2B52-4095-B12E-DB805E870A3D>