Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: renesas_usbhs: Update usbhs pipe configuration for RZ/G2L family

The RZ/G2L family SoCs has 10 pipe buffers compared to 16 pipe buffers on
RZ/A2M. Update the pipe configuration for RZ/G2L family SoCs and use
family SoC specific compatible to handle this difference.

The pipe configuration of RZ/G2L is same as usbhsc_rzg2l_default_pipe[],
so select the default pipe configuration for RZ/G2L SoCs by setting
.has_new_pipe_configs to zero.

Add SoC specific compatible to OF table to avoid ABI breakage with old
DTB. To optimize memory usage the SoC specific compatible will be removed
later.

Based on the patch in BSP by Huy Nguyen <huy.nguyen.wh@renesas.com>

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240319105356.87287-5-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Biju Das and committed by
Greg Kroah-Hartman
caf8fa11 790effae

+31 -1
+17 -1
drivers/usb/renesas_usbhs/common.c
··· 363 363 * platform default param 364 364 */ 365 365 366 - /* commonly used on old SH-Mobile SoCs */ 366 + /* commonly used on old SH-Mobile and RZ/G2L family SoCs */ 367 367 static struct renesas_usbhs_driver_pipe_config usbhsc_default_pipe[] = { 368 368 RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_CONTROL, 64, 0x00, false), 369 369 RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_ISOC, 1024, 0x08, true), ··· 566 566 .data = &usbhs_rcar_gen3_with_pll_plat_info, 567 567 }, 568 568 { 569 + .compatible = "renesas,usbhs-r9a07g043", 570 + .data = &usbhs_rzg2l_plat_info, 571 + }, 572 + { 573 + .compatible = "renesas,usbhs-r9a07g044", 574 + .data = &usbhs_rzg2l_plat_info, 575 + }, 576 + { 577 + .compatible = "renesas,usbhs-r9a07g054", 578 + .data = &usbhs_rzg2l_plat_info, 579 + }, 580 + { 569 581 .compatible = "renesas,rcar-gen2-usbhs", 570 582 .data = &usbhs_rcar_gen2_plat_info, 571 583 }, ··· 592 580 { 593 581 .compatible = "renesas,rza2-usbhs", 594 582 .data = &usbhs_rza2_plat_info, 583 + }, 584 + { 585 + .compatible = "renesas,rzg2l-usbhs", 586 + .data = &usbhs_rzg2l_plat_info, 595 587 }, 596 588 { }, 597 589 };
+1
drivers/usb/renesas_usbhs/rza.h
··· 3 3 4 4 extern const struct renesas_usbhs_platform_info usbhs_rza1_plat_info; 5 5 extern const struct renesas_usbhs_platform_info usbhs_rza2_plat_info; 6 + extern const struct renesas_usbhs_platform_info usbhs_rzg2l_plat_info;
+13
drivers/usb/renesas_usbhs/rza2.c
··· 71 71 .has_new_pipe_configs = 1, 72 72 }, 73 73 }; 74 + 75 + const struct renesas_usbhs_platform_info usbhs_rzg2l_plat_info = { 76 + .platform_callback = { 77 + .hardware_init = usbhs_rza2_hardware_init, 78 + .hardware_exit = usbhs_rza2_hardware_exit, 79 + .power_ctrl = usbhs_rza2_power_ctrl, 80 + .get_id = usbhs_get_id_as_gadget, 81 + }, 82 + .driver_param = { 83 + .has_cnen = 1, 84 + .cfifo_byte_addr = 1, 85 + }, 86 + };