clk_s900.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Actions Semi S900 Clock Definitions
  4. *
  5. * Copyright (C) 2015 Actions Semi Co., Ltd.
  6. * Copyright (C) 2018 Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
  7. *
  8. */
  9. #ifndef _OWL_CLK_S900_H_
  10. #define _OWL_CLK_S900_H_
  11. #include <clk-uclass.h>
  12. struct owl_clk_priv {
  13. phys_addr_t base;
  14. };
  15. /* BUSCLK register definitions */
  16. #define CMU_PDBGDIV_8 7
  17. #define CMU_PDBGDIV_SHIFT 26
  18. #define CMU_PDBGDIV_DIV (CMU_PDBGDIV_8 << CMU_PDBGDIV_SHIFT)
  19. #define CMU_PERDIV_8 7
  20. #define CMU_PERDIV_SHIFT 20
  21. #define CMU_PERDIV_DIV (CMU_PERDIV_8 << CMU_PERDIV_SHIFT)
  22. #define CMU_NOCDIV_2 1
  23. #define CMU_NOCDIV_SHIFT 19
  24. #define CMU_NOCDIV_DIV (CMU_NOCDIV_2 << CMU_NOCDIV_SHIFT)
  25. #define CMU_DMMCLK_SRC_APLL 2
  26. #define CMU_DMMCLK_SRC_SHIFT 10
  27. #define CMU_DMMCLK_SRC (CMU_DMMCLK_SRC_APLL << CMU_DMMCLK_SRC_SHIFT)
  28. #define CMU_APBCLK_DIV BIT(8)
  29. #define CMU_NOCCLK_SRC BIT(7)
  30. #define CMU_AHBCLK_DIV BIT(4)
  31. #define CMU_CORECLK_MASK 3
  32. #define CMU_CORECLK_CPLL BIT(1)
  33. #define CMU_CORECLK_HOSC BIT(0)
  34. /* COREPLL register definitions */
  35. #define CMU_COREPLL_EN BIT(9)
  36. #define CMU_COREPLL_HOSC_EN BIT(8)
  37. #define CMU_COREPLL_OUT (1104 / 24)
  38. /* DEVPLL register definitions */
  39. #define CMU_DEVPLL_CLK BIT(12)
  40. #define CMU_DEVPLL_EN BIT(8)
  41. #define CMU_DEVPLL_OUT (660 / 6)
  42. /* UARTCLK register definitions */
  43. #define CMU_UARTCLK_SRC_DEVPLL BIT(16)
  44. /* DEVCLKEN1 register definitions */
  45. #define CMU_DEVCLKEN1_UART5 BIT(21)
  46. #define PLL_STABILITY_WAIT_US 50
  47. #endif