How to enable Pinephone as USB device?

I’ve been searching for info on this issue and feel like I might be missing something basic so any help and tips on how to investigate are appreciated.

It seems like my Pinephone is not recognized as a USB device; hosts don’t recognize it when I plug it in (it just starts charging). I can use the same USB cable with an Android phone and the host will recognize it/be able to mount it.

I’ve seen references to USB gadgets and scripts to make it work, but not really sure if that’s relevant here? Thanks in advance!

1 Like

Thanks @philm! I think this is my problem,

Update 2:
@Strit & @philm
Solved part of the puzzle.
The earlier mentioned dr_mode property was due to CONFIG_USB_MUSB_DUAL_ROLE being disabled during compilation, even though our kernel configuration has it enabled.
This is due to a dependency misconfiguration with the following 2 options:
CONFIG_USB=y
CONFIG_USB_GADGET=m
The kernel configuration CONFIG_USB_MUSB_DUAL_ROLE requires above mentioned options to be set equal, so either to ‘=y’, or ‘=m’.
I’ll leave it up to you guys to decide which option would be preferable, myself I compiled a kernel with both options set to ‘=y’ and this makes the usb-otg device work properly again.

And for anyone else interested note this comment, enable USB tethering (#8) · Issues · manjaro-arm / packages / core / linux-pinephone · GitLab – kernel config was tweaked.

I cloned, configured and recompiled the kernel, but same behavior as before – my PP doesn’t seem recognized as a USB device. I’m basing it on:

  1. When I plug into my laptop with a good cable (works with Android) the device doesn’t show up in Removable Devices
  2. When I plug into a RPI which ‘should’ recognize a USB device, it doesn’t recognize the PP lsusb on the RPI before and after plugging in the PP is the same output. If I plug in an Android though, lsusb shows it.

I have not run any of the USB tethering scripts, but as I understand it I’m not tethering (to get a network connection), so I don’t need to do that? Nor have I run the USB gadget scripts from mobian, not sure if I should do that on Plasma Mobile.

Some relevant info from PP:

[george@manjaro-arm ~]$ uname -r
5.15.6-1-MANJARO-ARM
[george@manjaro-arm ~]$ zgrep 'CONFIG_USB=' /proc/config.gz
CONFIG_USB=y
[george@manjaro-arm ~]$ zgrep 'CONFIG_USB_GADGET=' /proc/config.gz
CONFIG_USB_GADGET=y
[george@manjaro-arm ~]$ zgrep 'CONFIG_USB_MUSB' /proc/config.gz
CONFIG_USB_MUSB_HDRC=y
# CONFIG_USB_MUSB_HOST is not set
# CONFIG_USB_MUSB_GADGET is not set
CONFIG_USB_MUSB_DUAL_ROLE=y
CONFIG_USB_MUSB_SUNXI=m

The following I"m not sure how to change or why yet

[george@manjaro-arm ~]$ systemctl list-unit-files | grep usb
pinephone-setup-usb-network.service                   enabled         disabled
pinephone-usb-gadget.service                          enabled         disabled
usbmuxd.service                                       static          -
usb-gadget.target                                     static          -
[george@manjaro-arm ~]$ 

Thanks for any ideas!

I made some progress after I realized I needed to sudo modprobe a module; now the RPI recognizes the PP when plugged in at least. Still working on getting the PP talking to the host over USB.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.