Same issue here with a new "JAMSWALL" branded PS3 controller off Amazon.
I tried various kernels 4.19, 5.4, 5.10. (I even tried Linux, same thing, 4 slow blink, 2 middle, then back to 4)
Worked fine on Windows 10 though.
I tried with the drivers Sixaxis, PS3Controller, and CustomHIDSony, none of them worked.
The controller wouldn't work cabled in, and couldn't be paired via Bluetooth.
I also tried it on a PI3, and the USB2 and USB3 ports on my Pi4.
I even tried blacklisting the hid-sony module.
Bus 001 Device 027: ID 054c:0268 Sony Corp. Batoh Device / PlayStation 3 Controller
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x054c Sony Corp.
idProduct 0x0268 Batoh Device / PlayStation 3 Controller
bcdDevice 5.72
iManufacturer 0
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 148
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
[ 16.077838] Bluetooth: Core ver 2.22
[ 16.077927] NET: Registered protocol family 31
[ 16.077939] Bluetooth: HCI device and connection manager initialized
[ 16.078024] Bluetooth: HCI socket layer initialized
[ 16.078048] Bluetooth: L2CAP socket layer initialized
[ 16.078078] Bluetooth: SCO socket layer initialized
[ 16.083707] Bluetooth: HCI UART driver ver 2.3
[ 16.083716] Bluetooth: HCI UART protocol H4 registered
[ 16.083752] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 16.083893] Bluetooth: HCI UART protocol Broadcom registered
[ 16.248570] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 16.248577] Bluetooth: BNEP filters: protocol multicast
[ 16.248590] Bluetooth: BNEP socket layer initialized
[ 64.655323] usb 1-1.3: USB disconnect, device number 5
[ 71.094313] usb 1-1.3: new full-speed USB device number 6 using xhci_hcd
[ 71.232931] usb 1-1.3: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 0.01
[ 71.232951] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 71.232967] usb 1-1.3: Product: PS3 Controller
[ 71.245636] usbhid 1-1.3:1.0: can't add hid device: -32
[ 71.245719] usbhid: probe of 1-1.3:1.0 failed with error -32
[ 71.312237] usb 1-1.3: USB disconnect, device number 6
[ 71.854308] usb 1-1.3: new full-speed USB device number 7 using xhci_hcd
[ 71.992536] usb 1-1.3: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 5.72
[ 71.992553] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 71.992567] usb 1-1.3: Product: PS3 Controller
[ 72.002411] sony 0003:054C:0268.0004: failed to retrieve feature report 0xf2 with the Sixaxis MAC address
[ 72.002789] sony 0003:054C:0268.0004: hiddev97,hidraw2: USB HID v81.11 Joystick [PS3 Controller] on usb-0000:01:00.0-1.3/input0
[ 72.002804] sony 0003:054C:0268.0004: failed to claim input
I didn't try using a powered USB hub ( I remember seeing somewhere that that can make a difference), but I tried everything else.
I'm sure someone with driver/coding skills will eventually update the "hid-sony" driver in Linux and that will trickle down to the Raspberry Pi but I had to give up and return it.