am35x_def.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * am35x_def.h - TI's AM35x specific definitions.
  4. *
  5. * Based on arch/arm/include/asm/arch-omap3/cpu.h
  6. *
  7. * Author: Ajay Kumar Gupta <ajay.gupta@ti.com>
  8. *
  9. * Copyright (c) 2010 Texas Instruments Incorporated
  10. */
  11. #ifndef _AM35X_DEF_H_
  12. #define _AM35X_DEF_H_
  13. #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
  14. #include <asm/types.h>
  15. #endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */
  16. #ifndef __KERNEL_STRICT_NAMES
  17. #ifndef __ASSEMBLY__
  18. /* LVL_INTR_CLEAR bits */
  19. #define USBOTGSS_INT_CLR (1 << 4)
  20. /* IP_SW_RESET bits */
  21. #define USBOTGSS_SW_RST (1 << 0) /* reset USBOTG */
  22. #define CPGMACSS_SW_RST (1 << 1) /* reset CPGMAC */
  23. /* DEVCONF2 bits */
  24. #define CONF2_PHY_GPIOMODE (1 << 23)
  25. #define CONF2_OTGMODE (3 << 14)
  26. #define CONF2_NO_OVERRIDE (0 << 14)
  27. #define CONF2_FORCE_HOST (1 << 14)
  28. #define CONF2_FORCE_DEVICE (2 << 14)
  29. #define CONF2_FORCE_HOST_VBUS_LOW (3 << 14)
  30. #define CONF2_SESENDEN (1 << 13)
  31. #define CONF2_VBDTCTEN (1 << 12)
  32. #define CONF2_REFFREQ_24MHZ (2 << 8)
  33. #define CONF2_REFFREQ_26MHZ (7 << 8)
  34. #define CONF2_REFFREQ_13MHZ (6 << 8)
  35. #define CONF2_REFFREQ (0xf << 8)
  36. #define CONF2_PHYCLKGD (1 << 7)
  37. #define CONF2_VBUSSENSE (1 << 6)
  38. #define CONF2_PHY_PLLON (1 << 5)
  39. #define CONF2_RESET (1 << 4)
  40. #define CONF2_PHYPWRDN (1 << 3)
  41. #define CONF2_OTGPWRDN (1 << 2)
  42. #define CONF2_DATPOL (1 << 1)
  43. /* General register mappings of system control module */
  44. #define AM35X_SCM_GEN_BASE 0x48002270
  45. struct am35x_scm_general {
  46. u32 res1[0xC4]; /* 0x000 - 0x30C */
  47. u32 devconf2; /* 0x310 */
  48. u32 devconf3; /* 0x314 */
  49. u32 res2[0x2]; /* 0x318 - 0x31C */
  50. u32 cba_priority; /* 0x320 */
  51. u32 lvl_intr_clr; /* 0x324 */
  52. u32 ip_sw_reset; /* 0x328 */
  53. u32 ipss_clk_ctrl; /* 0x32C */
  54. };
  55. #define am35x_scm_general_regs ((struct am35x_scm_general *)AM35X_SCM_GEN_BASE)
  56. #define AM35XX_IPSS_USBOTGSS_BASE 0x5C040000
  57. #endif /*__ASSEMBLY__ */
  58. #endif /* __KERNEL_STRICT_NAMES */
  59. #endif /* _AM35X_DEF_H_ */