jackdk has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 258 seconds]
<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
<samueldr> and there's fastboot, which is mostly useful to me to boot a kernel without writing it to storage :)
<samueldr> both of those combined will save trips for both the emmc and sd card to the computer!
<clever> samueldr: nice, that almost eliminates the need for the rpi mass-storage bootcode.bin
<samueldr> depends on if there's a usb gadget implementation for the rpi
<samueldr> though I guess it's something that can be ported
<clever> can it emulate a hub with multiple gadgets?
<samueldr> clever: what's the model compatibility with the mass storage bootcode.bin?
<samueldr> clever: no, one at a time
<clever> any pi without a usb hub
<clever> main issue, is that you cant connect the OTG detect pin, and have to hot-wire 2 host ports together
<samueldr> heh
<clever> so only the compute module works "right"
<samueldr> pine a64-lts already has to use an A-to-A usb cable
<clever> the dev board for the compute module includes a bidirectional mux, to switch between a micro-a and hub
<samueldr> ugh, every result I find is about booting from a usb drive, not presenting the rpi as a usb drive :/
<samueldr> confirmed, ums works fine, just used it to write to the emmc :)
<samueldr> (on the pinephone devkit)
<clever> bootcode.bin + start.elf implements a mass-storage gadget
<samueldr> okay, anything resource about using this for non-cm/non-zero?
<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
<clever> https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/bootflow.md it will check the OTG detect pin, and decide if its host or device mode
<clever> but only if it fails to boot from all other sources
<clever> the CM forces that by having a jumper to GND one of the eMMC enable lines
<samueldr> so the otg pin on a 3 would be, I guess, NC or always pulled up
<samueldr> NC wouldn't really make sense, so probably pulled up
<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
<clever> samueldr: not 100% sure, but i think it will run in device mode (ignoring OTG pin), only if host mode is disabled
<samueldr> message got truncated, but I found the rest in the previous link
<clever> host mode is *EN*abled via OTP (and may be disabled again via GPIO?)
<clever> you can also just dump the boot rom and read the logic yourself
<samueldr> I could, not sure I can
<samueldr> ;)
<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
<samueldr> (gadget mode mainly)
<clever> of note, there are 0-ohm resistors, that either connect the cpu to the 1st usb port, or cpu->hub
<clever> and which ones are populated, are based on if the hub is present
<clever> if you remove them, you can bypass the hub, and connect directly to the cpu side of those resistor pads
<samueldr> interesting, but not really plug-and-play :)
<samueldr> I was thinking about fun stuff to automate rpi booting for tests without relying on network boot
<clever> the above, is a custom firmware, that replaces bootcode.bin
<samueldr> yeah
<clever> when you boot with that, it will just dump the boot rom via serial
<clever> you can then disassemble it, and see how the usb device boot works exactly
orivej has quit [Ping timeout: 245 seconds]
ryantrinkle has joined #nixos-aarch64
zupo has joined #nixos-aarch64
<mthst> i have an usb-sata adapter which works on my desktop but not on my RPi 3B
<jackdk> have you tried running it through a powered USB hub?
<mthst> no
<jackdk> it might be that the pi cannot put enough juice out its usb ports to run the drive properly
<mthst> ok
<mthst> thanks for your help
<jackdk> that's all I can offer, I need to run. best of luck
<mthst> out of curiosity, why do the logs mention "using ehci-pci" on the desktop but "using dwc2" on the pi?
jackdk has quit [Ping timeout: 258 seconds]
<sphalerite> mthst: because they have different USB controllers
<sphalerite> and so need different drivers
<mthst> sphalerite: got it. thank you
chris| has quit [Quit: ZNC 1.7.2 - https://znc.in]
chris| has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kai_w has quit [Quit: Konversation terminated!]
kai_w has joined #nixos-aarch64
LnL7 is now known as LnL
ryantrinkle has quit [Ping timeout: 258 seconds]
orivej has joined #nixos-aarch64
mog has quit [Read error: Connection reset by peer]
mog has joined #nixos-aarch64
mog has quit [Quit: im quiting!]
mog has joined #nixos-aarch64
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryantrinkle has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 258 seconds]
ryantrinkle has joined #nixos-aarch64
jtojnar has joined #nixos-aarch64
kai_w has quit [Quit: Konversation terminated!]
zupo has joined #nixos-aarch64
zupo_ has joined #nixos-aarch64
zupo has quit [Ping timeout: 258 seconds]
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryantrinkle has quit [Ping timeout: 245 seconds]
zupo has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
Thra11 has joined #nixos-aarch64
Thra11 has quit [Quit: WeeChat 1.9.1]
jtojnar_ has joined #nixos-aarch64
jtojnar has quit [Ping timeout: 245 seconds]
n_db has quit [Remote host closed the connection]
jtojnar_ is now known as jtojnar
n_db has joined #nixos-aarch64
jtojnar_ has joined #nixos-aarch64
jtojnar has quit [Ping timeout: 246 seconds]
jtojnar_ is now known as jtojnar
ryantrinkle has quit [Ping timeout: 245 seconds]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]