@@ -565,6 +565,18 @@ static const struct of_device_id usbhs_of_match[] = {
.compatible = "renesas,usbhs-r8a77995",
.data = &usbhs_rcar_gen3_with_pll_plat_info,
},
+ {
+ .compatible = "renesas,usbhs-r9a07g043",
+ .data = &usbhs_rzg2l_plat_info,
+ },
+ {
+ .compatible = "renesas,usbhs-r9a07g044",
+ .data = &usbhs_rzg2l_plat_info,
+ },
+ {
+ .compatible = "renesas,usbhs-r9a07g054",
+ .data = &usbhs_rzg2l_plat_info,
+ },
{
.compatible = "renesas,rcar-gen2-usbhs",
.data = &usbhs_rcar_gen2_plat_info,
@@ -581,6 +593,10 @@ static const struct of_device_id usbhs_of_match[] = {
.compatible = "renesas,rza2-usbhs",
.data = &usbhs_rza2_plat_info,
},
+ {
+ .compatible = "renesas,rzg2l-usbhs",
+ .data = &usbhs_rzg2l_plat_info,
+ },
{ },
};
MODULE_DEVICE_TABLE(of, usbhs_of_match);
@@ -640,8 +656,13 @@ static int usbhs_probe(struct platform_device *pdev)
/* set default param if platform doesn't have */
if (usbhs_get_dparam(priv, has_new_pipe_configs)) {
- priv->dparam.pipe_configs = usbhsc_new_pipe;
- priv->dparam.pipe_size = ARRAY_SIZE(usbhsc_new_pipe);
+ if (info->driver_param.pipe_configs) {
+ priv->dparam.pipe_configs = info->driver_param.pipe_configs;
+ priv->dparam.pipe_size = info->driver_param.pipe_size;
+ } else {
+ priv->dparam.pipe_configs = usbhsc_new_pipe;
+ priv->dparam.pipe_size = ARRAY_SIZE(usbhsc_new_pipe);
+ }
} else if (!priv->dparam.pipe_configs) {
priv->dparam.pipe_configs = usbhsc_default_pipe;
priv->dparam.pipe_size = ARRAY_SIZE(usbhsc_default_pipe);
@@ -3,3 +3,4 @@
extern const struct renesas_usbhs_platform_info usbhs_rza1_plat_info;
extern const struct renesas_usbhs_platform_info usbhs_rza2_plat_info;
+extern const struct renesas_usbhs_platform_info usbhs_rzg2l_plat_info;
@@ -58,6 +58,36 @@ static int usbhs_rza2_power_ctrl(struct platform_device *pdev,
return retval;
}
+/* commonly used on RZ/G2L family */
+static struct renesas_usbhs_driver_pipe_config usbhsc_rzg2l_pipe[] = {
+ RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_CONTROL, 64, 0x00, false),
+ RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_ISOC, 1024, 0x08, true),
+ RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_ISOC, 1024, 0x28, true),
+ RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_BULK, 512, 0x48, true),
+ RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_BULK, 512, 0x58, true),
+ RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_BULK, 512, 0x68, true),
+ RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_INT, 64, 0x04, false),
+ RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_INT, 64, 0x05, false),
+ RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_INT, 64, 0x06, false),
+ RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_INT, 64, 0x07, false),
+};
+
+const struct renesas_usbhs_platform_info usbhs_rzg2l_plat_info = {
+ .platform_callback = {
+ .hardware_init = usbhs_rza2_hardware_init,
+ .hardware_exit = usbhs_rza2_hardware_exit,
+ .power_ctrl = usbhs_rza2_power_ctrl,
+ .get_id = usbhs_get_id_as_gadget,
+ },
+ .driver_param = {
+ .pipe_configs = usbhsc_rzg2l_pipe,
+ .pipe_size = ARRAY_SIZE(usbhsc_rzg2l_pipe),
+ .has_cnen = 1,
+ .cfifo_byte_addr = 1,
+ .has_new_pipe_configs = 1,
+ },
+};
+
const struct renesas_usbhs_platform_info usbhs_rza2_plat_info = {
.platform_callback = {
.hardware_init = usbhs_rza2_hardware_init,