Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB Keyboard doesnt work on MB TB #997

Open
wiktormowinski opened this issue Aug 12, 2024 · 8 comments
Open

USB Keyboard doesnt work on MB TB #997

wiktormowinski opened this issue Aug 12, 2024 · 8 comments
Assignees
Labels
bug Something isn't working minnowboard turbot

Comments

@wiktormowinski
Copy link

wiktormowinski commented Aug 12, 2024

Device

MinnowBoard Turbot B41

RTE version

OSFV version

branch: minnow-update

Affected component(s) or functionality

No response

Brief summary

After plugging in the keyboard i is not powered on

How reproducible

very likely to reproduce

How to reproduce

plug USB Keyboard and observe the behavior (for example do any of the following)

  • caps lock/numpad diodes light up
  • check usb devices (ubuntu - lsusb)
  • or run USB002.001 test case

Expected behavior

the keyboard should be detected by DUT or at least power up

Actual behavior

it's like the port is not even working properly

Link to screenshots or logs

trying lsusb:

Bus 002 Device 002: ID 0781:5591 SanDisk Corp. Ultra Flair
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

yelds no results

Additional context

No response

Solutions you've tried

No response

@wiktormowinski wiktormowinski added bug Something isn't working minnowboard turbot labels Aug 12, 2024
@wiktormowinski wiktormowinski transferred this issue from Dasharo/open-source-firmware-validation Aug 13, 2024
@miczyg1
Copy link
Contributor

miczyg1 commented Aug 14, 2024

USb worked for me, not sure why it works with USB stick but not the keyboard...

@filipleple
Copy link
Member

filipleple commented Aug 20, 2024

There's also a ton of USB-related errors popping up in dmesg:

[    4.393605] usb 1-1: new low-speed USB device number 4 using xhci_hcd
[    4.394275] usb 1-1: Device not responding to setup address.
[    4.602191] usb 1-1: Device not responding to setup address.
[    4.809586] usb 1-1: device not accepting address 4, error -71
[    4.941593] usb 1-1: new low-speed USB device number 5 using xhci_hcd
[    4.942614] usb 1-1: Device not responding to setup address.
[    5.150646] usb 1-1: Device not responding to setup address.
[    5.357596] usb 1-1: device not accepting address 5, error -71
[    5.364845] usb usb1-port1: unable to enumerate USB device
[    5.497907] usb 1-2: new low-speed USB device number 6 using xhci_hcd
[    5.626199] usb 1-2: device descriptor read/64, error -71
[    5.865661] usb 1-2: device descriptor read/64, error -71
[    6.105888] usb 1-2: new low-speed USB device number 7 using xhci_hcd
[    6.233964] usb 1-2: device descriptor read/64, error -71
[    6.473686] usb 1-2: device descriptor read/64, error -71
[    6.586272] usb usb1-port2: attempt power cycle
...

and corresponding errors in cbmem:

XhcCheckUrbResult: TRANSACTION_ERROR! Completecode = 4
    Slot 1 address not assigned successfully. Status = Device Error
Disable device slot 1!
Enable Slot Successfully, The Slot ID = 0x2
XhcCheckUrbResult: TRANSACTION_ERROR! Completecode = 4
    Slot 2 address not assigned successfully. Status = Device Error
Disable device slot 2!
UsbEnumerateNewDev: hub port 1 is reset
UsbEnumerateNewDev: device is of 1 speed
UsbEnumerateNewDev: device uses translator (0, 0)
XhcControlTransfer: error - Device Error, transfer - 100
UsbEnumerateNewDev: failed to set device address - Device Error

@filipleple
Copy link
Member

I haven't managed to get a keyboard to work in any way, but when I connected a 2-port USB hub with a mouse and a keyboard and rebooted the system, the keyboard did work in edk2 and grub. They both did appear in lsusb in OS, but the keyboard input didn't work. Re-plugging the hub caused it to stop showing up in lsusb.

@filipleple
Copy link
Member

I've tested it on a different unit, the issue doesn't seem to occur:

bash-5.2# cbmem -c | grep Xhc
XhcCreateUsb3Hc: Capability length 0x80
XhcCreateUsb3Hc: HcSParams1 0x7000820
XhcCreateUsb3Hc: HcSParams2 0x84000054
XhcCreateUsb3Hc: HcCParams 0x200077C1
XhcCreateUsb3Hc: DBOff 0x3000
XhcCreateUsb3Hc: RTSOff 0x2000
XhcCreateUsb3Hc: UsbLegSupOffset 0x460
XhcCreateUsb3Hc: DebugCapSupOffset 0x480
XhcCreateUsb3Hc: Usb2SupOffset 0x0
XhcCreateUsb3Hc: Usb3SupOffset 0x20
XhcSetBiosOwnership: called to set BIOS ownership
XhcResetHC!
XhcInitSched:DCBAA=0x78CA1000
XhcInitSched: Created CMD ring [78CA1140~78CA2140) EVENT ring [78CA2140~78CA4140)
XhcDriverBindingStart: XHCI started for controller @ 78D8CF18
XhcGetCapability: 7 ports, 64 bit 1
XhcClearRootHubPortFeature: status Success
XhcUsbPortReset!
XhcSetRootHubPortFeature: status Success
XhcClearRootHubPortFeature: status Success
XhcClearRootHubPortFeature: status Success
XhcClearBiosOwnership: called to clear BIOS ownership
bash-5.2#
bash-5.2# dmesg | grep usb
[    0.174093] usbcore: registered new interface driver usbfs
[    0.174111] usbcore: registered new interface driver hub
[    0.174131] usbcore: registered new device driver usb
[    3.615173] usbcore: registered new interface driver usb-storage
[    3.615223] usbcore: registered new interface driver usbserial_generic
[    3.615240] usbserial: USB Serial support registered for generic
[    3.615257] usbcore: registered new interface driver ftdi_sio
[    3.615271] usbserial: USB Serial support registered for FTDI USB Serial Device
[    3.615305] usbcore: registered new interface driver pl2303
[    3.615318] usbserial: USB Serial support registered for pl2303
[    3.616997] usbcore: registered new interface driver appletouch
[    3.617016] usbcore: registered new interface driver bcm5974
[    3.617108] usbcore: registered new interface driver synaptics_usb
[    3.629297] usbcore: registered new interface driver usbhid
[    3.629302] usbhid: USB HID core driver
[    3.941733] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
[    3.966704] usb-storage 2-1:1.0: USB Mass Storage device detected
[    3.968691] scsi host2: usb-storage 2-1:1.0
[  313.686592] usb 1-2: new low-speed USB device number 2 using xhci_hcd
[  313.834794] input: Dell KB216 Wired Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:413C:2113.0001/input/input2
[  313.888728] hid-generic 0003:413C:2113.0001: input,hidraw0: USB HID v1.11 Keyboard [Dell KB216 Wired Keyboard] on usb-0000:00:14.0-2/input0
[  313.895715] input: Dell KB216 Wired Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:413C:2113.0002/input/input3
[  313.949154] input: Dell KB216 Wired Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:413C:2113.0002/input/input4
[  313.950463] hid-generic 0003:413C:2113.0002: input,hidraw1: USB HID v1.11 Device [Dell KB216 Wired Keyboard] on usb-0000:00:14.0-2/input1
bash-5.2#
bash-5.2# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 413c:2113 Dell Computer Corp. KB216 Wired Keyboard
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50 Kyson
bash-5.2#

@krystian-hebel would that be enough for this to be written off as a faulty unit issue?

@krystian-hebel
Copy link
Contributor

@filipleple was this with the same keyboard and pendrive (unit, not only model) in the same ports as on the faulty one? It may be either faulty platform or peripheral, but it does seem as hardware issue.

@filipleple
Copy link
Member

@krystian-hebel the exact same keyboard and pendrive unit

@krystian-hebel
Copy link
Contributor

While debugging another issues, I've noticed that there are few soft-straps set in the descriptor of board in question, and those were related to USB. It may be worth clearing them and testing again, but for now I need the platform for debugging.

@krystian-hebel
Copy link
Contributor

Partial improvement after clearing mentioned soft-straps, now additional port is detected:

bash-5.1# lsusb                                                                 
Bus 001 Device 002: ID 8087:07e6 Intel Corp.                                    
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub                  
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub                  
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Still no luck getting the keyboard to show up, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minnowboard turbot
Projects
None yet
Development

No branches or pull requests

4 participants