210-dwc2_defaults.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- a/drivers/usb/dwc2/platform.c
  2. +++ b/drivers/usb/dwc2/platform.c
  3. @@ -144,6 +144,34 @@ static int __dwc2_lowlevel_hw_enable(str
  4. return ret;
  5. }
  6. +static const struct dwc2_core_params params_cns3xxx = {
  7. + .otg_cap = 2, /* non-HNP/non-SRP capable */
  8. + .otg_ver = 0, /* 1.3 */
  9. + .dma_enable = 1,
  10. + .dma_desc_enable = 0,
  11. + .speed = 0, /* High Speed */
  12. + .enable_dynamic_fifo = 1,
  13. + .en_multiple_tx_fifo = 1,
  14. + .host_rx_fifo_size = 658, /* 774 DWORDs */
  15. + .host_nperio_tx_fifo_size = 128, /* 256 DWORDs */
  16. + .host_perio_tx_fifo_size = 658, /* 512 DWORDs */
  17. + .max_transfer_size = 65535,
  18. + .max_packet_count = 511,
  19. + .host_channels = 16,
  20. + .phy_type = 1, /* UTMI */
  21. + .phy_utmi_width = 16, /* 8 bits */
  22. + .phy_ulpi_ddr = 0, /* Single */
  23. + .phy_ulpi_ext_vbus = 0,
  24. + .i2c_enable = 0,
  25. + .ulpi_fs_ls = 0,
  26. + .host_support_fs_ls_low_power = 0,
  27. + .host_ls_low_power_phy_clk = 0, /* 48 MHz */
  28. + .ts_dline = 0,
  29. + .reload_ctl = 0,
  30. + .ahbcfg = 0x10,
  31. + .uframe_sched = 0,
  32. +};
  33. +
  34. /**
  35. * dwc2_lowlevel_hw_enable - enable platform lowlevel hw resources
  36. * @hsotg: The driver state
  37. @@ -344,6 +372,9 @@ static int dwc2_driver_probe(struct plat
  38. /* Default all params to autodetect */
  39. dwc2_set_all_params(&defparams, -1);
  40. params = &defparams;
  41. +#ifdef CONFIG_ARCH_CNS3XXX
  42. + params = &params_cns3xxx;
  43. +#endif
  44. /*
  45. * Disable descriptor dma mode by default as the HW can support