Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PinePhone A64: No working USB controllers #85

Open
sven-frotscher opened this issue Oct 6, 2023 · 2 comments
Open

PinePhone A64: No working USB controllers #85

sven-frotscher opened this issue Oct 6, 2023 · 2 comments

Comments

@sven-frotscher
Copy link

sven-frotscher commented Oct 6, 2023

I flashed https://github.com/dreemurrs-embedded/Jumpdrive/releases/download/0.8/pine64-pinephone.img.xz onto a microSD card and booted my PinePhone from it by connecting it to my computer with a known good USB cable. Sadly, it doesn't show up as a USB device.
Connecting to the serial console using a custom cable and a USB-Serial converter sometimes (still haven't found out the root cause, suspecting my USB-Serial converter or PuTTY) makes the boot hang before the command prompt and splash screen:

DRAM: 3072 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.2(release):v2.2-904-gf9ea3a629
NOTICE:  BL31: Built : 15:32:12, Apr  9 2020
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x4064410, model: PinePhone
NOTICE:  PSCI: System suspend is unavailable


U-Boot 2020.07 (Nov 08 2020 - 00:15:12 +0100)

DRAM:  3 GiB
MMC:   Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000'
mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
653 bytes read in 4 ms (159.2 KiB/s)
## Executing script at 4fc00000
gpio: pin 114 (gpio 114) value is 1
4275261 bytes read in 190 ms (21.5 MiB/s)
Uncompressed size: 10170376 = 0x9B3008
36162 bytes read in 4 ms (8.6 MiB/s)
1078500 bytes read in 51 ms (20.2 MiB/s)
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
   Loading Ramdisk to 49ef8000, end 49fff4e4 ... OK
   Loading Device Tree to 0000000049eec000, end 0000000049ef7d41 ... OK

Starting kernel ...

Sometimes, the boot finishes (especially if I connect my logic analyzer to GND, Rx and Tx as well, but that may also be GND impedance or fiddly USB cables (EDIT: I now think it's GND impedance over the 3 USB cables)) and also gives me a working command prompt after showing an exact copy of the above log.

For some reason, I now got the following output (note the difference after Hit any key to stop autoboot):

DRAM: 3072 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.2(release):v2.2-904-gf9ea3a629
NOTICE:  BL31: Built : 15:32:12, Apr  9 2020
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x4064410, model: PinePhone
NOTICE:  PSCI: System suspend is unavailable


U-Boot 2020.07 (Nov 08 2020 - 00:15:12 +0100)

DRAM:  3 GiB
MMC:   Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000'
mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
unable to select a mode
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
starting USB...
No working controllers found
USB is stopped. Please issue 'usb start' first.
=> usb start
starting USB...
No working controllers found
=> 

What can I do at that point? Am I using Jumpdrive wrong? Did I somehow break my PinePhone (e.g. the USB controller(s))?

@sven-frotscher
Copy link
Author

sven-frotscher commented Oct 6, 2023

Running source /init_functions.sh and then setup_usb_configfs in the shell (if Jumpdrive reaches it) raises the fatal error Couldn't create /config/usb_gadget/g1. Trying to escape that with ^Z briefly shows the reason:

Setting up an USB gadget through configfs...
mkdir: can't create directory '/config/usb_gadget/g1': File exists
�[H�[J�[;0H
  Couldn't create /config/usb_gadget/g1

^Zmkdir: can't create directory '/config/usb_gadget/g1/strings/0x409': File exists
  Couldn't create /config/usb_gadget/g1/strings/0x409
mkdir: can't create directory '/config/usb_gadget/g1/functions/rndis.usb0': File exists
  Couldn't create /config/usb_gadget/g1/functions/rndis.usb0
mkdir: can't create directory '/config/usb_gadget/g1/functions/mass_storage.0': File exists
  Couldn't create /config/usb_gadget/g1/functions/mass_storage.0
mkdir: can't create directory '/config/usb_gadget/g1/functions/mass_storage.0/lun.1': File exists
  Couldn't create /config/usb_gadget/g1/functions/mass_storage.0/lun.1
mkdir: can't create directory '/config/usb_gadget/g1/configs/c.1': File exists
  Couldn't create /config/usb_gadget/g1/configs/c.1
mkdir: can't create directory '/config/usb_gadget/g1/configs/c.1/strings/0x409': File exists
  Couldn't create /config/usb_gadget/g1/configs/c.1/strings/0x409
ln: /config/usb_gadget/g1/configs/c.1/rndis.usb0: File exists
  Couldn't symlink rndis.usb0
ln: /config/usb_gadget/g1/configs/c.1/mass_storage.0: File exists
  Couldn't symlink mass_storage.0
sh: write error: Device or resource busy

and then raises another fatal error (Couldn't write to UDC), but I can escape that one with ^Z and get back to the shell.

@sven-frotscher
Copy link
Author

Weirdly enough, Jumpdrive works fine when booted from megi's multi-boot image flashed to a microSD card. It then connects as an Ethernet adapter and two block devices (eMMC and microSD), as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant