hi3798cv200.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2017 Linaro
  4. * Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
  5. */
  6. #ifndef __HI3798cv200_H__
  7. #define __HI3798cv200_H__
  8. #define REG_BASE_PERI_CTRL 0xF8A20000
  9. #define REG_BASE_CRG 0xF8A22000
  10. /* DEVICES */
  11. #define REG_BASE_MCI 0xF9830000
  12. #define REG_BASE_UART0 0xF8B00000
  13. /* PERI control registers (4KB) */
  14. /* USB2 PHY01 configuration register */
  15. #define PERI_CTRL_USB0 (REG_BASE_PERI_CTRL + 0x120)
  16. /* PERI CRG registers (4KB) */
  17. /* USB2 CTRL0 clock and soft reset */
  18. #define PERI_CRG46 (REG_BASE_CRG + 0xb8)
  19. #define USB2_BUS_CKEN (1<<0)
  20. #define USB2_OHCI48M_CKEN (1<<1)
  21. #define USB2_OHCI12M_CKEN (1<<2)
  22. #define USB2_OTG_UTMI_CKEN (1<<3)
  23. #define USB2_HST_PHY_CKEN (1<<4)
  24. #define USB2_UTMI0_CKEN (1<<5)
  25. #define USB2_BUS_SRST_REQ (1<<12)
  26. #define USB2_UTMI0_SRST_REQ (1<<13)
  27. #define USB2_HST_PHY_SYST_REQ (1<<16)
  28. #define USB2_OTG_PHY_SYST_REQ (1<<17)
  29. #define USB2_CLK48_SEL (1<<20)
  30. /* USB2 PHY clock and soft reset */
  31. #define PERI_CRG47 (REG_BASE_CRG + 0xbc)
  32. #define USB2_PHY01_REF_CKEN (1 << 0)
  33. #define USB2_PHY2_REF_CKEN (1 << 2)
  34. #define USB2_PHY01_SRST_REQ (1 << 4)
  35. #define USB2_PHY2_SRST_REQ (1 << 6)
  36. #define USB2_PHY01_SRST_TREQ0 (1 << 8)
  37. #define USB2_PHY01_SRST_TREQ1 (1 << 9)
  38. #define USB2_PHY2_SRST_TREQ (1 << 10)
  39. #define USB2_PHY01_REFCLK_SEL (1 << 12)
  40. #define USB2_PHY2_REFCLK_SEL (1 << 14)
  41. #endif