00:04
jackdk has joined #nixos-aarch64
00:09
ryantrinkle has quit [Ping timeout: 258 seconds]
00:58
<
samueldr >
the usb gadgets in u-boot are so neat, the mass storage one allows presenting block devices over usb, like they're usb drives
00:59
<
samueldr >
and there's fastboot, which is mostly useful to me to boot a kernel without writing it to storage :)
00:59
<
samueldr >
both of those combined will save trips for both the emmc and sd card to the computer!
01:01
<
clever >
samueldr: nice, that almost eliminates the need for the rpi mass-storage bootcode.bin
01:02
<
samueldr >
depends on if there's a usb gadget implementation for the rpi
01:02
<
samueldr >
though I guess it's something that can be ported
01:02
<
clever >
can it emulate a hub with multiple gadgets?
01:02
<
samueldr >
clever: what's the model compatibility with the mass storage bootcode.bin?
01:02
<
samueldr >
clever: no, one at a time
01:03
<
clever >
any pi without a usb hub
01:03
<
clever >
main issue, is that you cant connect the OTG detect pin, and have to hot-wire 2 host ports together
01:03
<
clever >
so only the compute module works "right"
01:03
<
samueldr >
pine a64-lts already has to use an A-to-A usb cable
01:04
<
clever >
the dev board for the compute module includes a bidirectional mux, to switch between a micro-a and hub
01:05
<
samueldr >
ugh, every result I find is about booting from a usb drive, not presenting the rpi as a usb drive :/
01:07
<
samueldr >
confirmed, ums works fine, just used it to write to the emmc :)
01:07
<
samueldr >
(on the pinephone devkit)
01:08
<
clever >
bootcode.bin + start.elf implements a mass-storage gadget
01:08
<
samueldr >
okay, anything resource about using this for non-cm/non-zero?
01:08
<
clever >
main.c implements a host mode app, that talks to the "DFU" gadget in the boot rom, to push the previous 2 files over
01:09
<
clever >
but only if it fails to boot from all other sources
01:10
<
clever >
the CM forces that by having a jumper to GND one of the eMMC enable lines
01:10
<
samueldr >
so the otg pin on a 3 would be, I guess, NC or always pulled up
01:10
<
samueldr >
NC wouldn't really make sense, so probably pulled up
01:11
<
clever >
The USB device boot mode is enabled by default at the time of manufacture, but the USB host boot mode is only enabled with program_usb_boot_mode=1. Once enabled, the processor will use the value of the OTGID pin on the processor to decide between the two modes. On a Raspberry Pi Model B, the OTGID pin is driven to '0' and therefore will only boot via host mode once enabled (it is not possible to boot through device mode because the LAN9515 device i
01:12
<
clever >
samueldr: not 100% sure, but i think it will run in device mode (ignoring OTG pin), only if host mode is disabled
01:12
<
samueldr >
message got truncated, but I found the rest in the previous link
01:12
<
clever >
host mode is *EN*abled via OTP (and may be disabled again via GPIO?)
01:12
<
clever >
you can also just dump the boot rom and read the logic yourself
01:13
<
samueldr >
I could, not sure I can
01:14
<
samueldr >
I was more intersted to know whether this would enable the use of OTG on a A or B model, but I think that no, it wouldn't, except if connection to its hub was broken I guess
01:14
<
samueldr >
(gadget mode mainly)
01:15
<
clever >
of note, there are 0-ohm resistors, that either connect the cpu to the 1st usb port, or cpu->hub
01:15
<
clever >
and which ones are populated, are based on if the hub is present
01:15
<
clever >
if you remove them, you can bypass the hub, and connect directly to the cpu side of those resistor pads
01:16
<
samueldr >
interesting, but not really plug-and-play :)
01:16
<
samueldr >
I was thinking about fun stuff to automate rpi booting for tests without relying on network boot
01:16
<
clever >
the above, is a custom firmware, that replaces bootcode.bin
01:17
<
clever >
when you boot with that, it will just dump the boot rom via serial
01:17
<
clever >
you can then disassemble it, and see how the usb device boot works exactly
01:39
orivej has quit [Ping timeout: 245 seconds]
01:39
ryantrinkle has joined #nixos-aarch64
06:30
zupo has joined #nixos-aarch64
07:24
<
mthst >
i have an usb-sata adapter which works on my desktop but not on my RPi 3B
07:29
<
jackdk >
have you tried running it through a powered USB hub?
07:33
<
jackdk >
it might be that the pi cannot put enough juice out its usb ports to run the drive properly
07:36
<
mthst >
thanks for your help
07:37
<
jackdk >
that's all I can offer, I need to run. best of luck
07:37
<
mthst >
out of curiosity, why do the logs mention "using ehci-pci" on the desktop but "using dwc2" on the pi?
07:42
jackdk has quit [Ping timeout: 258 seconds]
08:03
<
sphalerite >
mthst: because they have different USB controllers
08:03
<
sphalerite >
and so need different drivers
08:18
<
mthst >
sphalerite: got it. thank you
09:02
chris| has joined #nixos-aarch64
09:20
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:30
kai_w has quit [Quit: Konversation terminated!]
09:34
kai_w has joined #nixos-aarch64
10:18
LnL7 is now known as LnL
12:12
ryantrinkle has quit [Ping timeout: 258 seconds]
12:36
orivej has joined #nixos-aarch64
13:32
mog has quit [Read error: Connection reset by peer]
13:32
mog has joined #nixos-aarch64
13:43
mog has quit [Quit: im quiting!]
13:43
mog has joined #nixos-aarch64
13:45
zupo has joined #nixos-aarch64
14:10
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:11
ryantrinkle has joined #nixos-aarch64
14:34
ryantrinkle has quit [Ping timeout: 258 seconds]
14:45
ryantrinkle has joined #nixos-aarch64
15:08
jtojnar has joined #nixos-aarch64
15:49
kai_w has quit [Quit: Konversation terminated!]
16:01
zupo has joined #nixos-aarch64
16:33
zupo_ has joined #nixos-aarch64
16:36
zupo has quit [Ping timeout: 258 seconds]
18:47
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:02
ryantrinkle has quit [Ping timeout: 245 seconds]
19:11
zupo has joined #nixos-aarch64
19:12
ryantrinkle has joined #nixos-aarch64
20:01
Thra11 has joined #nixos-aarch64
20:11
Thra11 has quit [Quit: WeeChat 1.9.1]
20:49
jtojnar_ has joined #nixos-aarch64
20:49
jtojnar has quit [Ping timeout: 245 seconds]
20:50
n_db has quit [Remote host closed the connection]
20:50
jtojnar_ is now known as jtojnar
20:55
n_db has joined #nixos-aarch64
22:09
jtojnar_ has joined #nixos-aarch64
22:10
jtojnar has quit [Ping timeout: 246 seconds]
22:10
jtojnar_ is now known as jtojnar
23:12
ryantrinkle has quit [Ping timeout: 245 seconds]
23:28
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]