Jump to content

Recommended Posts

Posted

Hi folks,

 

I'm trying to figure out what the current status of USB OTG support is, as applies to the Orange Pi Zero.

 

I'm trying to use the HID gadget features, but I'm triggering a segfault and stack dump when I try to set it up.

 

I'm using the hidonly.sh script found here (https://github.com/crmulliner/hidemulation), with a tiny modification to make it more generic:

 

- echo ci_hdrc.0 > UDC

+ ls /sys/class/udc > UDC

 

On running the script, I get the following (using the serial console):

root@orangepizero:~/hidemulation# ./hidonly.sh

[  162.341999] Unable to handle kernel NULL pointer dereference at virtual address 00000002

[  162.350201] pgd = cd99c000

[  162.352917] [00000002] *pgd=4d942835, *pte=00000000, *ppte=00000000

[  162.359272] Internal error: Oops: 17 [#1] SMP THUMB2

[  162.364240] Modules linked in: usb_f_hid libcomposite evdev xradio_wlan mac80211 cfg80211 rfkill sun8i_ths uio_pdrv_genirq cpufreq_dt gpio_keys thermal_sys uio

[  162.378686] CPU: 2 PID: 1094 Comm: ls Not tainted 4.9.4-sun8i #3

[  162.384695] Hardware name: Allwinner sun8i Family

[  162.389404] task: cd90c740 task.stack: cd900000

[  162.394001] PC is at alloc_ep_req+0x15/0x50 [libcomposite]

[  162.399506] LR is at kmem_cache_alloc+0xe5/0xec

[  162.404044] pc : [<bf921e06>]    lr : [<c01c2aad>]    psr: 200e0033

[  162.404044] sp : cd901df0  ip : 00000000  fp : ce303698

[  162.415528] r10: ce35f4c4  r9 : c9c76cec  r8 : 00000100

[  162.420757] r7 : ce35f4a8  r6 : cd20e418  r5 : ce351e80  r4 : 00000008

[  162.427286] r3 : 00000000  r2 : ffffffff  r1 : 00000000  r0 : ce351e80

[  162.433817] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA Thumb  Segment none

[  162.441136] Control: 50c5387d  Table: 4d99c06a  DAC: 00000051

[  162.446884] Process ls (pid: 1094, stack limit = 0xcd900210)

[  162.452547] Stack: (0xcd901df0 to 0xcd902000)

[  162.456911] 1de0:                                     bf9320c0 c9c76c94 00000000 bf93147d

[  162.465101] 1e00: ce35f524 cebc93c0 ce3035ec bf91e90f c9c76c94 ce35f4a8 00000200 00000000

[  162.473290] 1e20: 00000100 bf91e773 ce35f51c c9c76c94 ce35f4a8 00000200 ce35f51c bf921541

[  162.481479] 1e40: ce303400 ce303660 00000000 cd20f148 bf923180 ce3035ec 0000000b cd222e00

[  162.489668] 1e60: c0b48f60 ce3035ec ce3035ec c0b48f48 cebc93c0 cd987000 00000051 c054e6e3

[  162.497875] 1e80: cd222e00 c0b48f60 cdb79400 c054e9bb cdb79400 ce303400 ce303590 fffffff0

[  162.506085] 1ea0: 00000011 bf921c3b 00037e98 00000000 00000011 ceaf5780 00037e98 ceaf5798

[  162.514295] 1ec0: cd901f80 c021e91d cd901f80 cebc93c0 c021e88d c07121f8 cd901f80 00000000

[  162.522504] 1ee0: 00000011 00000000 00000000 c01d032f 00000817 00038e9c c0111569 cd901fb0

[  162.530714] 1f00: 00002710 000001ff b6e97120 c010120d 00000000 00000000 5890f14f 09757f45

[  162.538924] 1f20: 5890f14f 09757f45 5890f14f 09757f45 00002d49 00000000 cebc93c0 00000011

[  162.547133] 1f40: 00037e98 cd901f80 00000000 00000000 00000000 c01d0d95 0000000e 000081a4

[  162.555342] 1f60: 00000001 cebc93c0 cebc93c0 00000000 00000000 00037e98 00000011 c01d1937

[  162.563551] 1f80: 00000000 00000000 5890f14f 00000011 00037e98 b6eb3d58 00000004 c0106024

[  162.571760] 1fa0: cd900000 c0105e61 00000011 00037e98 00000001 00037e98 00000011 00000000

[  162.579969] 1fc0: 00000011 00037e98 b6eb3d58 00000004 b6eb40ac 00000001 b6f04000 00000000

[  162.588178] 1fe0: 00000000 be9d8af4 b6e1779b b6e52f96 000e0030 00000001 00000000 00000000

[  162.596462] [<bf921e06>] (alloc_ep_req [libcomposite]) from [<bf93147d>] (hidg_bind+0x68/0x1c8 [usb_f_hid])

[  162.606273] [<bf93147d>] (hidg_bind [usb_f_hid]) from [<bf91e773>] (usb_add_function+0x3a/0xcc [libcomposite])

[  162.616358] [<bf91e773>] (usb_add_function [libcomposite]) from [<bf921541>] (configfs_composite_bind+0x1cc/0x2f0 [libcomposite])

[  162.628072] [<bf921541>] (configfs_composite_bind [libcomposite]) from [<c054e6e3>] (udc_bind_to_driver+0x1b/0x74)

[  162.638457] [<c054e6e3>] (udc_bind_to_driver) from [<c054e9bb>] (usb_gadget_probe_driver+0x9f/0xd4)

[  162.647563] [<c054e9bb>] (usb_gadget_probe_driver) from [<bf921c3b>] (gadget_dev_desc_UDC_store+0x82/0x98 [libcomposite])

[  162.658583] [<bf921c3b>] (gadget_dev_desc_UDC_store [libcomposite]) from [<c021e91d>] (configfs_write_file+0x91/0xf8)

[  162.669231] [<c021e91d>] (configfs_write_file) from [<c01d032f>] (__vfs_write+0xf/0xb4)

[  162.677271] [<c01d032f>] (__vfs_write) from [<c01d0d95>] (vfs_write+0x71/0x13c)

[  162.684616] [<c01d0d95>] (vfs_write) from [<c01d1937>] (SyS_write+0x2b/0x64)

[  162.691693] [<c01d1937>] (SyS_write) from [<c0105e61>] (ret_fast_syscall+0x1/0x4c)

[  162.699297] Code: d722 4605 b1a0 6a73 (f993) 2002

[  162.704221] ---[ end trace 52c0d65ec038feec ]---

./hidonly.sh: line 31:  1094 Segmentation fault      ls /sys/class/udc > UDC

root@orangepizero:~/hidemulation#

 

 

I found this report, which appears to be identical, but I'm not sure what it means, or what I should do to get working OTG support on the OPi Zero.

 

Is there a kernel which has working OTG gadget support for the OPi Zero? i.e. a non-dev one? This and WiFi are literally the only features I need, so I'm happy to sacrifice other drivers if it means getting this working.

 

Thanks!

Posted

I found this report, which appears to be identical, but I'm not sure what it means, or what I should do to get working OTG support on the OPi Zero.

 

Is there a kernel which has working OTG gadget support for the OPi Zero? i.e. a non-dev one? This and WiFi are literally the only features I need, so I'm happy to sacrifice other drivers if it means getting this working.

This means that OTG works in general except for HID and multi gadgets. No idea what is with g_hid (may be a hardware limitation or simply a bug in a work-in-progress kernel), no idea when or if it will be fixed.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines