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

Raspberrypi4-64, usb no power #446

Closed
iohe opened this issue Jul 19, 2019 · 8 comments · Fixed by #450
Closed

Raspberrypi4-64, usb no power #446

iohe opened this issue Jul 19, 2019 · 8 comments · Fixed by #450

Comments

@iohe
Copy link

iohe commented Jul 19, 2019

Description
Keyboard is not powered, kernel reports errors
Steps to reproduce the issue:

  1. build meta-raspberry @ 6531d1d (HEAD -> ag/rpi4-uboot-update, origin/ag/rpi4-uboot-update) u-boot: Update patches for RPi4

Describe the results you received:
Errors encountered in kernel :
[ 2.530074] usb 1-1: new high-speed USB device number 4 using xhci_hcd
[ 2.550489] usb 1-1: device descriptor read/8, error -61
[ 2.678539] usb 1-1: device descriptor read/8, error -61
[ 2.914059] usb 1-1: new high-speed USB device number 5 using xhci_hcd
[ 2.934469] usb 1-1: device descriptor read/8, error -61
[ 3.062515] usb 1-1: device descriptor read/8, error -61
[ 3.170269] usb usb1-port1: unable to enumerate USB device

Describe the results you expected:
Usb keyboard to work.

Additional information you deem important (e.g. issue happens only occasionally):
Always happens.
It did not happen with meta-raspberry@ 1e329d3

Additional details (revisions used, host distro, etc.):
layers used:
-poky@97c5921666
-meta-openembedded@27d1d3dfa

  • meta-raspberry @ 6531d1d
    local.conf has:
    MACHINE ?= "raspberrypi4-64"
    DISTRO_FEATURES_append = " opengl"
    DISTRO_FEATURES_append = " polkit"
    u-boot is not enabled or used.
    -Image : core-image-x11
    Other packages in image: xfce4

dmesg.txt

@iohe iohe changed the title Raspeberrypi4-64, usb no power Raspberrypi4-64, usb no power Jul 19, 2019
@agherzan
Copy link
Owner

What power supply are you using? Are you testing it with an official charger?

@iohe
Copy link
Author

iohe commented Jul 19, 2019

Official power source for rpi4.
usb is powered and no issue present if i build a couple of days old commit, as specified. I suspect something wrong on firmware side.

@agherzan
Copy link
Owner

That is worrying. Would you be able to give it a try with an older firmware and test that theory?

@iohe
Copy link
Author

iohe commented Jul 19, 2019

dmesg.txt
This works ok.
Update: reverting commit ae7aba5 that only updates firmware will lead to unbootable system. It displays coloured screen and nothing more.

@iohe
Copy link
Author

iohe commented Jul 21, 2019

Using 8d5fc54 i can attach my Razer Blackwidw Lite keyboard and type.
Using 69da331 it does not go more than colored screen at boot.
Using 0d641c8, and RPI_USE_U_BOOT = "1" i sill cannot type.
Using a USBtester that shows Voltage and amps, it never shows amps above 0.
all are 64 bits, this time core-image-minimal.
Is anyone else able to reproduce issue ?
Later edit: Issue confirmed after this: raspberrypi/linux@d5dc848#comments

@agherzan
Copy link
Owner

The relevant kernel issue is: raspberrypi/linux#3093

agherzan added a commit that referenced this issue Jul 24, 2019
The PCI controller on the Raspberry Pi 4 acts as a DMA controller and can
only address the first 3Gb[1] of the memory space. On 32bit this was
addressed by implementing bouncing buffers[2] but this currently has no
support for arm64. In order to have working USB, as a workaround, we
limit the ram to 3G.

Fixes #446

[1] raspberrypi/linux#3093
[2] https://github.com/raspberrypi/linux/blob/rpi-4.19.y/drivers/pci/controller/pcie-brcmstb-bounce.c

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
@agherzan
Copy link
Owner

@iohe if you are willing to compromise on 1Gb of ram, here is a PR ^

@iohe
Copy link
Author

iohe commented Jul 24, 2019

ok for now, will revisit later for full 4g.
Thank you very much!

@iohe iohe closed this as completed Jul 24, 2019
agherzan added a commit that referenced this issue Jul 25, 2019
The PCI controller on the Raspberry Pi 4 acts as a DMA controller and can
only address the first 3Gb[1] of the memory space. On 32bit this was
addressed by implementing bouncing buffers[2] but this currently has no
support for arm64. In order to have working USB, as a workaround, we
limit the ram to 3G.

Fixes #446

[1] raspberrypi/linux#3093
[2] https://github.com/raspberrypi/linux/blob/rpi-4.19.y/drivers/pci/controller/pcie-brcmstb-bounce.c

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
agherzan added a commit that referenced this issue Jul 25, 2019
The PCI controller on the Raspberry Pi 4 acts as a DMA controller and can
only address the first 3Gb[1] of the memory space. On 32bit this was
addressed by implementing bouncing buffers[2] but this currently has no
support for arm64. In order to have working USB, as a workaround, we
limit the ram to 3G.

Fixes #446

[1] raspberrypi/linux#3093
[2] https://github.com/raspberrypi/linux/blob/rpi-4.19.y/drivers/pci/controller/pcie-brcmstb-bounce.c

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
agherzan added a commit that referenced this issue Jul 26, 2019
The PCI controller on the Raspberry Pi 4 acts as a DMA controller and can
only address the first 3Gb[1] of the memory space. On 32bit this was
addressed by implementing bouncing buffers[2] but this currently has no
support for arm64. In order to have working USB, as a workaround, we
limit the ram to 3G.

Fixes #446

[1] raspberrypi/linux#3093
[2] https://github.com/raspberrypi/linux/blob/rpi-4.19.y/drivers/pci/controller/pcie-brcmstb-bounce.c

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants