Message ID | 20200421165059.19394-10-s.nawrocki@samsung.com |
---|---|
State | Superseded |
Headers | show |
Series | USB host support for Raspberry Pi 4 board | expand |
On Tue, 2020-04-21 at 18:50 +0200, Sylwester Nawrocki wrote: > From: Marek Szyprowski <m.szyprowski at samsung.com> > > This requires enabling BRCMSTB PCIe and XHCI_PCI drivers as well as PCI > and USB commands. To get it working one has to call the following commands: > "pci enum; usb start;", thus such commands have been added to the default > "preboot" environment variable. One has to update his environment if it is > already configured to get this feature working out of the box. > > Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com> > --- Would you mind enabling USB keyboard support too? It's useful for people using u-boot/UEFI. If not I don't mind sending a separate patch. Regards, Nicolas > configs/rpi_4_32b_defconfig | 9 +++++++++ > configs/rpi_4_defconfig | 10 ++++++++++ > configs/rpi_arm64_defconfig | 9 ++++++++- > 3 files changed, 27 insertions(+), 1 deletion(-) > > diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig > index 72cda5d..0dd763f 100644 > --- a/configs/rpi_4_32b_defconfig > +++ b/configs/rpi_4_32b_defconfig > @@ -8,6 +8,8 @@ CONFIG_NR_DRAM_BANKS=2 > CONFIG_DISTRO_DEFAULTS=y > CONFIG_OF_BOARD_SETUP=y > # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set > +CONFIG_USE_PREBOOT=y > +CONFIG_PREBOOT="pci enum; usb start;" > CONFIG_MISC_INIT_R=y > # CONFIG_DISPLAY_CPUINFO is not set > # CONFIG_DISPLAY_BOARDINFO is not set > @@ -15,6 +17,8 @@ CONFIG_SYS_PROMPT="U-Boot> " > CONFIG_CMD_DFU=y > CONFIG_CMD_GPIO=y > CONFIG_CMD_MMC=y > +CONFIG_CMD_PCI=y > +CONFIG_CMD_USB=y > CONFIG_CMD_FS_UUID=y > CONFIG_OF_BOARD=y > CONFIG_ENV_FAT_INTERFACE="mmc" > @@ -28,12 +32,17 @@ CONFIG_MMC_SDHCI=y > CONFIG_MMC_SDHCI_BCM2835=y > CONFIG_DM_ETH=y > CONFIG_BCMGENET=y > +CONFIG_PCI=y > +CONFIG_DM_PCI=y > +CONFIG_PCI_BRCMSTB=y > CONFIG_PINCTRL=y > # CONFIG_PINCTRL_GENERIC is not set > # CONFIG_REQUIRE_SERIAL_CONSOLE is not set > CONFIG_USB=y > CONFIG_DM_USB=y > CONFIG_DM_USB_GADGET=y > +CONFIG_USB_XHCI_HCD=y > +CONFIG_USB_XHCI_PCI=y > CONFIG_USB_GADGET=y > CONFIG_USB_GADGET_MANUFACTURER="FSL" > CONFIG_USB_GADGET_VENDOR_NUM=0x0525 > diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig > index 6d148da..f80e5da 100644 > --- a/configs/rpi_4_defconfig > +++ b/configs/rpi_4_defconfig > @@ -8,6 +8,8 @@ CONFIG_NR_DRAM_BANKS=2 > CONFIG_DISTRO_DEFAULTS=y > CONFIG_OF_BOARD_SETUP=y > # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set > +CONFIG_USE_PREBOOT=y > +CONFIG_PREBOOT="pci enum; usb start;" > CONFIG_MISC_INIT_R=y > # CONFIG_DISPLAY_CPUINFO is not set > # CONFIG_DISPLAY_BOARDINFO is not set > @@ -15,6 +17,8 @@ CONFIG_SYS_PROMPT="U-Boot> " > CONFIG_CMD_DFU=y > CONFIG_CMD_GPIO=y > CONFIG_CMD_MMC=y > +CONFIG_CMD_PCI=y > +CONFIG_CMD_USB=y > CONFIG_CMD_FS_UUID=y > CONFIG_OF_BOARD=y > CONFIG_ENV_FAT_INTERFACE="mmc" > @@ -28,12 +32,18 @@ CONFIG_MMC_SDHCI=y > CONFIG_MMC_SDHCI_BCM2835=y > CONFIG_DM_ETH=y > CONFIG_BCMGENET=y > +CONFIG_PCI=y > +CONFIG_DM_PCI=y > +CONFIG_PCI_BRCMSTB=y > CONFIG_PINCTRL=y > # CONFIG_PINCTRL_GENERIC is not set > # CONFIG_REQUIRE_SERIAL_CONSOLE is not set > CONFIG_USB=y > CONFIG_DM_USB=y > CONFIG_DM_USB_GADGET=y > +CONFIG_USB_XHCI_HCD=y > +CONFIG_XHCI_64BIT_DWORD_ACCESS_ONLY=y > +CONFIG_USB_XHCI_PCI=y > CONFIG_USB_GADGET=y > CONFIG_USB_GADGET_MANUFACTURER="FSL" > CONFIG_USB_GADGET_VENDOR_NUM=0x0525 > diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig > index fea86be..926dfc3 100644 > --- a/configs/rpi_arm64_defconfig > +++ b/configs/rpi_arm64_defconfig > @@ -7,13 +7,14 @@ CONFIG_NR_DRAM_BANKS=2 > CONFIG_DISTRO_DEFAULTS=y > CONFIG_OF_BOARD_SETUP=y > CONFIG_USE_PREBOOT=y > -CONFIG_PREBOOT="usb start" > +CONFIG_PREBOOT="pci enum; usb start;" > CONFIG_MISC_INIT_R=y > # CONFIG_DISPLAY_CPUINFO is not set > # CONFIG_DISPLAY_BOARDINFO is not set > CONFIG_SYS_PROMPT="U-Boot> " > CONFIG_CMD_GPIO=y > CONFIG_CMD_MMC=y > +CONFIG_CMD_PCI=y > CONFIG_CMD_USB=y > CONFIG_CMD_FS_UUID=y > CONFIG_OF_BOARD=y > @@ -26,11 +27,17 @@ CONFIG_MMC_SDHCI=y > CONFIG_MMC_SDHCI_BCM2835=y > CONFIG_DM_ETH=y > CONFIG_BCMGENET=y > +CONFIG_PCI=y > +CONFIG_DM_PCI=y > +CONFIG_PCI_BRCMSTB=y > CONFIG_PINCTRL=y > # CONFIG_PINCTRL_GENERIC is not set > # CONFIG_REQUIRE_SERIAL_CONSOLE is not set > CONFIG_USB=y > CONFIG_DM_USB=y > +CONFIG_USB_XHCI_HCD=y > +CONFIG_XHCI_64BIT_DWORD_ACCESS_ONLY=y > +CONFIG_USB_XHCI_PCI=y > CONFIG_USB_DWC2=y > CONFIG_USB_KEYBOARD=y > CONFIG_USB_HOST_ETHER=y -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: This is a digitally signed message part URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200422/607d0e28/attachment.sig>
> > This requires enabling BRCMSTB PCIe and XHCI_PCI drivers as well as PCI > > and USB commands. To get it working one has to call the following commands: > > "pci enum; usb start;", thus such commands have been added to the default > > "preboot" environment variable. One has to update his environment if it is > > already configured to get this feature working out of the box. > > > > Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com> > > --- > > Would you mind enabling USB keyboard support too? It's useful for people using > u-boot/UEFI. And storage too: CONFIG_USB_STORAGE=y CONFIG_USB_KEYBOARD=y In testing these patches I can see the devices with a "usb tree" but even with the keyboard enabled it doesn't appear to work. AFAICT with it enabled there should be support for usb keyboard via console in include/configs/rpi.h but I couldn't see what else might be missing. > If not I don't mind sending a separate patch. > > Regards, > Nicolas > > > configs/rpi_4_32b_defconfig | 9 +++++++++ > > configs/rpi_4_defconfig | 10 ++++++++++ > > configs/rpi_arm64_defconfig | 9 ++++++++- > > 3 files changed, 27 insertions(+), 1 deletion(-) > > > > diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig > > index 72cda5d..0dd763f 100644 > > --- a/configs/rpi_4_32b_defconfig > > +++ b/configs/rpi_4_32b_defconfig > > @@ -8,6 +8,8 @@ CONFIG_NR_DRAM_BANKS=2 > > CONFIG_DISTRO_DEFAULTS=y > > CONFIG_OF_BOARD_SETUP=y > > # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set > > +CONFIG_USE_PREBOOT=y > > +CONFIG_PREBOOT="pci enum; usb start;" > > CONFIG_MISC_INIT_R=y > > # CONFIG_DISPLAY_CPUINFO is not set > > # CONFIG_DISPLAY_BOARDINFO is not set > > @@ -15,6 +17,8 @@ CONFIG_SYS_PROMPT="U-Boot> " > > CONFIG_CMD_DFU=y > > CONFIG_CMD_GPIO=y > > CONFIG_CMD_MMC=y > > +CONFIG_CMD_PCI=y > > +CONFIG_CMD_USB=y > > CONFIG_CMD_FS_UUID=y > > CONFIG_OF_BOARD=y > > CONFIG_ENV_FAT_INTERFACE="mmc" > > @@ -28,12 +32,17 @@ CONFIG_MMC_SDHCI=y > > CONFIG_MMC_SDHCI_BCM2835=y > > CONFIG_DM_ETH=y > > CONFIG_BCMGENET=y > > +CONFIG_PCI=y > > +CONFIG_DM_PCI=y > > +CONFIG_PCI_BRCMSTB=y > > CONFIG_PINCTRL=y > > # CONFIG_PINCTRL_GENERIC is not set > > # CONFIG_REQUIRE_SERIAL_CONSOLE is not set > > CONFIG_USB=y > > CONFIG_DM_USB=y > > CONFIG_DM_USB_GADGET=y > > +CONFIG_USB_XHCI_HCD=y > > +CONFIG_USB_XHCI_PCI=y > > CONFIG_USB_GADGET=y > > CONFIG_USB_GADGET_MANUFACTURER="FSL" > > CONFIG_USB_GADGET_VENDOR_NUM=0x0525 > > diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig > > index 6d148da..f80e5da 100644 > > --- a/configs/rpi_4_defconfig > > +++ b/configs/rpi_4_defconfig > > @@ -8,6 +8,8 @@ CONFIG_NR_DRAM_BANKS=2 > > CONFIG_DISTRO_DEFAULTS=y > > CONFIG_OF_BOARD_SETUP=y > > # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set > > +CONFIG_USE_PREBOOT=y > > +CONFIG_PREBOOT="pci enum; usb start;" > > CONFIG_MISC_INIT_R=y > > # CONFIG_DISPLAY_CPUINFO is not set > > # CONFIG_DISPLAY_BOARDINFO is not set > > @@ -15,6 +17,8 @@ CONFIG_SYS_PROMPT="U-Boot> " > > CONFIG_CMD_DFU=y > > CONFIG_CMD_GPIO=y > > CONFIG_CMD_MMC=y > > +CONFIG_CMD_PCI=y > > +CONFIG_CMD_USB=y > > CONFIG_CMD_FS_UUID=y > > CONFIG_OF_BOARD=y > > CONFIG_ENV_FAT_INTERFACE="mmc" > > @@ -28,12 +32,18 @@ CONFIG_MMC_SDHCI=y > > CONFIG_MMC_SDHCI_BCM2835=y > > CONFIG_DM_ETH=y > > CONFIG_BCMGENET=y > > +CONFIG_PCI=y > > +CONFIG_DM_PCI=y > > +CONFIG_PCI_BRCMSTB=y > > CONFIG_PINCTRL=y > > # CONFIG_PINCTRL_GENERIC is not set > > # CONFIG_REQUIRE_SERIAL_CONSOLE is not set > > CONFIG_USB=y > > CONFIG_DM_USB=y > > CONFIG_DM_USB_GADGET=y > > +CONFIG_USB_XHCI_HCD=y > > +CONFIG_XHCI_64BIT_DWORD_ACCESS_ONLY=y > > +CONFIG_USB_XHCI_PCI=y > > CONFIG_USB_GADGET=y > > CONFIG_USB_GADGET_MANUFACTURER="FSL" > > CONFIG_USB_GADGET_VENDOR_NUM=0x0525 > > diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig > > index fea86be..926dfc3 100644 > > --- a/configs/rpi_arm64_defconfig > > +++ b/configs/rpi_arm64_defconfig > > @@ -7,13 +7,14 @@ CONFIG_NR_DRAM_BANKS=2 > > CONFIG_DISTRO_DEFAULTS=y > > CONFIG_OF_BOARD_SETUP=y > > CONFIG_USE_PREBOOT=y > > -CONFIG_PREBOOT="usb start" > > +CONFIG_PREBOOT="pci enum; usb start;" > > CONFIG_MISC_INIT_R=y > > # CONFIG_DISPLAY_CPUINFO is not set > > # CONFIG_DISPLAY_BOARDINFO is not set > > CONFIG_SYS_PROMPT="U-Boot> " > > CONFIG_CMD_GPIO=y > > CONFIG_CMD_MMC=y > > +CONFIG_CMD_PCI=y > > CONFIG_CMD_USB=y > > CONFIG_CMD_FS_UUID=y > > CONFIG_OF_BOARD=y > > @@ -26,11 +27,17 @@ CONFIG_MMC_SDHCI=y > > CONFIG_MMC_SDHCI_BCM2835=y > > CONFIG_DM_ETH=y > > CONFIG_BCMGENET=y > > +CONFIG_PCI=y > > +CONFIG_DM_PCI=y > > +CONFIG_PCI_BRCMSTB=y > > CONFIG_PINCTRL=y > > # CONFIG_PINCTRL_GENERIC is not set > > # CONFIG_REQUIRE_SERIAL_CONSOLE is not set > > CONFIG_USB=y > > CONFIG_DM_USB=y > > +CONFIG_USB_XHCI_HCD=y > > +CONFIG_XHCI_64BIT_DWORD_ACCESS_ONLY=y > > +CONFIG_USB_XHCI_PCI=y > > CONFIG_USB_DWC2=y > > CONFIG_USB_KEYBOARD=y > > CONFIG_USB_HOST_ETHER=y >
Hi Peter, On Wed, 2020-04-22 at 11:50 +0100, Peter Robinson wrote: > > > This requires enabling BRCMSTB PCIe and XHCI_PCI drivers as well as PCI > > > and USB commands. To get it working one has to call the following > > > commands: > > > "pci enum; usb start;", thus such commands have been added to the default > > > "preboot" environment variable. One has to update his environment if it is > > > already configured to get this feature working out of the box. > > > > > > Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com> > > > --- > > > > Would you mind enabling USB keyboard support too? It's useful for people > > using > > u-boot/UEFI. > > And storage too: > CONFIG_USB_STORAGE=y > CONFIG_USB_KEYBOARD=y > > In testing these patches I can see the devices with a "usb tree" but > even with the keyboard enabled it doesn't appear to work. AFAICT with > it enabled there should be support for usb keyboard via console in > include/configs/rpi.h but I couldn't see what else might be missing. That's surprising, USB keyboard works fine in my case. Regards, Nicolas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: This is a digitally signed message part URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200422/80303ec7/attachment.sig>
On Wed, Apr 22, 2020 at 1:26 PM Nicolas Saenz Julienne <nsaenzjulienne at suse.de> wrote: > > Hi Peter, > > On Wed, 2020-04-22 at 11:50 +0100, Peter Robinson wrote: > > > > This requires enabling BRCMSTB PCIe and XHCI_PCI drivers as well as PCI > > > > and USB commands. To get it working one has to call the following > > > > commands: > > > > "pci enum; usb start;", thus such commands have been added to the default > > > > "preboot" environment variable. One has to update his environment if it is > > > > already configured to get this feature working out of the box. > > > > > > > > Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com> > > > > --- > > > > > > Would you mind enabling USB keyboard support too? It's useful for people > > > using > > > u-boot/UEFI. > > > > And storage too: > > CONFIG_USB_STORAGE=y > > CONFIG_USB_KEYBOARD=y > > > > In testing these patches I can see the devices with a "usb tree" but > > even with the keyboard enabled it doesn't appear to work. AFAICT with > > it enabled there should be support for usb keyboard via console in > > include/configs/rpi.h but I couldn't see what else might be missing. > > That's surprising, USB keyboard works fine in my case. I've tried 2 devices and 2 keyboards and someone else managed to reproduce it. Another person got it working on the top USB3 port but it was even intermittent there.
On 22.04.2020 14:26, Nicolas Saenz Julienne wrote: > On Wed, 2020-04-22 at 11:50 +0100, Peter Robinson wrote: >>> Would you mind enabling USB keyboard support too? It's useful for people >>> using >>> u-boot/UEFI. >> >> And storage too: >> CONFIG_USB_STORAGE=y >> CONFIG_USB_KEYBOARD=y >> >> In testing these patches I can see the devices with a "usb tree" but >> even with the keyboard enabled it doesn't appear to work. AFAICT with >> it enabled there should be support for usb keyboard via console in >> include/configs/rpi.h but I couldn't see what else might be missing. > > That's surprising, USB keyboard works fine in my case. USB keyboard also works well for me (but not the one with a built-in touchpad). I could add those 2 additional options to the patch but perhaps it's better to leave it as is, i.e. enable PCIe/xHCI in one patch and all needed USB devices in another?
diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig index 72cda5d..0dd763f 100644 --- a/configs/rpi_4_32b_defconfig +++ b/configs/rpi_4_32b_defconfig @@ -8,6 +8,8 @@ CONFIG_NR_DRAM_BANKS=2 CONFIG_DISTRO_DEFAULTS=y CONFIG_OF_BOARD_SETUP=y # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start;" CONFIG_MISC_INIT_R=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set @@ -15,6 +17,8 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_DFU=y CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y +CONFIG_CMD_USB=y CONFIG_CMD_FS_UUID=y CONFIG_OF_BOARD=y CONFIG_ENV_FAT_INTERFACE="mmc" @@ -28,12 +32,17 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y CONFIG_DM_ETH=y CONFIG_BCMGENET=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_PCI_BRCMSTB=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set CONFIG_USB=y CONFIG_DM_USB=y CONFIG_DM_USB_GADGET=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PCI=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="FSL" CONFIG_USB_GADGET_VENDOR_NUM=0x0525 diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig index 6d148da..f80e5da 100644 --- a/configs/rpi_4_defconfig +++ b/configs/rpi_4_defconfig @@ -8,6 +8,8 @@ CONFIG_NR_DRAM_BANKS=2 CONFIG_DISTRO_DEFAULTS=y CONFIG_OF_BOARD_SETUP=y # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start;" CONFIG_MISC_INIT_R=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set @@ -15,6 +17,8 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_DFU=y CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y +CONFIG_CMD_USB=y CONFIG_CMD_FS_UUID=y CONFIG_OF_BOARD=y CONFIG_ENV_FAT_INTERFACE="mmc" @@ -28,12 +32,18 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y CONFIG_DM_ETH=y CONFIG_BCMGENET=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_PCI_BRCMSTB=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set CONFIG_USB=y CONFIG_DM_USB=y CONFIG_DM_USB_GADGET=y +CONFIG_USB_XHCI_HCD=y +CONFIG_XHCI_64BIT_DWORD_ACCESS_ONLY=y +CONFIG_USB_XHCI_PCI=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="FSL" CONFIG_USB_GADGET_VENDOR_NUM=0x0525 diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig index fea86be..926dfc3 100644 --- a/configs/rpi_arm64_defconfig +++ b/configs/rpi_arm64_defconfig @@ -7,13 +7,14 @@ CONFIG_NR_DRAM_BANKS=2 CONFIG_DISTRO_DEFAULTS=y CONFIG_OF_BOARD_SETUP=y CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="usb start" +CONFIG_PREBOOT="pci enum; usb start;" CONFIG_MISC_INIT_R=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_FS_UUID=y CONFIG_OF_BOARD=y @@ -26,11 +27,17 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCM2835=y CONFIG_DM_ETH=y CONFIG_BCMGENET=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_PCI_BRCMSTB=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_XHCI_64BIT_DWORD_ACCESS_ONLY=y +CONFIG_USB_XHCI_PCI=y CONFIG_USB_DWC2=y CONFIG_USB_KEYBOARD=y CONFIG_USB_HOST_ETHER=y