Problem setting Pine64 as a USB device
I am looking for help with setting the Pine64 LTS upper USB port as a USB Device(serial port)

My setup:
Pine64 LTS
Armbian_5.38_Pine64so_Ubuntu_xenial_default_3.10.107( I have also tried Armbian_5.35_Pine64so_Ubuntu_xenial_default_3.10.105 with the same results)
Original kernel configuration: Original kernel configuration
My current configuration: My current configuration
Kernel sources I use are form armbian package linux-source-default-pine64_5.38_all.deb and contain git versioning information with remote repository at

What I tried:
Rebooting without SD card into FEL mode to see if Pine will be enumerated on my PC, this works ok, so the actual connection works and the USB port on the Pine I picked is the correct one.

Armbian seem to be lacking the g_serial driver, so I recompiled the kernel with gadget support + g_serial module.
From what I understand, doing :
echo 0 > /sys/bus/platform/devices/usbc0.6/otg_role # I read somewhere that it's to be disabled before loading g_serial
modprobe g_serial use_acm=0
echo usb_device > /sys/bus/platform/devices/usbc0.6/otg_role # Cannot find where I got this from, but it makes sense
should be all that is required to make it work.
Here is the dmesg output taken after running these commands:

I tried this with and without Device Drivers -> USB support -> OTG support support in the kernel, does not seem to make a difference.

What happens:
/dev/ttyGS0 is created as expected

What does not happen:
I when I connect the Pine to my PC, it does not enumerate(it's missing from lsusb ) [Image: sad.png]

Can anyone tell me what I am doing wrong? Do I need some different version of the kernel?
it might not be kernel. i have read in other forums about similar issue were fel enumeration works but not device enumeration and oddly, if a different cable was used then the device enumerated and another testing step would be a powered hub from host computer to otg device. you could also try sudo lsusb.
Thank you for your response.

Trying different USB cable, also sudo lsusb but I see no change.

In the meanwhile I tried:
Modprobe g_webcam as the only gadget module that is included in armbain 5.3x 3.10.105/107, it failed to load:
[  125.143273] g_webcam gadget: uvc_function_bind
[  125.143306] gadget_is_softwinner_otg is not -int # << this is the same error I get when loading
[  125.143314] gadget_is_softwinner_otg is not -int #    the g_serial module without the use_acm=0
[  125.143322] gadget_is_softwinner_otg is not -int #    option. In both cases it doesn't work.
[  125.143330] gadget_is_softwinner_otg is not -int
[  125.143347] g_webcam gadget: Unable to allocate streaming EP
[  125.143382] g_webcam 1c19000.udc-controller: failed to start g_webcam: -22

I get the same errors about endpoints when I try to insert my compiled g_serial without the use_acm=0 option. It realy does seem that gadgets simply do not work with this(BSP/mostly BSP) kernel 3.10.107 and that's why it's not included .  However I can't find any further information about it.
I using configfs to setup the gadget seem to get the same result.(and functionfs is not configured on Armbian with 3.10.105/107 kernel)

I found out that USB gadgets actualy do work with the mainline kernel(4.13.xx), which is great, but does not really solve my problem, because the mainline kernel does not support DSI MIPI displays at this time. Because of that, I am still trying to make it work on the 3.10.xx kernel.

I am looking for a way to get both of those features working.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Armbian for Pine64 LTS Mark88 0 254 05-04-2024, 11:18 AM
Last Post: Mark88
  Kernel rebuild resources and process for pine64-LTS Atreyo tech 2 3,513 07-02-2021, 12:23 AM
Last Post: Atreyo tech
  Building OP-TEE OS for pine64-LTS foreverska 1 3,570 12-13-2019, 03:32 PM
Last Post: foreverska
  SoPine/Pine64 LTS: Ubuntu Mate is not booting jaganteki 0 2,922 11-20-2018, 10:49 PM
Last Post: jaganteki

Forum Jump:

Users browsing this thread: 2 Guest(s)