0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. From 6c0c0951bbf8c2c216675fe277fba4c42aa0a2bf Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= <a.seppala@gmail.com>
  3. Date: Sat, 27 Feb 2016 12:31:24 +0200
  4. Subject: [PATCH] usb: dwc2: Add support for Lantiq ARX and XRX SoCs
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Add support for Lantiq ARX and XRX SoC families to the dwc2 driver.
  9. Acked-by: John Youn <johnyoun@synopsys.com>
  10. Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
  11. Signed-off-by: Felipe Balbi <balbi@kernel.org>
  12. ---
  13. Documentation/devicetree/bindings/usb/dwc2.txt | 2 ++
  14. drivers/usb/dwc2/platform.c | 34 ++++++++++++++++++++++++++
  15. 2 files changed, 36 insertions(+)
  16. --- a/Documentation/devicetree/bindings/usb/dwc2.txt
  17. +++ b/Documentation/devicetree/bindings/usb/dwc2.txt
  18. @@ -7,6 +7,8 @@ Required properties:
  19. - rockchip,rk3066-usb: The DWC2 USB controller instance in the rk3066 Soc;
  20. - "rockchip,rk3188-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3188 Soc;
  21. - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc;
  22. + - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs;
  23. + - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs;
  24. - snps,dwc2: A generic DWC2 USB controller with default parameters.
  25. - reg : Should contain 1 register range (address and length)
  26. - interrupts : Should contain 1 interrupt
  27. --- a/drivers/usb/dwc2/platform.c
  28. +++ b/drivers/usb/dwc2/platform.c
  29. @@ -116,6 +116,37 @@ static const struct dwc2_core_params par
  30. .hibernation = -1,
  31. };
  32. +static const struct dwc2_core_params params_ltq = {
  33. + .otg_cap = 2, /* non-HNP/non-SRP */
  34. + .otg_ver = -1,
  35. + .dma_enable = -1,
  36. + .dma_desc_enable = -1,
  37. + .speed = -1,
  38. + .enable_dynamic_fifo = -1,
  39. + .en_multiple_tx_fifo = -1,
  40. + .host_rx_fifo_size = 288, /* 288 DWORDs */
  41. + .host_nperio_tx_fifo_size = 128, /* 128 DWORDs */
  42. + .host_perio_tx_fifo_size = 96, /* 96 DWORDs */
  43. + .max_transfer_size = 65535,
  44. + .max_packet_count = 511,
  45. + .host_channels = -1,
  46. + .phy_type = -1,
  47. + .phy_utmi_width = -1,
  48. + .phy_ulpi_ddr = -1,
  49. + .phy_ulpi_ext_vbus = -1,
  50. + .i2c_enable = -1,
  51. + .ulpi_fs_ls = -1,
  52. + .host_support_fs_ls_low_power = -1,
  53. + .host_ls_low_power_phy_clk = -1,
  54. + .ts_dline = -1,
  55. + .reload_ctl = -1,
  56. + .ahbcfg = GAHBCFG_HBSTLEN_INCR16 <<
  57. + GAHBCFG_HBSTLEN_SHIFT,
  58. + .uframe_sched = -1,
  59. + .external_id_pin_ctl = -1,
  60. + .hibernation = -1,
  61. +};
  62. +
  63. static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg)
  64. {
  65. struct platform_device *pdev = to_platform_device(hsotg->dev);
  66. @@ -310,6 +341,8 @@ static int dwc2_driver_remove(struct pla
  67. static const struct of_device_id dwc2_of_match_table[] = {
  68. { .compatible = "brcm,bcm2835-usb", .data = &params_bcm2835 },
  69. { .compatible = "rockchip,rk3066-usb", .data = &params_rk3066 },
  70. + { .compatible = "lantiq,arx100-usb", .data = &params_ltq },
  71. + { .compatible = "lantiq,xrx200-usb", .data = &params_ltq },
  72. { .compatible = "snps,dwc2", .data = NULL },
  73. { .compatible = "samsung,s3c6400-hsotg", .data = NULL},
  74. {},