diff options
Diffstat (limited to 'drivers/usb/renesas_usbhs/common.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/common.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 56079bb6759a..4310df46639d 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -17,6 +17,7 @@ #include "common.h" #include "rcar2.h" #include "rcar3.h" +#include "rza.h" /* * image of renesas_usbhs @@ -488,6 +489,10 @@ static const struct of_device_id usbhs_of_match[] = { .compatible = "renesas,rcar-gen3-usbhs", .data = (void *)USBHS_TYPE_RCAR_GEN3, }, + { + .compatible = "renesas,rza1-usbhs", + .data = (void *)USBHS_TYPE_RZA1, + }, { }, }; MODULE_DEVICE_TABLE(of, usbhs_of_match); @@ -520,6 +525,11 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev) dparam->pipe_size = ARRAY_SIZE(usbhsc_new_pipe); } + if (dparam->type == USBHS_TYPE_RZA1) { + dparam->pipe_configs = usbhsc_new_pipe; + dparam->pipe_size = ARRAY_SIZE(usbhsc_new_pipe); + } + return info; } @@ -581,6 +591,18 @@ static int usbhs_probe(struct platform_device *pdev) break; case USBHS_TYPE_RCAR_GEN3_WITH_PLL: priv->pfunc = usbhs_rcar3_with_pll_ops; + if (!IS_ERR_OR_NULL(priv->edev)) { + priv->nb.notifier_call = priv->pfunc.notifier; + ret = devm_extcon_register_notifier(&pdev->dev, + priv->edev, + EXTCON_USB_HOST, + &priv->nb); + if (ret < 0) + dev_err(&pdev->dev, "no notifier registered\n"); + } + break; + case USBHS_TYPE_RZA1: + priv->pfunc = usbhs_rza1_ops; break; default: if (!info->platform_callback.get_id) { |