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

usbh: add experimental host support #30361

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions boards/arm/atsamr21_xpro/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ static int board_pinmux_init(const struct device *dev)
pinmux_pin_set(muxa, 25, PINMUX_FUNC_G);
pinmux_pin_set(muxa, 24, PINMUX_FUNC_G);
#endif

#ifdef CONFIG_USBH_SAM0
pinmux_pin_set(muxa, 25, PINMUX_FUNC_G);
pinmux_pin_set(muxa, 24, PINMUX_FUNC_G);
pinmux_pin_set(muxa, 23, PINMUX_FUNC_G);
#endif

return 0;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ add_subdirectory_ifdef(CONFIG_ENTROPY_HAS_DRIVER entropy)
add_subdirectory_ifdef(CONFIG_SYS_CLOCK_EXISTS timer)
add_subdirectory_ifdef(CONFIG_NEURAL_NET_ACCEL neural_net)
add_subdirectory_ifdef(CONFIG_PTP_CLOCK ptp_clock)
add_subdirectory_ifdef(CONFIG_USBH usbh)
2 changes: 2 additions & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,6 @@ source "drivers/peci/Kconfig"

source "drivers/regulator/Kconfig"

source "drivers/usbh/Kconfig"

endmenu
5 changes: 5 additions & 0 deletions drivers/usbh/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2020 PHYTEC Messtechnik GmbH
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_USBH_SAM0 usbh_hcd_atsamx.c)
zephyr_sources_ifdef(CONFIG_USBH_EHCI usbh_hcd_ehci.c)
21 changes: 21 additions & 0 deletions drivers/usbh/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2020 PHYTEC Messtechnik GmbH
# SPDX-License-Identifier: Apache-2.0

if USBH

config USBH_SAM0
bool "SAM0 series USB Host Controller driver"
default y
depends on SOC_FAMILY_SAM0
help
SAM0 family USB host controller Driver.

config USBH_EHCI
bool "EHCI USB Host Controller driver"
default y
depends on HAS_MCUX_USB_EHCI
select NOCACHE_MEMORY if HAS_MCUX_CACHE
help
RT EHCI USB Host Controller Driver.

endif
Loading