ppc405gp.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * (C) Copyright 2010
  3. * Stefan Roese, DENX Software Engineering, sr@denx.de.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _PPC405GP_H_
  8. #define _PPC405GP_H_
  9. #define CONFIG_SDRAM_PPC4xx_IBM_SDRAM /* IBM SDRAM controller */
  10. /* Memory mapped register */
  11. #define CONFIG_SYS_PERIPHERAL_BASE 0xef600000 /* Internal Peripherals */
  12. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_PERIPHERAL_BASE + 0x0300)
  13. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_PERIPHERAL_BASE + 0x0400)
  14. #define GPIO0_BASE (CONFIG_SYS_PERIPHERAL_BASE + 0x0700)
  15. /* DCR's */
  16. #define DCP0_CFGADDR 0x0014 /* Decompression controller addr reg */
  17. #define DCP0_CFGDATA 0x0015 /* Decompression controller data reg */
  18. #define OCM0_ISCNTL 0x0019 /* OCM I-side control reg */
  19. #define OCM0_DSARC 0x001a /* OCM D-side address compare */
  20. #define OCM0_DSCNTL 0x001b /* OCM D-side control */
  21. #define CPC0_PLLMR 0x00b0 /* PLL mode register */
  22. #define CPC0_CR0 0x00b1 /* chip control register 0 */
  23. #define CPC0_CR1 0x00b2 /* chip control register 1 */
  24. #define CPC0_PSR 0x00b4 /* chip pin strapping reg */
  25. #define CPC0_EIRR 0x00b6 /* ext interrupt routing reg */
  26. #define CPC0_SR 0x00b8 /* Power management status */
  27. #define CPC0_ER 0x00b9 /* Power management enable */
  28. #define CPC0_FR 0x00ba /* Power management force */
  29. #define CPC0_ECR 0x00aa /* edge conditioner register */
  30. /* values for kiar register - indirect addressing of these regs */
  31. #define KCONF 0x40 /* decompression core config register */
  32. #define PLLMR_FWD_DIV_MASK 0xE0000000 /* Forward Divisor */
  33. #define PLLMR_FWD_DIV_BYPASS 0xE0000000
  34. #define PLLMR_FWD_DIV_3 0xA0000000
  35. #define PLLMR_FWD_DIV_4 0x80000000
  36. #define PLLMR_FWD_DIV_6 0x40000000
  37. #define PLLMR_FB_DIV_MASK 0x1E000000 /* Feedback Divisor */
  38. #define PLLMR_FB_DIV_1 0x02000000
  39. #define PLLMR_FB_DIV_2 0x04000000
  40. #define PLLMR_FB_DIV_3 0x06000000
  41. #define PLLMR_FB_DIV_4 0x08000000
  42. #define PLLMR_TUNING_MASK 0x01F80000
  43. #define PLLMR_CPU_TO_PLB_MASK 0x00060000 /* CPU:PLB Frequency Divisor */
  44. #define PLLMR_CPU_PLB_DIV_1 0x00000000
  45. #define PLLMR_CPU_PLB_DIV_2 0x00020000
  46. #define PLLMR_CPU_PLB_DIV_3 0x00040000
  47. #define PLLMR_CPU_PLB_DIV_4 0x00060000
  48. #define PLLMR_OPB_TO_PLB_MASK 0x00018000 /* OPB:PLB Frequency Divisor */
  49. #define PLLMR_OPB_PLB_DIV_1 0x00000000
  50. #define PLLMR_OPB_PLB_DIV_2 0x00008000
  51. #define PLLMR_OPB_PLB_DIV_3 0x00010000
  52. #define PLLMR_OPB_PLB_DIV_4 0x00018000
  53. #define PLLMR_PCI_TO_PLB_MASK 0x00006000 /* PCI:PLB Frequency Divisor */
  54. #define PLLMR_PCI_PLB_DIV_1 0x00000000
  55. #define PLLMR_PCI_PLB_DIV_2 0x00002000
  56. #define PLLMR_PCI_PLB_DIV_3 0x00004000
  57. #define PLLMR_PCI_PLB_DIV_4 0x00006000
  58. #define PLLMR_EXB_TO_PLB_MASK 0x00001800 /* External Bus:PLB Divisor */
  59. #define PLLMR_EXB_PLB_DIV_2 0x00000000
  60. #define PLLMR_EXB_PLB_DIV_3 0x00000800
  61. #define PLLMR_EXB_PLB_DIV_4 0x00001000
  62. #define PLLMR_EXB_PLB_DIV_5 0x00001800
  63. /* definitions for PPC405GPr (new mode strapping) */
  64. #define PLLMR_FWDB_DIV_MASK 0x00000007 /* Forward Divisor B */
  65. #define PSR_PLL_FWD_MASK 0xC0000000
  66. #define PSR_PLL_FDBACK_MASK 0x30000000
  67. #define PSR_PLL_TUNING_MASK 0x0E000000
  68. #define PSR_PLB_CPU_MASK 0x01800000
  69. #define PSR_OPB_PLB_MASK 0x00600000
  70. #define PSR_PCI_PLB_MASK 0x00180000
  71. #define PSR_EB_PLB_MASK 0x00060000
  72. #define PSR_ROM_WIDTH_MASK 0x00018000
  73. #define PSR_ROM_LOC 0x00004000
  74. #define PSR_PCI_ASYNC_EN 0x00001000
  75. #define PSR_PERCLK_SYNC_MODE_EN 0x00000800 /* PPC405GPr only */
  76. #define PSR_PCI_ARBIT_EN 0x00000400
  77. #define PSR_NEW_MODE_EN 0x00000020 /* PPC405GPr only */
  78. #endif /* _PPC405GP_H_ */