apm821xx.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) 2010, Applied Micro Circuits Corporation
  3. * Author: Tirumala R Marri <tmarri@apm.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _APM821XX_H_
  8. #define _APM821XX_H_
  9. #define CONFIG_SDRAM_PPC4xx_IBM_DDR2 /* IBM DDR(2) controller */
  10. /* Memory mapped registers */
  11. #define CONFIG_SYS_PERIPHERAL_BASE 0xEF600000
  12. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_PERIPHERAL_BASE + 0x0200)
  13. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_PERIPHERAL_BASE + 0x0300)
  14. #define GPIO0_BASE (CONFIG_SYS_PERIPHERAL_BASE + 0x0700)
  15. #define SDR0_SRST0_DMC 0x00200000
  16. #define SDR0_SRST1_AHB 0x00000040 /* PLB4XAHB bridge */
  17. /* AHB config. */
  18. #define AHB_TOP 0xA4
  19. #define AHB_BOT 0xA5
  20. /* clk divisors */
  21. #define PLLSYS0_FWD_DIV_A_MASK 0x000000f0 /* Fwd Div A */
  22. #define PLLSYS0_FWD_DIV_B_MASK 0x0000000f /* Fwd Div B */
  23. #define PLLSYS0_FB_DIV_MASK 0x0000ff00 /* Feedback divisor */
  24. #define PLLSYS0_OPB_DIV_MASK 0x0c000000 /* OPB Divisor */
  25. #define PLLSYS0_EPB_DIV_MASK 0x00000300 /* EPB divisor */
  26. #define PLLSYS0_EXTSL_MASK 0x00000080 /* PerClk feedback path */
  27. #define PLLSYS0_PLBEDV0_DIV_MASK 0xe0000000/* PLB Early Clk Div*/
  28. #define PLLSYS0_PERCLK_DIV_MASK 0x03000000 /* Peripheral Clk Divisor */
  29. #define PLLSYS0_SEL_MASK 0x18000000 /* 0 = PLL, 1 = PerClk */
  30. /*
  31. + * Clocking Controller
  32. + */
  33. #define CPR0_CLKUPD 0x0020
  34. #define CPR0_PLLC 0x0040
  35. #define CPR0_PLLC_SEL(pllc) (((pllc) & 0x01000000) >> 24)
  36. #define CPR0_PLLD 0x0060
  37. #define CPR0_PLLD_FDV(plld) (((plld) & 0xff000000) >> 24)
  38. #define CPR0_PLLD_FWDVA(plld) (((plld) & 0x000f0000) >> 16)
  39. #define CPR0_CPUD 0x0080
  40. #define CPR0_CPUD_CPUDV(cpud) (((cpud) & 0x07000000) >> 24)
  41. #define CPR0_PLB2D 0x00a0
  42. #define CPR0_PLB2D_PLB2DV(plb2d) (((plb2d) & 0x06000000) >> 25)
  43. #define CPR0_OPBD 0x00c0
  44. #define CPR0_OPBD_OPBDV(opbd) (((opbd) & 0x03000000) >> 24)
  45. #define CPR0_PERD 0x00e0
  46. #define CPR0_PERD_PERDV(perd) (((perd) & 0x03000000) >> 24)
  47. #define CPR0_DDR2D 0x0100
  48. #define CPR0_DDR2D_DDR2DV(ddr2d) (((ddr2d) & 0x06000000) >> 25)
  49. #define CLK_ICFG 0x0140
  50. #endif /* _APM821XX_H_ */