-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
drivers: udc: add support for USB device on Renesas RA USBFS HWIP #83358
base: main
Are you sure you want to change the base?
drivers: udc: add support for USB device on Renesas RA USBFS HWIP #83358
Conversation
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
@thenguyenyf : Please rebase to solve conflict. |
94f4294
01764f3
to
94f4294
Compare
Last push to update the hal_renesas rev, because it was merged, and solve the conflict |
drivers/usb/udc/udc_renesas_ra.c
Outdated
static struct udc_data udc_data_##id = {.mutex = Z_MUTEX_INITIALIZER(udc_data_##id.mutex), \ | ||
.priv = &udc_priv_##id}; \ | ||
\ | ||
static int udc_renesas_ra_driver_preinit_##id(const struct device *dev) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be normal function as you have dev parameter, no need to put it inside macro.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it
drivers/usb/udc/udc_renesas_ra.c
Outdated
return -ENOTSUP; \ | ||
} \ | ||
\ | ||
uint32_t uclk_src = RA_CGC_CLK_SRC(DT_CLOCKS_CTLR(DT_NODELABEL(uclk))); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable definition should be at the top of a block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it
drivers/usb/udc/udc_renesas_ra.c
Outdated
\ | ||
static void udc_renesas_ra_thread_##n(void *dev, void *arg1, void *arg2) \ | ||
static int renesas_ra_usb_irq_config##id(const struct device *dev) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be normal function, no need to place it inside macro.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it
drivers/usb/udc/udc_renesas_ra.c
Outdated
{ \ | ||
renesas_ra_thread_handler(dev); \ | ||
} \ | ||
\ | ||
static void udc_renesas_ra_make_thread_##n(const struct device *dev) \ | ||
static void udc_renesas_ra_make_thread_##id(const struct device *dev) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stray change, no need to introduce id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it
drivers/usb/udc/udc_renesas_ra.c
Outdated
.ep_cfg_out = ep_cfg_out##id, \ | ||
.make_thread = udc_renesas_ra_make_thread_##id, \ | ||
.speed_idx = DT_ENUM_IDX_OR(id, maximum_speed, UDC_BUS_SPEED_FS), \ | ||
.irq_config_func = renesas_ra_usb_irq_config##id}; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.irq_config_func = renesas_ra_usb_irq_config##id
};
Style issue, please fix it everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it
94f4294
to
1002014
Compare
Update revision of hal_renesas module to add support of UDC on Renesas RA USBFS module Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add missing clock node of uclk on Renesas RA2A1 SoC Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
First commit to add support for USBFS module on Renesas RA - Remove renesas,ra-usb binding - Add 2 new binding for Renesas RA USBFS and USBHS - Remove unused interrupts of USBHS Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add device node of usbfs on Renesas RA SoC Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add phys-clock to usbhs node in case internal phys-clock-src is used Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add USB support on USBFS port on these boards: - RA8: ek_ra8m1, ek_ra8d1, mck_ra8t1 - RA6: ek_ra6m1, ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5 - RA4: ek_ra4m2, ek_ra4m3 Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
1002014
to
38610d4
Compare
Last push to rebase main branch and solve conflict |
This PR to add support for USB device on USBFS port of Renesas RA family