fsl_usb.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Freescale USB Controller
  3. *
  4. * Copyright 2013 Freescale Semiconductor, Inc.
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef _ASM_FSL_USB_H_
  9. #define _ASM_FSL_USB_H_
  10. #ifdef CONFIG_SYS_FSL_USB_DUAL_PHY_ENABLE
  11. struct ccsr_usb_port_ctrl {
  12. u32 ctrl;
  13. u32 drvvbuscfg;
  14. u32 pwrfltcfg;
  15. u32 sts;
  16. u8 res_14[0xc];
  17. u32 bistcfg;
  18. u32 biststs;
  19. u32 abistcfg;
  20. u32 abiststs;
  21. u8 res_30[0x10];
  22. u32 xcvrprg;
  23. u32 anaprg;
  24. u32 anadrv;
  25. u32 anasts;
  26. };
  27. struct ccsr_usb_phy {
  28. u32 id;
  29. struct ccsr_usb_port_ctrl port1;
  30. u8 res_50[0xc];
  31. u32 tvr;
  32. u32 pllprg[4];
  33. u8 res_70[0x4];
  34. u32 anaccfg;
  35. u32 dbg;
  36. u8 res_7c[0x4];
  37. struct ccsr_usb_port_ctrl port2;
  38. u8 res_dc[0x334];
  39. };
  40. #define CONFIG_SYS_FSL_USB_CTRL_PHY_EN (1 << 0)
  41. #define CONFIG_SYS_FSL_USB_DRVVBUS_CR_EN (1 << 1)
  42. #define CONFIG_SYS_FSL_USB_PWRFLT_CR_EN (1 << 1)
  43. #define CONFIG_SYS_FSL_USB_PLLPRG1_PHY_DIV (1 << 0)
  44. #define CONFIG_SYS_FSL_USB_PLLPRG2_PHY2_CLK_EN (1 << 0)
  45. #define CONFIG_SYS_FSL_USB_PLLPRG2_PHY1_CLK_EN (1 << 1)
  46. #define CONFIG_SYS_FSL_USB_PLLPRG2_FRAC_LPF_EN (1 << 13)
  47. #define CONFIG_SYS_FSL_USB_PLLPRG2_REF_DIV (1 << 4)
  48. #define CONFIG_SYS_FSL_USB_PLLPRG2_MFI (5 << 16)
  49. #define CONFIG_SYS_FSL_USB_PLLPRG2_PLL_EN (1 << 21)
  50. #define CONFIG_SYS_FSL_USB_SYS_CLK_VALID (1 << 0)
  51. #else
  52. struct ccsr_usb_phy {
  53. u8 res0[0x18];
  54. u32 usb_enable_override;
  55. u8 res[0xe4];
  56. };
  57. #define CONFIG_SYS_FSL_USB_ENABLE_OVERRIDE 1
  58. #endif
  59. #endif /*_ASM_FSL_USB_H_ */