ehci-fsl.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Copyright (c) 2005 freescale semiconductor
  3. * Copyright (c) 2005 MontaVista Software
  4. * Copyright (c) 2008 Excito Elektronik i Sk=E5ne AB
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of
  9. * the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  19. * MA 02111-1307 USA
  20. */
  21. #ifndef _EHCI_FSL_H
  22. #define _EHCI_FSL_H
  23. /* Global offsets */
  24. #define FSL_SKIP_PCI 0x100
  25. /* offsets for the non-ehci registers in the FSL SOC USB controller */
  26. #define FSL_SOC_USB_ULPIVP 0x170
  27. #define FSL_SOC_USB_PORTSC1 0x184
  28. #define PORT_PTS_MSK (3 << 30)
  29. #define PORT_PTS_UTMI (0 << 30)
  30. #define PORT_PTS_ULPI (2 << 30)
  31. #define PORT_PTS_SERIAL (3 << 30)
  32. #define PORT_PTS_PTW (1 << 28)
  33. /* USBMODE Register bits */
  34. #define CM_IDLE (0 << 0)
  35. #define CM_RESERVED (1 << 0)
  36. #define CM_DEVICE (2 << 0)
  37. #define CM_HOST (3 << 0)
  38. #define USBMODE_RESERVED_2 (0 << 2)
  39. #define SLOM (1 << 3)
  40. #define SDIS (1 << 4)
  41. /* CONTROL Register bits */
  42. #define ULPI_INT_EN (1 << 0)
  43. #define WU_INT_EN (1 << 1)
  44. #define USB_EN (1 << 2)
  45. #define LSF_EN (1 << 3)
  46. #define KEEP_OTG_ON (1 << 4)
  47. #define OTG_PORT (1 << 5)
  48. #define REFSEL_12MHZ (0 << 6)
  49. #define REFSEL_16MHZ (1 << 6)
  50. #define REFSEL_48MHZ (2 << 6)
  51. #define PLL_RESET (1 << 8)
  52. #define UTMI_PHY_EN (1 << 9)
  53. #define PHY_CLK_SEL_UTMI (0 << 10)
  54. #define PHY_CLK_SEL_ULPI (1 << 10)
  55. #define CLKIN_SEL_USB_CLK (0 << 11)
  56. #define CLKIN_SEL_USB_CLK2 (1 << 11)
  57. #define CLKIN_SEL_SYS_CLK (2 << 11)
  58. #define CLKIN_SEL_SYS_CLK2 (3 << 11)
  59. #define RESERVED_18 (0 << 13)
  60. #define RESERVED_17 (0 << 14)
  61. #define RESERVED_16 (0 << 15)
  62. #define WU_INT (1 << 16)
  63. #define PHY_CLK_VALID (1 << 17)
  64. #define FSL_SOC_USB_PORTSC2 0x188
  65. #define FSL_SOC_USB_USBMODE 0x1a8
  66. #define FSL_SOC_USB_SNOOP1 0x400 /* NOTE: big-endian */
  67. #define FSL_SOC_USB_SNOOP2 0x404 /* NOTE: big-endian */
  68. #define FSL_SOC_USB_AGECNTTHRSH 0x408 /* NOTE: big-endian */
  69. #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */
  70. #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */
  71. #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */
  72. #define SNOOP_SIZE_2GB 0x1e
  73. /* System Clock Control Register */
  74. #define MPC83XX_SCCR_USB_MASK 0x00f00000
  75. #define MPC83XX_SCCR_USB_DRCM_11 0x00300000
  76. #define MPC83XX_SCCR_USB_DRCM_01 0x00100000
  77. #define MPC83XX_SCCR_USB_DRCM_10 0x00200000
  78. #endif /* _EHCI_FSL_H */