SN30 Pro USB not supported

Hi All,

I tried to plug a 8bitdo SN30 Pro USB controller to my vim3 but the pad hardly works.

Sometimes it’s detected as a xbox 360 pad, which is corrected.

Log
[   24.192910] usb 1-1.2: new full-speed USB device number 3 using xhci-hcd
[   24.318943] usb 1-1.2: New USB device found, idVendor=045e, idProduct=028e, bcdDevice= 1.14
[   24.321767] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   24.328993] usb 1-1.2: Product: Controller
[   24.328997] usb 1-1.2: Manufacturer: Controller
[   24.337496] usb 1-1.2: SerialNumber: Controller
[   24.547470] input: Microsoft X-Box 360 pad as /devices/platform/soc/ffe09000.usb/ff500000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.2/1-1.2:1.0/input/input3
[   24.555297] usbcore: registered new interface driver xpad

Sometimes it’s detected as a Nintendo Pro Controller which is incorrect and doesn’t work.

Log
[  323.752929] usb 1-1.2: new full-speed USB device number 23 using xhci-hcd
[  323.882922] usb 1-1.2: New USB device found, idVendor=045e, idProduct=028e, bcdDevice= 1.14
[  323.890559] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  323.897767] usb 1-1.2: Product: Controller
[  323.902695] usb 1-1.2: Manufacturer: Controller
[  323.907519] usb 1-1.2: SerialNumber: Controller
[  324.118066] usb 1-1.2: can't set config #1, error -32
[  326.838173] usb 1-1.2: USB disconnect, device number 23
[  327.120922] usb 1-1.2: new full-speed USB device number 24 using xhci-hcd
[  327.250061] usb 1-1.2: New USB device found, idVendor=057e, idProduct=2009, bcdDevice= 2.00
[  327.257421] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  327.264581] usb 1-1.2: Product: Pro Controller
[  327.269165] usb 1-1.2: Manufacturer: Nintendo Co., Ltd.
[  327.274111] usb 1-1.2: SerialNumber: 000000000001
[  328.374090] usb 1-1.2: can't set config #1, error -32
[  328.378988] usb 1-1.2: USB disconnect, device number 24
[  328.624905] usb 1-1.2: new full-speed USB device number 25 using xhci-hcd
[  328.754004] usb 1-1.2: New USB device found, idVendor=057e, idProduct=2009, bcdDevice= 2.00
[  328.761273] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  328.768487] usb 1-1.2: Product: Pro Controller
[  328.773039] usb 1-1.2: Manufacturer: Nintendo Co., Ltd.
[  328.778012] usb 1-1.2: SerialNumber: 000000000001
[  328.859475] input: Nintendo Co., Ltd. Pro Controller as /devices/platform/soc/ffe09000.usb/ff500000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.2/1-1.2:1.0/0003:057E:2009.0001/input/input13
[  328.874824] hid-generic 0003:057E:2009.0001: input,hidraw0: USB HID v1.11 Joystick [Nintendo Co., Ltd. Pro Controller] on usb-xhci-hcd.0.auto-1.2/input0
[  330.422182] usb 1-1.2: USB disconnect, device number 25
[  330.960942] usb 1-1.2: new full-speed USB device number 26 using xhci-hcd
[  331.091697] usb 1-1.2: New USB device found, idVendor=045e, idProduct=028e, bcdDevice= 1.14
[  331.099381] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  331.106554] usb 1-1.2: Product: Controller

Sometimes it’s not detected at all.

Log
[  122.080936] usb 1-1.2: new full-speed USB device number 5 using xhci-hcd
[  122.228310] usb 1-1.2: New USB device found, idVendor=045e, idProduct=028e, bcdDevice= 1.14
[  122.235460] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  122.242604] usb 1-1.2: Product: Controller
[  122.454054] usb 1-1.2: can't set config #1, error -32
[  123.318177] usb 1-1.2: USB disconnect, device number 5
[  123.564931] usb 1-1.2: new full-speed USB device number 6 using xhci-hcd
[  123.696128] usb 1-1.2: New USB device found, idVendor=057e, idProduct=2009, bcdDevice= 2.00
[  123.703312] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  123.830093] usb 1-1.2: can't set config #1, error -71
[  123.834758] usb 1-1.2: USB disconnect, device number 6
[  124.116918] usb 1-1.2: new full-speed USB device number 7 using xhci-hcd

I guess it is something related to USB timings and how the pads choose which mode to advertise. Those new 8bitdo pads don’t have a way to select the operation mode. At least that I’m aware of.

Would you know if this can be fixed? Workaround? Those pads work correctly with other boards.

Thanks!
Tiago

Up.
Any feedback? I’m running 5.7-rc4 with some patches from LibreELEC. Mainline u-boot (2020.07-rc1).

Thanks!