Skip to content
Open
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: 4 additions & 3 deletions boards/renesas/ek_ra6m3/ek_ra6m3-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@

usbhs_default: usbhs_default {
group1 {
psels = <RA_PSEL(RA_PSEL_USBHS, 11, 1)>; /* VBUS */
psels = <RA_PSEL(RA_PSEL_USBHS, 11, 1)>, /* VBUS */
<RA_PSEL(RA_PSEL_USBHS, 11, 0)>; /* VBUSEN */
drive-strength = "high";
};
};
Expand Down Expand Up @@ -64,8 +65,8 @@

usbfs_default: usbfs_default {
group1 {
/* USB_VBUS */
psels = <RA_PSEL(RA_PSEL_USBFS, 11, 1)>;
psels = <RA_PSEL(RA_PSEL_USBFS, 4, 7)>, /* VBUS */
<RA_PSEL(RA_PSEL_USBFS, 5, 0)>; /* VBUSEN */
drive-strength = "high";
};
};
Expand Down
5 changes: 5 additions & 0 deletions boards/renesas/ek_ra6m3/ek_ra6m3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@
pinctrl-0 = <&usbfs_default>;
pinctrl-names = "default";
maximum-speed = "full-speed";
status = "okay";

zephyr_uhc0: uhc {
status = "okay";
};
};

&wdt {
Expand Down
7 changes: 4 additions & 3 deletions boards/renesas/ek_ra6m5/ek_ra6m5-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@

usbhs_default: usbhs_default {
group1 {
psels = <RA_PSEL(RA_PSEL_USBHS, 11, 1)>; /* USBHS-VBUS */
psels = <RA_PSEL(RA_PSEL_USBHS, 11, 1)>, /* VBUS */
<RA_PSEL(RA_PSEL_USBHS, 11, 0)>; /* VBUSEN */
drive-strength = "high";
};
};
Expand Down Expand Up @@ -82,8 +83,8 @@

usbfs_default: usbfs_default {
group1 {
/* USB_VBUS */
psels = <RA_PSEL(RA_PSEL_USBFS, 11, 1)>;
psels = <RA_PSEL(RA_PSEL_USBFS, 4, 7)>, /* VBUS */
<RA_PSEL(RA_PSEL_USBFS, 5, 0)>; /* VBUSEN */
drive-strength = "high";
};
};
Expand Down
5 changes: 5 additions & 0 deletions boards/renesas/ek_ra6m5/ek_ra6m5.dts
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@
pinctrl-0 = <&usbfs_default>;
pinctrl-names = "default";
maximum-speed = "full-speed";
status = "okay";

zephyr_uhc0: uhc {
status = "okay";
};
};

mikrobus_serial: &uart7 {};
Expand Down
11 changes: 6 additions & 5 deletions boards/renesas/ek_ra8d1/ek_ra8d1-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@

usbhs_default: usbhs_default {
group1 {
psels = <RA_PSEL(RA_PSEL_USBHS, 11, 1)>; /* USBHS-VBUS */
psels = <RA_PSEL(RA_PSEL_USBHS, 11, 1)>, /* VBUS */
<RA_PSEL(RA_PSEL_USBHS, 11, 0)>; /* VBUSEN */
drive-strength = "high";
};
};
Expand Down Expand Up @@ -212,10 +213,10 @@

usbfs_default: usbfs_default {
group1 {
/* USBP USBN */
psels = <RA_PSEL(RA_PSEL_USBFS, 8, 15)>,
<RA_PSEL(RA_PSEL_USBFS, 8, 14)>,
<RA_PSEL(RA_PSEL_USBFS, 4, 7)>;
psels = <RA_PSEL(RA_PSEL_USBFS, 8, 15)>, /* USBN */
<RA_PSEL(RA_PSEL_USBFS, 8, 14)>, /* USBP */
<RA_PSEL(RA_PSEL_USBFS, 4, 7)>, /* VBUS */
<RA_PSEL(RA_PSEL_USBFS, 5, 0)>; /* VBUSEN */
drive-strength = "high";
};
};
Expand Down
5 changes: 5 additions & 0 deletions boards/renesas/ek_ra8d1/ek_ra8d1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,11 @@ dvp_20pin_interface: &ceu {};
pinctrl-0 = <&usbfs_default>;
pinctrl-names = "default";
maximum-speed = "full-speed";
status = "okay";

zephyr_uhc0: uhc {
status = "okay";
};
};

&wdt {
Expand Down
11 changes: 6 additions & 5 deletions boards/renesas/ek_ra8m1/ek_ra8m1-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@

usbhs_default: usbhs_default {
group1 {
psels = <RA_PSEL(RA_PSEL_USBHS, 11, 1)>; /* VBUS */
psels = <RA_PSEL(RA_PSEL_USBHS, 11, 1)>, /* VBUS */
<RA_PSEL(RA_PSEL_USBHS, 4, 8)>; /* VBUSEN */
drive-strength = "high";
};
};
Expand All @@ -172,10 +173,10 @@

usbfs_default: usbfs_default {
group1 {
/* USBP USBN */
psels = <RA_PSEL(RA_PSEL_USBFS, 8, 15)>,
<RA_PSEL(RA_PSEL_USBFS, 8, 14)>,
<RA_PSEL(RA_PSEL_USBFS, 4, 7)>;
psels = <RA_PSEL(RA_PSEL_USBFS, 8, 15)>, /* USBN */
<RA_PSEL(RA_PSEL_USBFS, 8, 14)>, /* USBP */
<RA_PSEL(RA_PSEL_USBFS, 4, 7)>, /* VBUS */
<RA_PSEL(RA_PSEL_USBFS, 5, 0)>; /* VBUSEN */
drive-strength = "high";
};
};
Expand Down
5 changes: 5 additions & 0 deletions boards/renesas/ek_ra8m1/ek_ra8m1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,11 @@ pmod_sd_shield: &sdhc0 {};
pinctrl-0 = <&usbfs_default>;
pinctrl-names = "default";
maximum-speed = "full-speed";
status = "okay";

zephyr_uhc0: uhc {
status = "okay";
};
};

&wdt {
Expand Down
8 changes: 4 additions & 4 deletions boards/renesas/mck_ra8t1/mck_ra8t1-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@

usbfs_default: usbfs_default {
group1 {
/* USBP USBN */
psels = <RA_PSEL(RA_PSEL_USBFS, 8, 15)>,
<RA_PSEL(RA_PSEL_USBFS, 8, 14)>,
<RA_PSEL(RA_PSEL_USBFS, 4, 7)>;
psels = <RA_PSEL(RA_PSEL_USBFS, 8, 15)>, /* USBN */
<RA_PSEL(RA_PSEL_USBFS, 8, 14)>, /* USBP */
<RA_PSEL(RA_PSEL_USBFS, 4, 7)>, /* VBUS */
<RA_PSEL(RA_PSEL_USBFS, 4, 8)>; /* VBUSEN */
drive-strength = "high";
};
};
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/uhc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ zephyr_library_sources_ifdef(CONFIG_UHC_NXP_EHCI uhc_mcux_common.c uhc_mcux_ehci
zephyr_library_sources_ifdef(CONFIG_UHC_NXP_KHCI uhc_mcux_common.c uhc_mcux_khci.c)
zephyr_library_sources_ifdef(CONFIG_UHC_NXP_OHCI uhc_mcux_common.c uhc_mcux_ohci.c)
zephyr_library_sources_ifdef(CONFIG_UHC_NXP_IP3516HS uhc_mcux_common.c uhc_mcux_ip3516hs.c)
zephyr_library_sources_ifdef(CONFIG_UHC_RENESAS_RA uhc_renesas_ra.c)
1 change: 1 addition & 0 deletions drivers/usb/uhc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ source "subsys/logging/Kconfig.template.log_config"
source "drivers/usb/uhc/Kconfig.max3421e"
source "drivers/usb/uhc/Kconfig.virtual"
source "drivers/usb/uhc/Kconfig.mcux"
source "drivers/usb/uhc/Kconfig.renesas_ra"

endif # UHC_DRIVER
40 changes: 40 additions & 0 deletions drivers/usb/uhc/Kconfig.renesas_ra
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (c) 2024 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

DT_COMPAT_UHC_RENESAS_RA := renesas,ra-uhc

config UHC_RENESAS_RA
bool "Renesas RA family UHC driver"
default y
depends on DT_HAS_RENESAS_RA_UHC_ENABLED
select USE_RA_FSP_USB_HOST
help
Enable Renesas RA family UHC driver.

if UHC_RENESAS_RA

config UHC_RENESAS_RA_STACK_SIZE
int "UHC controller driver internal thread stack size"
default 512
help
Renesas RA device controller driver internal thread stack size.

config UHC_RENESAS_RA_THREAD_PRIORITY
int "Renesas RA family UHC driver thread priority"
default 8
help
Renesas RA device controller driver thread priority.

config UHC_RENESAS_RA_MAX_MSGQ
int "Renesas RA family internal UHC driver msgq size"
default 10
help
Renesas RA device controller driver internal msgq size.

config UHC_RENESAS_RA_OSC_WAIT_RETRIES
int "Maximum retries for oscillator ready event"
default 3
help
Specify the number of retries for oscillator ready event.

endif # UHC_RENESAS_RA
Loading